Advertisement

PBuffer class? Modify every pixel!

Started by February 14, 2003 08:15 AM
0 comments, last by studioblue 22 years ago
I need to write something that quickly (60hz) midifies every pixel in a window. The thought was to render to a pbuffer, modify the texture, then display it on a quad. I would also consider doing it in cg...if I knew how. I am writing this program in OpenGL and would need the solution to work on both Windows and Linux. Any ideas? Any good pbuffer classes or cg links???
http://cvs1.nvidia.com/DEMOS/OpenGL/src/shared/pbuffer.cpp
http://cvs1.nvidia.com/DEMOS/OpenGL/inc/shared/pbuffer.h

This is the one used in the NVIDIA SDK, works in Windows/Linux.

Use like so:


declare variable:
PBuffer myPbuffer(width, height, GLUT_SINGLE | GLUT_DEPTH | GLUT_STENCIL);

initialize:
myPbuffer.Initialize(false, true);

make the current rendering context:
myPbuffer.MakeCurrent();

draw your stuff
copy to a texture
make main window active rendering context
---I write code.DelphiGL (http://delphigl.cfxweb.net)

This topic is closed to new replies.

Advertisement