This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GLuint tex[2]; | |
GLuint fbo; | |
glGenTextures(2, tex); | |
glBindTexture(GL_TEXTURE_2D_ARRAY, tex[0]); | |
glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_DEPTH_COMPONENT32F, 1024, 1024, 10); | |
glBindTexture(GL_TEXTURE_2D_ARRAY, tex[1]); | |
glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_RGBA8, 1024, 1024, 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option 1: WHAT WE HAVE TODAY | |
glEnable(GL_DEPTH_TEST); | |
glDepthFunc(GL_LEQUAL); | |
// Blah | |
glDisable(GL_DEPTH_TEST); | |
Option 2: ONE ENTRY POINT, EXTRA PARAMETER |