-/* $Id: xm_api.c,v 1.52 2003/01/24 15:33:22 brianp Exp $ */
+/* $Id: xm_api.c,v 1.53 2003/02/17 16:35:56 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
}
- v->dithered_pf = PF_GRAYSCALE;
- v->undithered_pf = PF_GRAYSCALE;
+ v->dithered_pf = PF_Grayscale;
+ v->undithered_pf = PF_Grayscale;
return GL_TRUE;
}
}
}
- v->dithered_pf = PF_DITHER;
- v->undithered_pf = PF_LOOKUP;
+ v->dithered_pf = PF_Dither;
+ v->undithered_pf = PF_Lookup;
return GL_TRUE;
}
v->Kernel[i] = kernel[i] >> maxBits;
}
- v->undithered_pf = PF_TRUECOLOR;
- v->dithered_pf = (GET_VISUAL_DEPTH(v)<24) ? PF_TRUEDITHER : PF_TRUECOLOR;
+ v->undithered_pf = PF_Truecolor;
+ v->dithered_pf = (GET_VISUAL_DEPTH(v)<24) ? PF_Dither_True : PF_Truecolor;
}
/*
&& v->RedGamma==1.0 && v->GreenGamma==1.0 && v->BlueGamma==1.0) {
/* 5-6-5 color weight on common PC VGA boards */
v->undithered_pf = PF_5R6G5B;
- v->dithered_pf = PF_DITHER_5R6G5B;
+ v->dithered_pf = PF_Dither_5R6G5B;
}
else if (GET_REDMASK(v) ==0xe0
&& GET_GREENMASK(v)==0x1c
static void setup_monochrome( XMesaVisual v, XMesaBuffer b )
{
(void) b;
- v->dithered_pf = v->undithered_pf = PF_1BIT;
+ v->dithered_pf = v->undithered_pf = PF_1Bit;
/* if black=1 then we must flip pixel values */
v->bitFlip = (GET_BLACK_PIXEL(v) != 0);
}
* Even if the visual is TrueColor or DirectColor we treat it as
* being color indexed. This is weird but might be useful to someone.
*/
- v->dithered_pf = v->undithered_pf = PF_INDEX;
+ v->dithered_pf = v->undithered_pf = PF_Index;
v->index_bits = GET_VISUAL_DEPTH(v);
}
else {
GLuint pixelFormat)
{
switch (pixelFormat) {
- case PF_INDEX:
+ case PF_Index:
return 0;
- case PF_TRUECOLOR:
+ case PF_Truecolor:
{
unsigned long p;
PACK_TRUECOLOR( p, r, g, b );
return PACK_8R8G8B( r, g, b );
case PF_5R6G5B:
return PACK_5R6G5B( r, g, b );
- case PF_DITHER:
+ case PF_Dither:
{
DITHER_SETUP;
return DITHER( 1, 0, r, g, b );
}
- case PF_1BIT:
+ case PF_1Bit:
/* 382 = (3*255)/2 */
return ((r+g+b) > 382) ^ xmesa->xm_visual->bitFlip;
case PF_HPCR:
return DITHER_HPCR(1, 1, r, g, b);
- case PF_LOOKUP:
+ case PF_Lookup:
{
LOOKUP_SETUP;
return LOOKUP( r, g, b );
}
- case PF_GRAYSCALE:
+ case PF_Grayscale:
return GRAY_RGB( r, g, b );
- case PF_TRUEDITHER:
+ case PF_Dither_True:
/* fall through */
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
{
unsigned long p;
PACK_TRUEDITHER(p, 1, 0, r, g, b);
if ((hw = fxQueryHardware())==GR_SSTTYPE_VOODOO) {
b->FXctx = fxMesaCreateBestContext(0, b->width, b->height, attribs);
- if ((v->undithered_pf!=PF_INDEX) && (b->backimage)) {
+ if ((v->undithered_pf!=PF_Index) && (b->backimage)) {
b->FXisHackUsable = b->FXctx ? GL_TRUE : GL_FALSE;
if (fxEnvVar[0]=='w' || fxEnvVar[0]=='W')
b->FXwindowHack = b->FXctx ? GL_TRUE : GL_FALSE;
b->width * sizeof(GLushort), /* stride */
b->backimage->data); /* dest buffer */
}
- else if (b->xm_visual->dithered_pf==PF_DITHER
+ else if (b->xm_visual->dithered_pf==PF_Dither
&& GET_VISUAL_DEPTH(b->xm_visual)==8) {
/* Special case: 8bpp RGB */
for (y=0;y<b->height;y++) {
GLint a = (GLint) (alpha * 255.0F);
switch (xmesa->pixelformat) {
- case PF_INDEX:
+ case PF_Index:
return 0;
- case PF_TRUECOLOR:
+ case PF_Truecolor:
{
unsigned long p;
PACK_TRUECOLOR( p, r, g, b );
return PACK_8R8G8B( r, g, b );
case PF_5R6G5B:
return PACK_5R6G5B( r, g, b );
- case PF_DITHER:
+ case PF_Dither:
{
DITHER_SETUP;
return DITHER( x, y, r, g, b );
}
- case PF_1BIT:
+ case PF_1Bit:
/* 382 = (3*255)/2 */
return ((r+g+b) > 382) ^ xmesa->xm_visual->bitFlip;
case PF_HPCR:
return DITHER_HPCR(x, y, r, g, b);
- case PF_LOOKUP:
+ case PF_Lookup:
{
LOOKUP_SETUP;
return LOOKUP( r, g, b );
}
- case PF_GRAYSCALE:
+ case PF_Grayscale:
return GRAY_RGB( r, g, b );
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
/* fall through */
- case PF_TRUEDITHER:
+ case PF_Dither_True:
{
unsigned long p;
PACK_TRUEDITHER(p, x, y, r, g, b);
-/* $Id: xm_line.c,v 1.21 2002/11/14 03:48:03 brianp Exp $ */
+/* $Id: xm_line.c,v 1.22 2003/02/17 16:35:57 brianp Exp $ */
/*
* Mesa 3-D graphics library
&& ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS
&& ctx->Line.Width==1.0F) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
+ case PF_Truecolor:
return flat_TRUECOLOR_z_line;
case PF_8A8B8G8R:
return flat_8A8B8G8R_z_line;
return flat_8R8G8B24_z_line;
case PF_5R6G5B:
return flat_5R6G5B_z_line;
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
return flat_DITHER_5R6G5B_z_line;
- case PF_DITHER:
+ case PF_Dither:
return (depth==8) ? flat_DITHER8_z_line : (swrast_line_func) NULL;
- case PF_LOOKUP:
+ case PF_Lookup:
return (depth==8) ? flat_LOOKUP8_z_line : (swrast_line_func) NULL;
case PF_HPCR:
return flat_HPCR_z_line;
&& swrast->_RasterMask==0
&& ctx->Line.Width==1.0F) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
+ case PF_Truecolor:
return flat_TRUECOLOR_line;
case PF_8A8B8G8R:
return flat_8A8B8G8R_line;
return flat_8R8G8B24_line;
case PF_5R6G5B:
return flat_5R6G5B_line;
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
return flat_DITHER_5R6G5B_line;
- case PF_DITHER:
+ case PF_Dither:
return (depth==8) ? flat_DITHER8_line : (swrast_line_func) NULL;
- case PF_LOOKUP:
+ case PF_Lookup:
return (depth==8) ? flat_LOOKUP8_line : (swrast_line_func) NULL;
case PF_HPCR:
return flat_HPCR_line;
-/* $Id: xm_span.c,v 1.18 2002/11/13 16:48:47 brianp Exp $ */
+/* $Id: xm_span.c,v 1.19 2003/02/17 16:35:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
#endif
if (span && !error) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
- case PF_TRUEDITHER:
+ case PF_Truecolor:
+ case PF_Dither_True:
{
const GLubyte *pixelToR = xmesa->xm_visual->PixelToR;
const GLubyte *pixelToG = xmesa->xm_visual->PixelToG;
}
break;
case PF_5R6G5B:
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
{
const GLubyte *pixelToR = xmesa->xm_visual->PixelToR;
const GLubyte *pixelToG = xmesa->xm_visual->PixelToG;
}
}
break;
- case PF_DITHER:
- case PF_LOOKUP:
- case PF_GRAYSCALE:
+ case PF_Dither:
+ case PF_Lookup:
+ case PF_Grayscale:
{
GLubyte *rTable = source->pixel_to_r;
GLubyte *gTable = source->pixel_to_g;
}
}
break;
- case PF_1BIT:
+ case PF_1Bit:
{
int bitFlip = xmesa->xm_visual->bitFlip;
GLuint i;
else if (source->backimage) {
/* Read from XImage back buffer */
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
- case PF_TRUEDITHER:
+ case PF_Truecolor:
+ case PF_Dither_True:
{
const GLubyte *pixelToR = xmesa->xm_visual->PixelToR;
const GLubyte *pixelToG = xmesa->xm_visual->PixelToG;
}
break;
case PF_5R6G5B:
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
{
const GLubyte *pixelToR = xmesa->xm_visual->PixelToR;
const GLubyte *pixelToG = xmesa->xm_visual->PixelToG;
}
}
break;
- case PF_DITHER:
- case PF_LOOKUP:
- case PF_GRAYSCALE:
+ case PF_Dither:
+ case PF_Lookup:
+ case PF_Grayscale:
{
const GLubyte *rTable = source->pixel_to_r;
const GLubyte *gTable = source->pixel_to_g;
}
}
break;
- case PF_1BIT:
+ case PF_1Bit:
{
XMesaImage *img = source->backimage;
int bitFlip = xmesa->xm_visual->bitFlip;
if (source->buffer) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
- case PF_TRUEDITHER:
+ case PF_Truecolor:
+ case PF_Dither_True:
case PF_5R6G5B:
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
{
unsigned long rMask = GET_REDMASK(xmesa->xm_visual);
unsigned long gMask = GET_GREENMASK(xmesa->xm_visual);
}
}
break;
- case PF_DITHER:
- case PF_LOOKUP:
- case PF_GRAYSCALE:
+ case PF_Dither:
+ case PF_Lookup:
+ case PF_Grayscale:
{
GLubyte *rTable = source->pixel_to_r;
GLubyte *gTable = source->pixel_to_g;
}
}
break;
- case PF_1BIT:
+ case PF_1Bit:
{
int bitFlip = xmesa->xm_visual->bitFlip;
for (i=0;i<n;i++) {
}
else if (source->backimage) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
- case PF_TRUEDITHER:
+ case PF_Truecolor:
+ case PF_Dither_True:
case PF_5R6G5B:
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
{
unsigned long rMask = GET_REDMASK(xmesa->xm_visual);
unsigned long gMask = GET_GREENMASK(xmesa->xm_visual);
}
}
break;
- case PF_DITHER:
- case PF_LOOKUP:
- case PF_GRAYSCALE:
+ case PF_Dither:
+ case PF_Lookup:
+ case PF_Grayscale:
{
GLubyte *rTable = source->pixel_to_r;
GLubyte *gTable = source->pixel_to_g;
}
}
break;
- case PF_1BIT:
+ case PF_1Bit:
{
XMesaImage *img = source->backimage;
int bitFlip = xmesa->xm_visual->bitFlip;
if (xmesa->xm_buffer->buffer!=XIMAGE) {
/* Writing to window or back pixmap */
switch (xmesa->pixelformat) {
- case PF_INDEX:
+ case PF_Index:
dd->WriteCI32Span = write_span_index_pixmap;
dd->WriteCI8Span = write_span_index8_pixmap;
dd->WriteMonoCISpan = write_span_mono_index_pixmap;
dd->WriteCI32Pixels = write_pixels_index_pixmap;
dd->WriteMonoCIPixels = write_pixels_mono_index_pixmap;
break;
- case PF_TRUECOLOR:
+ case PF_Truecolor:
dd->WriteRGBASpan = write_span_TRUECOLOR_pixmap;
dd->WriteRGBSpan = write_span_rgb_TRUECOLOR_pixmap;
dd->WriteMonoRGBASpan = write_span_mono_pixmap;
dd->WriteRGBAPixels = write_pixels_TRUECOLOR_pixmap;
dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap;
break;
- case PF_TRUEDITHER:
+ case PF_Dither_True:
dd->WriteRGBASpan = write_span_TRUEDITHER_pixmap;
dd->WriteRGBSpan = write_span_rgb_TRUEDITHER_pixmap;
dd->WriteMonoRGBASpan = write_span_mono_TRUEDITHER_pixmap;
dd->WriteRGBAPixels = write_pixels_5R6G5B_pixmap;
dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap;
break;
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
dd->WriteRGBASpan = write_span_DITHER_5R6G5B_pixmap;
dd->WriteRGBSpan = write_span_rgb_DITHER_5R6G5B_pixmap;
dd->WriteMonoRGBASpan = write_span_mono_TRUEDITHER_pixmap;
dd->WriteRGBAPixels = write_pixels_DITHER_5R6G5B_pixmap;
dd->WriteMonoRGBAPixels = write_pixels_mono_TRUEDITHER_pixmap;
break;
- case PF_DITHER:
+ case PF_Dither:
dd->WriteRGBASpan = write_span_DITHER_pixmap;
dd->WriteRGBSpan = write_span_rgb_DITHER_pixmap;
dd->WriteMonoRGBASpan = write_span_mono_DITHER_pixmap;
dd->WriteRGBAPixels = write_pixels_DITHER_pixmap;
dd->WriteMonoRGBAPixels = write_pixels_mono_DITHER_pixmap;
break;
- case PF_1BIT:
+ case PF_1Bit:
dd->WriteRGBASpan = write_span_1BIT_pixmap;
dd->WriteRGBSpan = write_span_rgb_1BIT_pixmap;
dd->WriteMonoRGBASpan = write_span_mono_1BIT_pixmap;
ctx->Driver.ClearColor = clear_color_HPCR_pixmap;
}
break;
- case PF_LOOKUP:
+ case PF_Lookup:
dd->WriteRGBASpan = write_span_LOOKUP_pixmap;
dd->WriteRGBSpan = write_span_rgb_LOOKUP_pixmap;
dd->WriteMonoRGBASpan = write_span_mono_pixmap;
dd->WriteRGBAPixels = write_pixels_LOOKUP_pixmap;
dd->WriteMonoRGBAPixels = write_pixels_mono_pixmap;
break;
- case PF_GRAYSCALE:
+ case PF_Grayscale:
dd->WriteRGBASpan = write_span_GRAYSCALE_pixmap;
dd->WriteRGBSpan = write_span_rgb_GRAYSCALE_pixmap;
dd->WriteMonoRGBASpan = write_span_mono_pixmap;
else if (xmesa->xm_buffer->buffer==XIMAGE) {
/* Writing to back XImage */
switch (xmesa->pixelformat) {
- case PF_INDEX:
+ case PF_Index:
dd->WriteCI32Span = write_span_index_ximage;
if (depth==8)
dd->WriteCI8Span = write_span_index8_ximage8;
dd->WriteCI32Pixels = write_pixels_index_ximage;
dd->WriteMonoCIPixels = write_pixels_mono_index_ximage;
break;
- case PF_TRUECOLOR:
+ case PF_Truecolor:
/* Generic RGB */
dd->WriteRGBASpan = write_span_TRUECOLOR_ximage;
dd->WriteRGBSpan = write_span_rgb_TRUECOLOR_ximage;
dd->WriteRGBAPixels = write_pixels_TRUECOLOR_ximage;
dd->WriteMonoRGBAPixels = write_pixels_mono_ximage;
break;
- case PF_TRUEDITHER:
+ case PF_Dither_True:
dd->WriteRGBASpan = write_span_TRUEDITHER_ximage;
dd->WriteRGBSpan = write_span_rgb_TRUEDITHER_ximage;
dd->WriteMonoRGBASpan = write_span_mono_TRUEDITHER_ximage;
dd->WriteRGBAPixels = write_pixels_5R6G5B_ximage;
dd->WriteMonoRGBAPixels = write_pixels_mono_ximage;
break;
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
dd->WriteRGBASpan = write_span_DITHER_5R6G5B_ximage;
dd->WriteRGBSpan = write_span_rgb_DITHER_5R6G5B_ximage;
dd->WriteMonoRGBASpan = write_span_mono_DITHER_5R6G5B_ximage;
dd->WriteRGBAPixels = write_pixels_DITHER_5R6G5B_ximage;
dd->WriteMonoRGBAPixels = write_pixels_mono_DITHER_5R6G5B_ximage;
break;
- case PF_DITHER:
+ case PF_Dither:
if (depth==8) {
dd->WriteRGBASpan = write_span_DITHER8_ximage;
dd->WriteRGBSpan = write_span_rgb_DITHER8_ximage;
dd->WriteMonoRGBAPixels = write_pixels_mono_DITHER_ximage;
}
break;
- case PF_1BIT:
+ case PF_1Bit:
dd->WriteRGBASpan = write_span_1BIT_ximage;
dd->WriteRGBSpan = write_span_rgb_1BIT_ximage;
dd->WriteMonoRGBASpan = write_span_mono_1BIT_ximage;
ctx->Driver.ClearColor = clear_color_HPCR_ximage;
}
break;
- case PF_LOOKUP:
+ case PF_Lookup:
if (depth==8) {
dd->WriteRGBASpan = write_span_LOOKUP8_ximage;
dd->WriteRGBSpan = write_rgb_LOOKUP8_ximage;
dd->WriteMonoRGBAPixels = write_pixels_mono_ximage;
}
break;
- case PF_GRAYSCALE:
+ case PF_Grayscale:
if (depth==8) {
dd->WriteRGBASpan = write_span_GRAYSCALE8_ximage;
dd->WriteRGBSpan = write_span_rgb_GRAYSCALE8_ximage;
-/* $Id: xm_tri.c,v 1.30 2002/11/13 16:51:02 brianp Exp $ */
+/* $Id: xm_tri.c,v 1.31 2003/02/17 16:36:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
&& ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS
&& ctx->Polygon.StippleFlag==GL_FALSE) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
+ case PF_Truecolor:
USE(smooth_TRUECOLOR_z_triangle);
case PF_8A8B8G8R:
USE(smooth_8A8B8G8R_z_triangle);
USE(smooth_8R8G8B_z_triangle);
case PF_8R8G8B24:
USE(smooth_8R8G8B24_z_triangle);
- case PF_TRUEDITHER:
+ case PF_Dither_True:
USE(smooth_TRUEDITHER_z_triangle);
case PF_5R6G5B:
USE(smooth_5R6G5B_z_triangle);
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
USE(smooth_DITHER_5R6G5B_z_triangle);
case PF_HPCR:
USE(smooth_HPCR_z_triangle);
- case PF_DITHER:
+ case PF_Dither:
if (depth == 8)
USE(smooth_DITHER8_z_triangle);
else
USE(smooth_DITHER_z_triangle);
break;
- case PF_LOOKUP:
+ case PF_Lookup:
if (depth == 8)
USE(smooth_LOOKUP8_z_triangle);
else
&& ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS
&& ctx->Polygon.StippleFlag==GL_FALSE) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
+ case PF_Truecolor:
USE(flat_TRUECOLOR_z_triangle);
case PF_8A8B8G8R:
USE(flat_8A8B8G8R_z_triangle);
USE(flat_8R8G8B_z_triangle);
case PF_8R8G8B24:
USE(flat_8R8G8B24_z_triangle);
- case PF_TRUEDITHER:
+ case PF_Dither_True:
USE(flat_TRUEDITHER_z_triangle);
case PF_5R6G5B:
USE(flat_5R6G5B_z_triangle);
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
USE(flat_DITHER_5R6G5B_z_triangle);
case PF_HPCR:
USE(flat_HPCR_z_triangle);
- case PF_DITHER:
+ case PF_Dither:
if (depth == 8)
USE(flat_DITHER8_z_triangle);
else
USE(flat_DITHER_z_triangle);
break;
- case PF_LOOKUP:
+ case PF_Lookup:
if (depth == 8)
USE(flat_LOOKUP8_z_triangle);
else
&& ctx->Light.ShadeModel==GL_SMOOTH
&& ctx->Polygon.StippleFlag==GL_FALSE) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
+ case PF_Truecolor:
USE(smooth_TRUECOLOR_triangle);
case PF_8A8B8G8R:
USE(smooth_8A8B8G8R_triangle);
USE(smooth_8R8G8B_triangle);
case PF_8R8G8B24:
USE(smooth_8R8G8B24_triangle);
- case PF_TRUEDITHER:
+ case PF_Dither_True:
USE(smooth_TRUEDITHER_triangle);
case PF_5R6G5B:
USE(smooth_5R6G5B_triangle);
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
USE(smooth_DITHER_5R6G5B_triangle);
case PF_HPCR:
USE(smooth_HPCR_triangle);
- case PF_DITHER:
+ case PF_Dither:
if (depth == 8)
USE(smooth_DITHER8_triangle);
else
USE(smooth_DITHER_triangle);
break;
- case PF_LOOKUP:
+ case PF_Lookup:
if (depth == 8)
USE(smooth_LOOKUP8_triangle);
else
&& ctx->Light.ShadeModel==GL_FLAT
&& ctx->Polygon.StippleFlag==GL_FALSE) {
switch (xmesa->pixelformat) {
- case PF_TRUECOLOR:
+ case PF_Truecolor:
USE(flat_TRUECOLOR_triangle);
- case PF_TRUEDITHER:
+ case PF_Dither_True:
USE(flat_TRUEDITHER_triangle);
case PF_8A8B8G8R:
USE(flat_8A8B8G8R_triangle);
USE(flat_8R8G8B24_triangle);
case PF_5R6G5B:
USE(flat_5R6G5B_triangle);
- case PF_DITHER_5R6G5B:
+ case PF_Dither_5R6G5B:
USE(flat_DITHER_5R6G5B_triangle);
case PF_HPCR:
USE(flat_HPCR_triangle);
- case PF_DITHER:
+ case PF_Dither:
if (depth == 8)
USE(flat_DITHER8_triangle);
else
USE(flat_DITHER_triangle);
break;
- case PF_LOOKUP:
+ case PF_Lookup:
if (depth == 8)
USE(flat_LOOKUP8_triangle);
else
-/* $Id: xmesaP.h,v 1.33 2003/01/24 15:33:22 brianp Exp $ */
+/* $Id: xmesaP.h,v 1.34 2003/02/17 16:36:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
GLboolean swapbytes; /* Host byte order != display byte order? */
GLboolean direct; /* Direct rendering context? */
- GLuint pixelformat; /* Current pixel format */
+ /** Current pixel format */
+ enum {
+ PF_Index, /**< Color Index mode */
+ PF_Truecolor, /**< TrueColor or DirectColor, any depth */
+ PF_Dither_True, /**< TrueColor with dithering */
+ PF_8A8B8G8R, /**< 32-bit TrueColor: 8-A, 8-B, 8-G, 8-R */
+ PF_8R8G8B, /**< 32-bit TrueColor: 8-R, 8-G, 8-B bits */
+ PF_5R6G5B, /**< 16-bit TrueColor: 5-R, 6-G, 5-B bits */
+ PF_Dither, /**< Color-mapped RGB with dither */
+ PF_Lookup, /**< Color-mapped RGB without dither */
+ PF_HPCR, /**< HP Color Recovery (ad@lms.be 30/08/95) */
+ PF_1Bit, /**< monochrome dithering of RGB */
+ PF_Grayscale, /**< Grayscale or StaticGray */
+ PF_8R8G8B24, /**< 24-bit TrueColor: 8-R, 8-G, 8-B bits */
+ PF_Dither_5R6G5B /**< 16-bit dithered TrueColor: 5-R, 6-G, 5-B */
+ } pixelformat;
+
+
+
GLubyte clearcolor[4]; /* current clearing color */
unsigned long clearpixel; /* current clearing pixel value */
#define BACK_XIMAGE 4
-/* Values for xmesa->pixelformat: */
-#define PF_INDEX 1 /* Color Index mode */
-#define PF_TRUECOLOR 2 /* TrueColor or DirectColor, any depth */
-#define PF_TRUEDITHER 3 /* TrueColor with dithering */
-#define PF_8A8B8G8R 4 /* 32-bit TrueColor: 8-A, 8-B, 8-G, 8-R */
-#define PF_8R8G8B 5 /* 32-bit TrueColor: 8-R, 8-G, 8-B bits */
-#define PF_5R6G5B 6 /* 16-bit TrueColor: 5-R, 6-G, 5-B bits */
-#define PF_DITHER 7 /* Color-mapped RGB with dither */
-#define PF_LOOKUP 8 /* Color-mapped RGB without dither */
-#define PF_HPCR 9 /* HP Color Recovery (ad@lms.be 30/08/95) */
-#define PF_1BIT 10 /* monochrome dithering of RGB */
-#define PF_GRAYSCALE 11 /* Grayscale or StaticGray */
-#define PF_8R8G8B24 12 /* 24-bit TrueColor: 8-R, 8-G, 8-B bits */
-#define PF_DITHER_5R6G5B 13 /* 16-bit dithered TrueColor: 5-R, 6-G, 5-B */
-
-
/*
* If pixelformat==PF_TRUECOLOR:
*/
-/* $Id: m_matrix.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
+/* $Id: m_matrix.h,v 1.5 2003/02/17 16:36:06 brianp Exp $ */
/*
* Mesa 3-D graphics library
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+/**
+ * \file math/m_matrix.h
+ * \brief Defines basic structures for matrix-handling.
+ */
+
#ifndef _M_MATRIX_H
#define _M_MATRIX_H
#define MAT_TY 13
#define MAT_TZ 14
-/*
- * Different kinds of 4x4 transformation matrices:
- */
-#define MATRIX_GENERAL 0 /* general 4x4 matrix */
-#define MATRIX_IDENTITY 1 /* identity matrix */
-#define MATRIX_3D_NO_ROT 2 /* ortho projection and others... */
-#define MATRIX_PERSPECTIVE 3 /* perspective projection matrix */
-#define MATRIX_2D 4 /* 2-D transformation */
-#define MATRIX_2D_NO_ROT 5 /* 2-D scale & translate only */
-#define MATRIX_3D 6 /* 3-D transformation */
+/**
+ * \defgroup MatFlags MAT_FLAG_XXX-flags
+ *
+ * Bitmasks to indicate different kinds of 4x4 matrices in
+ * GLmatrix::flags
+ */
+/*@{*/
#define MAT_FLAG_IDENTITY 0
#define MAT_FLAG_GENERAL 0x1
#define MAT_FLAG_ROTATION 0x2
#define MAT_DIRTY_TYPE 0x100
#define MAT_DIRTY_FLAGS 0x200
#define MAT_DIRTY_INVERSE 0x400
+/*@}*/
+
#define MAT_FLAGS_ANGLE_PRESERVING (MAT_FLAG_ROTATION | \
MAT_FLAG_TRANSLATION | \
typedef struct {
GLfloat *m; /* 16-byte aligned */
GLfloat *inv; /* optional, 16-byte aligned */
- GLuint flags;
- GLuint type; /* one of the MATRIX_* values */
+ GLuint flags; /**< possible values determined by (of \link
+ MatFlags MAT_FLAG_* flags\endlink) */
+ enum {
+ MATRIX_GENERAL, /**< general 4x4 matrix */
+ MATRIX_IDENTITY, /**< identity matrix */
+ MATRIX_3D_NO_ROT, /**< ortho projection and others... */
+ MATRIX_PERSPECTIVE,/**< perspective projection matrix */
+ MATRIX_2D, /**< 2-D transformation */
+ MATRIX_2D_NO_ROT, /**< 2-D scale & translate only */
+ MATRIX_3D /**< 3-D transformation */
+ } type;
} GLmatrix;
-/* $Id: t_array_api.c,v 1.29 2002/12/19 18:36:01 keithw Exp $ */
+/* $Id: t_array_api.c,v 1.30 2003/02/17 16:36:07 brianp Exp $ */
/*
* Mesa 3-D graphics library
*/
/**
- * \file vpexec.c
+ * \file t_array_api.c
* \brief Vertex array API functions (glDrawArrays, etc)
* \author Keith Whitwell
*/