Hi,
On Tue, 23 May 2000, Brett Porter wrote:
> > Unless someone else knows something about why glCopyBuffer() doesn't work
> > the
> > way I want it to work, FreeSCI 0.3.0 will probably ship with a broken glx
> > target. glx will be fixed for the new display subsystem design, though.
>
> Which way do you want it to work? I seem to remember a couple of anomalies
> with it, maybe I can help...
OK, here's the relevant code;
glDrawBuffer(GL_BACK);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 320);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, MAX(x,0));
glPixelStorei(GL_UNPACK_SKIP_ROWS, MAX(y,0));
glRasterPos2f(x / 320.0, y / 200.0);
glDrawPixels(xl, yl, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, source);
/* This draws the 'source' bitmap to the back buffer. Translation
** parameters were specified earlier and appear to work just fine.
*/
/* some more code follows, but it's essentially the same principle */
glFlush();
glReadBuffer(GL_BACK);
glDrawBuffer(GL_FRONT);
glCopyPixels(x, y, xl, yl, GL_COLOR);
glFlush();
/* This is /supposed/ to copy parts of the back buffer to the
** front buffer, but it doesn't do anything (visible).
*/
Note that glXSwapBuffers() works fine in this case (well, almost fine;
only parts of the back buffer are written to, and that function is known
to destroy the back buffer on some OpenGL implementations).
I tested this with Mesa and SGI OpenGL; neither version worked.
> if not, drop a line to the OpenGL mailing list [EMAIL PROTECTED]
> (if you need to be a member, send it via me )
> You guys are doing great work - I wish I had time to do more than follow
> your progress :(
Well, now is your chance to do just that ;-)
Thanks in advance,
llap,
Christoph