Jump to content
  • Advertisement
Sign in to follow this  
Seabolt

glFramebufferRenderbuffer kills glFramebufferTexture

This topic is 2094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

 

Share this post


Link to post
Share on other sites
Advertisement

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

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!