summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-02-10 17:45:52 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-02-10 17:45:52 +0000
commit577c67e860a70ba7b39322676b951d32f7583182 (patch)
treea520cbfbd4d7fcb5a724f3b2b471e55394eba35a /src
parent46a5936f54142816a4ec068502790643a32006f9 (diff)
added GLCALLBACKPCAST for Cygnus (Sven Panne)
Diffstat (limited to 'src')
-rw-r--r--src/glu/mesa/nurbs.c79
-rw-r--r--src/glu/mesa/quadric.c4
-rw-r--r--src/glu/mesa/tess.c59
3 files changed, 33 insertions, 109 deletions
diff --git a/src/glu/mesa/nurbs.c b/src/glu/mesa/nurbs.c
index 0ce9a44987..fdf0991651 100644
--- a/src/glu/mesa/nurbs.c
+++ b/src/glu/mesa/nurbs.c
@@ -1,9 +1,9 @@
-/* $Id: nurbs.c,v 1.2 1999/11/11 03:21:43 kendallb Exp $ */
+/* $Id: nurbs.c,v 1.3 2000/02/10 17:45:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
- * Copyright (C) 1995-1999 Brian Paul
+ * Version: 3.3
+ * Copyright (C) 1995-2000 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -22,73 +22,6 @@
/*
- * $Log: nurbs.c,v $
- * Revision 1.2 1999/11/11 03:21:43 kendallb
- *
- * . Updated GL/gl.h with GLCALLACKP and GLAPIENTRYP macros for compatibility
- * with the IBM VisualAge C++ compiler. Eventually some more code will be
- * needed in the headers to enable the reversal of (__stdcall*) to (*__stdcall)
- * for the IBM compilers, however we currently build using our own header files
- * that already handle this.
- *
- * . Changed instances of (GLCALLBACK*) to GLCALLBACKP for compatibility
- * with the IBM VisualAge C++ compiler in src-glu.
- *
- * . Misc cleanups for warnings generated with Watcom C++ in src-glu. Compiles
- * with 0 warnings now.
- *
- * . tess_hash.c: line 244 - Why is this function stubbed out? I removed the
- * code with a #if 0 to avoid a compiler warning, but it looks dangerous.
- *
- * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
- * Imported sources
- *
- * Revision 1.14 1999/01/03 03:23:15 brianp
- * now using GLAPIENTRY and GLCALLBACK keywords (Ted Jump)
- *
- * Revision 1.13 1998/06/01 01:07:49 brianp
- * small update for Next/OpenStep from Alexander Mai
- *
- * Revision 1.12 1998/03/15 18:14:30 brianp
- * fixed a compiler cast warning
- *
- * Revision 1.11 1998/02/07 14:29:11 brianp
- * fixed casting problem in gluNurbsCallback, again
- *
- * Revision 1.10 1998/02/04 00:21:20 brianp
- * fixed cygnus compilation problem (Stephane Rehel)
- *
- * Revision 1.9 1998/01/16 03:35:26 brianp
- * fixed Windows compilation warnings (Theodore Jump)
- *
- * Revision 1.8 1997/09/17 01:51:48 brianp
- * changed glu*Callback() functions to match prototype in glu.h
- *
- * Revision 1.7 1997/07/24 01:28:44 brianp
- * changed precompiled header symbol from PCH to PC_HEADER
- *
- * Revision 1.6 1997/07/24 01:26:31 brianp
- * added CALLBACK keyword to gluNurbsCallback()
- *
- * Revision 1.5 1997/05/28 02:29:38 brianp
- * added support for precompiled headers (PCH), inserted APIENTRY keyword
- *
- * Revision 1.4 1997/05/27 03:17:22 brianp
- * minor clean-up
- *
- * Revision 1.3 1997/05/27 03:00:16 brianp
- * incorporated Bogdan's new NURBS code
- *
- * Revision 1.2 1996/09/27 23:11:23 brianp
- * ifdef'd out unimplemented trimmed nurbs code
- *
- * Revision 1.1 1996/09/27 01:19:39 brianp
- * Initial revision
- *
- */
-
-
-/*
* NURBS implementation written by Bogdan Sikorski (bogdan@cira.it)
* See README2 for more info.
*/
@@ -619,11 +552,7 @@ void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
void GLAPIENTRY
gluNurbsCallback( GLUnurbsObj *nobj, GLenum which, void (GLCALLBACKP fn)())
{
-#if defined(__CYGWIN32__) || defined(OPENSTEP)
- nobj->error_callback = (void(*)(GLenum))fn;
-#else
- nobj->error_callback = (void(GLCALLBACKP)(GLenum))fn;
-#endif
+ nobj->error_callback = (void(GLCALLBACKPCAST)(GLenum))fn;
if(which!=GLU_ERROR)
call_user_error(nobj,GLU_INVALID_ENUM);
diff --git a/src/glu/mesa/quadric.c b/src/glu/mesa/quadric.c
index 0458e97be7..943c885a59 100644
--- a/src/glu/mesa/quadric.c
+++ b/src/glu/mesa/quadric.c
@@ -1,4 +1,4 @@
-/* $Id: quadric.c,v 1.6 2000/01/11 22:01:08 brianp Exp $ */
+/* $Id: quadric.c,v 1.7 2000/02/10 17:45:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -153,7 +153,7 @@ void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
*/
if (qobj && which==GLU_ERROR) {
#ifdef __CYGWIN32__
- qobj->ErrorFunc = (void(*)(int))fn;
+ qobj->ErrorFunc = (void(GLCALLBACKPCAST)(GLenum))fn;
#elif defined(OPENSTEP)
qobj->ErrorFunc = (void(*)(GLenum))fn;
#elif defined(_WIN32)
diff --git a/src/glu/mesa/tess.c b/src/glu/mesa/tess.c
index 4f91d135e8..919643cb8e 100644
--- a/src/glu/mesa/tess.c
+++ b/src/glu/mesa/tess.c
@@ -1,10 +1,10 @@
-/* $Id: tess.c,v 1.23 2000/01/20 21:52:01 gareth Exp $ */
+/* $Id: tess.c,v 1.24 2000/02/10 17:45:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.3
*
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -83,19 +83,19 @@ void tess_error_callback( GLUtesselator *tobj, GLenum errnum )
*****************************************************************************/
static void init_callbacks( tess_callbacks_t *callbacks )
{
- callbacks->begin = ( void (GLCALLBACKP)(GLenum) ) NULL;
- callbacks->beginData = ( void (GLCALLBACKP)(GLenum, void *) ) NULL;
- callbacks->edgeFlag = ( void (GLCALLBACKP)(GLboolean) ) NULL;
- callbacks->edgeFlagData = ( void (GLCALLBACKP)(GLboolean, void *) ) NULL;
- callbacks->vertex = ( void (GLCALLBACKP)(void *) ) NULL;
- callbacks->vertexData = ( void (GLCALLBACKP)(void *, void *) ) NULL;
- callbacks->end = ( void (GLCALLBACKP)(void) ) NULL;
- callbacks->endData = ( void (GLCALLBACKP)(void *) ) NULL;
- callbacks->error = ( void (GLCALLBACKP)(GLenum) ) NULL;
- callbacks->errorData = ( void (GLCALLBACKP)(GLenum, void *) ) NULL;
- callbacks->combine = ( void (GLCALLBACKP)(GLdouble [3], void *[4],
+ callbacks->begin = ( void (GLCALLBACKPCAST)(GLenum) ) NULL;
+ callbacks->beginData = ( void (GLCALLBACKPCAST)(GLenum, void *) ) NULL;
+ callbacks->edgeFlag = ( void (GLCALLBACKPCAST)(GLboolean) ) NULL;
+ callbacks->edgeFlagData = ( void (GLCALLBACKPCAST)(GLboolean, void *) ) NULL;
+ callbacks->vertex = ( void (GLCALLBACKPCAST)(void *) ) NULL;
+ callbacks->vertexData = ( void (GLCALLBACKPCAST)(void *, void *) ) NULL;
+ callbacks->end = ( void (GLCALLBACKPCAST)(void) ) NULL;
+ callbacks->endData = ( void (GLCALLBACKPCAST)(void *) ) NULL;
+ callbacks->error = ( void (GLCALLBACKPCAST)(GLenum) ) NULL;
+ callbacks->errorData = ( void (GLCALLBACKPCAST)(GLenum, void *) ) NULL;
+ callbacks->combine = ( void (GLCALLBACKPCAST)(GLdouble [3], void *[4],
GLfloat [4], void **) ) NULL;
- callbacks->combineData = ( void (GLCALLBACKP)(GLdouble [3], void *[4],
+ callbacks->combineData = ( void (GLCALLBACKPCAST)(GLdouble [3], void *[4],
GLfloat [4], void **,
void *) ) NULL;
}
@@ -883,55 +883,50 @@ void GLAPIENTRY gluTessCallback( GLUtesselator *tobj, GLenum which,
{
/* Register the begin callbacks. */
case GLU_TESS_BEGIN:
- tobj->callbacks.begin = (void (GLCALLBACKP)(GLenum)) fn;
+ tobj->callbacks.begin = (void (GLCALLBACKPCAST)(GLenum)) fn;
break;
case GLU_TESS_BEGIN_DATA:
- tobj->callbacks.beginData = (void (GLCALLBACKP)(GLenum, void *)) fn;
+ tobj->callbacks.beginData = (void (GLCALLBACKPCAST)(GLenum, void *)) fn;
break;
/* Register the edge flag callbacks. */
case GLU_TESS_EDGE_FLAG:
- tobj->callbacks.edgeFlag = (void (GLCALLBACKP)(GLboolean)) fn;
+ tobj->callbacks.edgeFlag = (void (GLCALLBACKPCAST)(GLboolean)) fn;
break;
case GLU_TESS_EDGE_FLAG_DATA:
- tobj->callbacks.edgeFlagData =
- (void (GLCALLBACKP)(GLboolean, void *)) fn;
+ tobj->callbacks.edgeFlagData = (void (GLCALLBACKPCAST)(GLboolean, void *)) fn;
break;
/* Register the vertex callbacks. */
case GLU_TESS_VERTEX:
- tobj->callbacks.vertex = (void (GLCALLBACKP)(void *)) fn;
+ tobj->callbacks.vertex = (void (GLCALLBACKPCAST)(void *)) fn;
break;
case GLU_TESS_VERTEX_DATA:
- tobj->callbacks.vertexData = (void (GLCALLBACKP)(void *, void *)) fn;
+ tobj->callbacks.vertexData = (void (GLCALLBACKPCAST)(void *, void *)) fn;
break;
/* Register the end callbacks. */
case GLU_TESS_END:
- tobj->callbacks.end = (void (GLCALLBACKP)(void)) fn;
+ tobj->callbacks.end = (void (GLCALLBACKPCAST)(void)) fn;
break;
case GLU_TESS_END_DATA:
- tobj->callbacks.endData = (void (GLCALLBACKP)(void *)) fn;
+ tobj->callbacks.endData = (void (GLCALLBACKPCAST)(void *)) fn;
break;
/* Register the error callbacks. */
case GLU_TESS_ERROR:
- tobj->callbacks.error = (void (GLCALLBACKP)(GLenum)) fn;
+ tobj->callbacks.error = (void (GLCALLBACKPCAST)(GLenum)) fn;
break;
case GLU_TESS_ERROR_DATA:
- tobj->callbacks.errorData = (void (GLCALLBACKP)(GLenum, void *)) fn;
+ tobj->callbacks.errorData = (void (GLCALLBACKPCAST)(GLenum, void *)) fn;
break;
/* Register the combine callbacks. */
case GLU_TESS_COMBINE:
- tobj->callbacks.combine =
- (void (GLCALLBACKP)(GLdouble[3], void *[4],
- GLfloat [4], void **)) fn;
+ tobj->callbacks.combine = (void (GLCALLBACKPCAST)(GLdouble[3], void *[4], GLfloat [4], void **)) fn;
break;
case GLU_TESS_COMBINE_DATA:
- tobj->callbacks.combineData =
- (void (GLCALLBACKP)(GLdouble[3], void *[4], GLfloat [4],
- void **, void *)) fn;
+ tobj->callbacks.combineData = (void (GLCALLBACKPCAST)(GLdouble[3], void *[4], GLfloat [4], void **, void *)) fn;
break;
default: