Jump to content
  • Advertisement
Sign in to follow this  
skullfire

OpenGL 2D clip

This topic is 3494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, long time no post. I've been doing a game in 2D using ogl for some time. I am kinda new to opengl but i manage. I am kinda stuck though when trying to make some kind of clipping to the thngs i am drawing. I have an image of a television. When i turn it on on my game, i want it to render the game inside the television (so basically, i want a the scene to be rendered only on this rectangular region, and any part of the scene outside this television will not be drawn). I could fake this by separating the tv into layers, one at the front (frame) then back, and then draw the scene in between. Thing is, i dont want to do this. Is it possible to set like a clip or something similar in open gl? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
Thank you very much! I currently made the crappy layer subdivision solution, but this is in fact what i was looking for! I was going the wrong way with glClipPlane :(

Thanks again man!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!