Commit d6eaf8e9 authored by Sam Lantinga's avatar Sam Lantinga

*** empty log message ***

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40309
parent d45cd06f
...@@ -1208,20 +1208,40 @@ static void* QZ_GL_GetProcAddress (_THIS, const char *proc) { ...@@ -1208,20 +1208,40 @@ static void* QZ_GL_GetProcAddress (_THIS, const char *proc) {
static int QZ_GL_GetAttribute (_THIS, SDL_GLattr attrib, int* value) { static int QZ_GL_GetAttribute (_THIS, SDL_GLattr attrib, int* value) {
/* GLenum attr;
CGLContextRef ctx = [ gl_context cglContext ];
CGLContextParameter param; QZ_GL_MakeCurrent (this);
switch (attrib) { 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; glGetIntegerv (attr, value);
return -1; return 0;
} }
static int QZ_GL_MakeCurrent (_THIS) { static int QZ_GL_MakeCurrent (_THIS) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment