[gl2ps] additional 3D export formats?

Andreas Micheler Andreas.Micheler at Physik.Uni-Augsburg.de
Wed Jul 25 16:21:43 CEST 2007


Hallo Christophe!
> Hi Andreas - Indeed, in GL2PS we get the geometrical information from 
> the feedback buffer, i.e., after projection. The x- and y-coordinates 
> are screen coordinates and the z coordinate is the depth in the z-buffer.
>
> You should be able to project the vertices back into model coordinates 
> by using the OpenGL projection matrices. (You can use gluUnProject() to 
> make the coding easy.)
>   
Thank you for the tips!
(That's a much better method than the one I found out in the meantime,
which was to always load the identity matrix and then use glOrtho.)

But now I have another problem:
I need the texture coordinates for each triangle vertex,
because this seems to be the best method of coloring a model in the .obj 
format.
This seems to be a more or less big problem,
since I have to change the gl2ps data structures.
I don't know how far I may go in changing the data structures,
until it gets improbable for the patch to be accepted.
Therefore I ask how I should proceed now.

Andreas