View Full Version : how to use texture mapping
im a newbie in this programming...
need help on how to use the texture mapping.
i need to draw a map with a visualization.
10-22-2004, 05:57 AM
If you want to texture map, you first need to get the texels and(if you use 2d texture + height and if you use 3d texture + depth) you want to map on your object.
If you have that information, you first need to bind a texture(you can get the name of a texture with glGenTextures) with glBindTexture();, after that, you need to set some properties of that texture object.
In example minification and magnification filter, and axis wraping with glTexParameter*.
After that you need to combine the picture with the texture using glTexImage*D();.
After you have done that you need to enable texturing.
In the function where you are gonna render that texture you first need to select the texture you want to use with glBindTexture();
After that you can set the vertices of the texels with glTexCoord*();
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.