Shut up debug.
[AROS.git] / arch / all-hosted / libs / hostgl / hostgl_glagetconfig.c
blob436b0411718ae273847dbe1d885cbfedb902dd07
1 /*
2 Copyright 2011-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "hostgl_ctx_manager.h"
7 #include "hostgl_types.h"
8 #include <proto/exec.h>
10 /*****************************************************************************
12 NAME */
14 void glAGetConfig(
16 /* SYNOPSIS */
17 GLAContext ctx,
18 GLenum pname,
19 GLint * params)
21 /* FUNCTION
23 Gets value of selected parameter
25 INPUTS
27 pname - enum value of parameter
29 params - pointer to integer where the value is to be put
31 RESULT
33 None
35 BUGS
37 INTERNALS
39 HISTORY
41 *****************************************************************************/
43 struct hostgl_context *_ctx = (struct hostgl_context *)ctx;
44 Display * dpy = NULL;
46 if (_ctx == NULL)
48 *params = -1;
49 return;
52 HostGL_Lock();
53 HostGL_UpdateGlobalGLXContext();
55 dpy = HostGL_GetGlobalX11Display();
57 switch(pname)
59 case GL_RED_BITS:
60 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_RED_SIZE, params);
61 break;
62 case GL_GREEN_BITS:
63 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_GREEN_SIZE, params);
64 break;
65 case GL_BLUE_BITS:
66 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_BLUE_SIZE, params);
67 break;
68 case GL_ALPHA_BITS:
69 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_ALPHA_SIZE, params);
70 break;
71 case GL_DOUBLEBUFFER:
72 *params = 1;
73 break;
74 case GL_DEPTH_BITS:
75 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_DEPTH_SIZE, params);
76 break;
77 case GL_STENCIL_BITS:
78 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_STENCIL_SIZE, params);
79 break;
80 case GL_ACCUM_RED_BITS:
81 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_ACCUM_RED_SIZE, params);
82 break;
83 case GL_ACCUM_GREEN_BITS:
84 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_ACCUM_GREEN_SIZE, params);
85 break;
86 case GL_ACCUM_BLUE_BITS:
87 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_ACCUM_BLUE_SIZE, params);
88 break;
89 case GL_ACCUM_ALPHA_BITS:
90 GLXCALL(glXGetFBConfigAttrib, dpy, _ctx->framebuffer->fbconfigs[0], GLX_ACCUM_ALPHA_SIZE, params);
91 break;
92 case GL_STEREO:
93 *params = 0;
94 break;
95 default:
96 *params = -1;
99 HostGL_UnLock();