I know this is such a trivial question, yet I haven't found any information that seems to help, starting from glGet()
's documentation. I'm using my textures as sprites, so it's crucial that I keep track of their sizes in texels/pixels.
When I'm creating my textures with glTexImage2D()
I'm required to pass the size of the pixel data array to it. But does OpenGL store it anywhere, or do I have to keep track of them in my code? (This feels awkward, as client code would still be able to overwrite the texture with glTexImage2D()
/ glTexSubImage2D()
/ glCopyTexImage2D()
etc. calls while not changing the size accordingly, thereby resulting in visual distortions.)