Results 1 to 2 of 2

Thread: GLenum

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default GLenum

    hi,
    anyone know how to print the value of a GLenum var?
    Qt Code:
    1. cout << "enum " << getEnum(); //it prints a number..
    To copy to clipboard, switch view to plain text mode 
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: GLenum

    You'll have to write your own function to convert it from an integer to a string, e.g.

    Qt Code:
    1. switch( value )
    2. {
    3. case enum1:
    4. return "enum1";
    5. ...
    6. }
    To copy to clipboard, switch view to plain text mode 

    enums are compiled into integers.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.