I’m working with the latest version of GLUT in Visual Studio C++ 2010. I’m trying to make a 2D game where every object in the game is represented by a rectangle. I want to set it up so the rectangle’s dimensions are based off of the height and width of the texture that it uses. I seem to have successfully gotten a texture loaded up and passed in with glTexImage2D and so on. But when actually drawing my polygons, I pull up a texture with glBindTexturefv and then try to call glGetTexLevelParameter twice with the pname parameters GL_TEXTURE_WIDTH/HEIGHT to put the values into a couple floats. But when I check the floats afterward, they’re zero.
When I was setting up the bitmap info header earlier on when loading the texture, the height and width values were definitely properly set. I assume this means I’m completely misunderstanding glGetTexLevelParameter. Is there some way to use it to get height and width, or do I need to do something else? Or can I do anything at all?