PBuffer class? Modify every pixel!
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
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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement