Jump to content
  • Advertisement
Sign in to follow this  
underthesun

OpenGL a roatated glScissor

This topic is 3051 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

glScissors works on x,y,width,height value. That makes it a rectangular area that is always aligned with the screen.. It's not possible to have a diagonal (or even polygonal) scissor. So what is the best way to do this kind of rendering efficiently? There's stencils.. and there's also rendering to a frame buffer, then drawing a polygon (or whatever) with that frame buffer's texture.. and then there's vertex shaders. I'm developing for devices that use opengl ES (iphone and a lot of phones these days). What's the best solution for these kind of devices?

Share this post


Link to post
Share on other sites
Advertisement
There is no best solution, it really depends on what you are trying to do. If you have a lot of geometry to render to your rectangle, then an of screen buffer might be best. Stencil buffer may not be best as iphone opengles1.1 doesnt not support them.

I just finnished a clipping system that clips 2d sprites and 2d polygons to a concave area before it sends it to opengl. This is for our in house animation system, and manually clipping the elements seemed the best solution for us.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!