src/video/quartz/SDL_QuartzGL.m
changeset 1737 eacc5bc01d1c
parent 1736 3b2a92126f4d
child 1738 acfd00fbff5c
     1.1 --- a/src/video/quartz/SDL_QuartzGL.m	Thu Apr 27 07:59:16 2006 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzGL.m	Thu Apr 27 08:39:51 2006 +0000
     1.3 @@ -112,6 +112,10 @@
     1.4          attr[i++] = NSOpenGLPFANoRecovery;
     1.5      }
     1.6  
     1.7 +    if ( this->gl_config.accelerated > 0 ) {
     1.8 +        attr[i++] = NSOpenGLPFAAccelerated;
     1.9 +    }
    1.10 +
    1.11      attr[i++] = NSOpenGLPFAScreenMask;
    1.12      attr[i++] = CGDisplayIDToOpenGLDisplayMask (display_id);
    1.13      attr[i] = 0;
    1.14 @@ -242,8 +246,22 @@
    1.15              glGetIntegerv (GL_ALPHA_BITS, &component); bits += component;
    1.16  
    1.17              *value = bits;
    1.18 +            return 0;
    1.19          }
    1.20 -        return 0;
    1.21 +        case SDL_GL_ACCELERATED_VISUAL:
    1.22 +        {
    1.23 +            long val;
    1.24 +            [fmt getValues: &val forAttribute: NSOpenGLPFAAccelerated attr forVirtualScreen: 0];
    1.25 +            *value = val;
    1.26 +            return 0;
    1.27 +        }
    1.28 +        case SDL_GL_SWAP_CONTROL:
    1.29 +        {
    1.30 +            long val;
    1.31 +            [ gl_context getValues: &val forParameter: NSOpenGLCPSwapInterval ];
    1.32 +            *value = val;
    1.33 +            return 0;
    1.34 +        }
    1.35      }
    1.36  
    1.37      glGetIntegerv (attr, (GLint *)value);