/*****************************************************************************/
+#ifndef GLX_USE_APPLEGL
static void
do_enable_disable(GLenum array, GLboolean val)
{
- __GLXcontext *gc = __glXGetCurrentContext();
+ struct glx_context *gc = __glXGetCurrentContext();
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
unsigned index = 0;
void
__indirect_glPushClientAttrib(GLuint mask)
{
- __GLXcontext *gc = __glXGetCurrentContext();
+ struct glx_context *gc = __glXGetCurrentContext();
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
__GLXattribute **spp = gc->attributes.stackPointer, *sp;
if (spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
if (!(sp = *spp)) {
- sp = (__GLXattribute *) Xmalloc(sizeof(__GLXattribute));
+ sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+ __glXSetError(gc, GL_OUT_OF_MEMORY);
+ return;
+ }
*spp = sp;
}
sp->mask = mask;
void
__indirect_glPopClientAttrib(void)
{
- __GLXcontext *gc = __glXGetCurrentContext();
+ struct glx_context *gc = __glXGetCurrentContext();
__GLXattribute *state = (__GLXattribute *) (gc->client_state_private);
__GLXattribute **spp = gc->attributes.stackPointer, *sp;
GLuint mask;
return;
}
}
+#endif
void
-__glFreeAttributeState(__GLXcontext * gc)
+__glFreeAttributeState(struct glx_context * gc)
{
__GLXattribute *sp, **spp;
spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]; spp++) {
sp = *spp;
if (sp) {
- XFree((char *) sp);
+ free((char *) sp);
}
else {
break;