142 switch (
ctx->ModelViewMatrixType) {
152 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
153 vEye[
i][0] = m0 * ox + m4 * oy +
m12;
154 vEye[
i][1] = m1 * ox + m5 * oy +
m13;
155 vEye[
i][2] = m2 * ox + m6 * oy +
m14;
156 vEye[
i][3] = m3 * ox + m7 * oy + m15;
164 vEye[
i][0] = vObj[
i][0];
165 vEye[
i][1] = vObj[
i][1];
174 GLfloat m0 =
m[0], m1 =
m[1], m4 =
m[4], m5 =
m[5];
178 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
179 vEye[
i][0] = m0 * ox + m4 * oy +
m12;
180 vEye[
i][1] = m1 * ox + m5 * oy +
m13;
192 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
193 vEye[
i][0] = m0 * ox +
m12;
194 vEye[
i][1] = m5 * oy +
m13;
203 GLfloat m0 =
m[0], m1 =
m[1], m2 =
m[2], m4 =
m[4], m5 =
m[5];
207 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
208 vEye[
i][0] = m0 * ox + m4 * oy +
m12;
209 vEye[
i][1] = m1 * ox + m5 * oy +
m13;
210 vEye[
i][2] = m2 * ox + m6 * oy +
m14;
236 switch (
ctx->ModelViewMatrixType) {
246 GLfloat ox = vObj[
i][0], oy = vObj[
i][1], oz = vObj[
i][2];
247 vEye[
i][0] = m0 * ox + m4 * oy + m8 * oz +
m12;
248 vEye[
i][1] = m1 * ox + m5 * oy + m9 * oz +
m13;
249 vEye[
i][2] = m2 * ox + m6 * oy + m10 * oz +
m14;
250 vEye[
i][3] = m3 * ox + m7 * oy +
m11 * oz + m15;
258 vEye[
i][0] = vObj[
i][0];
259 vEye[
i][1] = vObj[
i][1];
260 vEye[
i][2] = vObj[
i][2];
268 GLfloat m0 =
m[0], m1 =
m[1], m4 =
m[4], m5 =
m[5];
272 GLfloat ox = vObj[
i][0], oy = vObj[
i][1], oz = vObj[
i][2];
273 vEye[
i][0] = m0 * ox + m4 * oy +
m12 ;
274 vEye[
i][1] = m1 * ox + m5 * oy +
m13 ;
286 GLfloat ox = vObj[
i][0], oy = vObj[
i][1], oz = vObj[
i][2];
287 vEye[
i][0] = m0 * ox +
m12 ;
288 vEye[
i][1] = m5 * oy +
m13 ;
297 GLfloat m0 =
m[0], m1 =
m[1], m2 =
m[2], m4 =
m[4], m5 =
m[5];
298 GLfloat m6 =
m[6], m8 =
m[8], m9 =
m[9], m10 =
m[10];
302 GLfloat ox = vObj[
i][0], oy = vObj[
i][1], oz = vObj[
i][2];
303 vEye[
i][0] = m0 * ox + m4 * oy + m8 * oz +
m12 ;
304 vEye[
i][1] = m1 * ox + m5 * oy + m9 * oz +
m13 ;
305 vEye[
i][2] = m2 * ox + m6 * oy + m10 * oz +
m14 ;
315 switch (
ctx->ModelViewMatrixType) {
341 for (
i = 0;
i <
n;
i++)
343 TRACE(
"(%3.1f, %3.1f, %3.1f, %3.1f) --> (%3.1f, %3.1f, %3.1f, %3.1f)\n",
344 vObj[
i][0], vObj[
i][1], vObj[
i][2], vObj[
i][3],
345 vEye[
i][0], vEye[
i][1], vEye[
i][2], vEye[
i][3]);
365 switch (
ctx->ModelViewMatrixType) {
375 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
376 GLfloat oz = vObj[
i][2], ow = vObj[
i][3];
377 vEye[
i][0] = m0 * ox + m4 * oy + m8 * oz +
m12 * ow;
378 vEye[
i][1] = m1 * ox + m5 * oy + m9 * oz +
m13 * ow;
379 vEye[
i][2] = m2 * ox + m6 * oy + m10 * oz +
m14 * ow;
380 vEye[
i][3] = m3 * ox + m7 * oy +
m11 * oz + m15 * ow;
388 vEye[
i][0] = vObj[
i][0];
389 vEye[
i][1] = vObj[
i][1];
390 vEye[
i][2] = vObj[
i][2];
391 vEye[
i][3] = vObj[
i][3];
398 GLfloat m0 =
m[0], m1 =
m[1], m4 =
m[4], m5 =
m[5];
402 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
403 GLfloat oz = vObj[
i][2], ow = vObj[
i][3];
404 vEye[
i][0] = m0 * ox + m4 * oy +
m12 * ow;
405 vEye[
i][1] = m1 * ox + m5 * oy +
m13 * ow;
417 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
418 GLfloat oz = vObj[
i][2], ow = vObj[
i][3];
419 vEye[
i][0] = m0 * ox +
m12 * ow;
420 vEye[
i][1] = m5 * oy +
m13 * ow;
429 GLfloat m0 =
m[0], m1 =
m[1], m2 =
m[2], m4 =
m[4], m5 =
m[5];
430 GLfloat m6 =
m[6], m8 =
m[8], m9 =
m[9], m10 =
m[10];
434 GLfloat ox = vObj[
i][0], oy = vObj[
i][1];
435 GLfloat oz = vObj[
i][2], ow = vObj[
i][3];
436 vEye[
i][0] = m0 * ox + m4 * oy + m8 * oz +
m12 * ow;
437 vEye[
i][1] = m1 * ox + m5 * oy + m9 * oz +
m13 * ow;
438 vEye[
i][2] = m2 * ox + m6 * oy + m10 * oz +
m14 * ow;
448 switch (
ctx->ModelViewMatrixType) {
484 switch (
ctx->TextureMatrixType) {
495 t[
i][0] = m0 * t0 + m4 * t1 + m8 * t2 +
m12 * t3;
496 t[
i][1] = m1 * t0 + m5 * t1 + m9 * t2 +
m13 * t3;
497 t[
i][2] = m2 * t0 + m6 * t1 + m10 * t2 +
m14 * t3;
498 t[
i][3] = m3 * t0 + m7 * t1 +
m11 * t2 + m15 * t3;
508 GLfloat m0 =
m[0], m1 =
m[1], m4 =
m[4], m5 =
m[5];
513 t[
i][0] = m0 * t0 + m4 * t1 +
m12 * t3;
514 t[
i][1] = m1 * t0 + m5 * t1 +
m13 * t3;
523 GLfloat m0 =
m[0], m1 =
m[1], m2 =
m[2], m4 =
m[4], m5 =
m[5];
524 GLfloat m6 =
m[6], m8 =
m[8], m9 =
m[9], m10 =
m[10];
529 t[
i][0] = m0 * t0 + m4 * t1 + m8 * t2 +
m12 * t3;
530 t[
i][1] = m1 * t0 + m5 * t1 + m9 * t2 +
m13 * t3;
531 t[
i][2] = m2 * t0 + m6 * t1 + m10 * t2 +
m14 * t3;
538 gl_problem(
NULL,
"invalid matrix type in transform_texcoords()" );
541 switch (
ctx->TextureMatrixType) {
556 gl_problem(
NULL,
"invalid matrix type in transform_texcoords()" );
591 switch (
ctx->ProjectionMatrixType) {
602 GLfloat ez = vEye[
i][2], ew = vEye[
i][3];
657 GLfloat ez = vEye[
i][2], ew = vEye[
i][3];
684 GLfloat m0 =
m[0], m5 =
m[5], m8 =
m[8], m9 =
m[9];
689 GLfloat ez = vEye[
i][2], ew = vEye[
i][3];
691 volatile GLfloat cy = m5 * ey + m9 * ez ;
715 gl_problem(
NULL,
"invalid matrix type in project_and_cliptest()" );
719 *andMask = tmpAndMask;
721 switch (
ctx->ProjectionMatrixType) {
724 clipMask, orMask, andMask );
731 clipMask, orMask, andMask );
735 vEye, clipMask, orMask, andMask );
739 gl_problem(
NULL,
"invalid matrix type in project_and_cliptest()" );
747#define MAGIC_NUMBER -0.8e-03F
769 if (
ctx->Transform.ClipEnabled[
p]) {
778 + vEye[
i][2] *
c + vEye[
i][3] *
d;
829 if (clipMask[
i]==0) {
830 vWin[
i][0] = vClip[
i][0] * sx + tx;
831 vWin[
i][1] = vClip[
i][1] * sy +
ty;
832 vWin[
i][2] = vClip[
i][2] * sz +
tz;
840 vWin[
i][0] = vClip[
i][0] * sx + tx;
841 vWin[
i][1] = vClip[
i][1] * sy +
ty;
842 vWin[
i][2] = vClip[
i][2] * sz +
tz;
852 if (clipMask[
i] == 0) {
853 if (vClip[
i][3] != 0.0F) {
855 vWin[
i][0] = vClip[
i][0] * wInv * sx + tx;
856 vWin[
i][1] = vClip[
i][1] * wInv * sy +
ty;
857 vWin[
i][2] = vClip[
i][2] * wInv * sz +
tz;
872 if (vClip[
i][3] != 0.0F) {
874 vWin[
i][0] = vClip[
i][0] * wInv * sx + tx;
875 vWin[
i][1] = vClip[
i][1] * wInv * sy +
ty;
876 vWin[
i][2] = vClip[
i][2] * wInv * sz +
tz;
890 for (
i = 0;
i <
n;
i++)
892 TRACE(
"(%3.1f, %3.1f, %3.1f, %3.1f) --> (%3.1f, %3.1f, %3.1f)\n",
893 vClip[
i][0], vClip[
i][1], vClip[
i][2], vClip[
i][3],
894 vWin[
i][0], vWin[
i][1], vWin[
i][2]);
912 if (
VB->MaterialMask[
i]) {
914 COPY_4V(
ctx->Light.Material[0].Ambient,
VB->Material[
i][0].Ambient );
917 COPY_4V(
ctx->Light.Material[1].Ambient,
VB->Material[
i][1].Ambient );
920 COPY_4V(
ctx->Light.Material[0].Diffuse,
VB->Material[
i][0].Diffuse );
923 COPY_4V(
ctx->Light.Material[1].Diffuse,
VB->Material[
i][1].Diffuse );
926 COPY_4V(
ctx->Light.Material[0].Specular,
VB->Material[
i][0].Specular );
929 COPY_4V(
ctx->Light.Material[1].Specular,
VB->Material[
i][1].Specular );
932 COPY_4V(
ctx->Light.Material[0].Emission,
VB->Material[
i][0].Emission );
935 COPY_4V(
ctx->Light.Material[1].Emission,
VB->Material[
i][1].Emission );
938 ctx->Light.Material[0].Shininess =
VB->Material[
i][0].Shininess;
942 ctx->Light.Material[1].Shininess =
VB->Material[
i][1].Shininess;
946 ctx->Light.Material[0].AmbientIndex =
VB->Material[
i][0].AmbientIndex;
947 ctx->Light.Material[0].DiffuseIndex =
VB->Material[
i][0].DiffuseIndex;
948 ctx->Light.Material[0].SpecularIndex =
VB->Material[
i][0].SpecularIndex;
951 ctx->Light.Material[1].AmbientIndex =
VB->Material[
i][1].AmbientIndex;
952 ctx->Light.Material[1].DiffuseIndex =
VB->Material[
i][1].DiffuseIndex;
953 ctx->Light.Material[1].SpecularIndex =
VB->Material[
i][1].SpecularIndex;
955 VB->MaterialMask[
i] = 0;
967 if (
ctx->Visual->RGBAflag) {
968 if (!
VB->MonoMaterial) {
974 &
VB->Normal[
i], &
VB->Fcolor[
i]);
975 if (
ctx->Light.Model.TwoSide) {
977 &
VB->Normal[
i], &
VB->Bcolor[
i]);
986 if (
ctx->Light.Fast) {
987 if (
VB->MonoNormal) {
993 VB->Normal +
VB->Start,
998 if (
ctx->Light.Model.TwoSide) {
1001 VB->Normal +
VB->Start,
1012 VB->Count -
VB->Start,
1013 VB->Normal +
VB->Start,
1014 VB->Fcolor +
VB->Start );
1015 if (
ctx->Light.Model.TwoSide) {
1017 VB->Count -
VB->Start,
1018 VB->Normal +
VB->Start,
1019 VB->Bcolor +
VB->Start );
1026 VB->Count -
VB->Start,
1027 VB->Eye +
VB->Start,
1028 VB->Normal +
VB->Start,
1029 VB->Fcolor +
VB->Start );
1030 if (
ctx->Light.Model.TwoSide) {
1032 VB->Count -
VB->Start,
1033 VB->Eye +
VB->Start,
1034 VB->Normal +
VB->Start,
1035 VB->Bcolor +
VB->Start );
1042 if (!
VB->MonoMaterial) {
1051 &
VB->Normal[
i], &
VB->Findex[
i] );
1052 if (
ctx->Light.Model.TwoSide) {
1054 &
VB->Normal[
i], &
VB->Bindex[
i] );
1064 VB->Count -
VB->Start,
1065 VB->Eye +
VB->Start,
1066 VB->Normal +
VB->Start,
1067 VB->Findex +
VB->Start );
1068 if (
ctx->Light.Model.TwoSide) {
1070 VB->Count -
VB->Start,
1071 VB->Eye +
VB->Start,
1072 VB->Normal +
VB->Start,
1073 VB->Bindex +
VB->Start );
1088 if (
ctx->Visual->RGBAflag) {
1091 VB->Eye +
VB->Start,
1092 VB->Fcolor +
VB->Start );
1093 if (
ctx->LightTwoSide) {
1095 VB->Eye +
VB->Start,
1096 VB->Bcolor +
VB->Start );
1102 VB->Eye +
VB->Start,
1103 VB->Findex +
VB->Start );
1104 if (
ctx->LightTwoSide) {
1106 VB->Eye +
VB->Start,
1107 VB->Bindex +
VB->Start );
1134 VB->Obj +
VB->Start,
VB->Eye +
VB->Start );
1138 VB->Obj +
VB->Start,
VB->Eye +
VB->Start );
1142 if (
ctx->NeedNormals) {
1144 VB->Normal +
VB->Start,
ctx->ModelViewInv,
1145 VB->Normal +
VB->Start,
ctx->Transform.Normalize );
1149 ctx->VertexTime += gl_time() - t0;
1175 if (
ctx->Transform.AnyClip) {
1177 VB->Eye +
VB->Start,
1178 VB->ClipMask +
VB->Start );
1189 VB->ClipAndMask = 0;
1197 VB->Clip +
VB->Start,
VB->ClipMask +
VB->Start,
1198 &
VB->ClipOrMask, &
VB->ClipAndMask );
1200 if (
VB->ClipAndMask) {
1209 if (
ctx->Light.Enabled) {
1220 if (
ctx->Texture.TexGenEnabled) {
1222 VB->Obj +
VB->Start,
1223 VB->Eye +
VB->Start,
1224 VB->Normal +
VB->Start,
1225 VB->TexCoord +
VB->Start );
1227 if (
ctx->NewTextureMatrix) {
1232 VB->TexCoord +
VB->Start );
1240 VB->ClipOrMask ?
VB->ClipMask +
VB->Start :
NULL,
1241 VB->Win +
VB->Start );
1244 if (
ctx->Driver.RasterSetup) {
1245 (*
ctx->Driver.RasterSetup)(
ctx, 0,
VB->Count );
1250 ctx->VertexTime += gl_time() - t0;
1251 ctx->VertexCount +=
VB->Count -
VB->Start;
1260 if (!
ctx->Driver.RenderVB || !(*
ctx->Driver.RenderVB)(
ctx,allDone)) {
void asm_project_and_cliptest_ortho(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4], GLubyte clipmask[], GLubyte *ormask, GLubyte *andmask)
void asm_project_and_cliptest_general(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4], GLubyte clipmask[], GLubyte *ormask, GLubyte *andmask)
void asm_project_and_cliptest_perspective(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4], GLubyte clipmask[], GLubyte *ormask, GLubyte *andmask)
void asm_transform_points4_general(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
void asm_transform_points4_2d_no_rot(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
void asm_transform_points3_3d(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
void asm_transform_points3_general(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
void asm_transform_points3_2d_no_rot(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
void asm_transform_points4_3d(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
void asm_transform_points4_identity(GLuint n, GLfloat d[][4], GLfloat s[][4])
void asm_transform_points4_2d(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
void asm_transform_points3_identity(GLuint n, GLfloat d[][4], GLfloat s[][4])
void asm_project_and_cliptest_identity(GLuint n, GLfloat d[][4], GLfloat s[][4], GLubyte clipmask[], GLubyte *ormask, GLubyte *andmask)
void asm_transform_points3_2d(GLuint n, GLfloat d[][4], GLfloat m[16], GLfloat s[][4])
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void gl_problem(const GLcontext *ctx, const char *s)
void gl_analyze_texture_matrix(GLcontext *ctx)
void gl_texgen(GLcontext *ctx, GLint n, GLfloat obj[][4], GLfloat eye[][4], GLfloat normal[][3], GLfloat texcoord[][4])
#define FRONT_SHININESS_BIT
#define FRONT_SPECULAR_BIT
#define FRONT_INDEXES_BIT
#define FRONT_DIFFUSE_BIT
#define BACK_EMISSION_BIT
#define FRONT_AMBIENT_BIT
#define BACK_SPECULAR_BIT
#define MATRIX_PERSPECTIVE
#define BACK_SHININESS_BIT
#define FRONT_EMISSION_BIT
void gl_fog_index_vertices(GLcontext *ctx, GLuint n, GLfloat v[][4], GLuint indx[])
void gl_fog_color_vertices(GLcontext *ctx, GLuint n, GLfloat v[][4], GLubyte color[][4])
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define COPY_4V(DST, SRC)
void gl_compute_material_shine_table(struct gl_material *m)
_Out_opt_ int _Out_opt_ int * cy
void gl_color_shade_vertices(GLcontext *ctx, GLuint side, GLuint n, GLfloat vertex[][4], GLfloat normal[][3], GLubyte color[][4])
void gl_color_shade_vertices_fast(GLcontext *ctx, GLuint side, GLuint n, GLfloat normal[][3], GLubyte color[][4])
void gl_index_shade_vertices(GLcontext *ctx, GLuint side, GLuint n, GLfloat vertex[][4], GLfloat normal[][3], GLuint indexResult[])
struct vertex_buffer * VB
void gl_render_vb(GLcontext *ctx, GLboolean allDone)
void gl_reset_vb(GLcontext *ctx, GLboolean allDone)