where is glAreTexturesResident???

Started by mustan9, January 14, 2005, 23:08:49

Previous topic - Next topic

mustan9

Help!

I'm looking for the OpenGL API's

glAreTexturesResident and glPrioritizeTextures

I can't find them anywhere in LWJGL, except in "org_lwjgl_opengl_GL11.c" but these API's are commented out??

Why? What's going on?

Is there a work around for checking if a texture is resident on the GPU, and why is a basic GL 1.1 API missing?

princec

I'm not sure. But don't use either of these two functions, as they are completely useless.

Cas :)

samskivert

Not to dredge up ancient history, but why is glAreTexturesResident useless? If I want to find out whether or not I'm blowing through texture memory and swapping like a crazy fool, how else am I to do it without querying whether my textures are resident?

I can call glGetTexParameter(..., GL_TEXTURE_RESIDENT) on every single texture but glAreTexturesResident() would seem to be more efficient.

Are you saying most graphics cards/drivers don't implement it? (Or don't implement it properly?)

princec

Well, ask yourself, which mipmap is resident too then :)
Basically OpenGL works like this: all textures are loaded into RAM, somewhere. Either a texture is needed in a scene or it isn't, so there's no way of not having the texture. As OpenGL manages when the texture is uploaded and unloaded there's no point in querying whether they're resident at the server as there's nothing you can do about it anyway.

Cas :)

samskivert

I agree that the specification is unclear as to whether a texture is considered "resident" if any or all of its mimaps are resident, however it is still useful to have some indication.

If I want to switch to lower resolution textures or even just get debugging information from a wide variety of users that are using my game, it's extremely handy for me to periodically sample whether my textures are in memory. I know of no other way to determine whether OpenGL is constantly loading and unloading textures.

Anyhow, if there's no technical obstacle, it seems nicer to expose every GL function that can be exposed. Let users of the library decide whether or not they want to make use of a particular API rather than forcing their decision.

elias

I've added the two functions, but CVS is down so I can't commit yet.

- elias