Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: 2D Scrolling in OpenGL

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Posts
    17

    2D Scrolling in OpenGL

    Can you implement a 2D scrolling effect using an orthographic view volume, or do you need to fake 2D with a perspective view volume?
    Nathan E Brown

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Brisbane,QLD, Australia
    Posts
    107

    Re: 2D Scrolling in OpenGL

    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.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000
    Posts
    17

    Re: 2D Scrolling in OpenGL

    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...
    Nathan E Brown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •