When I set stuff with glEnable, or specify func to the things I enable, and then switch frame buffer object, are my settings kept for each frame buffer object, or do I have to set them for each one? In practice, does this work?
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
for int i=0; i<N; i++{
glBindFramebuffer(GL_FRAMEBUFFER, fbos[i]);
rendering something to the fbos here
}
Or do I have to write
for int i=0; i<N; i++{
glBindFramebuffer(GL_FRAMEBUFFER, fbos[i]);
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
rendering something to the fbos here
}
EDIT: And what about glUseProgram? Is that kept?