[gl2ps] additional 3D export formats?

Christophe Geuzaine cgeuzaine at ulg.ac.be
Wed Jul 25 17:04:11 CEST 2007


Andreas Micheler wrote:
> 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.

Are the texture coordinates passed through the OpenGL feedback buffer?

When I looked at this a few years ago I thought they were not... But if
they are, I would encourage you to change GL2PS to keep track of them:
it's a much requested feature.

Let us know what you find out...

Cheers,

Christophe


> 
> Andreas
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine