View Full Version : set priority

03-12-2006, 08:45 AM
I'm looking for changing priority of my texture; see that it's '76' (what does '76' mean?). I'd like set it to 1.0, but code below doesn't works

GLclampf prior[1];
glPrioritizeTextures(1, tex, prior);
glBindTexture(GL_TEXTURE_2D, tex[0]);
bool a = glAreTexturesResident(1, tex, resid);
printf("resid: %i\n", resid[0]); //print '76'

03-12-2006, 08:54 AM
Learn how to use printf.

03-12-2006, 10:33 AM
Originally posted by jide:
Learn how to use printf. Using
This print 'L'. Is it right? L=76

std::cout << "resid" << resid[0] << endl;Are you refers to %i instead of %d? See here:
web page (http://www.cplusplus.com/ref/cstdio/printf.html)

03-12-2006, 11:23 AM
%i is for integers, the returning values of AreTexturesResident are booleans. And as everyone knows, in C, an expression is false if it is equal to zero.

Also, texture priorities might not be set until the texture has been fully created. So only binding a texture might not be suffisant enough for the priority to be set.

AreTexturesResident won't change the priority of the texture, it will only says if the texture effectively resides in the graphic memory. The return of your request tells it effectively is.

03-12-2006, 02:51 PM
I don't undestand. Why my cout print 'L'? Should it be 0 or 1? Thanks..