Lines Matching refs:gc

50 __glFreeAttributeState(struct glx_context * gc)
54 for (spp = &gc->attributes.stack[0];
55 spp < &gc->attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]; spp++) {
67 indirect_destroy_context(struct glx_context *gc)
69 __glXFreeVertexArrayState(gc);
71 free((char *) gc->vendor);
72 free((char *) gc->renderer);
73 free((char *) gc->version);
74 free((char *) gc->extensions);
75 __glFreeAttributeState(gc);
76 free((char *) gc->buf);
77 free((char *) gc->client_state_private);
78 free((char *) gc);
151 indirect_bind_context(struct glx_context *gc, struct glx_context *old,
155 Display *dpy = gc->psc->dpy;
165 sent = SendMakeCurrentRequest(dpy, gc->xid, tag, draw, read,
166 &gc->currentContextTag);
176 * At the point this is called gc->currentDpy is not initialized
180 __GLXattribute *state = gc->client_state_private;
182 gc->currentDpy = gc->psc->dpy;
183 __glXSetCurrentContext(gc);
186 __glXInitVertexArrayState(gc);
194 indirect_unbind_context(struct glx_context *gc, struct glx_context *new)
196 Display *dpy = gc->psc->dpy;
198 if (gc == new)
206 SendMakeCurrentRequest(dpy, None, gc->currentContextTag, None, None,
208 gc->currentContextTag = 0;
213 indirect_wait_gl(struct glx_context *gc)
216 Display *dpy = gc->currentDpy;
219 __glXFlushRenderBuffer(gc, gc->pc);
224 req->reqType = gc->majorOpcode;
226 req->contextTag = gc->currentContextTag;
232 indirect_wait_x(struct glx_context *gc)
235 Display *dpy = gc->currentDpy;
238 __glXFlushRenderBuffer(gc, gc->pc);
242 req->reqType = gc->majorOpcode;
244 req->contextTag = gc->currentContextTag;
282 struct glx_context *gc;
323 gc = calloc(1, sizeof *gc);
324 if (!gc) {
329 glx_context_init(gc, psc, mode);
330 gc->isDirect = GL_FALSE;
331 gc->vtable = &indirect_context_vtable;
333 gc->renderType = renderType;
337 free(gc);
340 gc->client_state_private = state;
351 gc->buf = malloc(bufSize);
352 if (!gc->buf) {
353 free(gc->client_state_private);
354 free(gc);
357 gc->bufSize = bufSize;
360 gc->renderMode = GL_RENDER;
365 gc->attributes.stackPointer = &gc->attributes.stack[0];
367 gc->pc = gc->buf;
368 gc->bufEnd = gc->buf + bufSize;
369 gc->isDirect = GL_FALSE;
374 gc->limit = gc->buf;
377 gc->limit = gc->buf + bufSize - __GLX_BUFFER_LIMIT_SIZE;
379 gc->majorOpcode = opcode;
387 gc->maxSmallRenderCommandSize = MIN3(bufSize, __GLX_RENDER_CMD_SIZE_LIMIT,
391 return gc;