Is there a reliable way to do this? It doesn’t have to be massively speedy; I’d just like something clean. Right now there only seem to be two options:
-
WGL_ARB_pbuffer : not supported by all (much?) hardware, and (I assume) only ever available on Windows.
-
Render to back buffer, then move to texture memory using glTexCopySubImage2D, recently optimized thanks to Matt. The problem here is windowed apps, where a) the back buffer may not be big enough for the texture, and b) the GL context might not own the contents of parts of the backbuffer (because the window is partially or wholly obscured by another one).
Does anyone know of a solution that doesn’t involve a horrible rat’s nest of dodgy assumptions and special-case logic?