64{
66
68
69 if (
ctx->NewModelViewMatrix) {
71 }
72 if (
ctx->NewProjectionMatrix) {
74 }
75 if (
ctx->NewTextureMatrix) {
77 }
78
79
81
82
83 if (
ctx->Light.Enabled) {
87 if (
ctx->Visual->RGBAflag) {
90 ctx->Current.RasterColor[0] =
color[0] *
ctx->Visual->InvRedScale;
91 ctx->Current.RasterColor[1] =
color[1] *
ctx->Visual->InvGreenScale;
92 ctx->Current.RasterColor[2] =
color[2] *
ctx->Visual->InvBlueScale;
93 ctx->Current.RasterColor[3] =
color[3] *
ctx->Visual->InvAlphaScale;
94 }
95 else {
97 &
ctx->Current.RasterIndex );
98 }
99 }
100 else {
101
102 if (
ctx->Visual->RGBAflag) {
104 rc[0] =
ctx->Current.ByteColor[0] *
ctx->Visual->InvRedScale;
105 rc[1] =
ctx->Current.ByteColor[1] *
ctx->Visual->InvGreenScale;
106 rc[2] =
ctx->Current.ByteColor[2] *
ctx->Visual->InvBlueScale;
107 rc[3] =
ctx->Current.ByteColor[3] *
ctx->Visual->InvAlphaScale;
108 }
109 else {
110 ctx->Current.RasterIndex =
ctx->Current.Index;
111 }
112 }
113
114
117 return;
118 }
119
120
121 ctx->Current.RasterDistance =
122 GL_SQRT( eye[0]*eye[0] + eye[1]*eye[1] + eye[2]*eye[2] );
123
124
126
127
130 return;
131 }
132
133
136 ndc[0] = clip[0] *
d;
137 ndc[1] = clip[1] *
d;
138 ndc[2] = clip[2] *
d;
139
140 ctx->Current.RasterPos[0] = ndc[0] *
ctx->Viewport.Sx +
ctx->Viewport.Tx;
141 ctx->Current.RasterPos[1] = ndc[1] *
ctx->Viewport.Sy +
ctx->Viewport.Ty;
142 ctx->Current.RasterPos[2] = (ndc[2] *
ctx->Viewport.Sz +
ctx->Viewport.Tz)
144 ctx->Current.RasterPos[3] = clip[3];
146
147
148
149 if (
ctx->Texture.Enabled) {
150 COPY_4V(
ctx->Current.RasterTexCoord,
ctx->Current.TexCoord );
151 }
152
155 }
156
157}
GLuint gl_userclip_point(GLcontext *ctx, const GLfloat v[])
GLuint gl_viewclip_point(const GLfloat v[])
void gl_analyze_texture_matrix(GLcontext *ctx)
void gl_analyze_modelview_matrix(GLcontext *ctx)
void gl_analyze_projection_matrix(GLcontext *ctx)
void gl_update_hitflag(GLcontext *ctx, GLfloat z)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLubyte GLubyte GLubyte GLubyte w
#define ASSIGN_4V(V, V0, V1, V2, V3)
#define COPY_4V(DST, SRC)
void gl_color_shade_vertices(GLcontext *ctx, GLuint side, GLuint n, GLfloat vertex[][4], 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[])