No. And that goes for all the different 3D APIs I have looked at in since 1973.
The way to do what you want to do is to have two versions of your
code. One that uses OpenGL and one that does not. If the system does
have OpenGL then use it, if not, don’t.
Also, you can not make assumptions about the contents of the back
buffer. There is not reason to believe that it is the same memory that
was displayed on the screen before the swap. A lot of systems use
triple buffering to reduce latency. One frame is visible, the second
frame is waiting for vsync so it can be displayed without tearing and
the third one is the one you are rendering into. Or, just for grins
and giggles the driver might give you a completely unrelated chunk of
memory. Just 'cause it works for you on your machine does not mean it
will work the same way on another machine, or on another version of
the driver.
When using multiple buffers you are not allowed to make assumptions
about the contents of a buffer that has just been given to you. The
only times you can make assumptions are well documented in the OpenGL
standard books. If you do not own copies of the current versions of
the Red, Blue books you need to get them and at least read a good
chunk of the Blue book.
Bob PendletonOn Fri, Jun 18, 2010 at 1:15 AM, JeZ-l-Lee wrote:
Draw Only Part OpenGL Screen Buffer?
Hi,
Is it possible when using SDL1.2+OpenGL
to flip/swap only part of the screen buffer to the screen?
I only see: SDL_GL_SwapBuffers();
but it flips/swaps the entire screen buffer to the entire screen.
I wish to only draw a smaller part of the screen buffer to the screen.
Trying to make a dirty rectangle system of drawing to the screen
so that the game runs full speed
when OpenGL hardware acceleration is not available.
Thanks!
JeZ+Lee
JessePalser Gmail com
16BitSoft®
Video Game Design Studio
www.16BitSoft.com
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
±----------------------------------------------------------