Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Sporadic behavoir with glGetString()

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2009
    Location
    UK
    Posts
    1

    Sporadic behavoir with glGetString()

    Greetings,

    Having a few problems with glGetString(), was wondering if anyone else has had this, as I don't know how to fix it....

    Basically I can call glGetString() and it either works, or it doesn't (lol), but its unknown why it doesn't work returning 1282 ( GL_INVALID_OPERATION ) mid operation ( and not between glBegin() - glEnd() ), GL is ready and being drawn too. Its to check for multi-texturing, I could brute force check every cycle until its found that its supported, but this is messy when running on a system with gl version <1.3 ( not to mention performance hinderence ), and it also means multi-texturing could be disabled and then suddenly start working mid-flow...

    PC isCore2 Quad Q6700 @ 2.66 with GeForce 7300 SE/7200 GS/PCI/SSE2.

    Any help would be appreciated,
    Many thanks...

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2006
    Location
    greece
    Posts
    183

    Re: Sporadic behavoir with glGetString()

    First thing, check to see whether you still get errors without the glGetString call. If you do, correct these first. Second, openGL simply ignores a command that causes an error so it's no wonder you still have a working program. Third, do not modify any string obtained via glGetString(Unless you copy it first and edit the copy, of course!)
    while(1){keyboardsolo(FORTE, BPM_190);}

  3. #3
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: Sporadic behavoir with glGetString()

    And at last, make sure that you have active context before any GL call including glGetString.

  4. #4
    Advanced Member Frequent Contributor _NK47's Avatar
    Join Date
    Mar 2008
    Posts
    574

    Re: Sporadic behavoir with glGetString()

    that is, wglGetCurrentContext() != NULL. who knows where it can get lost even if you do rendering already.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •