FBO depth test failing

Started by
2 comments, last by BloodLust666 13 years, 12 months ago
When rendering to an FBO color buffer, it seems as though my depth test is failing... Polygons that are behind others are being rendering as if they're in front of them which gives weird looking objects. Do I have to respecificy to glEnable(depthtest) and whatnot? I'm already clearing the buffer before rendering to them, color to 0,0,0,0, depth to 1, and stencil to 0. oh and also it renders upside down, is there a way to fix that?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Advertisement
Also, when I render that texture onto a quad, the image is completely distorted... Almost like a fish eye, it seems as though the middle is pinched down vertically and the sides are spread out
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Do you have a depth buffer attached to the FBO right? Either a depth texture or a depth renderbuffer is fine.
No... I didn't think I needed it. I thought that was just for storing it and it would write to the color buffer just fine.
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML

This topic is closed to new replies.

Advertisement