PDA

View Full Version : Texture coordinates



sig
11-30-2000, 06:41 AM
I'm coded a program, which simply imports and visualizes a data, containing in .ASE file.

ASE file format is simple text, generated by 3D Studio Max.

While using Vertex coordinates, faces and e.t.c. - there is no problems.

But: texture mapping coordinates in this file is given in three float values (in bounds between 0.00 to 1.00) instead of two, for mapping a 2-d textures.

Is it correct to use these coordinates to produce texture coordinates in OpenGL?

I'm not quite understand the "r" and "q" coordinates in texture mapping in OpenGL function glTexCoord4f(s,t,r,q).
How "r" and "q" affect the visualization of 2-D texture?

Also, i can't find anywhere the explanation and/or examples how to use 3 or 4 mapping coordinates.

Michael Steinberg
11-30-2000, 07:36 AM
I assume that the 3rd component in the ASE files stand for the 3D textures coordinates. So, simply use glTexCoord2f() and put in only the first two.