Win32 build req't updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: glu.c,v 1.11 1999/09/17 01:00:38 brianp Exp $ */
|
/* $Id: glu.c,v 1.12 1999/09/17 03:07:28 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.12 1999/09/17 03:07:28 tjump
|
||||||
|
* Win32 build req't updates
|
||||||
|
*
|
||||||
* Revision 1.11 1999/09/17 01:00:38 brianp
|
* Revision 1.11 1999/09/17 01:00:38 brianp
|
||||||
* fixed typo
|
* fixed typo
|
||||||
*
|
*
|
||||||
@@ -371,9 +374,13 @@ const GLubyte* GLAPIENTRY gluGetString( GLenum name )
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* for BeOS R4.5 */
|
/* for BeOS R4.5 */
|
||||||
void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))(...)
|
gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
|
||||||
#else
|
#else
|
||||||
|
<<<<<<< glu.c
|
||||||
|
gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
|
||||||
|
=======
|
||||||
void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))()
|
void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))()
|
||||||
|
>>>>>>> 1.11
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
struct proc {
|
struct proc {
|
||||||
@@ -401,7 +408,7 @@ void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))()
|
|||||||
|
|
||||||
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)
|
||||||
return (void (*)()) procTable[i].address;
|
return (gluProcAddress) procTable[i].address;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tess.c,v 1.7 1999/09/16 06:41:42 gareth Exp $ */
|
/* $Id: tess.c,v 1.8 1999/09/17 03:07:28 tjump Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -26,6 +26,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: tess.c,v $
|
* $Log: tess.c,v $
|
||||||
|
* Revision 1.8 1999/09/17 03:07:28 tjump
|
||||||
|
* Win32 build req't updates
|
||||||
|
*
|
||||||
* Revision 1.7 1999/09/16 06:41:42 gareth
|
* Revision 1.7 1999/09/16 06:41:42 gareth
|
||||||
* Misc winding rule bug fixes.
|
* Misc winding rule bug fixes.
|
||||||
*
|
*
|
||||||
@@ -578,20 +581,24 @@ void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj )
|
|||||||
*
|
*
|
||||||
* Internal error handler. Call the user-registered error callback.
|
* Internal error handler. Call the user-registered error callback.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void tess_error_callback( GLUtesselator *tobj, GLenum errno, void *data )
|
|
||||||
|
/* 2nd arg changed from 'errno' to 'errnum' since MSVC defines errnum as */
|
||||||
|
/* a macro (of all things) and thus breaks the build -tjump */
|
||||||
|
|
||||||
|
void tess_error_callback( GLUtesselator *tobj, GLenum errnum, void *data )
|
||||||
{
|
{
|
||||||
if ( tobj->error == GLU_NO_ERROR )
|
if ( tobj->error == GLU_NO_ERROR )
|
||||||
{
|
{
|
||||||
tobj->error = errno;
|
tobj->error = errnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( tobj->callbacks.errorData != NULL )
|
if ( tobj->callbacks.errorData != NULL )
|
||||||
{
|
{
|
||||||
( tobj->callbacks.errorData )( errno, data );
|
( tobj->callbacks.errorData )( errnum, data );
|
||||||
}
|
}
|
||||||
else if ( tobj->callbacks.error != NULL )
|
else if ( tobj->callbacks.error != NULL )
|
||||||
{
|
{
|
||||||
( tobj->callbacks.error )( errno );
|
( tobj->callbacks.error )( errnum );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -164,7 +164,7 @@ __glutSetCursor(GLUTwindow *window)
|
|||||||
break;
|
break;
|
||||||
case GLUT_CURSOR_FULL_CROSSHAIR:
|
case GLUT_CURSOR_FULL_CROSSHAIR:
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
xcursor = IDC_CROSS;
|
xcursor = (HICON) IDC_CROSS;
|
||||||
#else
|
#else
|
||||||
if (fullCrosshairCusor == None) {
|
if (fullCrosshairCusor == None) {
|
||||||
fullCrosshairCusor = getFullCrosshairCursor();
|
fullCrosshairCusor = getFullCrosshairCursor();
|
||||||
|
@@ -96,9 +96,8 @@ __glutFinishMenu(Window win, int x, int y)
|
|||||||
static void
|
static void
|
||||||
mapMenu(GLUTmenu * menu, int x, int y)
|
mapMenu(GLUTmenu * menu, int x, int y)
|
||||||
{
|
{
|
||||||
TrackPopupMenu(menu->win, TPM_LEFTALIGN |
|
TrackPopupMenu((HMENU) menu->win, TPM_LEFTALIGN |
|
||||||
__glutMenuButton == TPM_RIGHTBUTTON ?
|
(__glutMenuButton == TPM_RIGHTBUTTON) ? TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
|
||||||
TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
|
|
||||||
x, y, 0, __glutCurrentWindow->win, NULL);
|
x, y, 0, __glutCurrentWindow->win, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,7 +253,7 @@ glutCreateMenu(GLUTselectCB selectFunc)
|
|||||||
menu->cascade = NULL;
|
menu->cascade = NULL;
|
||||||
menu->highlighted = NULL;
|
menu->highlighted = NULL;
|
||||||
menu->anchor = NULL;
|
menu->anchor = NULL;
|
||||||
menu->win = CreatePopupMenu();
|
menu->win = (HWND) CreatePopupMenu();
|
||||||
menuList[menuid] = menu;
|
menuList[menuid] = menu;
|
||||||
__glutSetMenu(menu);
|
__glutSetMenu(menu);
|
||||||
return menuid + 1;
|
return menuid + 1;
|
||||||
@@ -277,7 +276,7 @@ glutDestroyMenu(int menunum)
|
|||||||
menuModificationError();
|
menuModificationError();
|
||||||
}
|
}
|
||||||
assert(menu->id == menunum - 1);
|
assert(menu->id == menunum - 1);
|
||||||
DestroyMenu(menu->win);
|
DestroyMenu( (HMENU) menu->win);
|
||||||
menuList[menunum - 1] = NULL;
|
menuList[menunum - 1] = NULL;
|
||||||
/* free all menu entries */
|
/* free all menu entries */
|
||||||
item = menu->list;
|
item = menu->list;
|
||||||
@@ -337,9 +336,9 @@ setMenuItem(GLUTmenuItem * item, const char *label,
|
|||||||
item->value = value;
|
item->value = value;
|
||||||
item->unique = uniqueMenuHandler++;
|
item->unique = uniqueMenuHandler++;
|
||||||
if (isTrigger) {
|
if (isTrigger) {
|
||||||
AppendMenu(menu->win, MF_POPUP, (UINT)item->win, label);
|
AppendMenu((HMENU) menu->win, MF_POPUP, (UINT)item->win, label);
|
||||||
} else {
|
} else {
|
||||||
AppendMenu(menu->win, MF_STRING, item->unique, label);
|
AppendMenu((HMENU) menu->win, MF_STRING, item->unique, label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,7 +404,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)
|
|||||||
need to account for submenus. */
|
need to account for submenus. */
|
||||||
item->menu->submenus--;
|
item->menu->submenus--;
|
||||||
/* Nuke the Win32 menu. */
|
/* Nuke the Win32 menu. */
|
||||||
DestroyMenu(item->win);
|
DestroyMenu((HMENU) item->win);
|
||||||
}
|
}
|
||||||
free(item->label);
|
free(item->label);
|
||||||
|
|
||||||
@@ -416,7 +415,7 @@ glutChangeToMenuEntry(int num, const char *label, int value)
|
|||||||
item->len = (int) strlen(label);
|
item->len = (int) strlen(label);
|
||||||
item->value = value;
|
item->value = value;
|
||||||
item->unique = uniqueMenuHandler++;
|
item->unique = uniqueMenuHandler++;
|
||||||
ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
|
ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
|
||||||
MF_BYPOSITION | MFT_STRING, item->unique, label);
|
MF_BYPOSITION | MFT_STRING, item->unique, label);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -445,7 +444,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)
|
|||||||
/* If changing a menu entry to as submenu trigger, we
|
/* If changing a menu entry to as submenu trigger, we
|
||||||
need to account for submenus. */
|
need to account for submenus. */
|
||||||
item->menu->submenus++;
|
item->menu->submenus++;
|
||||||
item->win = CreatePopupMenu();
|
item->win = (HWND) CreatePopupMenu();
|
||||||
}
|
}
|
||||||
free(item->label);
|
free(item->label);
|
||||||
|
|
||||||
@@ -459,7 +458,7 @@ glutChangeToSubMenu(int num, const char *label, int menu)
|
|||||||
popupmenu = __glutGetMenuByNum(menu);
|
popupmenu = __glutGetMenuByNum(menu);
|
||||||
if (popupmenu)
|
if (popupmenu)
|
||||||
item->win = popupmenu->win;
|
item->win = popupmenu->win;
|
||||||
ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
|
ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
|
||||||
MF_BYPOSITION | MF_POPUP, (UINT) item->win, label);
|
MF_BYPOSITION | MF_POPUP, (UINT) item->win, label);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -489,7 +488,7 @@ glutRemoveMenuItem(int num)
|
|||||||
/* Patch up menu's item list. */
|
/* Patch up menu's item list. */
|
||||||
*prev = item->next;
|
*prev = item->next;
|
||||||
|
|
||||||
RemoveMenu(__glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
|
RemoveMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
|
||||||
|
|
||||||
free(item->label);
|
free(item->label);
|
||||||
free(item);
|
free(item);
|
||||||
|
@@ -70,6 +70,7 @@ __glutFont(void *font)
|
|||||||
}
|
}
|
||||||
__glutFatalError("out of memory.");
|
__glutFatalError("out of memory.");
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
|
return NULL; /* MSVC compiler complains if there is no return at all */
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: fxglidew.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
|
/* $Id: fxglidew.c,v 1.2 1999/09/17 03:07:28 tjump Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -53,8 +53,8 @@ FxI32 FX_grGetInteger(FxU32 pname)
|
|||||||
default:
|
default:
|
||||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||||
fprintf(stderr,"Wrong parameter in FX_grGetInteger!\n");
|
fprintf(stderr,"Wrong parameter in FX_grGetInteger!\n");
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
FxU32 grname;
|
FxU32 grname;
|
||||||
@@ -71,8 +71,8 @@ FxI32 FX_grGetInteger(FxU32 pname)
|
|||||||
default:
|
default:
|
||||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||||
fprintf(stderr,"Wrong parameter in FX_grGetInteger!\n");
|
fprintf(stderr,"Wrong parameter in FX_grGetInteger!\n");
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
grGet(grname,4,&result);
|
grGet(grname,4,&result);
|
||||||
|
Reference in New Issue
Block a user