-/* $Id: lines.c,v 1.9 2000/03/03 18:55:45 brianp Exp $ */
+/* $Id: lines.c,v 1.10 2000/05/10 22:36:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
static void flat_ci_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- PB_SET_INDEX( ctx, ctx->PB, ctx->VB->IndexPtr->data[pvert] );
- count = ctx->PB->count;
+ PB_SET_INDEX( ctx->PB, ctx->VB->IndexPtr->data[pvert] );
#define INTERP_XY 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, 0);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
static void flat_ci_z_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- GLdepth *pbz = ctx->PB->z;
- PB_SET_INDEX( ctx, ctx->PB, ctx->VB->IndexPtr->data[pvert] );
- count = ctx->PB->count;
+ PB_SET_INDEX( ctx->PB, ctx->VB->IndexPtr->data[pvert] );
#define INTERP_XY 1
#define INTERP_Z 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- pbz[count] = Z; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, Z);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
static void flat_rgba_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- GLubyte *color = ctx->VB->ColorPtr->data[pvert];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
- count = ctx->PB->count;
+ const GLubyte *color = ctx->VB->ColorPtr->data[pvert];
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
#define INTERP_XY 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, 0);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
static void flat_rgba_z_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- GLdepth *pbz = ctx->PB->z;
- GLubyte *color = ctx->VB->ColorPtr->data[pvert];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
- count = ctx->PB->count;
+ const GLubyte *color = ctx->VB->ColorPtr->data[pvert];
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
#define INTERP_XY 1
#define INTERP_Z 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- pbz[count] = Z; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, Z);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
GLint count = ctx->PB->count;
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
- GLuint *pbi = ctx->PB->i;
+ GLuint *pbi = ctx->PB->index;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_INDEX 1
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
- GLuint *pbi = ctx->PB->i;
+ GLuint *pbi = ctx->PB->index;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_Z 1
#define INTERP_INDEX 1
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_RGB 1
#define INTERP_ALPHA 1
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_Z 1
#define INTERP_RGB 1
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
- GLuint *pbi = ctx->PB->i;
+ GLuint *pbi = ctx->PB->index;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
- PB_SET_INDEX( ctx, ctx->PB, ctx->VB->IndexPtr->data[pvert] );
+ PB_SET_INDEX( ctx->PB, ctx->VB->IndexPtr->data[pvert] );
count = ctx->PB->count;
if (ctx->Line.StippleFlag) {
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
GLubyte *color = ctx->VB->ColorPtr->data[pvert];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
count = ctx->PB->count;
if (ctx->Line.StippleFlag) {
GLfloat *pbt = ctx->PB->t[0];
GLfloat *pbu = ctx->PB->u[0];
GLubyte *color = ctx->VB->ColorPtr->data[pv];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
count = ctx->PB->count;
if (ctx->Line.StippleFlag) {
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
GLubyte (*pbspec)[3] = ctx->PB->spec;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
-/* $Id: points.c,v 1.8 2000/05/07 23:18:54 brianp Exp $ */
+/* $Id: points.c,v 1.9 2000/05/10 22:36:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
GLfloat *win;
GLint *pbx = PB->x, *pby = PB->y;
GLdepth *pbz = PB->z;
- GLuint *pbi = PB->i;
+ GLuint *pbi = PB->index;
GLuint pbcount = PB->count;
GLuint i;
y1 = y0 + isize - 1;
}
- PB_SET_INDEX( ctx, PB, VB->IndexPtr->data[i] );
+ PB_SET_INDEX( PB, VB->IndexPtr->data[i] );
for (iy = y0; iy <= y1; iy++) {
for (ix = x0; ix <= x1; ix++) {
y1 = y0 + isize - 1;
}
- PB_SET_COLOR( ctx, PB,
+ PB_SET_COLOR( PB,
VB->ColorPtr->data[i][0],
VB->ColorPtr->data[i][1],
VB->ColorPtr->data[i][2],
y1 = y0 + isize - 1;
}
- PB_SET_INDEX( ctx, PB, VB->IndexPtr->data[i] );
+ PB_SET_INDEX( PB, VB->IndexPtr->data[i] );
for (iy=y0;iy<=y1;iy++) {
for (ix=x0;ix<=x1;ix++) {
y1 = y0 + isize - 1;
}
- PB_SET_COLOR( ctx, PB,
+ PB_SET_COLOR( PB,
VB->ColorPtr->data[i][0],
VB->ColorPtr->data[i][1],
VB->ColorPtr->data[i][2],
}
+#ifdef DEBUG
+void
+_mesa_print_points_function(GLcontext *ctx)
+{
+ printf("Point Func == ");
+ if (ctx->Driver.PointsFunc == size1_ci_points)
+ printf("size1_ci_points\n");
+ else if (ctx->Driver.PointsFunc == size1_rgba_points)
+ printf("size1_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == general_ci_points)
+ printf("general_ci_points\n");
+ else if (ctx->Driver.PointsFunc == general_rgba_points)
+ printf("general_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == textured_rgba_points)
+ printf("textured_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == multitextured_rgba_points)
+ printf("multitextured_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == antialiased_rgba_points)
+ printf("antialiased_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == null_points)
+ printf("null_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_general_ci_points)
+ printf("dist_atten_general_ci_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_general_rgba_points)
+ printf("dist_atten_general_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_textured_rgba_points)
+ printf("dist_atten_textured_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_antialiased_rgba_points)
+ printf("dist_atten_antialiased_rgba_points\n");
+ else if (!ctx->Driver.PointsFunc)
+ printf("NULL\n");
+ else
+ printf("Driver func %p\n", ctx->Driver.PointsFunc);
+}
+#endif
+
+
/*
* Examine the current context to determine which point drawing function
* should be used.
ctx->Driver.PointsFunc = gl_select_points;
}
+ /*_mesa_print_points_function(ctx);*/
}
-/* $Id: state.c,v 1.11 2000/05/04 14:09:41 brianp Exp $ */
+/* $Id: state.c,v 1.12 2000/05/10 22:36:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
if (ctx->Scissor.Enabled) ctx->RasterMask |= SCISSOR_BIT;
if (ctx->Stencil.Enabled) ctx->RasterMask |= STENCIL_BIT;
if (ctx->Color.SWmasking) ctx->RasterMask |= MASKING_BIT;
+ if (ctx->Texture.ReallyEnabled) ctx->RasterMask |= TEXTURE_BIT;
if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
&& ctx->Color.ColorMask[ACOMP]
ctx->NeedNormals = (ctx->Light.Enabled || ctx->Texture.NeedNormals);
}
- if (ctx->NewState & (NEW_RASTER_OPS | NEW_LIGHTING | NEW_FOG)) {
+ if (ctx->NewState & (NEW_RASTER_OPS | NEW_LIGHTING | NEW_FOG | NEW_TEXTURE_ENABLE)) {
-
- if (ctx->NewState & NEW_RASTER_OPS) {
+ if (ctx->NewState & (NEW_RASTER_OPS | NEW_TEXTURE_ENABLE)) {
update_pixel_logic(ctx);
update_pixel_masking(ctx);
update_fog_mode(ctx);
(*ctx->Driver.Dither)( ctx, ctx->Color.DitherFlag );
}
- /* Check if incoming colors can be modified during rasterization */
- if (ctx->Fog.Enabled ||
- ctx->Texture.Enabled ||
- ctx->Color.BlendEnabled ||
- ctx->Color.SWmasking ||
- ctx->Color.SWLogicOpEnabled) {
- ctx->MutablePixels = GL_TRUE;
- }
- else {
- ctx->MutablePixels = GL_FALSE;
- }
-
/* update scissor region */
-
ctx->DrawBuffer->Xmin = 0;
ctx->DrawBuffer->Ymin = 0;
ctx->DrawBuffer->Xmax = ctx->DrawBuffer->Width-1;