kevin.watkins
11-30-2005, 10:43 PM
Hi,
I am wondering whether I should expect the glDrawPixels and glCopyPixels operations to generate fragments and send them through a fragment program I've loaded.
My reading of the man pages and fragment program spec suggests so, but actually testing the code suggests not. I can set up the fragment program, and run three calls glDrawPixels, glCopyPixels, and glRect one immediately after the other, and only the glRect call seems to generate fragments that go through the fragment program.
On the other hand, the man page at http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/copypixels.html says
The GL then converts the resulting indices or
RGBA colors to fragments by attaching the
current raster position z coordinate and
texture coordinates to each pixel, then
assigning window coordinates (x +i,y +j),
where (x ,y ) is the current raster position,
and the pixel was the ith pixel in the jth
row. These pixel fragments are then treated
just like the fragments generated by
rasterizing points, lines, or polygons.
Texture mapping, fog, and all the fragment
operations are applied before the fragments
are written to the frame buffer.
The extension document for GL_ARB_fragment_program also seemed to suggest that pixels from these calls would be fed through an enabled fragment program.
Any help with this, or general advice for feeding pixels I've already rendered back through a fragment program (maybe with texture hacks) would be appreciated. (I am working at a machine that generally has OpenGL v1.4 support.)
Kevin
I am wondering whether I should expect the glDrawPixels and glCopyPixels operations to generate fragments and send them through a fragment program I've loaded.
My reading of the man pages and fragment program spec suggests so, but actually testing the code suggests not. I can set up the fragment program, and run three calls glDrawPixels, glCopyPixels, and glRect one immediately after the other, and only the glRect call seems to generate fragments that go through the fragment program.
On the other hand, the man page at http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/copypixels.html says
The GL then converts the resulting indices or
RGBA colors to fragments by attaching the
current raster position z coordinate and
texture coordinates to each pixel, then
assigning window coordinates (x +i,y +j),
where (x ,y ) is the current raster position,
and the pixel was the ith pixel in the jth
row. These pixel fragments are then treated
just like the fragments generated by
rasterizing points, lines, or polygons.
Texture mapping, fog, and all the fragment
operations are applied before the fragments
are written to the frame buffer.
The extension document for GL_ARB_fragment_program also seemed to suggest that pixels from these calls would be fed through an enabled fragment program.
Any help with this, or general advice for feeding pixels I've already rendered back through a fragment program (maybe with texture hacks) would be appreciated. (I am working at a machine that generally has OpenGL v1.4 support.)
Kevin