PDA

View Full Version : Saving OpenGL output as OBJ file



miztaken
05-26-2010, 11:30 AM
Hi there,
I am drawing various objects and multiple texture in opengl and after i complete drawing it i want to save it as standard single obj file. How can i do that?

can anyone point me to right direction ( resources)?

thank you
miztaken

Alfonse Reinheart
05-26-2010, 12:45 PM
.obj files do not store textures. The best you could do is use transform feedback to read your clip-space vertex positions and save them. But that won't tell you what textures or shaders you used.

miztaken
05-28-2010, 06:31 AM
hi there,
thanks for the reply.
i m trying to save my rendered scene as a JPG image now and i have successfully done that. Now all i need to do is create an obj file as well and associate that texture[JPG image] with it.
r u hinting the same thing.
" The best you could do is use transform feedback to read your clip-space vertex positions and save them. " can u elaborate on this point a little more.
thanks