2D OpenGL questions

Hey everyone,

I am trying to draw an image into the auxillary buffer so that I do not have to redraw it everytime it is displayed to the screen. The documentation in the RedBook says this should work. But, it doesn’t seem to be working.

Here is the portion of code i’m having troubles with:

void __fastcall TFormMain: rawObjects()
// the portion in this if is only done once
glTranslatef(320, 240, 0);
glTranslatef(-320, -240, 0);
DrawCsmMap(“vms2d.csm”, 0); // a draw
// function of my own
init = false;
glCopyPixels(0, 0, 640, 480, GL_COLOR);

I know i’m a rookie and this code my be funny to some of you. But if anybody could send me in the right direction, I would greatly appreciate it.


Are you sure you have an auxiliary buffer at all? Or are you writing to the wrong buffer? You are writing to the second auxiliary buffer, in case you made the mistake thinking GL_AUX1 is the first one, GL_AUX0 is.