performance improvements
This commit is contained in:
parent
c250bfcf42
commit
11ad1f5c5b
|
@ -41,8 +41,8 @@ SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
|
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
|
||||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
||||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O1 -ggdb")
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -ffast-math")
|
||||||
SET(CMAKE_C_FLAGS_RELEASE "-O2")
|
SET(CMAKE_C_FLAGS_RELEASE "-O2 -ffast-math")
|
||||||
SET(CMAKE_CXX_FLAGS_RELFORPERFORMANCE "-Ofast")
|
SET(CMAKE_CXX_FLAGS_RELFORPERFORMANCE "-Ofast")
|
||||||
SET(CMAKE_C_FLAGS_RELFORPERFORMANCE "-Ofast")
|
SET(CMAKE_C_FLAGS_RELFORPERFORMANCE "-Ofast")
|
||||||
SET(CMAKE_CXX_FLAGS_RELFORSIZE "-Os")
|
SET(CMAKE_CXX_FLAGS_RELFORSIZE "-Os")
|
||||||
|
|
|
@ -68,10 +68,11 @@ void Graphics::init()
|
||||||
glBindFramebuffer = glBindFramebufferEXT;
|
glBindFramebuffer = glBindFramebufferEXT;
|
||||||
glFramebufferTexture2D = glFramebufferTexture2DEXT;
|
glFramebufferTexture2D = glFramebufferTexture2DEXT;
|
||||||
glCheckFramebufferStatus = glCheckFramebufferStatusEXT;
|
glCheckFramebufferStatus = glCheckFramebufferStatusEXT;
|
||||||
|
glGenerateMipmap = glGenerateMipmapEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_useFBO = m_useFBO && (GLEW_ARB_framebuffer_object || GLEW_EXT_framebuffer_object);
|
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
|
#endif
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|
|
@ -40,7 +40,7 @@ typedef int32_t int32;
|
||||||
typedef int16_t int16;
|
typedef int16_t int16;
|
||||||
typedef int8_t int8;
|
typedef int8_t int8;
|
||||||
|
|
||||||
typedef int64 ticks_t;
|
typedef long ticks_t;
|
||||||
|
|
||||||
typedef std::function<void()> SimpleCallback;
|
typedef std::function<void()> SimpleCallback;
|
||||||
typedef std::function<bool()> BooleanCallback;
|
typedef std::function<bool()> BooleanCallback;
|
||||||
|
|
Loading…
Reference in New Issue