Sign in to follow this  
Followers 0
Seabolt

glFramebufferRenderbuffer kills glFramebufferTexture

2 posts in this topic

Hey guys,

I have a little test right now. Basically if I don't bind a depth render target, the color buffer get's written to. If I bind one, the color buffer does not.

Renderbuffer code:

		pglBindRenderbuffer( GL_RENDERBUFFER, m_PlatformData.m_TargetHandle );
          	GL_ERROR( "Failed to bind the renderbuffer" );
		pglFramebufferRenderbuffer( GL_FRAMEBUFFER,
			GL_DEPTH_STENCIL_ATTACHMENT,
			GL_RENDERBUFFER,
			m_PlatformData.m_TargetHandle );
		GL_ERROR( "Failed to attach the render buffer to the frame buffer" );

Texture code:
 

pglFramebufferTexture( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, m_Texture->m_Texture, 0 );
GL_ERROR( "Failed to set the render target as a texture" );

Does anyone have any ideas as to why this may be happening?

 

0

Share this post


Link to post
Share on other sites

You said you were specifically using a renderbuffer for "performance" - but obviously it's breaking things? Just use a depth component texture attachment.

0

Share this post


Link to post
Share on other sites

I figured it out, it was something stupid. I was clearing the depth buffer and then enabling depth testing/writing. Just an exhausted mistake, thanks for the help.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0