Troubles with textures

Started by
1 comment, last by Tarik 22 years, 4 months ago
I could not understand how load textures to video memory, and select them. I''ve read lots of FAQ, but it doesn''t change anything. At first, i''m read texture to buffer wich specified by this type: typedef struct nsRGB { BYTE Red, Green, Blue; }; and create texture primitive glGenTexture glTexImage2d and bind this texture, but when i create polygon with this texture, i see it with out texture mapping.
Advertisement
do you send u,v coords for your texture along vertex position data?
like:
...
glTexCoord2f(u,v);
glVertex3f(x,y,z);
....

With best regards,
Mirek Czerwiñski
http://kris.top.pl/~kherin/
With best regards, Mirek Czerwiñski
You also have to enable texture mapping when you initialise.

glEnable (GL_TEXTURE_2D);

This topic is closed to new replies.

Advertisement