Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Zooming in Ortho mode? Anyone, anyone?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 binary1230   Members   

122
Like
Likes
Like

Posted 20 August 2001 - 08:17 AM

OK, I am building an overhead 2D map editor. Basically it just uses an ortho setup, but I cant quite figure out how to zoom correctly. I have tried specifying new clipping planes with glOrtho(), but its always offset by a large amount [actually I think the cause is that I have the y-axis flipped] Another method I''d prefer to use is modifying the modelview matrix. Instead of messing with the projection matrix, I''m wondering if the same effect can be accomplished using glScalef() or something like it. I''d prefer it this way. I think I remember reading somewhere that there was an actual matrix you could multiply by to zoom [not an prebuilt openGL matrix, just a mathmatical matrix]. Any ideas? Thanks ~Dom C. Bueler?

#2 zedzeek   Members   

528
Like
Likes
Like

Posted 20 August 2001 - 09:19 AM

the first method is the prefered method
u could have some variable called zoom say and just change that value.
glOrtho( -10.0/zoom, 10.0/zoom etc

if u use glScale if u use lighting u will need to renormalize the normals

#3 MButchers   Members   

123
Like
Likes
Like

Posted 20 August 2001 - 09:26 PM

hi there,

you can use glScale but if your not scaling your normals you
need to enable GL_AUTO_NORMAL to get proper lighting results.

hope it helps

Mark




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.