glFramebufferRenderbuffer kills glFramebufferTexture

Started by
1 comment, last by Seabolt 10 years, 5 months ago

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?

Perception is when one imagination clashes with another
Advertisement

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

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.

Perception is when one imagination clashes with another

This topic is closed to new replies.

Advertisement