danginsburg / opengles3-book

OpenGL ES 3.0 Programming Guide Sample Code
MIT License
1.94k stars 747 forks source link

Is it illegal to bind a texture to stencil buffer of fbo? #27

Open JieX opened 9 years ago

JieX commented 9 years ago

In chapter 12 section "Framebuffer and Renderbuffer Object", it says we can bind a texture image or a renderbuffer object to color attachment or depth attachment of fbo, but we only can attach renderbuffer object to stencil attachment of fbo, so is it illegal to bind a texture to stencil buffer of fbo? The parameter "attachment" of glFramebufferTexture2D() can be GL_STECNCIL_ATTACHMENT, and I have searched the ES 3.0 specification, the spec doesn't say we can't bind a texture to stencil buffer of fbo. So i get confused and looking for help here~