Textures to Postscript

We have constructed a framework in OpenGL and can render primitives and textures. We have full postscript output capability for anything constructed from primitives but have run into trouble when trying to extract texture information.

To try to understand this better, I made a quad and mapped a texture to it and then captured the GL_FEEDBACK buffer. The feedback buffer was only 46 floats long and was simply the two triangles (polygons) that made up the quad. There was no texture information.

If I can get the pixel per pixel color information of the screen rendering of the texture I can write the postscript output. I just need the color in each pixel and the coords of the corners.

Am I missing something, is the texture data stored somewhere else.

Thanks in advance,

The only thing related to textures
that the GL feedback mechanism returns
are clipped texture coordinates. Check
out the spec for more details (its not
much reading at all).

At the very least, you could
just to a ReadPixels to get that color information.
Maybe the render to texture technique would
work in your situation.


Upon closer examination I can use a GL PassThrough to embed my own tokens in the stream. I can do this from my display method and embed the 2d Texture coords and the texture info, then on generating the Postscript extract those tokens and reconstruct the the textured polygons.

Does anyone know of a better/cleaner way to do this?