Archived

This topic is now archived and is closed to further replies.

Tarik

Troubles with textures

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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/

Share this post


Link to post
Share on other sites