I upgraded my FBO code to use DSA (Direct Access State) features from OpenGL 4.5.
All is fine, but I still need to use glBindFramebuffer() before drawing. Is there something I missed ?
I was thinking about this call before drawing to my FBO.
glNamedFramebufferDrawBuffer(m_FBO, GL_COLOR_ATTACHMENT0);
Then use this one to revert back to default framebuffer.
glDrawBuffer(GL_BACK);
But it doesn't work. Should I still use glBindFramebuffer() ? And finally what is the use of glNamedFramebufferDrawBuffer() if so ?
I hardly found clear topics about this.