Lines Matching refs:c
57 static void ggl_init_procs(context_t* c);
58 static void ggl_set_scissor(context_t* c);
60 static void ggl_enable_blending(context_t* c, int enable);
61 static void ggl_enable_scissor_test(context_t* c, int enable);
62 static void ggl_enable_alpha_test(context_t* c, int enable);
63 static void ggl_enable_logic_op(context_t* c, int enable);
64 static void ggl_enable_dither(context_t* c, int enable);
65 static void ggl_enable_stencil_test(context_t* c, int enable);
66 static void ggl_enable_depth_test(context_t* c, int enable);
67 static void ggl_enable_aa(context_t* c, int enable);
68 static void ggl_enable_point_aa_nice(context_t* c, int enable);
69 static void ggl_enable_texture2d(context_t* c, int enable);
70 static void ggl_enable_w_lerp(context_t* c, int enable);
71 static void ggl_enable_fog(context_t* c, int enable);
85 void ggl_error(context_t* c, GGLenum error) in ggl_error() argument
87 if (c->error == GGL_NO_ERROR) in ggl_error()
88 c->error = error; in ggl_error()
95 GGL_CONTEXT(c, con); in ggl_bindTexture()
96 if (surface->format != c->activeTMU->surface.format) in ggl_bindTexture()
97 ggl_state_changed(c, GGL_TMU_STATE); in ggl_bindTexture()
98 ggl_set_surface(c, &(c->activeTMU->surface), surface); in ggl_bindTexture()
104 GGL_CONTEXT(c, con); in ggl_bindTextureLod()
106 ggl_set_surface(c, &c->state.texture[tmu].surface, surface); in ggl_bindTextureLod()
111 GGL_CONTEXT(c, con); in ggl_colorBuffer()
112 if (surface->format != c->state.buffers.color.format) in ggl_colorBuffer()
113 ggl_state_changed(c, GGL_CB_STATE); in ggl_colorBuffer()
115 if (surface->width > c->state.buffers.coverageBufferSize) { in ggl_colorBuffer()
117 free(c->state.buffers.coverage); in ggl_colorBuffer()
118 c->state.buffers.coverage = (int16_t*)malloc(surface->width * 2); in ggl_colorBuffer()
119 c->state.buffers.coverageBufferSize = in ggl_colorBuffer()
120 c->state.buffers.coverage ? surface->width : 0; in ggl_colorBuffer()
122 ggl_set_surface(c, &(c->state.buffers.color), surface); in ggl_colorBuffer()
123 if (c->state.buffers.read.format == 0) { in ggl_colorBuffer()
124 ggl_set_surface(c, &(c->state.buffers.read), surface); in ggl_colorBuffer()
126 ggl_set_scissor(c); in ggl_colorBuffer()
131 GGL_CONTEXT(c, con); in ggl_readBuffer()
132 ggl_set_surface(c, &(c->state.buffers.read), surface); in ggl_readBuffer()
137 GGL_CONTEXT(c, con); in ggl_depthBuffer()
139 ggl_set_surface(c, &(c->state.buffers.depth), surface); in ggl_depthBuffer()
141 c->state.buffers.depth.format = GGL_PIXEL_FORMAT_NONE; in ggl_depthBuffer()
142 ggl_enable_depth_test(c, 0); in ggl_depthBuffer()
149 GGL_CONTEXT(c, con); in ggl_scissor()
150 c->state.scissor.user_left = x; in ggl_scissor()
151 c->state.scissor.user_top = y; in ggl_scissor()
152 c->state.scissor.user_right = x + width; in ggl_scissor()
153 c->state.scissor.user_bottom = y + height; in ggl_scissor()
154 ggl_set_scissor(c); in ggl_scissor()
159 static void enable_disable(context_t* c, GGLenum name, int en) in enable_disable() argument
162 case GGL_BLEND: ggl_enable_blending(c, en); break; in enable_disable()
163 case GGL_SCISSOR_TEST: ggl_enable_scissor_test(c, en); break; in enable_disable()
164 case GGL_ALPHA_TEST: ggl_enable_alpha_test(c, en); break; in enable_disable()
165 case GGL_COLOR_LOGIC_OP: ggl_enable_logic_op(c, en); break; in enable_disable()
166 case GGL_DITHER: ggl_enable_dither(c, en); break; in enable_disable()
167 case GGL_STENCIL_TEST: ggl_enable_stencil_test(c, en); break; in enable_disable()
168 case GGL_DEPTH_TEST: ggl_enable_depth_test(c, en); break; in enable_disable()
169 case GGL_AA: ggl_enable_aa(c, en); break; in enable_disable()
170 case GGL_TEXTURE_2D: ggl_enable_texture2d(c, en); break; in enable_disable()
171 case GGL_W_LERP: ggl_enable_w_lerp(c, en); break; in enable_disable()
172 case GGL_FOG: ggl_enable_fog(c, en); break; in enable_disable()
173 case GGL_POINT_SMOOTH_NICE: ggl_enable_point_aa_nice(c, en); break; in enable_disable()
179 GGL_CONTEXT(c, con); in ggl_enable()
180 enable_disable(c, name, 1); in ggl_enable()
185 GGL_CONTEXT(c, con); in ggl_disable()
186 enable_disable(c, name, 0); in ggl_disable()
191 GGL_CONTEXT(c, con); in ggl_enableDisable()
192 enable_disable(c, name, en ? 1 : 0); in ggl_enableDisable()
199 GGL_CONTEXT(c, con); in ggl_shadeModel()
202 if (c->state.enables & GGL_ENABLE_SMOOTH) { in ggl_shadeModel()
203 c->state.enables &= ~GGL_ENABLE_SMOOTH; in ggl_shadeModel()
204 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_shadeModel()
208 if (!(c->state.enables & GGL_ENABLE_SMOOTH)) { in ggl_shadeModel()
209 c->state.enables |= GGL_ENABLE_SMOOTH; in ggl_shadeModel()
210 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_shadeModel()
214 ggl_error(c, GGL_INVALID_ENUM); in ggl_shadeModel()
220 GGL_CONTEXT(c, con); in ggl_color4xv()
221 c->shade.r0 = gglFixedToIteratedColor(color[0]); in ggl_color4xv()
222 c->shade.g0 = gglFixedToIteratedColor(color[1]); in ggl_color4xv()
223 c->shade.b0 = gglFixedToIteratedColor(color[2]); in ggl_color4xv()
224 c->shade.a0 = gglFixedToIteratedColor(color[3]); in ggl_color4xv()
229 GGL_CONTEXT(c, con); in ggl_colorGrad12xv()
235 c->shade.r0 = grad[ 0] + round; in ggl_colorGrad12xv()
236 c->shade.drdx = grad[ 1]; in ggl_colorGrad12xv()
237 c->shade.drdy = grad[ 2]; in ggl_colorGrad12xv()
238 c->shade.g0 = grad[ 3] + round; in ggl_colorGrad12xv()
239 c->shade.dgdx = grad[ 4]; in ggl_colorGrad12xv()
240 c->shade.dgdy = grad[ 5]; in ggl_colorGrad12xv()
241 c->shade.b0 = grad[ 6] + round; in ggl_colorGrad12xv()
242 c->shade.dbdx = grad[ 7]; in ggl_colorGrad12xv()
243 c->shade.dbdy = grad[ 8]; in ggl_colorGrad12xv()
244 c->shade.a0 = grad[ 9] + round; in ggl_colorGrad12xv()
245 c->shade.dadx = grad[10]; in ggl_colorGrad12xv()
246 c->shade.dady = grad[11]; in ggl_colorGrad12xv()
251 GGL_CONTEXT(c, con); in ggl_zGrad3xv()
255 c->shade.z0 = grad[0] + round; in ggl_zGrad3xv()
256 c->shade.dzdx = grad[1]; in ggl_zGrad3xv()
257 c->shade.dzdy = grad[2]; in ggl_zGrad3xv()
262 GGL_CONTEXT(c, con); in ggl_wGrad3xv()
263 c->shade.w0 = grad[0]; in ggl_wGrad3xv()
264 c->shade.dwdx = grad[1]; in ggl_wGrad3xv()
265 c->shade.dwdy = grad[2]; in ggl_wGrad3xv()
272 GGL_CONTEXT(c, con); in ggl_fogGrad3xv()
273 c->shade.f0 = grad[0]; in ggl_fogGrad3xv()
274 c->shade.dfdx = grad[1]; in ggl_fogGrad3xv()
275 c->shade.dfdy = grad[2]; in ggl_fogGrad3xv()
280 GGL_CONTEXT(c, con); in ggl_fogColor3xv()
284 c->state.fog.color[GGLFormat::ALPHA]= 0xFF; // unused in ggl_fogColor3xv()
285 c->state.fog.color[GGLFormat::RED] = (r - (r>>8))>>8; in ggl_fogColor3xv()
286 c->state.fog.color[GGLFormat::GREEN]= (g - (g>>8))>>8; in ggl_fogColor3xv()
287 c->state.fog.color[GGLFormat::BLUE] = (b - (b>>8))>>8; in ggl_fogColor3xv()
290 static void ggl_enable_fog(context_t* c, int enable) in ggl_enable_fog() argument
292 const int e = (c->state.enables & GGL_ENABLE_FOG)?1:0; in ggl_enable_fog()
294 if (enable) c->state.enables |= GGL_ENABLE_FOG; in ggl_enable_fog()
295 else c->state.enables &= ~GGL_ENABLE_FOG; in ggl_enable_fog()
296 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_fog()
304 GGL_CONTEXT(c, con); in ggl_blendFunc()
305 c->state.blend.src = src; in ggl_blendFunc()
306 c->state.blend.src_alpha = src; in ggl_blendFunc()
307 c->state.blend.dst = dst; in ggl_blendFunc()
308 c->state.blend.dst_alpha = dst; in ggl_blendFunc()
309 c->state.blend.alpha_separate = 0; in ggl_blendFunc()
310 if (c->state.enables & GGL_ENABLE_BLENDING) { in ggl_blendFunc()
311 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_blendFunc()
319 GGL_CONTEXT(c, con); in ggl_blendFuncSeparate()
320 c->state.blend.src = src; in ggl_blendFuncSeparate()
321 c->state.blend.src_alpha = srcAlpha; in ggl_blendFuncSeparate()
322 c->state.blend.dst = dst; in ggl_blendFuncSeparate()
323 c->state.blend.dst_alpha = dstAplha; in ggl_blendFuncSeparate()
324 c->state.blend.alpha_separate = 1; in ggl_blendFuncSeparate()
325 if (c->state.enables & GGL_ENABLE_BLENDING) { in ggl_blendFuncSeparate()
326 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_blendFuncSeparate()
336 GGL_CONTEXT(c, con); in ggl_texEnvi()
338 ggl_error(c, GGL_INVALID_ENUM); in ggl_texEnvi()
347 if (c->activeTMU->env != param) { in ggl_texEnvi()
348 c->activeTMU->env = param; in ggl_texEnvi()
349 ggl_state_changed(c, GGL_TMU_STATE); in ggl_texEnvi()
353 ggl_error(c, GGL_INVALID_ENUM); in ggl_texEnvi()
360 GGL_CONTEXT(c, con); in ggl_texEnvxv()
362 ggl_error(c, GGL_INVALID_ENUM); in ggl_texEnvxv()
370 uint8_t* const color = c->activeTMU->env_color; in ggl_texEnvxv()
382 ggl_error(c, GGL_INVALID_ENUM); in ggl_texEnvxv()
393 GGL_CONTEXT(c, con); in ggl_texParameteri()
395 ggl_error(c, GGL_INVALID_ENUM); in ggl_texParameteri()
407 what = &c->activeTMU->s_wrap; in ggl_texParameteri()
413 what = &c->activeTMU->t_wrap; in ggl_texParameteri()
420 what = &c->activeTMU->min_filter; in ggl_texParameteri()
426 what = &c->activeTMU->min_filter; in ggl_texParameteri()
433 what = &c->activeTMU->mag_filter; in ggl_texParameteri()
439 ggl_error(c, GGL_INVALID_ENUM); in ggl_texParameteri()
445 ggl_state_changed(c, GGL_TMU_STATE); in ggl_texParameteri()
451 GGL_CONTEXT(c, con); in ggl_texCoordGradScale8xv()
452 texture_t& u = c->state.texture[tmu]; in ggl_texCoordGradScale8xv()
465 GGL_CONTEXT(c, con); in ggl_texCoord2x()
466 c->activeTMU->shade.is0 = s; in ggl_texCoord2x()
467 c->activeTMU->shade.it0 = t; in ggl_texCoord2x()
468 c->activeTMU->shade.sscale= 0; in ggl_texCoord2x()
469 c->activeTMU->shade.tscale= 0; in ggl_texCoord2x()
479 GGL_CONTEXT(c, con); in ggl_texGeni()
481 ggl_error(c, GGL_INVALID_ENUM); in ggl_texGeni()
486 if (coord == GGL_S) coord_ptr = &(c->activeTMU->s_coord); in ggl_texGeni()
487 else if (coord == GGL_T) coord_ptr = &(c->activeTMU->t_coord); in ggl_texGeni()
492 ggl_state_changed(c, GGL_TMU_STATE); in ggl_texGeni()
495 ggl_error(c, GGL_INVALID_ENUM); in ggl_texGeni()
501 GGL_CONTEXT(c, con); in ggl_activeTexture()
503 ggl_error(c, GGL_INVALID_ENUM); in ggl_activeTexture()
506 c->activeTMUIndex = tmu; in ggl_activeTexture()
507 c->activeTMU = &(c->state.texture[tmu]); in ggl_activeTexture()
517 GGL_CONTEXT(c, con); in ggl_colorMask()
523 if (c->state.mask.color != mask) { in ggl_colorMask()
524 c->state.mask.color = mask; in ggl_colorMask()
525 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_colorMask()
531 GGL_CONTEXT(c, con); in ggl_depthMask()
532 if (c->state.mask.depth != flag?1:0) { in ggl_depthMask()
533 c->state.mask.depth = flag?1:0; in ggl_depthMask()
534 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_depthMask()
540 GGL_CONTEXT(c, con); in ggl_stencilMask()
541 if (c->state.mask.stencil != mask) { in ggl_stencilMask()
542 c->state.mask.stencil = mask; in ggl_stencilMask()
543 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_stencilMask()
551 GGL_CONTEXT(c, con); in ggl_alphaFuncx()
553 ggl_error(c, GGL_INVALID_ENUM); in ggl_alphaFuncx()
556 c->state.alpha_test.ref = gglFixedToIteratedColor(gglClampx(ref)); in ggl_alphaFuncx()
557 if (c->state.alpha_test.func != func) { in ggl_alphaFuncx()
558 c->state.alpha_test.func = func; in ggl_alphaFuncx()
559 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_alphaFuncx()
567 GGL_CONTEXT(c, con); in ggl_depthFunc()
569 ggl_error(c, GGL_INVALID_ENUM); in ggl_depthFunc()
572 if (c->state.depth_test.func != func) { in ggl_depthFunc()
573 c->state.depth_test.func = func; in ggl_depthFunc()
574 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_depthFunc()
582 GGL_CONTEXT(c, con); in ggl_logicOp()
584 ggl_error(c, GGL_INVALID_ENUM); in ggl_logicOp()
587 if (c->state.logic_op.opcode != opcode) { in ggl_logicOp()
588 c->state.logic_op.opcode = opcode; in ggl_logicOp()
589 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_logicOp()
596 void ggl_set_scissor(context_t* c) in ggl_set_scissor() argument
598 if (c->state.enables & GGL_ENABLE_SCISSOR_TEST) { in ggl_set_scissor()
599 const int32_t l = c->state.scissor.user_left; in ggl_set_scissor()
600 const int32_t t = c->state.scissor.user_top; in ggl_set_scissor()
601 const int32_t r = c->state.scissor.user_right; in ggl_set_scissor()
602 const int32_t b = c->state.scissor.user_bottom; in ggl_set_scissor()
603 c->state.scissor.left = max(0, l); in ggl_set_scissor()
604 c->state.scissor.right = min(c->state.buffers.color.width, r); in ggl_set_scissor()
605 c->state.scissor.top = max(0, t); in ggl_set_scissor()
606 c->state.scissor.bottom = min(c->state.buffers.color.height, b); in ggl_set_scissor()
608 c->state.scissor.left = 0; in ggl_set_scissor()
609 c->state.scissor.top = 0; in ggl_set_scissor()
610 c->state.scissor.right = c->state.buffers.color.width; in ggl_set_scissor()
611 c->state.scissor.bottom = c->state.buffers.color.height; in ggl_set_scissor()
615 void ggl_enable_blending(context_t* c, int enable) in ggl_enable_blending() argument
617 const int e = (c->state.enables & GGL_ENABLE_BLENDING)?1:0; in ggl_enable_blending()
619 if (enable) c->state.enables |= GGL_ENABLE_BLENDING; in ggl_enable_blending()
620 else c->state.enables &= ~GGL_ENABLE_BLENDING; in ggl_enable_blending()
621 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_blending()
625 void ggl_enable_scissor_test(context_t* c, int enable) in ggl_enable_scissor_test() argument
627 const int e = (c->state.enables & GGL_ENABLE_SCISSOR_TEST)?1:0; in ggl_enable_scissor_test()
629 if (enable) c->state.enables |= GGL_ENABLE_SCISSOR_TEST; in ggl_enable_scissor_test()
630 else c->state.enables &= ~GGL_ENABLE_SCISSOR_TEST; in ggl_enable_scissor_test()
631 ggl_set_scissor(c); in ggl_enable_scissor_test()
635 void ggl_enable_alpha_test(context_t* c, int enable) in ggl_enable_alpha_test() argument
637 const int e = (c->state.enables & GGL_ENABLE_ALPHA_TEST)?1:0; in ggl_enable_alpha_test()
639 if (enable) c->state.enables |= GGL_ENABLE_ALPHA_TEST; in ggl_enable_alpha_test()
640 else c->state.enables &= ~GGL_ENABLE_ALPHA_TEST; in ggl_enable_alpha_test()
641 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_alpha_test()
645 void ggl_enable_logic_op(context_t* c, int enable) in ggl_enable_logic_op() argument
647 const int e = (c->state.enables & GGL_ENABLE_LOGIC_OP)?1:0; in ggl_enable_logic_op()
649 if (enable) c->state.enables |= GGL_ENABLE_LOGIC_OP; in ggl_enable_logic_op()
650 else c->state.enables &= ~GGL_ENABLE_LOGIC_OP; in ggl_enable_logic_op()
651 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_logic_op()
655 void ggl_enable_dither(context_t* c, int enable) in ggl_enable_dither() argument
657 const int e = (c->state.enables & GGL_ENABLE_DITHER)?1:0; in ggl_enable_dither()
659 if (enable) c->state.enables |= GGL_ENABLE_DITHER; in ggl_enable_dither()
660 else c->state.enables &= ~GGL_ENABLE_DITHER; in ggl_enable_dither()
661 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_dither()
669 void ggl_enable_depth_test(context_t* c, int enable) in ggl_enable_depth_test() argument
671 if (c->state.buffers.depth.format == 0) in ggl_enable_depth_test()
673 const int e = (c->state.enables & GGL_ENABLE_DEPTH_TEST)?1:0; in ggl_enable_depth_test()
675 if (enable) c->state.enables |= GGL_ENABLE_DEPTH_TEST; in ggl_enable_depth_test()
676 else c->state.enables &= ~GGL_ENABLE_DEPTH_TEST; in ggl_enable_depth_test()
677 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_depth_test()
681 void ggl_enable_aa(context_t* c, int enable) in ggl_enable_aa() argument
683 const int e = (c->state.enables & GGL_ENABLE_AA)?1:0; in ggl_enable_aa()
685 if (enable) c->state.enables |= GGL_ENABLE_AA; in ggl_enable_aa()
686 else c->state.enables &= ~GGL_ENABLE_AA; in ggl_enable_aa()
687 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_aa()
691 void ggl_enable_point_aa_nice(context_t* c, int enable) in ggl_enable_point_aa_nice() argument
693 const int e = (c->state.enables & GGL_ENABLE_POINT_AA_NICE)?1:0; in ggl_enable_point_aa_nice()
695 if (enable) c->state.enables |= GGL_ENABLE_POINT_AA_NICE; in ggl_enable_point_aa_nice()
696 else c->state.enables &= ~GGL_ENABLE_POINT_AA_NICE; in ggl_enable_point_aa_nice()
697 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_point_aa_nice()
701 void ggl_enable_w_lerp(context_t* c, int enable) in ggl_enable_w_lerp() argument
703 const int e = (c->state.enables & GGL_ENABLE_W)?1:0; in ggl_enable_w_lerp()
705 if (enable) c->state.enables |= GGL_ENABLE_W; in ggl_enable_w_lerp()
706 else c->state.enables &= ~GGL_ENABLE_W; in ggl_enable_w_lerp()
707 ggl_state_changed(c, GGL_PIXEL_PIPELINE_STATE); in ggl_enable_w_lerp()
711 void ggl_enable_texture2d(context_t* c, int enable) in ggl_enable_texture2d() argument
713 if (c->activeTMU->enable != enable) { in ggl_enable_texture2d()
714 const uint32_t tmu = c->activeTMUIndex; in ggl_enable_texture2d()
715 c->activeTMU->enable = enable; in ggl_enable_texture2d()
717 if (enable) c->state.enabled_tmu |= mask; in ggl_enable_texture2d()
718 else c->state.enabled_tmu &= ~mask; in ggl_enable_texture2d()
719 if (c->state.enabled_tmu) c->state.enables |= GGL_ENABLE_TMUS; in ggl_enable_texture2d()
720 else c->state.enables &= ~GGL_ENABLE_TMUS; in ggl_enable_texture2d()
721 ggl_state_changed(c, GGL_TMU_STATE); in ggl_enable_texture2d()
738 void ggl_init_procs(context_t* c) in ggl_init_procs() argument
740 GGLContext& procs = *(GGLContext*)c; in ggl_init_procs()
773 ggl_init_clear(c); in ggl_init_procs()
776 void ggl_init_context(context_t* c) in ggl_init_context() argument
778 memset(c, 0, sizeof(context_t)); in ggl_init_context()
779 ggl_init_procs(c); in ggl_init_context()
780 ggl_init_trap(c); in ggl_init_context()
781 ggl_init_scanline(c); in ggl_init_context()
782 ggl_init_texture(c); in ggl_init_context()
783 ggl_init_picker(c); in ggl_init_context()
784 ggl_init_raster(c); in ggl_init_context()
785 c->formats = gglGetPixelFormatTable(); in ggl_init_context()
786 c->state.blend.src = GGL_ONE; in ggl_init_context()
787 c->state.blend.dst = GGL_ZERO; in ggl_init_context()
788 c->state.blend.src_alpha = GGL_ONE; in ggl_init_context()
789 c->state.blend.dst_alpha = GGL_ZERO; in ggl_init_context()
790 c->state.mask.color = 0xF; in ggl_init_context()
791 c->state.mask.depth = 0; in ggl_init_context()
792 c->state.mask.stencil = 0xFFFFFFFF; in ggl_init_context()
793 c->state.logic_op.opcode = GGL_COPY; in ggl_init_context()
794 c->state.alpha_test.func = GGL_ALWAYS; in ggl_init_context()
795 c->state.depth_test.func = GGL_LESS; in ggl_init_context()
796 c->state.depth_test.clearValue = FIXED_ONE; in ggl_init_context()
797 c->shade.w0 = FIXED_ONE; in ggl_init_context()
798 memcpy(c->ditherMatrix, gDitherMatrix, sizeof(gDitherMatrix)); in ggl_init_context()
801 void ggl_uninit_context(context_t* c) in ggl_uninit_context() argument
803 ggl_uninit_scanline(c); in ggl_uninit_context()
819 context_t *c = (context_t *)((ptrdiff_t(base)+31) & ~0x1FL); in gglInit() local
820 ggl_init_context(c); in gglInit()
821 c->base = base; in gglInit()
822 *context = (GGLContext*)c; in gglInit()
831 GGL_CONTEXT(c, (void*)con); in gglUninit()
832 ggl_uninit_context(c); in gglUninit()
833 free(c->base); in gglUninit()