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 2 of 2

Thread: help with basic concept of opengl data storage and use

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2003
    Posts
    1

    help with basic concept of opengl data storage and use

    I would like to read in from the harddisk, lots of 2D vectors (map data) and then zoom and pan through the map.
    All of the examples seem to recreate or reload the data in the glutDisplayFunc().
    Is it possible to load all the vetors into ram on the videoboard once, and then pan and zoom using changes to the projection matrix alone? Am I missing something obvious?

  2. #2
    Guest

    Re: help with basic concept of opengl data storage and use

    With basic data as is found on many simple glut tutorial, it does not really slows down to re-specify everything for each frame.

    With large static data, the best is to use display lists. It is easy and fast.

    Read the docs for :
    glGenList glNewList glEndList glCallList

    Basically, when you define a bunch of gl commands enclosed between glNewList and glEndList, it is stored on the card. Then you can change the projection matrix and simply use glCallList to render what was defined.

    If you really have a LOT of data (I know real map data can be huge), you can segment in several display lists, and do basic culling by hand. Well, it will still be slow when you see the whole map.

Posting Permissions

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