• Home
  • Raw
  • Download

Lines Matching refs:c

51 static void point2__nop(transform_t const*, vec4_t* c, vec4_t const* o);
52 static void point3__nop(transform_t const*, vec4_t* c, vec4_t const* o);
53 static void point4__nop(transform_t const*, vec4_t* c, vec4_t const* o);
54 static void normal__nop(transform_t const*, vec4_t* c, vec4_t const* o);
55 static void point2__generic(transform_t const*, vec4_t* c, vec4_t const* o);
56 static void point3__generic(transform_t const*, vec4_t* c, vec4_t const* o);
57 static void point4__generic(transform_t const*, vec4_t* c, vec4_t const* o);
58 static void point3__mvui(transform_t const*, vec4_t* c, vec4_t const* o);
59 static void point4__mvui(transform_t const*, vec4_t* c, vec4_t const* o);
66 void ogles_init_matrix(ogles_context_t* c) in ogles_init_matrix() argument
68 c->transforms.modelview.init(OGLES_MODELVIEW_STACK_DEPTH); in ogles_init_matrix()
69 c->transforms.projection.init(OGLES_PROJECTION_STACK_DEPTH); in ogles_init_matrix()
71 c->transforms.texture[i].init(OGLES_TEXTURE_STACK_DEPTH); in ogles_init_matrix()
73 c->transforms.current = &c->transforms.modelview; in ogles_init_matrix()
74 c->transforms.matrixMode = GL_MODELVIEW; in ogles_init_matrix()
75 c->transforms.dirty = transform_state_t::VIEWPORT | in ogles_init_matrix()
79 c->transforms.mvp.loadIdentity(); in ogles_init_matrix()
80 c->transforms.mvp4.loadIdentity(); in ogles_init_matrix()
81 c->transforms.mvit4.loadIdentity(); in ogles_init_matrix()
82 c->transforms.mvui.loadIdentity(); in ogles_init_matrix()
83 c->transforms.vpt.loadIdentity(); in ogles_init_matrix()
84 c->transforms.vpt.zNear = 0.0f; in ogles_init_matrix()
85 c->transforms.vpt.zFar = 1.0f; in ogles_init_matrix()
88 void ogles_uninit_matrix(ogles_context_t* c) in ogles_uninit_matrix() argument
90 c->transforms.modelview.uninit(); in ogles_uninit_matrix()
91 c->transforms.projection.uninit(); in ogles_uninit_matrix()
93 c->transforms.texture[i].uninit(); in ogles_uninit_matrix()
96 static void validate_perspective(ogles_context_t* c, vertex_t* v) in validate_perspective() argument
98 const uint32_t enables = c->rasterizer.state.enables; in validate_perspective()
99 c->arrays.perspective = (c->clipPlanes.enable) ? in validate_perspective()
102 c->arrays.perspective = ogles_vertex_perspective3DZ; in validate_perspective()
103 if (c->clipPlanes.enable || (enables&GGL_ENABLE_FOG)) in validate_perspective()
104 c->arrays.perspective = ogles_vertex_clipAllPerspective3DZ; in validate_perspective()
106 if ((c->arrays.vertex.size != 4) && in validate_perspective()
107 (c->transforms.mvp4.flags & transform_t::FLAGS_2D_PROJECTION)) { in validate_perspective()
108 c->arrays.perspective = ogles_vertex_perspective2D; in validate_perspective()
110 c->arrays.perspective(c, v); in validate_perspective()
113 void ogles_invalidate_perspective(ogles_context_t* c) in ogles_invalidate_perspective() argument
115 c->arrays.perspective = validate_perspective; in ogles_invalidate_perspective()
118 void ogles_validate_transform_impl(ogles_context_t* c, uint32_t want) in ogles_validate_transform_impl() argument
120 int dirty = c->transforms.dirty & want; in ogles_validate_transform_impl()
124 c->transforms.modelview.validate(); in ogles_validate_transform_impl()
129 c->transforms.projection.validate(); in ogles_validate_transform_impl()
134 vp_transform_t& vpt = c->transforms.vpt; in ogles_validate_transform_impl()
141 c->transforms.update_mvp(); in ogles_validate_transform_impl()
143 ogles_invalidate_perspective(c); in ogles_validate_transform_impl()
148 c->transforms.update_mvui(); in ogles_validate_transform_impl()
149 ogles_invalidate_lighting_mvui(c); in ogles_validate_transform_impl()
155 c->transforms.texture[i].validate(); in ogles_validate_transform_impl()
160 c->transforms.update_mvit(); in ogles_validate_transform_impl()
163 c->transforms.dirty &= ~want; in ogles_validate_transform_impl()
335 GLfloat c, s; in rotate() local
339 sincosf(a, &s, &c); in rotate()
341 r[5] = c; r[10]= c; in rotate()
347 r[0] = c; r[10]= c; in rotate()
353 r[0] = c; r[5] = c; in rotate()
366 const GLfloat nc = 1.0f - c; in rotate()
373 r[ 0] = x*x*nc + c; r[ 4] = xy*nc - zs; r[ 8] = zx*nc + ys; in rotate()
374 r[ 1] = xy*nc + zs; r[ 5] = y*y*nc + c; r[ 9] = yz*nc - xs; in rotate()
375 r[ 2] = zx*nc - ys; r[ 6] = yz*nc + xs; r[10] = z*z*nc + c; in rotate()
528 GLfloat det22(GLfloat a, GLfloat b, GLfloat c, GLfloat d) { in det22() argument
529 return a*d - b*c; in det22()
533 GLfloat ndet22(GLfloat a, GLfloat b, GLfloat c, GLfloat d) { in ndet22() argument
534 return b*c - a*d; in ndet22()
641 int ogles_surfaceport(ogles_context_t* c, GLint x, GLint y) in ogles_surfaceport() argument
643 c->viewport.surfaceport.x = x; in ogles_surfaceport()
644 c->viewport.surfaceport.y = y; in ogles_surfaceport()
646 ogles_viewport(c, in ogles_surfaceport()
647 c->viewport.x, in ogles_surfaceport()
648 c->viewport.y, in ogles_surfaceport()
649 c->viewport.w, in ogles_surfaceport()
650 c->viewport.h); in ogles_surfaceport()
652 ogles_scissor(c, in ogles_surfaceport()
653 c->viewport.scissor.x, in ogles_surfaceport()
654 c->viewport.scissor.y, in ogles_surfaceport()
655 c->viewport.scissor.w, in ogles_surfaceport()
656 c->viewport.scissor.h); in ogles_surfaceport()
661 void ogles_scissor(ogles_context_t* c, in ogles_scissor() argument
665 ogles_error(c, GL_INVALID_VALUE); in ogles_scissor()
668 c->viewport.scissor.x = x; in ogles_scissor()
669 c->viewport.scissor.y = y; in ogles_scissor()
670 c->viewport.scissor.w = w; in ogles_scissor()
671 c->viewport.scissor.h = h; in ogles_scissor()
673 x += c->viewport.surfaceport.x; in ogles_scissor()
674 y += c->viewport.surfaceport.y; in ogles_scissor()
676 y = c->rasterizer.state.buffers.color.height - (y + h); in ogles_scissor()
677 c->rasterizer.procs.scissor(c, x, y, w, h); in ogles_scissor()
680 void ogles_viewport(ogles_context_t* c, in ogles_viewport() argument
684 ogles_error(c, GL_INVALID_VALUE); in ogles_viewport()
688 c->viewport.x = x; in ogles_viewport()
689 c->viewport.y = y; in ogles_viewport()
690 c->viewport.w = w; in ogles_viewport()
691 c->viewport.h = h; in ogles_viewport()
693 x += c->viewport.surfaceport.x; in ogles_viewport()
694 y += c->viewport.surfaceport.y; in ogles_viewport()
696 GLint H = c->rasterizer.state.buffers.color.height; in ogles_viewport()
702 GLfloat near = c->transforms.vpt.zNear; in ogles_viewport()
703 GLfloat far = c->transforms.vpt.zFar; in ogles_viewport()
708 GLfloat* const f = c->transforms.vpt.matrix.editElements(); in ogles_viewport()
713 c->transforms.dirty |= transform_state_t::VIEWPORT; in ogles_viewport()
714 if (c->transforms.mvp4.flags & transform_t::FLAGS_2D_PROJECTION) in ogles_viewport()
715 c->transforms.dirty |= transform_state_t::MVP; in ogles_viewport()
814 ogles_context_t* c) in frustumf() argument
822 ogles_error(c, GL_INVALID_VALUE); in frustumf()
848 c->transforms.current->multiply(rhs); in frustumf()
849 c->transforms.invalidate(); in frustumf()
856 ogles_context_t* c) in orthof() argument
862 ogles_error(c, GL_INVALID_VALUE); in orthof()
887 c->transforms.current->multiply(rhs); in orthof()
888 c->transforms.invalidate(); in orthof()
891 static void depthRangef(GLclampf zNear, GLclampf zFar, ogles_context_t* c) in depthRangef() argument
895 GLfloat* const f = c->transforms.vpt.matrix.editElements(); in depthRangef()
898 c->transforms.dirty |= transform_state_t::VIEWPORT; in depthRangef()
899 c->transforms.vpt.zNear = zNear; in depthRangef()
900 c->transforms.vpt.zFar = zFar; in depthRangef()
911 ogles_context_t* c = ogles_context_t::get(); in glMatrixMode() local
915 stack = &c->transforms.modelview; in glMatrixMode()
918 stack = &c->transforms.projection; in glMatrixMode()
921 stack = &c->transforms.texture[c->textures.active]; in glMatrixMode()
924 ogles_error(c, GL_INVALID_ENUM); in glMatrixMode()
927 c->transforms.matrixMode = mode; in glMatrixMode()
928 c->transforms.current = stack; in glMatrixMode()
933 ogles_context_t* c = ogles_context_t::get(); in glLoadIdentity() local
934 c->transforms.current->loadIdentity(); // also loads the GLfixed transform in glLoadIdentity()
935 c->transforms.invalidate(); in glLoadIdentity()
936 c->transforms.current->dirty = 0; in glLoadIdentity()
941 ogles_context_t* c = ogles_context_t::get(); in glLoadMatrixf() local
942 c->transforms.current->load(m); in glLoadMatrixf()
943 c->transforms.invalidate(); in glLoadMatrixf()
948 ogles_context_t* c = ogles_context_t::get(); in glLoadMatrixx() local
949 c->transforms.current->load(m); // also loads the GLfixed transform in glLoadMatrixx()
950 c->transforms.invalidate(); in glLoadMatrixx()
951 c->transforms.current->dirty &= ~matrix_stack_t::DO_FLOAT_TO_FIXED; in glLoadMatrixx()
956 ogles_context_t* c = ogles_context_t::get(); in glMultMatrixf() local
959 c->transforms.current->multiply(rhs); in glMultMatrixf()
960 c->transforms.invalidate(); in glMultMatrixf()
965 ogles_context_t* c = ogles_context_t::get(); in glMultMatrixx() local
968 c->transforms.current->multiply(rhs); in glMultMatrixx()
969 c->transforms.invalidate(); in glMultMatrixx()
974 ogles_context_t* c = ogles_context_t::get(); in glPopMatrix() local
975 GLint err = c->transforms.current->pop(); in glPopMatrix()
977 ogles_error(c, err); in glPopMatrix()
980 c->transforms.invalidate(); in glPopMatrix()
985 ogles_context_t* c = ogles_context_t::get(); in glPushMatrix() local
986 GLint err = c->transforms.current->push(); in glPushMatrix()
988 ogles_error(c, err); in glPushMatrix()
991 c->transforms.invalidate(); in glPushMatrix()
999 ogles_context_t* c = ogles_context_t::get(); in glFrustumf() local
1000 frustumf(left, right, bottom, top, zNear, zFar, c); in glFrustumf()
1008 ogles_context_t* c = ogles_context_t::get(); in glFrustumx() local
1012 c); in glFrustumx()
1020 ogles_context_t* c = ogles_context_t::get(); in glOrthof() local
1021 orthof(left, right, bottom, top, zNear, zFar, c); in glOrthof()
1029 ogles_context_t* c = ogles_context_t::get(); in glOrthox() local
1033 c); in glOrthox()
1038 ogles_context_t* c = ogles_context_t::get(); in glRotatef() local
1039 c->transforms.current->rotate(a, x, y, z); in glRotatef()
1040 c->transforms.invalidate(); in glRotatef()
1045 ogles_context_t* c = ogles_context_t::get(); in glRotatex() local
1046 c->transforms.current->rotate( in glRotatex()
1049 c->transforms.invalidate(); in glRotatex()
1054 ogles_context_t* c = ogles_context_t::get(); in glScalef() local
1055 c->transforms.current->scale(x, y, z); in glScalef()
1056 c->transforms.invalidate(); in glScalef()
1061 ogles_context_t* c = ogles_context_t::get(); in glScalex() local
1062 c->transforms.current->scale( in glScalex()
1064 c->transforms.invalidate(); in glScalex()
1069 ogles_context_t* c = ogles_context_t::get(); in glTranslatef() local
1070 c->transforms.current->translate(x, y, z); in glTranslatef()
1071 c->transforms.invalidate(); in glTranslatef()
1076 ogles_context_t* c = ogles_context_t::get(); in glTranslatex() local
1077 c->transforms.current->translate( in glTranslatex()
1079 c->transforms.invalidate(); in glTranslatex()
1084 ogles_context_t* c = ogles_context_t::get(); in glScissor() local
1085 ogles_scissor(c, x, y, w, h); in glScissor()
1090 ogles_context_t* c = ogles_context_t::get(); in glViewport() local
1091 ogles_viewport(c, x, y, w, h); in glViewport()
1096 ogles_context_t* c = ogles_context_t::get(); in glDepthRangef() local
1097 depthRangef(zNear, zFar, c); in glDepthRangef()
1102 ogles_context_t* c = ogles_context_t::get(); in glDepthRangex() local
1103 depthRangef(fixedToFloat(zNear), fixedToFloat(zFar), c); in glDepthRangex()
1108 ogles_context_t* c = ogles_context_t::get(); in glPolygonOffsetx() local
1109 c->polygonOffset.factor = factor; in glPolygonOffsetx()
1110 c->polygonOffset.units = units; in glPolygonOffsetx()
1115 ogles_context_t* c = ogles_context_t::get(); in glPolygonOffset() local
1116 c->polygonOffset.factor = gglFloatToFixed(factor); in glPolygonOffset()
1117 c->polygonOffset.units = gglFloatToFixed(units); in glPolygonOffset()
1122 ogles_context_t* c = ogles_context_t::get(); in glQueryMatrixxOES() local
1124 GLfloat const* f = c->transforms.current->top().elements(); in glQueryMatrixxOES()