OpenGL Optimization - Reduced Logical Buffer Load
This commit is contained in:
@@ -267,10 +267,9 @@ void KRCamera::renderFrame(float deltaTime, GLint renderBufferWidth, GLint rende
|
|||||||
#if GL_EXT_discard_framebuffer
|
#if GL_EXT_discard_framebuffer
|
||||||
GLenum attachments[2] = {GL_DEPTH_ATTACHMENT, GL_COLOR_ATTACHMENT0};
|
GLenum attachments[2] = {GL_DEPTH_ATTACHMENT, GL_COLOR_ATTACHMENT0};
|
||||||
GLDEBUG(glDiscardFramebufferEXT(GL_FRAMEBUFFER, 2, attachments));
|
GLDEBUG(glDiscardFramebufferEXT(GL_FRAMEBUFFER, 2, attachments));
|
||||||
GLDEBUG(glClear(GL_DEPTH_BUFFER_BIT));
|
|
||||||
#else
|
|
||||||
GLDEBUG(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
|
||||||
#endif
|
#endif
|
||||||
|
GLDEBUG(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
||||||
|
|
||||||
// Enable backface culling
|
// Enable backface culling
|
||||||
GLDEBUG(glCullFace(GL_BACK));
|
GLDEBUG(glCullFace(GL_BACK));
|
||||||
GLDEBUG(glEnable(GL_CULL_FACE));
|
GLDEBUG(glEnable(GL_CULL_FACE));
|
||||||
|
|||||||
Reference in New Issue
Block a user