PDA

View Full Version : question about glPrioritizeTextures



lobbel
03-28-2010, 08:18 AM
hello I have a question about texture priorities.
I want to know what is the defautl value for a texture
priority. If I bind a texture without setting the priority
with glPrioritizeTextures(..) and then retrieve the priority
with glGetTexParameteriv(...) the priority is something
greate than 2 million. So, is there no default value for
a texture's priority ?

regards,
lobbel

ZbuffeR
03-28-2010, 08:30 AM
glPrioritizeTextures writes float priorities between 0 and 1, as described in the documentation :
http://www.opengl.org/sdk/docs/man/xhtml/glPrioritizeTextures.xml

So you'd better get float priorities too with glGetTexParameterfv :
http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameter.xml
The default is 1 as described in the documentation, that would mean 2+ billion when mapped to signed integer range.
Try with :
glGetTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_PRIOR ITY,&myGlFLoatVar);

Anyway, I heard that the whole gl texture priority system is often ignored by the hardware in practice, so it may or may not be useful. Never tested myself.

lobbel
03-28-2010, 09:12 AM
thanks for the fast answer.

regards,
lobbl