Jump to content

  • Log In with Google      Sign In   
  • Create Account

glFramebufferRenderbuffer kills glFramebufferTexture


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 25 October 2013 - 06:39 PM

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

Sponsor:

#2 3TATUK2   Members   -  Reputation: 730

Like
0Likes
Like

Posted 25 October 2013 - 07:05 PM

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



#3 Seabolt   Members   -  Reputation: 633

Like
0Likes
Like

Posted 28 October 2013 - 10:07 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS