Skip to main content
gamedev.net
🔒 Locked

Problem with FRAMEBUFFER ... need help!

Started by Nemezios 1 reply 600+ views
Original Post
Nemezios
Nemezios
A little problem with framebuffer (GL_EXT_framebuffer_object) in ma ogl program. Attachments: color(texture) and depth (renderbuffer) works ok but the stencil attachment does not work at all. I need it, because I use stencil shadows in this project and i want to add some postproccesing - that's why I use framebuffer. Here is the code for attaching stencil renderbuffer to the framebuffer : glGenRenderbuffersEXT(1,&rb_stencil); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,rb_stencil); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,GL_STENCIL_INDEX,WIDTH,HEIGHT); glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,GL_STENCIL_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,rb_stencil); This code seems to be ok.. but I have no idea, what might be wrong. The standard stencil buffer works ok but not this one. Does anyone know why? Please help me if You can.
GhostAce
GhostAce
Maybe you forgot to call
glDrawBuffer(GL_NONE);
glReadBuffer(GL_NONE);
You have to do this when you do not have any color attachments.


pozdro
Nemezios
Nemezios
There IS color_attachment and depth_attachment! Only stencil doesn't work.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.