Skip to main content
gamedev.net
🔒 Locked

colour buffer

Started by arbuckle911 Oct 27, 2005 at 7:34 AM 3 replies 550+ views
Original Post
arbuckle911
arbuckle911
I've looked on the internet for articles on the openGL colour buffer (in the frame buffer) but I haven't really been able to find what I need. I'm looking for colour buffer access because I want to be able to work with post-prosessing effects like motion blur and real-time glow. Could somebody tell me something along the lines of: Use so and so extension Get so and so varibale and each element in that array will be the color of a pixel from left ro right top down and you can edit them by..etc. I really have no idea where to start on ths topic. Thanks.
DadleFish
DadleFish
Check out chapter 10 in the OpenGL programming guide, which you can see here:

http://fly.cc.fer.hr/~unreal/theredbook/

Specifically you want to take a look into glCopyPixels.
Dubito, Cogito ergo sum.
Code-R
Code-R
or you can render to a texure, thn in a second pass apply it to a full screen quad and bind the appropriate shader effect.
benjamin bunny
benjamin bunny
Rendering to a texture, as Code-R suggested, is a lot faster than glCopyPixels on most implementations. If you do this, you should make sure you glCopyTexSubImage2D rather than glCopyTexImage2D, since it's faster.
arbuckle911
arbuckle911
Ok, thanks alot. I've always wanted to learn to render to texture anyway.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.