Lines Matching refs:c
30 void ogles_init_vertex(ogles_context_t* c) in ogles_init_vertex() argument
32 c->cull.enable = GL_FALSE; in ogles_init_vertex()
33 c->cull.cullFace = GL_BACK; in ogles_init_vertex()
34 c->cull.frontFace = GL_CCW; in ogles_init_vertex()
36 c->current.color.r = 0x10000; in ogles_init_vertex()
37 c->current.color.g = 0x10000; in ogles_init_vertex()
38 c->current.color.b = 0x10000; in ogles_init_vertex()
39 c->current.color.a = 0x10000; in ogles_init_vertex()
41 c->currentNormal.z = 0x10000; in ogles_init_vertex()
54 void perspective(ogles_context_t* c, vertex_t* v, uint32_t enables) in perspective() argument
70 const GLfixed* const m = c->transforms.vpt.transform.matrix.m; in perspective()
83 void clipFrustumPerspective(ogles_context_t* c, vertex_t* v, uint32_t enables) in clipFrustumPerspective() argument
99 c->arrays.cull &= clip; in clipFrustumPerspective()
104 perspective(c, v, enables); in clipFrustumPerspective()
110 void clipAllPerspective(ogles_context_t* c, vertex_t* v, uint32_t enables) in clipAllPerspective() argument
113 c->arrays.mv_transform( in clipAllPerspective()
114 &c->transforms.modelview.transform, &v->eye, &v->obj); in clipAllPerspective()
119 int planes = c->clipPlanes.enable; in clipAllPerspective()
124 GLfixed d = dot4(c->clipPlanes.plane[i].equation.v, v->eye.v); in clipAllPerspective()
131 clipFrustumPerspective(c, v, enables); in clipAllPerspective()
136 void ogles_vertex_project(ogles_context_t* c, vertex_t* v) { in ogles_vertex_project() argument
137 perspective(c, v, c->rasterizer.state.enables); in ogles_vertex_project()
140 void ogles_vertex_perspective2D(ogles_context_t* c, vertex_t* v) in ogles_vertex_perspective2D() argument
144 c->arrays.cull = 0; in ogles_vertex_perspective2D()
151 void ogles_vertex_perspective3DZ(ogles_context_t* c, vertex_t* v) { in ogles_vertex_perspective3DZ() argument
152 clipFrustumPerspective(c, v, GGL_ENABLE_DEPTH_TEST); in ogles_vertex_perspective3DZ()
154 void ogles_vertex_perspective3D(ogles_context_t* c, vertex_t* v) { in ogles_vertex_perspective3D() argument
155 clipFrustumPerspective(c, v, 0); in ogles_vertex_perspective3D()
157 void ogles_vertex_clipAllPerspective3DZ(ogles_context_t* c, vertex_t* v) { in ogles_vertex_clipAllPerspective3DZ() argument
158 clipAllPerspective(c, v, GGL_ENABLE_DEPTH_TEST); in ogles_vertex_clipAllPerspective3DZ()
160 void ogles_vertex_clipAllPerspective3D(ogles_context_t* c, vertex_t* v) { in ogles_vertex_clipAllPerspective3D() argument
161 clipAllPerspective(c, v, 0); in ogles_vertex_clipAllPerspective3D()
164 static void clipPlanex(GLenum plane, const GLfixed* equ, ogles_context_t* c) in clipPlanex() argument
168 ogles_error(c, GL_INVALID_ENUM); in clipPlanex()
172 vec4_t& equation = c->clipPlanes.plane[p].equation; in clipPlanex()
175 ogles_validate_transform(c, transform_state_t::MVIT); in clipPlanex()
176 transform_t& mvit = c->transforms.mvit4; in clipPlanex()
189 ogles_context_t* c = ogles_context_t::get(); in glColor4f() local
190 c->current.color.r = gglFloatToFixed(r); in glColor4f()
191 c->currentColorClamped.r = gglClampx(c->current.color.r); in glColor4f()
192 c->current.color.g = gglFloatToFixed(g); in glColor4f()
193 c->currentColorClamped.g = gglClampx(c->current.color.g); in glColor4f()
194 c->current.color.b = gglFloatToFixed(b); in glColor4f()
195 c->currentColorClamped.b = gglClampx(c->current.color.b); in glColor4f()
196 c->current.color.a = gglFloatToFixed(a); in glColor4f()
197 c->currentColorClamped.a = gglClampx(c->current.color.a); in glColor4f()
202 ogles_context_t* c = ogles_context_t::get(); in glColor4x() local
203 c->current.color.r = r; in glColor4x()
204 c->current.color.g = g; in glColor4x()
205 c->current.color.b = b; in glColor4x()
206 c->current.color.a = a; in glColor4x()
207 c->currentColorClamped.r = gglClampx(r); in glColor4x()
208 c->currentColorClamped.g = gglClampx(g); in glColor4x()
209 c->currentColorClamped.b = gglClampx(b); in glColor4x()
210 c->currentColorClamped.a = gglClampx(a); in glColor4x()
215 ogles_context_t* c = ogles_context_t::get(); in glNormal3f() local
216 c->currentNormal.x = gglFloatToFixed(x); in glNormal3f()
217 c->currentNormal.y = gglFloatToFixed(y); in glNormal3f()
218 c->currentNormal.z = gglFloatToFixed(z); in glNormal3f()
223 ogles_context_t* c = ogles_context_t::get(); in glNormal3x() local
224 c->currentNormal.x = x; in glNormal3x()
225 c->currentNormal.y = y; in glNormal3x()
226 c->currentNormal.z = z; in glNormal3x()
239 ogles_context_t* c = ogles_context_t::get(); in glClipPlanef() local
240 clipPlanex(plane, equx, c); in glClipPlanef()
245 ogles_context_t* c = ogles_context_t::get(); in glClipPlanex() local
246 clipPlanex(plane, equ, c); in glClipPlanex()