Skip to main content
gamedev.net
🔒 Locked

Polygon Clipping

Started by biubidboy 4 replies 850+ views
Original Post
biubidboy
biubidboy
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.
swiftcoder
swiftcoder
Quote:
Original post by biubidboy
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?
Typically, 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?
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
biubidboy
biubidboy
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.
biubidboy
biubidboy
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?
V-man
V-man
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.