LOADING 3D Images in Open GL

Started by
1 comment, last by Joehype 14 years, 1 month ago
Hi guys, Could anyone please show me how to upload an image (.pln, or 3d .bmp) into open gl. The pln extension is an archicad extension. Thanks.
Advertisement
You would use glTexImage3D. It takes a pointer to your array of texels as indicated here
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3D.xml

If you can use a glTexImage2D, then you can use glTexImage3D except that texcoords need to be 3d as well.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Thnx V-man


I'll try it out.

This topic is closed to new replies.

Advertisement