*** empty log message ***
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40309
This commit is contained in:
parent
d45cd06f89
commit
d6eaf8e9f8
1 changed files with 33 additions and 13 deletions
|
@ -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);
|
glGetIntegerv (attr, value);
|
||||||
*/
|
return 0;
|
||||||
|
|
||||||
*value = -1;
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int QZ_GL_MakeCurrent (_THIS) {
|
static int QZ_GL_MakeCurrent (_THIS) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue