I would like some entry level information about the OpenGI library which converts a 3D mesh to a 2D texture map.
http://opengi.sourceforge.net/doc/index.html
At this point i have implemented an example on a specific mesh and it seems to work perfectly. I would like to process this image further and i need to export it as a bmp file.
I have imported a mesh and created:
- texture with the parameterized geometry
- texture with the normals
At this point i am confused how to handle them. They are stored as OpenGL textures.
Here's the source code:
glBindTexture(GL_TEXTURE_2D, uiTex[0]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, res, res, 0, GL_RGBA, GL_FLOAT, NULL);
giGenImages(3, gim);
giBindImage(gim[0]);
giImageGLTextureData(res, res, 4, GL_FLOAT, uiTex[0]);
giAttribImage(0, gim[0]);
giAttribSamplerParameteri(0, GI_SAMPLING_MODE, GI_SAMPLE_DEFAULT);
giSample();
How can I export the texture?