Playing with Direct State Access functions right now. Just discovered smg unexpected creating a framebuffer: it seems like DSA functions generate GL_INVALID_OPERATION when I attempt to apply them to a newly generated FBO which was never bound. So here is the code that generates GL_INVALID_OPERATION error:
GLuint FBO = 0; glGenFramebuffers(1,&FBO); //glBindFramebuffer(GL_FRAMEBUFFER,FBO); glNamedFramebufferTexture(FBO, GL_COLOR_ATTACHMENT0, TextureName, MipmapLevel);
And once I uncomment the FBO’ binding line, error disappears - everything works fine.
In other words, generating name is not sufficient to create an object - it must be bound to context at least once before it could be used. Strange, I don’t remember this to be stated anywhere… Am I wrong, am I missing smg from documentation or did I just found a bug in nVidia drivers?..