Merge pull request #1130 from BeamNG/fix_opengl_performance

Remove a get* OpenGL function causing CPU-GPU sync point.
This commit is contained in:
Luis Anton Rebollo 2015-01-26 12:11:35 +01:00
commit d6beb3594a

View file

@ -217,6 +217,9 @@ GFXGLPreserveTexture TORQUE_CONCAT(preserve_, __LINE__) (binding, _GET_TEXTURE_B
GFXGLPreserveInteger TORQUE_CONCAT(preserve_, __LINE__) (GL_READ_FRAMEBUFFER, GL_READ_FRAMEBUFFER_BINDING, (GFXGLPreserveInteger::BindFn)glBindFramebuffer);\ GFXGLPreserveInteger TORQUE_CONCAT(preserve_, __LINE__) (GL_READ_FRAMEBUFFER, GL_READ_FRAMEBUFFER_BINDING, (GFXGLPreserveInteger::BindFn)glBindFramebuffer);\
GFXGLPreserveInteger TORQUE_CONCAT(preserve2_, __LINE__) (GL_DRAW_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER_BINDING, (GFXGLPreserveInteger::BindFn)glBindFramebuffer) GFXGLPreserveInteger TORQUE_CONCAT(preserve2_, __LINE__) (GL_DRAW_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER_BINDING, (GFXGLPreserveInteger::BindFn)glBindFramebuffer)
#if TORQUE_DEBUG
// Handy macro for checking the status of a framebuffer. Framebuffers can fail in // Handy macro for checking the status of a framebuffer. Framebuffers can fail in
// all sorts of interesting ways, these are just the most common. Further, no existing GL profiling // all sorts of interesting ways, these are just the most common. Further, no existing GL profiling
// tool catches framebuffer errors when the framebuffer is created, so we actually need this. // tool catches framebuffer errors when the framebuffer is created, so we actually need this.
@ -247,5 +250,8 @@ default:\
AssertFatal(false, "Something really bad happened with an FBO");\ AssertFatal(false, "Something really bad happened with an FBO");\
}\ }\
} }
#else
#define CHECK_FRAMEBUFFER_STATUS()
#endif //TORQUE_DEBUG
#endif #endif