mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 09:46:21 +00:00
Fixed more warnings, compiles with -Werror now.
svn path=/trunk/; revision=10165
This commit is contained in:
parent
73cbc815c1
commit
3351ce053d
4 changed files with 38 additions and 26 deletions
|
@ -238,7 +238,7 @@ TARGET_NAME = mesa32
|
||||||
|
|
||||||
TARGET_BASE = $(TARGET_BASE_LIB_MESA32)
|
TARGET_BASE = $(TARGET_BASE_LIB_MESA32)
|
||||||
|
|
||||||
TARGET_CFLAGS = -D__USE_W32API -Wall $(MESA_CFLAGS)
|
TARGET_CFLAGS = -D__USE_W32API -Wall -Werror $(MESA_CFLAGS)
|
||||||
|
|
||||||
TARGET_GCCLIBS = gdi32
|
TARGET_GCCLIBS = gdi32
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: colors.h,v $
|
* $Log: colors.h,v $
|
||||||
|
* Revision 1.2 2004/07/16 23:48:24 blight
|
||||||
|
* Fixed more warnings, compiles with -Werror now.
|
||||||
|
*
|
||||||
* Revision 1.1 2004/07/16 22:12:32 blight
|
* Revision 1.1 2004/07/16 22:12:32 blight
|
||||||
* Import Mesa-6.0.1 for use as software OpenGL renderer.
|
* Import Mesa-6.0.1 for use as software OpenGL renderer.
|
||||||
*
|
*
|
||||||
|
@ -52,6 +55,9 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: colors.h,v $
|
* $Log: colors.h,v $
|
||||||
|
* Revision 1.2 2004/07/16 23:48:24 blight
|
||||||
|
* Fixed more warnings, compiles with -Werror now.
|
||||||
|
*
|
||||||
* Revision 1.1 2004/07/16 22:12:32 blight
|
* Revision 1.1 2004/07/16 22:12:32 blight
|
||||||
* Import Mesa-6.0.1 for use as software OpenGL renderer.
|
* Import Mesa-6.0.1 for use as software OpenGL renderer.
|
||||||
*
|
*
|
||||||
|
@ -80,6 +86,9 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: colors.h,v $
|
* $Log: colors.h,v $
|
||||||
|
* Revision 1.2 2004/07/16 23:48:24 blight
|
||||||
|
* Fixed more warnings, compiles with -Werror now.
|
||||||
|
*
|
||||||
* Revision 1.1 2004/07/16 22:12:32 blight
|
* Revision 1.1 2004/07/16 22:12:32 blight
|
||||||
* Import Mesa-6.0.1 for use as software OpenGL renderer.
|
* Import Mesa-6.0.1 for use as software OpenGL renderer.
|
||||||
*
|
*
|
||||||
|
@ -150,7 +159,7 @@ char ColorMap16[] = {
|
||||||
0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
|
0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
|
||||||
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};
|
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
|
#ifdef DDRAW
|
||||||
#define BGR16(r,g,b) ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
|
#define BGR16(r,g,b) ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "array_cache/acache.h"
|
#include "array_cache/acache.h"
|
||||||
#include "swrast/swrast.h"
|
#include "swrast/swrast.h"
|
||||||
#include "swrast_setup/swrast_setup.h"
|
#include "swrast_setup/swrast_setup.h"
|
||||||
|
#include "swrast/s_alphabuf.h"
|
||||||
#include "swrast/s_context.h"
|
#include "swrast/s_context.h"
|
||||||
#include "swrast/s_depth.h"
|
#include "swrast/s_depth.h"
|
||||||
#include "swrast/s_lines.h"
|
#include "swrast/s_lines.h"
|
||||||
|
@ -164,7 +165,7 @@ static BOOL DDCreateOffScreen(WMesaContext wc);
|
||||||
#define USE_GDI_TO_CLEAR 1
|
#define USE_GDI_TO_CLEAR 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void FlushToFile(PWMC pwc, PSTR szFile);
|
//static void FlushToFile(PWMC pwc, PSTR szFile);
|
||||||
BOOL wmCreateBackingStore(PWMC pwc, long lxSize, long lySize);
|
BOOL wmCreateBackingStore(PWMC pwc, long lxSize, long lySize);
|
||||||
BOOL wmDeleteBackingStore(PWMC pwc);
|
BOOL wmDeleteBackingStore(PWMC pwc);
|
||||||
void wmCreatePalette( PWMC pwdc );
|
void wmCreatePalette( PWMC pwdc );
|
||||||
|
@ -347,11 +348,12 @@ BOOL wmSetDIBits(PWMC pwc, UINT uiScanWidth, UINT uiNumScans,
|
||||||
BYTE DITHER_RGB_2_8BIT( int r, int g, int b, int x, int y);
|
BYTE DITHER_RGB_2_8BIT( int r, int g, int b, int x, int y);
|
||||||
|
|
||||||
/* Finish all pending operations and synchronize. */
|
/* Finish all pending operations and synchronize. */
|
||||||
|
#if 0
|
||||||
static void finish(GLcontext* ctx)
|
static void finish(GLcontext* ctx)
|
||||||
{
|
{
|
||||||
/* No op */
|
/* No op */
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void flush(GLcontext* ctx)
|
static void flush(GLcontext* ctx)
|
||||||
{
|
{
|
||||||
|
@ -466,7 +468,7 @@ static void clear(GLcontext* ctx, GLbitfield mask,
|
||||||
WORD wColor;
|
WORD wColor;
|
||||||
BYTE bColor;
|
BYTE bColor;
|
||||||
LPDWORD lpdw = (LPDWORD)Current->pbPixels;
|
LPDWORD lpdw = (LPDWORD)Current->pbPixels;
|
||||||
LPWORD lpw = (LPWORD)Current->pbPixels;
|
//LPWORD lpw = (LPWORD)Current->pbPixels;
|
||||||
LPBYTE lpb = Current->pbPixels;
|
LPBYTE lpb = Current->pbPixels;
|
||||||
int lines;
|
int lines;
|
||||||
/* Double-buffering - clear back buffer */
|
/* Double-buffering - clear back buffer */
|
||||||
|
@ -600,7 +602,7 @@ static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
|
||||||
/* Return characteristics of the output buffer. */
|
/* Return characteristics of the output buffer. */
|
||||||
static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
|
static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
// GET_CURRENT_CONTEXT(ctx);
|
||||||
int New_Size;
|
int New_Size;
|
||||||
RECT CR;
|
RECT CR;
|
||||||
|
|
||||||
|
@ -647,7 +649,7 @@ static void buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
/* Accelerated routines are not implemented in 4.0. See OSMesa for ideas. */
|
/* Accelerated routines are not implemented in 4.0. See OSMesa for ideas. */
|
||||||
|
#if 0
|
||||||
static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last )
|
static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -667,6 +669,7 @@ static line_func choose_line_function( GLcontext* ctx )
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@ -735,7 +738,7 @@ static void write_rgba_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
|
||||||
if (pwc->rgb_flag==GL_TRUE)
|
if (pwc->rgb_flag==GL_TRUE)
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
HDC DC=DD_GETDC;
|
//HDC DC=DD_GETDC;
|
||||||
y=FLIP(y);
|
y=FLIP(y);
|
||||||
if (mask) {
|
if (mask) {
|
||||||
for (i=0; i<n; i++)
|
for (i=0; i<n; i++)
|
||||||
|
@ -783,7 +786,7 @@ static void write_rgb_span( const GLcontext* ctx,
|
||||||
if (pwc->rgb_flag==GL_TRUE)
|
if (pwc->rgb_flag==GL_TRUE)
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
HDC DC=DD_GETDC;
|
//HDC DC=DD_GETDC;
|
||||||
y=FLIP(y);
|
y=FLIP(y);
|
||||||
if (mask) {
|
if (mask) {
|
||||||
for (i=0; i<n; i++)
|
for (i=0; i<n; i++)
|
||||||
|
@ -902,7 +905,7 @@ static void write_rgba_pixels( const GLcontext* ctx,
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
PWMC pwc = Current;
|
PWMC pwc = Current;
|
||||||
HDC DC=DD_GETDC;
|
//HDC DC=DD_GETDC;
|
||||||
assert(Current->rgb_flag==GL_TRUE);
|
assert(Current->rgb_flag==GL_TRUE);
|
||||||
for (i=0; i<n; i++)
|
for (i=0; i<n; i++)
|
||||||
if (mask[i])
|
if (mask[i])
|
||||||
|
@ -925,7 +928,7 @@ static void write_mono_rgba_pixels( const GLcontext* ctx,
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
PWMC pwc = Current;
|
PWMC pwc = Current;
|
||||||
HDC DC=DD_GETDC;
|
//HDC DC=DD_GETDC;
|
||||||
assert(Current->rgb_flag==GL_TRUE);
|
assert(Current->rgb_flag==GL_TRUE);
|
||||||
for (i=0; i<n; i++)
|
for (i=0; i<n; i++)
|
||||||
if (mask[i])
|
if (mask[i])
|
||||||
|
@ -1103,7 +1106,7 @@ static void SetFunctionPointers(GLcontext *ctx)
|
||||||
|
|
||||||
static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
|
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);
|
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1195,7 +1198,7 @@ static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#if 0 /* unused */
|
||||||
#define PAL_SIZE 256
|
#define PAL_SIZE 256
|
||||||
static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
|
static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
|
||||||
{
|
{
|
||||||
|
@ -1253,6 +1256,7 @@ static void GetPalette(HPALETTE Pal,RGBQUAD *aRGB)
|
||||||
aRGB[i].rgbReserved=Palette.aEntries[i].peFlags;
|
aRGB[i].rgbReserved=Palette.aEntries[i].peFlags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* 0 -- unused */
|
||||||
|
|
||||||
|
|
||||||
WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
|
WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
|
||||||
|
@ -1458,7 +1462,7 @@ void WMesaMakeCurrent( WMesaContext c )
|
||||||
|
|
||||||
void WMesaSwapBuffers( void )
|
void WMesaSwapBuffers( void )
|
||||||
{
|
{
|
||||||
HDC DC = Current->hDC;
|
// HDC DC = Current->hDC;
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
/* If we're swapping the buffer associated with the current context
|
/* If we're swapping the buffer associated with the current context
|
||||||
|
@ -1764,14 +1768,14 @@ void wmCreateDIBSection(
|
||||||
pwc->hbmDIB = CreateDIBSection(hic,
|
pwc->hbmDIB = CreateDIBSection(hic,
|
||||||
&(pwc->bmi),
|
&(pwc->bmi),
|
||||||
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
|
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
|
||||||
&(pwc->pbPixels),
|
(void **)&(pwc->pbPixels),
|
||||||
pwc->dib.hFileMap,
|
pwc->dib.hFileMap,
|
||||||
0);
|
0);
|
||||||
#else
|
#else
|
||||||
pwc->hbmDIB = CreateDIBSection(hic,
|
pwc->hbmDIB = CreateDIBSection(hic,
|
||||||
&(pwc->bmi),
|
&(pwc->bmi),
|
||||||
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
|
(iUsage ? DIB_PAL_COLORS : DIB_RGB_COLORS),
|
||||||
&(pwc->pbPixels),
|
(void **)&(pwc->pbPixels),
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
#endif // USE_MAPPED_FILE
|
#endif // USE_MAPPED_FILE
|
||||||
|
@ -1790,7 +1794,7 @@ void wmCreateDIBSection(
|
||||||
BOOL wmFlush(PWMC pwc)
|
BOOL wmFlush(PWMC pwc)
|
||||||
{
|
{
|
||||||
BOOL bRet = 0;
|
BOOL bRet = 0;
|
||||||
DWORD dwErr = 0;
|
// DWORD dwErr = 0;
|
||||||
#ifdef DDRAW
|
#ifdef DDRAW
|
||||||
HRESULT ddrval;
|
HRESULT ddrval;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3204,9 +3208,9 @@ static void flat_DITHER8_triangle( GLcontext *ctx, GLuint v0, GLuint v1,
|
||||||
#endif
|
#endif
|
||||||
/************** END DEAD TRIANGLE CODE ***********************/
|
/************** END DEAD TRIANGLE CODE ***********************/
|
||||||
|
|
||||||
|
#if 0
|
||||||
static triangle_func choose_triangle_function( GLcontext *ctx )
|
static triangle_func choose_triangle_function( GLcontext *ctx )
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
|
WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
|
||||||
int depth = wmesa->cColorBits;
|
int depth = wmesa->cColorBits;
|
||||||
|
|
||||||
|
@ -3296,8 +3300,8 @@ static triangle_func choose_triangle_function( GLcontext *ctx )
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define a new viewport and reallocate auxillary buffers if the size of
|
* Define a new viewport and reallocate auxillary buffers if the size of
|
||||||
|
|
|
@ -29,9 +29,8 @@ extern "C" {
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#define GL_GLEXT_PROTOTYPES
|
||||||
#include <GL/gl.h>
|
#include "GL/gl.h"
|
||||||
#include <GL/glext.h>
|
#include "GL/glext.h"
|
||||||
//#include <GL/glu.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,7 @@ extern "C" {
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include "wmesadef.h"
|
#include "../gdi/wmesadef.h"
|
||||||
#include "GL/wmesa.h"
|
#include "GL/wmesa.h"
|
||||||
#include "mtypes.h"
|
#include "mtypes.h"
|
||||||
#include "glapi.h"
|
#include "glapi.h"
|
||||||
|
@ -53,7 +52,7 @@ typedef struct _icdTable {
|
||||||
} ICDTABLE, *PICDTABLE;
|
} ICDTABLE, *PICDTABLE;
|
||||||
|
|
||||||
static ICDTABLE icdTable = { 336, {
|
static ICDTABLE icdTable = { 336, {
|
||||||
#define ICD_ENTRY(func) mgl##func,
|
#define ICD_ENTRY(func) (PROC)mgl##func,
|
||||||
#include "icdlist.h"
|
#include "icdlist.h"
|
||||||
#undef ICD_ENTRY
|
#undef ICD_ENTRY
|
||||||
} };
|
} };
|
||||||
|
@ -218,13 +217,13 @@ WGLAPI BOOL GLAPIENTRY DrvShareLists(HGLRC hglrc1,HGLRC hglrc2)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static FIXED FixedFromDouble(double d)
|
static FIXED FixedFromDouble(double d)
|
||||||
{
|
{
|
||||||
long l = (long) (d * 65536L);
|
long l = (long) (d * 65536L);
|
||||||
return *(FIXED *)&l;
|
return *(FIXED *)&l;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
WGLAPI BOOL GLAPIENTRY DrvDescribeLayerPlane(HDC hdc,int iPixelFormat,
|
WGLAPI BOOL GLAPIENTRY DrvDescribeLayerPlane(HDC hdc,int iPixelFormat,
|
||||||
int iLayerPlane,UINT nBytes,
|
int iLayerPlane,UINT nBytes,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue