<<< Texture mapping | Index | Texture coordinates >>> |
In C++ client:
Load image (e.g. BMP, PNG, JPG, TGA, and so on) from a file into CPU memory, (or generate image programmatically)
Enable texture mapping
Upload texture image to OpenGL
Assign texture coordinates (UV) to vertices
Specify additional texture preferences (image wrapping, etc.)
In fragment shader:
Use texture sampler to access texture object and obtain texel color
<<< Texture mapping | Index | Texture coordinates >>> |