PDA

View Full Version : OpenGl Rendering



code_glitch
04-05-2011, 04:28 PM
I've hunted about but all I find is depreciated code and I know there is a blindingly obvious solution to this, but I haven't found it yet...

As you know, I'm doing some proof of concept code on 'super optimized redrawing' and I need a way to render the data from one opengl texture to a specific position on another texture without rendering it to the screen 8)

I've heard of frame buffers but apparently there is mention of it being depreciated and much of it dates back to 2004 so I was wondering if anyone had a snippet or two to share?

PS: My GCSE revision is on hold, had a BIO mock today (I didn't know ;) ) just over 90% no revision so I'm having the day off now :D

PPS: This year looks so good: A* on OCR GCSEs is 70-75 YAAAA! (just a note for other candids)

JSoftware
04-05-2011, 04:48 PM
What you are looking for is FBO(frame buffer objects). I can't imagine they are deprecated. They are very simple to use, and incredibly powerful

The old method was either copying from backbuffer or pixel buffer objects

code_glitch
04-05-2011, 05:24 PM
any code snippets on FBO? Ive seen bits of backbuffer stuff but it doesn't exactly look like opengl was designed to do that somehow ::)

Andru
04-05-2011, 06:31 PM
http://www.songho.ca/opengl/gl_fbo.html

code_glitch
07-05-2011, 10:23 PM
Late post, just got some time from the evil examinators of doom, but does anyone know where to find any demo code for this? It would be very helpful rather than attempting to cook something up - which I am notoriously bad at from docs ;)

Edit: Oh wait, firefox just rendered the rest of that link (thanks andru) so no need after all... Reading. Please wait.