• Home
  • Raw
  • Download

Lines Matching refs:c

70     ogles_context_t *c =  in ogles_init()  local
72 memset(c, 0, sizeof(ogles_context_t)); in ogles_init()
73 ggl_init_context(&(c->rasterizer)); in ogles_init()
77 c->surfaceManager = smgr.get(); in ogles_init()
78 c->surfaceManager->incStrong(c); in ogles_init()
81 c->bufferObjectManager = bomgr.get(); in ogles_init()
82 c->bufferObjectManager->incStrong(c); in ogles_init()
84 ogles_init_array(c); in ogles_init()
85 ogles_init_matrix(c); in ogles_init()
86 ogles_init_vertex(c); in ogles_init()
87 ogles_init_light(c); in ogles_init()
88 ogles_init_texture(c); in ogles_init()
90 c->rasterizer.base = base; in ogles_init()
91 c->point.size = TRI_ONE; in ogles_init()
92 c->line.width = TRI_ONE; in ogles_init()
95 c->rasterizer.procs.depthMask(c, 1); in ogles_init()
98 c->rasterizer.procs.enable(c, GL_DITHER); in ogles_init()
100 return c; in ogles_init()
103 void ogles_uninit(ogles_context_t* c) in ogles_uninit() argument
105 ogles_uninit_array(c); in ogles_uninit()
106 ogles_uninit_matrix(c); in ogles_uninit()
107 ogles_uninit_vertex(c); in ogles_uninit()
108 ogles_uninit_light(c); in ogles_uninit()
109 ogles_uninit_texture(c); in ogles_uninit()
110 c->surfaceManager->decStrong(c); in ogles_uninit()
111 c->bufferObjectManager->decStrong(c); in ogles_uninit()
112 ggl_uninit_context(&(c->rasterizer)); in ogles_uninit()
113 free(c->rasterizer.base); in ogles_uninit()
116 void _ogles_error(ogles_context_t* c, GLenum error) in _ogles_error() argument
118 if (c->error == GL_NO_ERROR) in _ogles_error()
119 c->error = error; in _ogles_error()
135 static void enable_disable(ogles_context_t* c, GLenum cap, int enabled) in enable_disable() argument
138 c->lighting.lights[cap-GL_LIGHT0].enable = enabled; in enable_disable()
139 c->lighting.enabledLights &= ~(1<<(cap-GL_LIGHT0)); in enable_disable()
140 c->lighting.enabledLights |= (enabled<<(cap-GL_LIGHT0)); in enable_disable()
146 c->point.smooth = enabled; in enable_disable()
149 c->line.smooth = enabled; in enable_disable()
152 c->polygonOffset.enable = enabled; in enable_disable()
155 c->cull.enable = enabled; in enable_disable()
158 c->lighting.enable = enabled; in enable_disable()
161 c->lighting.colorMaterial.enable = enabled; in enable_disable()
165 c->transforms.rescaleNormals = enabled ? cap : 0; in enable_disable()
175 c->clipPlanes.enable &= ~(1<<(cap-GL_CLIP_PLANE0)); in enable_disable()
176 c->clipPlanes.enable |= (enabled<<(cap-GL_CLIP_PLANE0)); in enable_disable()
177 ogles_invalidate_perspective(c); in enable_disable()
182 ogles_invalidate_perspective(c); in enable_disable()
192 c->rasterizer.procs.enableDisable(c, cap, enabled); in enable_disable()
195 c->rasterizer.procs.enableDisable(c, GL_TEXTURE_2D, enabled); in enable_disable()
206 ogles_error(c, GL_INVALID_ENUM); in enable_disable()
226 ogles_context_t* c = ogles_context_t::get(); in glStencilFunc() local
228 ogles_error(c, GL_INVALID_ENUM); in glStencilFunc()
237 ogles_context_t* c = ogles_context_t::get(); in glStencilOp() local
241 ogles_error(c, GL_INVALID_ENUM); in glStencilOp()
255 ogles_context_t* c = ogles_context_t::get(); in glCullFace() local
262 ogles_error(c, GL_INVALID_ENUM); in glCullFace()
264 c->cull.cullFace = mode; in glCullFace()
269 ogles_context_t* c = ogles_context_t::get(); in glFrontFace() local
275 ogles_error(c, GL_INVALID_ENUM); in glFrontFace()
278 c->cull.frontFace = mode; in glFrontFace()
283 ogles_context_t* c = ogles_context_t::get(); in glHint() local
290 c->rasterizer.procs.enableDisable(c, in glHint()
294 c->perspective = (mode == GL_NICEST) ? 1 : 0; in glHint()
297 ogles_error(c, GL_INVALID_ENUM); in glHint()
302 ogles_context_t* c = ogles_context_t::get(); in glEnable() local
303 enable_disable(c, cap, 1); in glEnable()
306 ogles_context_t* c = ogles_context_t::get(); in glDisable() local
307 enable_disable(c, cap, 0); in glDisable()
326 ogles_context_t* c = ogles_context_t::get(); in glGetError() local
327 if (c->error) { in glGetError()
328 const GLenum ret(c->error); in glGetError()
329 c->error = 0; in glGetError()
333 if (c->rasterizer.error) { in glGetError()
334 const GLenum ret(c->rasterizer.error); in glGetError()
335 c->rasterizer.error = 0; in glGetError()
350 ogles_context_t* c = ogles_context_t::get(); in glGetString() local
351 ogles_error(c, GL_INVALID_ENUM); in glGetString()
358 ogles_context_t* c = ogles_context_t::get(); in glGetIntegerv() local
369 int index = c->rasterizer.state.buffers.color.format; in glGetIntegerv()
375 int index = c->rasterizer.state.buffers.color.format; in glGetIntegerv()
381 int index = c->rasterizer.state.buffers.color.format; in glGetIntegerv()
387 int index = c->rasterizer.state.buffers.color.format; in glGetIntegerv()
409 params[0] = c->rasterizer.state.buffers.depth.format ? 0 : 16; in glGetIntegerv()
462 c->transforms.modelview.top().elements(), in glGetIntegerv()
467 c->transforms.projection.top().elements(), in glGetIntegerv()
472 c->transforms.texture[c->textures.active].top().elements(), in glGetIntegerv()
477 ogles_error(c, GL_INVALID_ENUM); in glGetIntegerv()
486 ogles_context_t* c = ogles_context_t::get(); in glPointSize() local
488 ogles_error(c, GL_INVALID_ENUM); in glPointSize()
491 c->point.size = TRI_FROM_FIXED(gglFloatToFixed(size)); in glPointSize()
496 ogles_context_t* c = ogles_context_t::get(); in glPointSizex() local
498 ogles_error(c, GL_INVALID_ENUM); in glPointSizex()
501 c->point.size = TRI_FROM_FIXED(size); in glPointSizex()
508 ogles_context_t* c = ogles_context_t::get(); in glLineWidth() local
510 ogles_error(c, GL_INVALID_ENUM); in glLineWidth()
513 c->line.width = TRI_FROM_FIXED(gglFloatToFixed(width)); in glLineWidth()
518 ogles_context_t* c = ogles_context_t::get(); in glLineWidthx() local
520 ogles_error(c, GL_INVALID_ENUM); in glLineWidthx()
523 c->line.width = TRI_FROM_FIXED(width); in glLineWidthx()
529 ogles_context_t* c = ogles_context_t::get(); in glColorMask() local
530 c->rasterizer.procs.colorMask(c, r, g, b, a); in glColorMask()
534 ogles_context_t* c = ogles_context_t::get(); in glDepthMask() local
535 c->rasterizer.procs.depthMask(c, flag); in glDepthMask()
539 ogles_context_t* c = ogles_context_t::get(); in glStencilMask() local
540 c->rasterizer.procs.stencilMask(c, mask); in glStencilMask()
544 ogles_context_t* c = ogles_context_t::get(); in glDepthFunc() local
545 c->rasterizer.procs.depthFunc(c, func); in glDepthFunc()
549 ogles_context_t* c = ogles_context_t::get(); in glLogicOp() local
550 c->rasterizer.procs.logicOp(c, opcode); in glLogicOp()
554 ogles_context_t* c = ogles_context_t::get(); in glAlphaFuncx() local
555 c->rasterizer.procs.alphaFuncx(c, func, ref); in glAlphaFuncx()
559 ogles_context_t* c = ogles_context_t::get(); in glBlendFunc() local
560 c->rasterizer.procs.blendFunc(c, sfactor, dfactor); in glBlendFunc()
564 ogles_context_t* c = ogles_context_t::get(); in glClear() local
565 c->rasterizer.procs.clear(c, mask); in glClear()
569 ogles_context_t* c = ogles_context_t::get(); in glClearColorx() local
570 c->rasterizer.procs.clearColorx(c, red, green, blue, alpha); in glClearColorx()
575 ogles_context_t* c = ogles_context_t::get(); in glClearColor() local
576 c->rasterizer.procs.clearColorx(c, in glClearColor()
584 ogles_context_t* c = ogles_context_t::get(); in glClearDepthx() local
585 c->rasterizer.procs.clearDepthx(c, depth); in glClearDepthx()
590 ogles_context_t* c = ogles_context_t::get(); in glClearDepthf() local
591 c->rasterizer.procs.clearDepthx(c, gglFloatToFixed(depth)); in glClearDepthf()
595 ogles_context_t* c = ogles_context_t::get(); in glClearStencil() local
596 c->rasterizer.procs.clearStencil(c, s); in glClearStencil()