Results 1 to 4 of 4

Thread: GLuint

  1. #1
    Member Contributor
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    86

    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?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    State College, PA
    Posts
    186

    Re: GLuint

    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).]

  3. #3
    Member Contributor
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    86

    Re: GLuint

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

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    111

    Re: GLuint

    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

Similar Threads

  1. GL_TEXTURE_RECTANGLE with GLuint data?
    By PrestoChung in forum OpenGL: Basic Coding
    Replies: 24
    Last Post: 01-28-2011, 05:34 AM
  2. invalid conversion from int* to GLuint*
    By Monsolith in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-03-2010, 08:03 PM
  3. Opaque types inplace of GLuint
    By kRogue in forum OpenGL: General
    Replies: 3
    Last Post: 07-19-2009, 01:57 PM
  4. glSetUniformLocation(const char* name, GLuint loc)
    By knackered in forum OpenGL: General
    Replies: 1
    Last Post: 03-23-2007, 11:11 AM
  5. Loading bitmap into Gluint [256 * 256] array
    By delta_z in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-28-2000, 06:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean