summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/windows/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/windows/gdi')
-rw-r--r--src/mesa/drivers/windows/gdi/colors.h11
-rw-r--r--src/mesa/drivers/windows/gdi/wgl.c40
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c88
-rw-r--r--src/mesa/drivers/windows/gdi/wmesadef.h1
4 files changed, 106 insertions, 34 deletions
diff --git a/src/mesa/drivers/windows/gdi/colors.h b/src/mesa/drivers/windows/gdi/colors.h
index 7070b85e32..5ee66e829d 100644
--- a/src/mesa/drivers/windows/gdi/colors.h
+++ b/src/mesa/drivers/windows/gdi/colors.h
@@ -24,6 +24,9 @@
/*
* $Log: colors.h,v $
+ * Revision 1.2 2004/08/25 15:59:48 brianp
+ * Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
+ *
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
@@ -49,6 +52,9 @@
/*
* $Log: colors.h,v $
+ * Revision 1.2 2004/08/25 15:59:48 brianp
+ * Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
+ *
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
@@ -74,6 +80,9 @@
/*
* $Log: colors.h,v $
+ * Revision 1.2 2004/08/25 15:59:48 brianp
+ * Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch 1015696)
+ *
* Revision 1.1 2003/07/24 03:47:46 kschultz
* Source code for GDI driver.
*
@@ -141,7 +150,7 @@ char ColorMap16[] = {
0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};
-#define BGR8(r,g,b) (unsigned)(((BYTE)(b & 0xc0 | (g & 0xe0)>>2 | (r & 0xe0)>>5)))
+#define BGR8(r,g,b) (unsigned)(((BYTE)((b & 0xc0) | ((g & 0xe0)>>2) | ((r & 0xe0)>>5))))
#ifdef DDRAW
#define BGR16(r,g,b) ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
#else
diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c
index 53850d1bdc..b530cfc02d 100644
--- a/src/mesa/drivers/windows/gdi/wgl.c
+++ b/src/mesa/drivers/windows/gdi/wgl.c
@@ -1,4 +1,4 @@
-/* $Id: wgl.c,v 1.4 2004/08/25 14:59:45 brianp Exp $ */
+/* $Id: wgl.c,v 1.5 2004/08/25 15:59:48 brianp Exp $ */
/*
* This library is free software; you can redistribute it and/or
@@ -107,6 +107,7 @@ static unsigned curPFD = 0;
WGLAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc,HGLRC hglrcDst,UINT mask)
{
+ (void) hglrcSrc; (void) hglrcDst; (void) mask;
return(FALSE);
}
@@ -166,6 +167,7 @@ WGLAPI BOOL GLAPIENTRY wglDeleteContext(HGLRC hglrc)
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc,int iLayerPlane)
{
+ (void) hdc; (void) iLayerPlane;
SetLastError(0);
return(NULL);
}
@@ -211,7 +213,8 @@ WGLAPI BOOL GLAPIENTRY wglMakeCurrent(HDC hdc,HGLRC hglrc)
}
WGLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,HGLRC hglrc2)
-{
+{
+ (void) hglrc1; (void) hglrc2;
return(TRUE);
}
@@ -219,7 +222,7 @@ WGLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1,HGLRC hglrc2)
static FIXED FixedFromDouble(double d)
{
long l = (long) (d * 65536L);
- return *(FIXED *)&l;
+ return *(FIXED *) (void *) &l;
}
@@ -258,9 +261,9 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
SetTextColor(bitDevice, tempColor);
// Place chars based on base line
- VERIFY(SetTextAlign(bitDevice, TA_BASELINE) >= 0 ? 1 : 0);
+ VERIFY(SetTextAlign(bitDevice, TA_BASELINE) != GDI_ERROR ? 1 : 0);
- for(i = 0; i < numChars; i++) {
+ for(i = 0; i < (int)numChars; i++) {
SIZE size;
char curChar;
int charWidth,charHeight,bmapWidth,bmapHeight,numBytes,res;
@@ -285,7 +288,7 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
// Assign the output bitmap to the device
origBmap = SelectObject(bitDevice, bitObject);
- VERIFY(origBmap);
+ (void) VERIFY(origBmap);
VERIFY( PatBlt( bitDevice, 0, 0, bmapWidth, bmapHeight,BLACKNESS ) );
@@ -344,11 +347,7 @@ WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first,
MAT2 mat;
int success = TRUE;
- if (first<0)
- return FALSE;
- if (count<0)
- return FALSE;
- if (listBase<0)
+ if (count == 0)
return FALSE;
font_list = listBase;
@@ -373,7 +372,7 @@ WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first,
/*
** Otherwise process all desired characters.
*/
- for (i = 0; i < count; i++)
+ for (i = 0; i < (int)count; i++)
{
DWORD err;
@@ -432,6 +431,7 @@ WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first,
WGLAPI BOOL GLAPIENTRY wglUseFontBitmapsW(HDC hdc,DWORD first,DWORD count,DWORD listBase)
{
+ (void) hdc; (void) first; (void) count; (void) listBase;
return FALSE;
}
@@ -440,6 +440,9 @@ WGLAPI BOOL GLAPIENTRY wglUseFontOutlinesA(HDC hdc,DWORD first,DWORD count,
FLOAT extrusion,int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
+ (void) hdc; (void) first; (void) count;
+ (void) listBase; (void) deviation; (void) extrusion; (void) format;
+ (void) lpgmf;
SetLastError(0);
return(FALSE);
}
@@ -449,6 +452,9 @@ WGLAPI BOOL GLAPIENTRY wglUseFontOutlinesW(HDC hdc,DWORD first,DWORD count,
FLOAT extrusion,int format,
LPGLYPHMETRICSFLOAT lpgmf)
{
+ (void) hdc; (void) first; (void) count;
+ (void) listBase; (void) deviation; (void) extrusion; (void) format;
+ (void) lpgmf;
SetLastError(0);
return(FALSE);
}
@@ -457,6 +463,7 @@ WGLAPI BOOL GLAPIENTRY wglDescribeLayerPlane(HDC hdc,int iPixelFormat,
int iLayerPlane,UINT nBytes,
LPLAYERPLANEDESCRIPTOR plpd)
{
+ (void) hdc; (void) iPixelFormat; (void) iLayerPlane; (void) nBytes; (void) plpd;
SetLastError(0);
return(FALSE);
}
@@ -465,6 +472,7 @@ WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC hdc,int iLayerPlane,
int iStart,int cEntries,
CONST COLORREF *pcr)
{
+ (void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
@@ -473,18 +481,21 @@ WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC hdc,int iLayerPlane,
int iStart,int cEntries,
COLORREF *pcr)
{
+ (void) hdc; (void) iLayerPlane; (void) iStart; (void) cEntries; (void) pcr;
SetLastError(0);
return(0);
}
WGLAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc,int iLayerPlane,BOOL bRealize)
{
+ (void) hdc; (void) iLayerPlane; (void) bRealize;
SetLastError(0);
return(FALSE);
}
WGLAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc,UINT fuPlanes)
{
+ (void) fuPlanes;
if( !hdc )
{
WMesaSwapBuffers();
@@ -498,6 +509,7 @@ WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC hdc,
CONST PIXELFORMATDESCRIPTOR *ppfd)
{
int i,best = -1,bestdelta = 0x7FFFFFFF,delta,qt_valid_pix;
+ (void) hdc;
qt_valid_pix = qt_pix;
if(ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR) || ppfd->nVersion != 1)
@@ -556,6 +568,7 @@ WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC hdc,int iPixelFormat,UINT nByte
LPPIXELFORMATDESCRIPTOR ppfd)
{
int qt_valid_pix;
+ (void) hdc;
qt_valid_pix = qt_pix;
if(ppfd == NULL)
@@ -584,6 +597,7 @@ WGLAPI PROC GLAPIENTRY wglGetProcAddress(LPCSTR lpszProc)
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc)
{
+ (void) hdc;
if(curPFD == 0)
{
SetLastError(0);
@@ -596,6 +610,7 @@ WGLAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat,
PIXELFORMATDESCRIPTOR *ppfd)
{
int qt_valid_pix;
+ (void) hdc;
qt_valid_pix = qt_pix;
if(iPixelFormat < 1 || iPixelFormat > qt_valid_pix || ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR))
@@ -609,6 +624,7 @@ WGLAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat,
WGLAPI BOOL GLAPIENTRY wglSwapBuffers(HDC hdc)
{
+ (void) hdc;
if (ctx_current < 0)
return FALSE;
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index eb64cf69a5..53d202251a 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -45,6 +45,7 @@
#include "array_cache/acache.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
+#include "swrast/s_alphabuf.h"
#include "swrast/s_context.h"
#include "swrast/s_depth.h"
#include "swrast/s_lines.h"
@@ -165,7 +166,6 @@ static BOOL DDCreateOffScreen(WMesaContext wc);
#define USE_GDI_TO_CLEAR 1
#endif
-static void FlushToFile(PWMC pwc, PSTR szFile);
BOOL wmCreateBackingStore(PWMC pwc, long lxSize, long lySize);
BOOL wmDeleteBackingStore(PWMC pwc);
void wmCreatePalette( PWMC pwdc );
@@ -347,15 +347,20 @@ BOOL wmSetDIBits(PWMC pwc, UINT uiScanWidth, UINT uiNumScans,
BYTE DITHER_RGB_2_8BIT( int r, int g, int b, int x, int y);
+#if 0 /* unused */
+
/* Finish all pending operations and synchronize. */
static void finish(GLcontext* ctx)
{
/* No op */
+ (void) ctx;
}
+#endif /* unused */
static void flush(GLcontext* ctx)
{
+ (void) ctx;
if((Current->rgb_flag &&!(Current->db_flag))
||(!Current->rgb_flag))
{
@@ -371,6 +376,7 @@ static void flush(GLcontext* ctx)
*/
static void clear_index(GLcontext* ctx, GLuint index)
{
+ (void) ctx;
Current->clearpixel = index;
}
@@ -382,6 +388,7 @@ static void clear_index(GLcontext* ctx, GLuint index)
static void clear_color( GLcontext* ctx, const GLfloat color[4] )
{
GLubyte col[4];
+ (void) ctx;
CLAMPED_FLOAT_TO_UBYTE(col[0], color[0]);
CLAMPED_FLOAT_TO_UBYTE(col[1], color[1]);
CLAMPED_FLOAT_TO_UBYTE(col[2], color[2]);
@@ -400,7 +407,7 @@ static void clear_color( GLcontext* ctx, const GLfloat color[4] )
* Otherwise, we let swrast do it.
*/
-static clear(GLcontext* ctx, GLbitfield mask,
+static void clear(GLcontext* ctx, GLbitfield mask,
GLboolean all, GLint x, GLint y, GLint width, GLint height)
{
const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
@@ -467,7 +474,7 @@ static clear(GLcontext* ctx, GLbitfield mask,
WORD wColor;
BYTE bColor;
LPDWORD lpdw = (LPDWORD)Current->pbPixels;
- LPWORD lpw = (LPWORD)Current->pbPixels;
+ /*LPWORD lpw = (LPWORD)Current->pbPixels; */
LPBYTE lpb = Current->pbPixels;
int lines;
/* Double-buffering - clear back buffer */
@@ -513,7 +520,9 @@ static clear(GLcontext* ctx, GLbitfield mask,
dwColor = BGR32(GetRValue(Current->clearpixel),
GetGValue(Current->clearpixel),
GetBValue(Current->clearpixel));
- }
+ }
+ else
+ dwColor = 0;
if (nBypp != 3)
{
@@ -567,6 +576,7 @@ static clear(GLcontext* ctx, GLbitfield mask,
static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
{
+ (void) ctx;
if (!Current)
return;
@@ -592,6 +602,7 @@ static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
GLuint bufferBit )
{
+ (void) ctx; (void) colorBuffer; (void) bufferBit;
/* XXX todo - examine bufferBit and set read/write pointers */
return;
}
@@ -601,9 +612,10 @@ static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
/* Return characteristics of the output buffer. */
static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
{
- GET_CURRENT_CONTEXT(ctx);
+ /*GET_CURRENT_CONTEXT(ctx);*/
int New_Size;
RECT CR;
+ (void) buffer;
GetClientRect(Current->Window,&CR);
@@ -649,25 +661,36 @@ static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
/* Accelerated routines are not implemented in 4.0. See OSMesa for ideas. */
+#if 0 /* unused */
+
static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last )
{
+ (void) ctx; (void) first; (void) last;
}
+#endif /* unused */
+
/* Return pointer to accelerated points function */
extern tnl_points_func choose_points_function( GLcontext* ctx )
{
+ (void) ctx;
return NULL;
}
+#if 0 /* unused */
+
static void fast_flat_rgb_line( GLcontext* ctx, GLuint v0,
GLuint v1, GLuint pv )
{
+ (void) ctx; (void) v0; (void) v1; (void) pv;
}
static tnl_line_func choose_line_function( GLcontext* ctx )
{
+ (void) ctx;
}
+#endif /* unused */
/**********************************************************************/
/***** Span-based pixel drawing *****/
@@ -682,6 +705,7 @@ static void write_ci32_span( const GLcontext* ctx,
{
GLuint i;
PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
if (mask[i])
@@ -697,6 +721,7 @@ static void write_ci8_span( const GLcontext* ctx,
{
GLuint i;
PBYTE Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
if (mask[i])
@@ -715,6 +740,7 @@ static void write_mono_ci_span(const GLcontext* ctx,
{
GLuint i;
BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
if (mask[i])
@@ -731,11 +757,12 @@ static void write_rgba_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
const GLubyte rgba[][4], const GLubyte mask[] )
{
PWMC pwc = Current;
+ (void) ctx;
if (pwc->rgb_flag==GL_TRUE)
{
GLuint i;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
y=FLIP(y);
if (mask) {
for (i=0; i<n; i++)
@@ -779,11 +806,12 @@ static void write_rgb_span( const GLcontext* ctx,
const GLubyte rgb[][3], const GLubyte mask[] )
{
PWMC pwc = Current;
-
+ (void) ctx;
+
if (pwc->rgb_flag==GL_TRUE)
{
GLuint i;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
y=FLIP(y);
if (mask) {
for (i=0; i<n; i++)
@@ -831,6 +859,7 @@ static void write_mono_rgba_span( const GLcontext* ctx,
{
GLuint i;
PWMC pwc = Current;
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
y=FLIP(y);
if(Current->rgb_flag==GL_TRUE)
@@ -863,6 +892,7 @@ static void write_ci32_pixels( const GLcontext* ctx,
const GLuint index[], const GLubyte mask[] )
{
GLuint i;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++) {
if (mask[i]) {
@@ -884,6 +914,7 @@ static void write_mono_ci_pixels( const GLcontext* ctx,
GLuint colorIndex, const GLubyte mask[] )
{
GLuint i;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++) {
if (mask[i]) {
@@ -902,7 +933,8 @@ static void write_rgba_pixels( const GLcontext* ctx,
{
GLuint i;
PWMC pwc = Current;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
for (i=0; i<n; i++)
if (mask[i])
@@ -925,7 +957,8 @@ static void write_mono_rgba_pixels( const GLcontext* ctx,
{
GLuint i;
PWMC pwc = Current;
- HDC DC=DD_GETDC;
+ /*HDC DC=DD_GETDC;*/
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
for (i=0; i<n; i++)
if (mask[i])
@@ -946,6 +979,7 @@ static void read_ci32_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
GLuint index[])
{
GLuint i;
+ (void) ctx;
BYTE *Mem=Current->ScreenMem+FLIP(y)*Current->ScanWidth+x;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++)
@@ -961,6 +995,7 @@ static void read_ci32_pixels( const GLcontext* ctx,
GLuint indx[], const GLubyte mask[] )
{
GLuint i;
+ (void) ctx;
assert(Current->rgb_flag==GL_FALSE);
for (i=0; i<n; i++) {
if (mask[i]) {
@@ -979,6 +1014,7 @@ static void read_rgba_span( const GLcontext* ctx,
UINT i;
COLORREF Color;
HDC DC=DD_GETDC;
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
y = Current->height - y - 1;
for (i=0; i<n; i++) {
@@ -1000,6 +1036,7 @@ static void read_rgba_pixels( const GLcontext* ctx,
GLuint i;
COLORREF Color;
HDC DC=DD_GETDC;
+ (void) ctx;
assert(Current->rgb_flag==GL_TRUE);
for (i=0; i<n; i++) {
if (mask[i]) {
@@ -1022,6 +1059,7 @@ static void read_rgba_pixels( const GLcontext* ctx,
static const GLubyte *get_string(GLcontext *ctx, GLenum name)
{
+ (void) ctx;
if (name == GL_RENDERER) {
return (GLubyte *) "Mesa Windows";
}
@@ -1074,7 +1112,7 @@ static void SetSWrastPointers(GLcontext *ctx)
static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
{
- struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
+ /*struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );*/
TNLcontext *tnl = TNL_CONTEXT(ctx);
/*
@@ -1166,7 +1204,7 @@ static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
/***** WMesa API Functions *****/
/**********************************************************************/
-
+#if 0 /* unused */
#define PAL_SIZE 256
static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
@@ -1178,11 +1216,9 @@ static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
WORD Version;
WORD NumberOfEntries;
PALETTEENTRY aEntries[PAL_SIZE];
- } Palette =
- {
- 0x300,
- PAL_SIZE
- };
+ } Palette;
+ Palette.Version = 0x300;
+ Palette.NumberOfEntries = PAL_SIZE;
hdc=GetDC(NULL);
if (Pal!=NULL)
GetPaletteEntries(Pal,0,PAL_SIZE,Palette.aEntries);
@@ -1226,6 +1262,7 @@ static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
}
}
+#endif /* unused */
WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
GLboolean rgb_flag,
@@ -1236,6 +1273,7 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
WMesaContext c;
GLboolean true_color_flag;
struct dd_function_table functions;
+ (void) Pal;
c = (struct wmesa_context * ) calloc(1,sizeof(struct wmesa_context));
if (!c)
@@ -1436,7 +1474,7 @@ void WMesaMakeCurrent( WMesaContext c )
void WMesaSwapBuffers( void )
{
- HDC DC = Current->hDC;
+/* HDC DC = Current->hDC;*/
GET_CURRENT_CONTEXT(ctx);
/* If we're swapping the buffer associated with the current context
@@ -1699,6 +1737,8 @@ void wmCreateDIBSection(
DWORD dwScanWidth;
UINT nBypp = pwc->cColorBits / 8;
HDC hic;
+ (void) hDC;
+ (void) pbmi;
dwScanWidth = (((pwc->ScanWidth * nBypp)+ 3) & ~3);
@@ -1742,14 +1782,14 @@ void wmCreateDIBSection(
pwc->hbmDIB = CreateDIBSection(hic,
&(pwc->bmi),
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
- &(pwc->pbPixels),
+ (void **)&(pwc->pbPixels),
pwc->dib.hFileMap,
0);
#else
pwc->hbmDIB = CreateDIBSection(hic,
&(pwc->bmi),
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
- &(pwc->pbPixels),
+ (void **)&(pwc->pbPixels),
0,
0);
#endif // USE_MAPPED_FILE
@@ -1768,7 +1808,7 @@ void wmCreateDIBSection(
BOOL wmFlush(PWMC pwc)
{
BOOL bRet = 0;
- DWORD dwErr = 0;
+/* DWORD dwErr = 0;*/
#ifdef DDRAW
HRESULT ddrval;
#endif
@@ -3182,8 +3222,11 @@ static void flat_DITHER8_triangle( GLcontext *ctx, GLuint v0, GLuint v1,
#endif
/************** END DEAD TRIANGLE CODE ***********************/
+#if 0 /* unused */
+
static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
{
+ (void) ctx;
#if 0
WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
int depth = wmesa->cColorBits;
@@ -3277,6 +3320,8 @@ static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
#endif
}
+#endif /* unused */
+
/*
* Define a new viewport and reallocate auxillary buffers if the size of
* the window (color buffer) has changed.
@@ -3284,6 +3329,7 @@ static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
void WMesaViewport( GLcontext *ctx,
GLint x, GLint y, GLsizei width, GLsizei height )
{
+ (void) ctx; (void) x; (void) y; (void) width; (void) height;
assert(0); /* I don't think that this is being used. */
#if 0
/* Save viewport */
diff --git a/src/mesa/drivers/windows/gdi/wmesadef.h b/src/mesa/drivers/windows/gdi/wmesadef.h
index 29fff9f4f5..3c267aa0f6 100644
--- a/src/mesa/drivers/windows/gdi/wmesadef.h
+++ b/src/mesa/drivers/windows/gdi/wmesadef.h
@@ -93,6 +93,7 @@ typedef struct _dibSection{
}WMDIBSECTION, *PWMDIBSECTION;
#ifdef COMPILE_SETPIXEL
+struct wmesa_context;
typedef void (*SETPIXELTYPE)(struct wmesa_context *pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b);
#endif