Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 10, 2002
1 parent 6cf3b57 commit 37bcdfc
Showing 1 changed file with 31 additions and 11 deletions.
42 changes: 31 additions & 11 deletions src/video/quartz/SDL_QuartzVideo.m
Expand Up @@ -1208,20 +1208,40 @@ static int QZ_GL_LoadLibrary (_THIS, const char *location) {

static int QZ_GL_GetAttribute (_THIS, SDL_GLattr attrib, int* value) {

/*
CGLContextRef ctx = [ gl_context cglContext ];
CGLContextParameter param;
GLenum attr;

QZ_GL_MakeCurrent (this);

switch (attrib) {
case SDL_GL_RED_SIZE: param = CGLContextParameter break;
case SDL_GL_RED_SIZE: attr = GL_RED_BITS; break;
case SDL_GL_BLUE_SIZE: attr = GL_BLUE_BITS; break;
case SDL_GL_GREEN_SIZE: attr = GL_GREEN_BITS; break;
case SDL_GL_ALPHA_SIZE: attr = GL_ALPHA_BITS; break;
case SDL_GL_DOUBLEBUFFER: attr = GL_DOUBLEBUFFER; break;
case SDL_GL_DEPTH_SIZE: attr = GL_DEPTH_BITS; break;
case SDL_GL_STENCIL_SIZE: attr = GL_STENCIL_BITS; break;
case SDL_GL_ACCUM_RED_SIZE: attr = GL_ACCUM_RED_BITS; break;
case SDL_GL_ACCUM_GREEN_SIZE: attr = GL_ACCUM_GREEN_BITS; break;
case SDL_GL_ACCUM_BLUE_SIZE: attr = GL_ACCUM_BLUE_BITS; break;
case SDL_GL_ACCUM_ALPHA_SIZE: attr = GL_ACCUM_ALPHA_BITS; break;
case SDL_GL_BUFFER_SIZE:
{
GLint bits = 0;
GLint component;

/* there doesn't seem to be a single flag in OpenGL for this! */
glGetIntegerv (GL_RED_BITS, &component); bits += component;
glGetIntegerv (GL_GREEN_BITS,&component); bits += component;
glGetIntegerv (GL_BLUE_BITS, &component); bits += component;
glGetIntegerv (GL_ALPHA_BITS, &component); bits += component;

*value = bits;
}
return 0;
}
CGLGetParameter (ctx, param, (long*)value);
*/

*value = -1;
return -1;
glGetIntegerv (attr, value);
return 0;
}

static int QZ_GL_MakeCurrent (_THIS) {
Expand Down

0 comments on commit 37bcdfc

Please sign in to comment.