2d display

hi,

i would like to display 2d graphics (like letters),

what 's the optimized way to do it ?

  1. Use display list to store each 2d pattern, (ie each letter is stored in a separate way from the others).

  2. Store a big bitmap with all the patterns in a texture, and use TexCoord (so i have to compute to know the position of the pattern inside the bitmap).

  3. maybe a third way ??

what 's the use of glOrtho (concrete examples, please) ?

Use method 2.
Don’t bother with glortho for this job, just do this:-
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

Now your coordinates should be x and y, in the range of -1.0f and +1.0f to position vertices on the screen.

I prefer using glOrtho for for pixel precise (or almost) positioning of raster objects.

glOrtho(0.0, (GLdouble)windowwidth, 0.0, (GLdouble)windowHeight, znear, zfar);

The most likely quickest way on all cards is to use textured quads. Put them in display lists if you want.

What`s glOrtho for? Get the Red Book or find the online version.

V-man