Results 1 to 6 of 6

Thread: Question to glGetIntegerv() function

  1. #1

    Question to glGetIntegerv() function

    On systems with more then one graphic card installed, to which card are the values, returned by glGetIntegerv(), related to ? And how can I get these informations (like GL_MAX_CLIP_PLANES etc.) for every installed card separately ?
    There are only 10 types of people in the world: Those who understand binary, and those who don't

  2. #2
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,107

    Re: Question to glGetIntegerv() function

    All OpenGL operations are performed on the graphics card you have created context for.
    On Windows you use such functions as EnumDisplayDevices to list all available rendering devices. Than you must switch to the device you want, create a window and OpenGL context.

  3. #3

    Re: Question to glGetIntegerv() function

    Okay, here's what I tried: First I created a window placed on the display connected to the first adapter, created a context and gathered the informations I needed. Then I did the same with a window placed on a display connected to the second graphic card and did the same.
    But, in both cases I received the same results for to completely different cards!? But the strange thing is, a driver problem causes the fact that opengl support is only available for the primary adapter. So there shouldn't be any valid results returned on the second run.
    What am I doing wrong?

    This is my code:
    Code :
    ...
    hWnd = CreateOpenGLWindow("OpenGL Framework", 0, 0, 600, 600, color, buffer);
    if( hWnd == NULL )
    	return 0;
     
    //get device context and gl context
    hDC = GetDC(hWnd);
    hRC = wglCreateContext(hDC);
    wglMakeCurrent(hDC, hRC);
     
    ShowWindow(hWnd, SW_SHOW);
    UpdateWindow(hWnd);
     
    /* get the max number of modelview matrices */
    glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &sys.max_model_stack);
    ...
    There are only 10 types of people in the world: Those who understand binary, and those who don't

  4. #4

    Re: Question to glGetIntegerv() function

    I ran the same procedure once more, but now with two more familiar graphic cards where opengl support is available for both cards, and received individual values there.
    There are only 10 types of people in the world: Those who understand binary, and those who don't

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Question to glGetIntegerv() function

    for the previous test (with same values) it is likely you had software rendering OpenGL on both cards.

  6. #6

    Re: Question to glGetIntegerv() function

    That's a good point, but hardware acceleration was definitely available for the first card. On the second card there was no rendering at all. Just an empty window.
    That's why the whole thing seems so strange to me, because despite the fact the second card is not rendering, it is returning values when calling glGetIntegerv(...) which seem to belong to the pimary adapter instead.
    There are only 10 types of people in the world: Those who understand binary, and those who don't

Similar Threads

  1. Replies: 4
    Last Post: 02-07-2014, 02:08 AM
  2. Simple glGetintegerv() question.
    By mjordan in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 05-12-2005, 07:09 AM
  3. glGetIntegerv(GL_MAX_TEXTURE_UNITS,...) is lying
    By Aeluned in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-27-2004, 11:16 AM
  4. why glGetIntegerv returns wrong
    By kangarooxy in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-02-2003, 02:24 AM
  5. about glGetIntegerv()
    By Helen in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 01-15-2002, 04:54 PM

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