mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
assorted fixes for Win32 (Gerk Huisma)
This commit is contained in:
parent
96385fa155
commit
fba5e95468
8 changed files with 40 additions and 28 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
** gluos.h - operating system dependencies for GLU
|
||||
**
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/include/gluos.h,v 1.2 2001/03/22 11:38:36 joukj Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/include/gluos.h,v 1.3 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
#ifdef __VMS
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -12,10 +12,20 @@
|
|||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <stdlib.h> /* For _MAX_PATH definition */
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOGDI
|
||||
#define NOIME
|
||||
#define NOMINMAX
|
||||
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#ifndef STRICT
|
||||
#define STRICT 1
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
/* Disable warnings */
|
||||
|
|
@ -23,6 +33,8 @@
|
|||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4761)
|
||||
|
||||
#pragma comment(linker, "/OPT:NOWIN98")
|
||||
|
||||
#else
|
||||
|
||||
/* Disable Microsoft-specific keywords */
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
/*
|
||||
* glcurveval.h
|
||||
*
|
||||
* $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $
|
||||
* $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.h,v 1.2 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
|
||||
#ifndef __gluglcurveval_h_
|
||||
|
|
@ -93,7 +93,7 @@ public:
|
|||
{
|
||||
output_triangles = flag;
|
||||
}
|
||||
void putCallBack(GLenum which, GLvoid (GLAPIENTRY *fn)(...));
|
||||
void putCallBack(GLenum which, _GLUfuncptr fn );
|
||||
void set_callback_userData(void *data)
|
||||
{
|
||||
userData = data;
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
|
||||
** $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glinterface.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glinterface.cc,v 1.2 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "gluos.h"
|
||||
|
|
@ -429,7 +429,7 @@ gluGetNurbsProperty(GLUnurbs *r, GLenum property, GLfloat *value)
|
|||
}
|
||||
|
||||
extern "C" void GLAPIENTRY
|
||||
gluNurbsCallback(GLUnurbs *r, GLenum which, GLvoid (*fn)())
|
||||
gluNurbsCallback(GLUnurbs *r, GLenum which, _GLUfuncptr fn )
|
||||
{
|
||||
switch (which) {
|
||||
case GLU_NURBS_BEGIN:
|
||||
|
|
@ -444,11 +444,11 @@ gluNurbsCallback(GLUnurbs *r, GLenum which, GLvoid (*fn)())
|
|||
case GLU_NURBS_NORMAL_DATA:
|
||||
case GLU_NURBS_TEXTURE_COORD_DATA:
|
||||
case GLU_NURBS_COLOR_DATA:
|
||||
r->putSurfCallBack(which, (GLvoid (*)(...))fn);
|
||||
r->putSurfCallBack(which, fn);
|
||||
break;
|
||||
|
||||
case GLU_NURBS_ERROR:
|
||||
r->errorCallback = (void (*)( GLenum )) fn;
|
||||
r->errorCallback = (void (APIENTRY *)( GLenum e )) fn;
|
||||
break;
|
||||
default:
|
||||
r->postError(GLU_INVALID_ENUM);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
/*
|
||||
* glrenderer.h
|
||||
*
|
||||
* $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glrenderer.h,v 1.1 2001/03/17 00:25:40 brianp Exp $
|
||||
* $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glrenderer.h,v 1.2 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
|
||||
#ifndef __gluglrenderer_h_
|
||||
|
|
@ -70,11 +70,11 @@ public:
|
|||
}
|
||||
GLboolean getautoloadmode( void ) { return autoloadmode; }
|
||||
|
||||
void (GLAPIENTRY *errorCallback)( GLenum );
|
||||
void (APIENTRY *errorCallback)( GLenum );
|
||||
void postError( int which )
|
||||
{ if (errorCallback) (*errorCallback)( (GLenum)which ); }
|
||||
{ if (errorCallback) (errorCallback)( (GLenum)which ); }
|
||||
|
||||
void putSurfCallBack(GLenum which, GLvoid (GLAPIENTRY *fn)(...))
|
||||
void putSurfCallBack(GLenum which, _GLUfuncptr fn )
|
||||
{
|
||||
curveEvaluator.putCallBack(which, fn);
|
||||
surfaceEvaluator.putCallBack(which, fn);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
/*
|
||||
* glsurfeval.c++
|
||||
*
|
||||
* $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glsurfeval.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
|
||||
* $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glsurfeval.cc,v 1.2 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
|
||||
/* Polynomial Evaluator Interface */
|
||||
|
|
@ -1188,7 +1188,7 @@ return;
|
|||
}
|
||||
|
||||
void
|
||||
OpenGLSurfaceEvaluator::putCallBack(GLenum which, GLvoid (GLAPIENTRY *fn)(...))
|
||||
OpenGLSurfaceEvaluator::putCallBack(GLenum which, _GLUfuncptr fn )
|
||||
{
|
||||
switch(which)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
/*
|
||||
* glsurfeval.h
|
||||
*
|
||||
* $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glsurfeval.h,v 1.1 2001/03/17 00:25:40 brianp Exp $
|
||||
* $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glsurfeval.h,v 1.2 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
|
||||
#ifndef __gluglsurfeval_h_
|
||||
|
|
@ -145,7 +145,7 @@ public:
|
|||
void newtmeshvert( REAL, REAL );
|
||||
void newtmeshvert( long, long );
|
||||
|
||||
void putCallBack(GLenum which, GLvoid (GLAPIENTRY *fn)(...));
|
||||
void putCallBack(GLenum which, _GLUfuncptr fn );
|
||||
int get_vertices_call_back()
|
||||
{
|
||||
return output_triangles;
|
||||
|
|
|
|||
|
|
@ -35,18 +35,18 @@
|
|||
/*
|
||||
* coveandtiler.h
|
||||
*
|
||||
* $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/coveandtiler.h,v 1.1 2001/03/17 00:25:40 brianp Exp $
|
||||
* $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/coveandtiler.h,v 1.2 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
|
||||
#ifndef __glucoveandtiler_h
|
||||
#define __glucoveandtiler_h
|
||||
|
||||
#include "trimregion.h"
|
||||
#include "trimvertex.h"
|
||||
#include "gridvertex.h"
|
||||
|
||||
class Backend;
|
||||
class TrimVertex;
|
||||
class GridVertex;
|
||||
class GridTrimVertex;
|
||||
|
||||
class CoveAndTiler : virtual public TrimRegion {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/project.c,v 1.1 2001/03/17 00:25:41 brianp Exp $
|
||||
** $Date: 2001/07/16 15:46:42 $ $Revision: 1.2 $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/project.c,v 1.2 2001/07/16 15:46:42 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "gluos.h"
|
||||
|
|
@ -331,7 +331,7 @@ gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
|
|||
const GLdouble modelMatrix[16],
|
||||
const GLdouble projMatrix[16],
|
||||
const GLint viewport[4],
|
||||
GLclampd near, GLclampd far,
|
||||
GLclampd near, GLclampd farVal,
|
||||
GLdouble *objx, GLdouble *objy, GLdouble *objz,
|
||||
GLdouble *objw)
|
||||
{
|
||||
|
|
@ -350,7 +350,7 @@ gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
|
|||
/* Map x and y from window coordinates */
|
||||
in[0] = (in[0] - viewport[0]) / viewport[2];
|
||||
in[1] = (in[1] - viewport[1]) / viewport[3];
|
||||
in[2] = (in[2] - near) / (far - near);
|
||||
in[2] = (in[2] - near) / (farVal - near);
|
||||
|
||||
/* Map to range -1 to 1 */
|
||||
in[0] = in[0] * 2 - 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue