Re: OpenGL and SwapBuffers behavior



Just draw to your pbuffer as normal. Then copy this to a texture
you've created:

glBindTexture(GL_TEXTURE_2D, texture);
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, width(), height());

Then when you want to draw this texture, first enable it:

glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture);

set up your coordinate system etc. then draw it using something like the following:

glColor4f(1.0, 1.0, 1.0, 0.0);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex2i(m_World.left(), m_World.bottom());
glTexCoord2f(1.0, 0.0); glVertex2i(m_World.right(), m_World.bottom());
glTexCoord2f(1.0, 1.0); glVertex2i(m_World.right(), m_World.top());
glTexCoord2f(0.0, 1.0); glVertex2i(m_World.left(), m_World.top());
glEnd();

also look at GL_TEXTURE_RECTANGLE_ARB if you normally draw to a viewport
that is not square and a power of 2.


Well, I hammered away at it without success, because I am not giving
glCopyTexImage2D power of 2 limits when I feed it the zoom extents
I pick with my rubber band rectangle. And, I investigated
GL_TEXTURE_RECTANGLE_ARB and found my current drivers for
my NVIDIA graphics board don't support it.

So, I have downloaded the current drivers from NVIDIA which do support
non power of 2 rectangles, and am working up the courage to install
them!

Thanks,

B.C.

.



Relevant Pages

  • Re: drawing an image from a texture to screen
    ... the power of two support is very slow. ... >> texture and that loads and displays just fine. ...
    (comp.graphics.api.opengl)
  • Re: Switching in Power Factor Correction Capacitors
    ... I've just purchased a Syncrowave 250, with the power factor capacitors ... machine draws about 66 amps full-time, whether or not you're welding. ... what reduces the no load draw from 66 down to 4.7 amps. ...
    (sci.engr.joining.welding)
  • Re: Infinite Crisis #4 thoughts and questions...
    ... needed the calculation power of a 853rd century supercomputer to figure out ... draw blood so easily. ... Bart's powers aren't drawn from the Speed Force. ... Where has she been seen since Crisis? ...
    (rec.arts.comics.dc.universe)
  • Re: Switching in Power Factor Correction Capacitors
    ... I've just purchased a Syncrowave 250, with the power factor capacitors ... machine draws about 66 amps full-time, whether or not you're welding. ... what reduces the no load draw from 66 down to 4.7 amps. ...
    (sci.engr.joining.welding)
  • Re: 50 Amp MH connected to 30-Amp Service
    ... appliances get power. ... You will use a 30 amp male to 50 amp ... But, yes, you can draw up ...
    (rec.outdoors.rv-travel)

Loading