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 6 of 6

Thread: GL commands with no RC

  1. #1
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    GL commands with no RC

    I thought that GL commands were suppose to not function as expected (read, do nothing) when no RC was created or made current.

    Im using glGetString and I think the other is gluGetString and both are for getting version numbers and they work.

    glu I can understand, but why is the case for gl working?

    PS: from time to time things screwed up (by itself, not my app!) and SetPixelFormat was causing my app to abort and return -1 to the OS. I think this was the problem but I cant be sure.

    V-man
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    The Round Table at Camelot
    Posts
    1,537

    Re: GL commands with no RC

    Well those functions dont draw anything so they can work just fine without a valid Rendering Context. Now glVertex and stuff would not work of course with out a RC.

    -SirKnight
    -SirKnight

  3. #3
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: GL commands with no RC

    I don't think you should be able to call even glGetString() without a valid RC, at least there's no garantuee it will work afaik.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    748

    Re: GL commands with no RC

    It can get confusing at times. I've recently discovered a minor issue with RC's and WGL_ARB_pixel_format :

    With NVIDIA's drivers using WGL_ARB_pixel_format without a valid RC does not produce an error ( as I think it should ). On ATI drivers, a valid RC is required. NVIDIA's multisample application does not seem to have a valid RC when the pixelformat is selected ( it creates a context only to bind the functions ).

  5. #5
    Intern Contributor
    Join Date
    Feb 2002
    Posts
    58

    Re: GL commands with no RC

    Originally posted by V-man:
    PS: from time to time things screwed up (by itself, not my app!) and SetPixelFormat was causing my app to abort and return -1 to the OS. I think this was the problem but I cant be sure.
    I have had the same problem with my app. It may only happen when I use the multisample extension to enable FSAA. The call to SetPixelFormat just exits the app with an exit code of -1; no errors listed; no crash; no nothing. I have to reboot in order to run any OpenGL apps after that.

    So you are saying that this is caused by calls to functions with no RC active? I'll have to look into that; when I use the pixel format extension to get a multisample pixel format, there is presumably no current RC.

    Has anyone else run into this problem?


    [This message has been edited by tcobbs (edited 05-10-2002).]

  6. #6
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: GL commands with no RC

    >>>It can get confusing at times. I've recently discovered a minor issue with RC's and WGL_ARB_pixel_format :<<<

    It can definitly get confusing at times.

    It would seem as if the reason why SetPixelFormat failed is not related. It happened today, and again quake 3 locks up.

    Sometimes, it says there is an invalid op in kernel.dll Sometimes, I get GDI generic.

    I really cant say what the cause is, but I am on win98, and that OS is crap. I will update the drivers to the latest and see (im on 23.11 now). Not using FSAA in any way

    V-man
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

Posting Permissions

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