Jump to content
  • Advertisement
Sign in to follow this  
mriz

non aligned zoom rectangle

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

Hi, I loaded textured .bmp image over which i draw zoom rectangle and the application zoomed-in and it all went fine. Then, Over zomed-in picture, when i tried to draw zoom rectangle again it was drawn such that drawing small zoom rectangle with mouse actually draws very big zoom rectangle. (picture zoom-in correctly but only problem lies with zoom rectsangle drawing)

Share this post


Link to post
Share on other sites
Advertisement
Are you perhaps scaling the scene? If you scale the entire scene, well, it scales everything. So if you are using some function to scale the image that also scales the entire scene, and you don't clear that scaling function before drawing the zoom rectangle, the zoom rectangle will also be scaled.

Share this post


Link to post
Share on other sites
Actually the image zooms-in by changing glOrtho2D(...) arguments. What actually happens: The zoom rectangle size increases as the image zooms-in [using glOrtho2D(...)]. Do I need to use depth buffer so as to draw zoom rectangle and load image on different screen layers? (This is what i think...)

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!