More Win32 build compliance fixups

This commit is contained in:
Ted Jump
1999-09-19 02:03:18 +00:00
parent 1bf9dfaf5d
commit 725ec81ae8
7 changed files with 23 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: gl.h,v 1.7 1999/09/18 01:06:52 brianp Exp $ */ /* $Id: gl.h,v 1.8 1999/09/19 02:03:18 tjump Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -2181,16 +2181,10 @@ GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
* If you want to try it out, #define GL_EXT_get_proc_address before * If you want to try it out, #define GL_EXT_get_proc_address before
* #include <GL/gl.h> * #include <GL/gl.h>
*/ */
#define GL_EXT_get_proc_address 1
#ifdef GL_EXT_get_proc_address #ifdef GL_EXT_get_proc_address
#ifdef __WIN32__ GLAPI void (GLAPIENTRY *glGetProcAddressEXT(const GLubyte *procName))();
typedef (void GLAPIENTRY *glProcAddress)();
glProcAddress GLAPIENTRY glGetProcAddressEXT(const GLubyte *procName);
#else
/* everything but Windows */
GLAPI void GLAPIENTRY (*glGetProcAddressEXT(const GLubyte *procName))();
#endif #endif
#endif
#if defined(__BEOS__) || defined(__QUICKDRAW__) #if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export off #pragma export off

View File

@@ -1,4 +1,4 @@
/* $Id: glu.h,v 1.8 1999/09/17 12:21:36 brianp Exp $ */ /* $Id: glu.h,v 1.9 1999/09/19 02:03:18 tjump Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -23,6 +23,9 @@
/* /*
* $Log: glu.h,v $ * $Log: glu.h,v $
* Revision 1.9 1999/09/19 02:03:18 tjump
* More Win32 build compliance fixups
*
* Revision 1.8 1999/09/17 12:21:36 brianp * Revision 1.8 1999/09/17 12:21:36 brianp
* glGetProcAddressEXT changes to accomodate Win32 and non-Win32 * glGetProcAddressEXT changes to accomodate Win32 and non-Win32
* *
@@ -511,15 +514,11 @@ GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
* which uses this extension yet! It may change! * which uses this extension yet! It may change!
*/ */
#define GLU_EXT_get_proc_address 1 #define GLU_EXT_get_proc_address 1
#ifdef __WIN32__ #ifdef GLU_EXT_get_proc_address
typedef (void (GLAPIENTRY *gluProcAddress))(); GLUAPI void (GLAPIENTRY *glGetProcAddressEXT(const GLubyte *procName))();
gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName);
#else
GLUAPI void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))();
#endif #endif
#if defined(__BEOS__) || defined(__QUICKDRAW__) #if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export off #pragma export off
#endif #endif

View File

@@ -64,7 +64,7 @@ void makeCheckImage(void)
for (i = 0; i < checkImageHeight; i++) { for (i = 0; i < checkImageHeight; i++) {
for (j = 0; j < checkImageWidth; j++) { for (j = 0; j < checkImageWidth; j++) {
c = ((((i&0x8)==0)^((j&0x8))==0))*255; c = (((i&0x8)==0)^((j&0x8)==0))*255;
checkImage[i][j][0] = (GLubyte) c; checkImage[i][j][0] = (GLubyte) c;
checkImage[i][j][1] = (GLubyte) c; checkImage[i][j][1] = (GLubyte) c;
checkImage[i][j][2] = (GLubyte) c; checkImage[i][j][2] = (GLubyte) c;

View File

@@ -347,7 +347,7 @@ int main(int argc, char **argv)
if (!glutLayerGet(GLUT_OVERLAY_POSSIBLE)) if (!glutLayerGet(GLUT_OVERLAY_POSSIBLE))
{ {
fprintf(stderr, "Overlay not available\n"); fprintf(stderr, "Overlay not available\n");
return; return(1);
} }
if (Args(argc, argv) == GL_FALSE) { if (Args(argc, argv) == GL_FALSE) {

View File

@@ -1,4 +1,4 @@
/* $Id: glu.c,v 1.14 1999/09/17 12:21:53 brianp Exp $ */ /* $Id: glu.c,v 1.15 1999/09/19 02:03:19 tjump Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -23,6 +23,9 @@
/* /*
* $Log: glu.c,v $ * $Log: glu.c,v $
* Revision 1.15 1999/09/19 02:03:19 tjump
* More Win32 build compliance fixups
*
* Revision 1.14 1999/09/17 12:21:53 brianp * Revision 1.14 1999/09/17 12:21:53 brianp
* glGetProcAddressEXT changes to accomodate Win32 and non-Win32 * glGetProcAddressEXT changes to accomodate Win32 and non-Win32
* *
@@ -381,10 +384,8 @@ const GLubyte* GLAPIENTRY gluGetString( GLenum name )
#ifdef __cplusplus #ifdef __cplusplus
/* for BeOS R4.5 */ /* for BeOS R4.5 */
void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))(...) void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))(...)
#elif defined(__WIN32__)
gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
#else #else
void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))() void (GLAPIENTRY *gluGetProcAddressEXT(const GLubyte *procName))()
#endif #endif
{ {
struct proc { struct proc {
@@ -412,11 +413,7 @@ const GLubyte* GLAPIENTRY gluGetString( GLenum name )
for (i = 0; procTable[i].address; i++) { for (i = 0; procTable[i].address; i++) {
if (strcmp((const char *) procName, procTable[i].name) == 0) if (strcmp((const char *) procName, procTable[i].name) == 0)
#ifdef __WIN32__ return (void (GLAPIENTRY *)()) procTable[i].address;
return (gluProcAddress) procTable[i].address;
#else
return (void (*)()) procTable[i].address;
#endif
} }
return NULL; return NULL;

View File

@@ -1,4 +1,4 @@
/* $Id: feedback.c,v 1.2 1999/09/18 20:41:23 keithw Exp $ */ /* $Id: feedback.c,v 1.3 1999/09/19 02:03:19 tjump Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -39,6 +39,7 @@
#include "macros.h" #include "macros.h"
#include "mmath.h" #include "mmath.h"
#include "types.h" #include "types.h"
#include "triangle.h"
#ifdef XFree86Server #ifdef XFree86Server
#include "GL/xf86glx.h" #include "GL/xf86glx.h"
#endif #endif
@@ -203,7 +204,7 @@ static void gl_do_feedback_vertex( GLcontext *ctx, GLuint v, GLuint pv )
void gl_feedback_triangle( GLcontext *ctx, void gl_feedback_triangle( GLcontext *ctx,
GLuint v0, GLuint v1, GLuint v2, GLuint pv ) GLuint v0, GLuint v1, GLuint v2, GLuint pv )
{ {
if (gl_cull_triangle( ctx, v0, v1, v2 )) { if (gl_cull_triangle( ctx, v0, v1, v2, 0 )) {
FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN ); FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN );
FEEDBACK_TOKEN( ctx, (GLfloat) 3 ); /* three vertices */ FEEDBACK_TOKEN( ctx, (GLfloat) 3 ); /* three vertices */
@@ -294,7 +295,7 @@ void gl_select_triangle( GLcontext *ctx,
{ {
struct vertex_buffer *VB = ctx->VB; struct vertex_buffer *VB = ctx->VB;
if (gl_cull_triangle( ctx, v0, v1, v2 )) { if (gl_cull_triangle( ctx, v0, v1, v2, 0 )) {
gl_update_hitflag( ctx, VB->Win.data[v0][3] / DEPTH_SCALE ); gl_update_hitflag( ctx, VB->Win.data[v0][3] / DEPTH_SCALE );
gl_update_hitflag( ctx, VB->Win.data[v1][3] / DEPTH_SCALE ); gl_update_hitflag( ctx, VB->Win.data[v1][3] / DEPTH_SCALE );
gl_update_hitflag( ctx, VB->Win.data[v2][3] / DEPTH_SCALE ); gl_update_hitflag( ctx, VB->Win.data[v2][3] / DEPTH_SCALE );

View File

@@ -1,4 +1,4 @@
/* $Id: stencil.c,v 1.2 1999/09/18 20:41:23 keithw Exp $ */ /* $Id: stencil.c,v 1.3 1999/09/19 02:03:19 tjump Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -35,6 +35,7 @@
#include "pb.h" #include "pb.h"
#include "stencil.h" #include "stencil.h"
#include "types.h" #include "types.h"
#include "enable.h"
#ifdef XFree86Server #ifdef XFree86Server
#include "GL/xf86glx.h" #include "GL/xf86glx.h"
#endif #endif