performance improvements

This commit is contained in:
Eduardo Bart 2012-04-04 09:56:22 -03:00
parent c250bfcf42
commit 11ad1f5c5b
3 changed files with 5 additions and 4 deletions

View File

@ -41,8 +41,8 @@ SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
SET(CMAKE_C_FLAGS_RELEASE "-O2")
SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -ffast-math")
SET(CMAKE_C_FLAGS_RELEASE "-O2 -ffast-math")
SET(CMAKE_CXX_FLAGS_RELFORPERFORMANCE "-Ofast")
SET(CMAKE_C_FLAGS_RELFORPERFORMANCE "-Ofast")
SET(CMAKE_CXX_FLAGS_RELFORSIZE "-Os")

View File

@ -68,10 +68,11 @@ void Graphics::init()
glBindFramebuffer = glBindFramebufferEXT;
glFramebufferTexture2D = glFramebufferTexture2DEXT;
glCheckFramebufferStatus = glCheckFramebufferStatusEXT;
glGenerateMipmap = glGenerateMipmapEXT;
}
m_useFBO = m_useFBO && (GLEW_ARB_framebuffer_object || GLEW_EXT_framebuffer_object);
m_generateHardwareMipmaps = m_generateHardwareMipmaps && GLEW_ARB_framebuffer_object; // glGenerateMipmap is supported when GLEW_ARB_framebuffer_object is
m_generateHardwareMipmaps = m_generateHardwareMipmaps; // glGenerateMipmap is supported when framebuffers are
#endif
glEnable(GL_BLEND);

View File

@ -40,7 +40,7 @@ typedef int32_t int32;
typedef int16_t int16;
typedef int8_t int8;
typedef int64 ticks_t;
typedef long ticks_t;
typedef std::function<void()> SimpleCallback;
typedef std::function<bool()> BooleanCallback;