GLuint

Hi all,
Had a for loop with the second parameter i >= 0. In this case the i was of type GLuint. This line caused me quite the difficulty. On execution it paused and you could hear the disk spooling, and then id get an error message that i was out of virtual memory. If i change the type to int…no worries. As well if i kept the type as GLuint but changed the condition to i>0…also no problem. Anyone know the reasons behind these behaviours?

I believe that GLuint stands for GL unsigned integer, yes? As in, GLuint >=0 is always true… Sounds like you hit an infinite loop to me.

Chris

[This message has been edited by chennes (edited 03-12-2001).]

Yah, youre right. Dont know why i didnt see it myself. Long day i think…

Hi Link19,

I think it is very easy.
If you use a GLuint in your loop, and check your loopcondition with i >= 0, then you will have a loop forever, because a GLuint is UNSIGNED, that mean it can never be < 0.

Bye

A027298