Hey people
I'm making a function to load an opengl texture, but instead of returning the texture ID as GLuint, I want it to return also other values such as width, height, etc. So I can access them as pointers. Something like this pseudo-code:
What are the steps I'll need to follow in order to return something like that? I know I can have a structure to hold values since I have one that holds the FPS and other global variables, but how would I go into returning a structure of its own, that's not global but that can be spawned as many textures as I want to load?Code:tex = LoadTexture("texture.jpg"); printf("Width: %i \n",tex->width); printf("Height: %i \n",tex->height); BindToSprite(tex->TextureID);
Thanks in advance!![]()



LinkBack URL
About LinkBacks




