So I'm studying the CLM.h and I don't understand how textures load.

Started by
4 comments, last by rubsnick 12 years, 11 months ago
I"m using the sample code provided styuging off of it but I don't understand how the textures get on there..... I'm not fully understanding how it works.

http://www.3dcodingtutorial.com/Textures/Loading-Textures.html

I see the code and I see GLM Textures but I don't know where it is.... I mean I don't know where it's being called or nothing but I do know if I remove the Texture.cpp that it won't run... Could someone quickly explain to me how texture.cpp is working? Where the functions are being called and how it's getting into the mesh?
Advertisement
LoadTGA most likely loads your image.

LoadTGA most likely loads your image.


Well it loads the texture... I just don't understand where the function call occurs during the main. I don't see it so I'm having a hard time understanding it ya know?
It is the very first line in LoadTreeTextures.

if (LoadTGA(&treeTexture, "fete_cub.tga"))
{ ...
The main() function calls the init() function which calls LoadTreeTextures() function that uses the LoadTGA() function to load textures. :D

The main() function calls the init() function which calls LoadTreeTextures() function that uses the LoadTGA() function to load textures. :D


Thank you that explains alot! XD I cannot believe I was that blind.

This topic is closed to new replies.

Advertisement