Polygon Clipping
Hello everyone.
I am currently using orthographically projected quads for a 2d game I am making, but I find that whenever the bottom left corner of the quad leaves the viewable area, the rest of the quad does not render at all. What clipping settings would I need to use to prevent this from happening?
Thankyou.
-Mike.
Quote:Original post by biubidboyTypically, OpenGL clips across partially visible polygons, rather than removing them entirely. Especially if it only happens with the lower-left corner, are you sure that you are not culling them yourself?
I am currently using orthographically projected quads for a 2d game I am making, but I find that whenever the bottom left corner of the quad leaves the viewable area, the rest of the quad does not render at all. What clipping settings would I need to use to prevent this from happening?
I'm not completely sure, because I am new to this stuff, but I can disbale culling and still observe the same results. So I don't think it is culling, at least not that any kind of culling I have enabled.
I use textured quads for sprites and render with glVertex2i.
I have checked out question 10.040 at http://www.opengl.org/resources/faq/technical/clipping.htm. I don't quite understand what this is saying, but could it be related?
I have checked out question 10.040 at http://www.opengl.org/resources/faq/technical/clipping.htm. I don't quite understand what this is saying, but could it be related?
No, because you are saying your entire polygon doesn't render.
It is highly likely that your code has a problem. If you want, upload it somewhere and someone will have a look.
It is highly likely that your code has a problem. If you want, upload it somewhere and someone will have a look.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement