69 if (
ctx->NewModelViewMatrix) {
72 if (
ctx->NewProjectionMatrix) {
75 if (
ctx->NewTextureMatrix) {
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;
97 &
ctx->Current.RasterIndex );
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;
110 ctx->Current.RasterIndex =
ctx->Current.Index;
121 ctx->Current.RasterDistance =
122 GL_SQRT( eye[0]*eye[0] + eye[1]*eye[1] + eye[2]*eye[2] );
136 ndc[0] = clip[0] *
d;
137 ndc[1] = clip[1] *
d;
138 ndc[2] = clip[2] *
d;
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];
149 if (
ctx->Texture.Enabled) {
150 COPY_4V(
ctx->Current.RasterTexCoord,
ctx->Current.TexCoord );
170 ctx->Current.RasterPos[0] =
x;
171 ctx->Current.RasterPos[1] =
y;
172 ctx->Current.RasterPos[2] =
CLAMP(
z, 0.0F, 1.0F );
173 ctx->Current.RasterPos[3] =
w;
178 if (
ctx->Light.Enabled) {
182 if (
ctx->NewModelViewMatrix) {
188 if (
ctx->Visual->RGBAflag) {
199 &
ctx->Current.RasterIndex );
204 if (
ctx->Visual->RGBAflag) {
206 ctx->Current.ByteColor[0] *
ctx->Visual->InvRedScale,
207 ctx->Current.ByteColor[1] *
ctx->Visual->InvGreenScale,
208 ctx->Current.ByteColor[2] *
ctx->Visual->InvBlueScale,
209 ctx->Current.ByteColor[3] *
ctx->Visual->InvAlphaScale );
212 ctx->Current.RasterIndex =
ctx->Current.Index;
216 ctx->Current.RasterDistance = 0.0;
218 if (
ctx->Texture.Enabled) {
219 COPY_4V(
ctx->Current.RasterTexCoord,
ctx->Current.TexCoord );
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_windowpos(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void gl_RasterPos4f(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
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[])
#define CLAMP(f, min, max)