I'm trying to find a way to rubber band in OpenGL and Visual Studio C++. The problem I'm coming across is some Win 7 computers (i.e. My boss') won't allow me to read or draw to the front buffer thus killing drawing straight to it.
glDrawBuffer( GL_FRONT );
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp( GL_XOR );
glPolygonMode(GL_FRONT, GL_LINE);
glRecti(X0, Y0, X1, Y1);
X1 = X;
Y1 = Y;
glRecti(X0, Y0, X1, Y1);
*//Doesn't draw lines*
or copying the front buffer to the back buffer (redrawing to it would take to long) calling a swapbuffers drawing and then swaping agian
glReadBuffer( GL_FRONT );
glDrawBuffer( GL_BACK );
glCopyPixels(0, 0, Width, Height, GL_COLOR);
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp( GL_XOR );
glPolygonMode(GL_BACK, GL_LINE);
SwapBuffers(hdc);
glRecti(X0, Y0, X1, Y1);
X1 = X;
Y1 = Y;
glRecti(X0, Y0, X1, Y1);
SwapBuffers(hdc);
*//Doesn't display original drawing*
any ideas?