PDA

View Full Version : 2D Scrolling in OpenGL



nebrown1
05-03-2001, 11:14 AM
Can you implement a 2D scrolling effect using an orthographic view volume, or do you need to fake 2D with a perspective view volume?

dans
05-03-2001, 12:00 PM
You can do 2D scrolling effects in either of these projection modes. using perspective would allow you to set up paralax layers with less fuss than ortho.

One way to do so are move your poly along a 2d axis, or move the camera along a stationary poly. Another way is to modify texture coords on a stationary poly.

nebrown1
05-08-2001, 06:09 AM
Note: remember that in glOrtho/gluOrtho, OpenGL will always reconstruct the edges of polygons that get clipped...That may not be to your liking and you should use perspective instead...