I am writing a simple texture cache for a
gl application I am working on.
I was wondering if there are these simple calls in gl/glu/glut which I can use to get
- amount of texture memory currently used
- amount of texture memory left available
- amount of memory allocated for framebuffers (depth, stencil, alpha, colors)
Thanks a lot
I’m not sure, but since OpenGL is hardware independent, I don’t think that there is such functions. Only DirectX deals with such things. In OpenGL you can add textures as you want, but it’s obvious that this will affect performance.
Well, I think you can retrieve the amount of memory texture with a call to glGet(GL_SOME_PARAMETER), but I’m not sure.
If you (or anybody) knows anything about this, please post a reply.
You can not directly access these. You can create several proxy texture objects and see if the current is placed on the card. This could be useful to determine how much space you have… after that you have to calculate the space manually by using the inner texture format used by your textures.