Commit 76fb8089 authored by Zhang's avatar Zhang Committed by Brian

Fix a number of MINGW32 issues

parent af2aa8e9
......@@ -317,6 +317,7 @@ SGI_GLU_FILES = \
$(DIRECTORY)/src/glu/Makefile \
$(DIRECTORY)/src/glu/descrip.mms \
$(DIRECTORY)/src/glu/sgi/Makefile \
$(DIRECTORY)/src/glu/sgi/Makefile.mgw \
$(DIRECTORY)/src/glu/sgi/Makefile.win \
$(DIRECTORY)/src/glu/sgi/Makefile.DJ \
$(DIRECTORY)/src/glu/sgi/glu.def \
......
......@@ -53,11 +53,13 @@
# MinGW core makefile updated for Mesa 7.0
#
# updated : by Heromyth, 2007-6-25
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
# Bug : All the default settings work fine. But the setting X86=1 can't work.
# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
# with the other compilers like VC8, especially for GLUT.
# 3) MAlthough more tests are needed, it can be used individually!
.PHONY : all libgl clean realclean
......@@ -73,13 +75,14 @@ CFLAGS += -O2 -ffast-math
export CFLAGS
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
all: libgl libglu libglut
all: libgl libglu libglut example
libgl: lib
$(MAKE) -f Makefile.mgw -C src/mesa
......
# MinGW config include file updated for Mesa 7.0
#
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
# The generated DLLs by MingW with STDCALL are not totally compatible
# with the ones linked by Microsoft's compilers.
#
# xxx_USING_STDCALL = 1 Compiling MESA with __stdcall. This is default!
#
# xxx_USING_STDCALL = 0 Compiling MESA without __stdcall. I like this:)
#
# In fact, GL_USING_STDCALL and GLUT_USING_STDCALL can be
# different. For example:
#
# GL_USING_STDCALL = 0
# GLUT_USING_STDCALL = 1
#
# Suggested setting:
#
# ALL_USING_STDCALL = 1
#
# That's default!
#
ALL_USING_STDCALL = 1
ifeq ($(ALL_USING_STDCALL),1)
GL_USING_STDCALL = 1
GLUT_USING_STDCALL = 1
else
GL_USING_STDCALL = 0
GLUT_USING_STDCALL = 0
endif
......@@ -88,3 +88,52 @@ Running the Build:
Paul G. <pgarceau@users.sourceforge.net>
Daniel Borca <dborca@users.sourceforge.net>
*******************This section is added by Heromyth*****************************
Updated on 2007-7-21, by Heromyth <zxpmyth@yahoo.com.cn>
Notice:
1) The generated DLLs are *not* compatible with the ones built
with the other compilers like VC8, especially for GLUT.
2) Although more tests are needed, it can be used individually!
3) You can set the options about whether using STDCALL to build MESA. The
config file is <Mesa3D-root>\configs\config.mgw. The default setting is that:
ALL_USING_STDCALL = 1
, which means using STDCALL to build MESA.
4) Of course, you can MESA without using STDCALL,I like this:)
The setting is :
ALL_USING_STDCALL = 0
To do this, however, you must modify wingdi.h which is in MingW's include dir.
For example, run:
notepad C:\MingW\include\wingdi.h
, and delete all the lines where all the wgl*() functions are. Because they would
be conflicted with the ones in <Mesa3D-root>\include\GL\mesa_wgl.h.
======= Conflicted Functions List ======
WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC,int);
WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
WINGDIAPI BOOL WINAPI wglDescribeLayerPlane(HDC,int,int,UINT,LPLAYERPLANEDESCRIPTOR);
WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void);
WINGDIAPI HDC WINAPI wglGetCurrentDC(void);
WINGDIAPI int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF*);
WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
WINGDIAPI BOOL WINAPI wglRealizeLayerPalette(HDC,int,BOOL);
WINGDIAPI int WINAPI wglSetLayerPaletteEntries(HDC,int,int,int,const COLORREF*);
WINGDIAPI BOOL WINAPI wglShareLists(HGLRC,HGLRC);
WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
WINGDIAPI BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
WINGDIAPI BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
===================
*********************************************************************************
\ No newline at end of file
......@@ -58,7 +58,11 @@
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
# if defined(__MINGW32__) && defined(GL_NO_STDCALL) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
# define GLAPIENTRY
# else
# define GLAPIENTRY __stdcall
# endif
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
......@@ -84,7 +88,8 @@
#include <windows.h>
#endif
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) \
&& !defined(OPENSTEP) && !defined(__CYGWIN__) || defined(__MINGW32__)
#include <GL/mesa_wgl.h>
#endif
......@@ -2161,11 +2166,11 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
#define GL_DEBUG_PRINT_MESA 0x875A
#define GL_DEBUG_ASSERT_MESA 0x875B
GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
GLsizei *length, GLcharARB *debugLog);
GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
#endif /* GL_MESA_shader_debug */
......
......@@ -10,6 +10,10 @@
#include <GL/gl.h>
#include <GL/glu.h>
#if defined(__MINGW32__)
#include <GL/mesa_wgl.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
......@@ -108,7 +112,7 @@ extern _CRTIMP void __cdecl exit(int);
and redifinition of Windows system defs, also removes requirement of
pretty much any standard windows header from this file */
#if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
# define GLUTAPIENTRY __stdcall
#else
# define GLUTAPIENTRY
......@@ -130,8 +134,9 @@ extern _CRTIMP void __cdecl exit(int);
# pragma message( "----: being multiply defined you should include WINDOWS.H priot to gl/glut.h" )
# endif
# define CALLBACK __stdcall
typedef int (GLUTAPIENTRY *PROC)();
#if !defined(__MINGW32__)
typedef int (GLUTAPIENTRY *PROC)();
typedef void *HGLRC;
typedef void *HDC;
#endif
......
......@@ -26,11 +26,12 @@
/* prototypes for the Mesa WGL functions */
/* relocated here so that I could make GLUT get them properly */
#define _mesa_wgl_h_
#ifndef _mesa_wgl_h_
#define _mesa_wgl_h_
#if defined(__MINGW32__)
# define __W32API_USE_DLLIMPORT__
#endif
#include <GL/gl.h>
......@@ -39,23 +40,16 @@ extern "C" {
#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
#else
/* non-Windows compilation */
# define GLAPI extern
# define GLAPIENTRY
#endif /* WIN32 / CYGWIN32 bracket */
#ifndef WGLAPI
#define WGLAPI GLAPI
#endif
#if defined(__MINGW32__)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1
# endif
# include <windows.h>
#endif
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
......@@ -80,23 +74,25 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
#endif
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
#if defined(GL_NO_STDCALL) || !defined(__MINGW32__)
WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
......@@ -105,12 +101,15 @@ WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, un
WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
#endif
#ifndef __MINGW32__
WGLAPI int GLAPIENTRY SwapBuffers(HDC);
WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
#endif
#ifndef WGL_ARB_extensions_string
#define WGL_ARB_extensions_string 1
......
......@@ -26,6 +26,15 @@
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
# MinGW samples makefile updated for Mesa 7.0
#
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
#
# Available options:
......@@ -44,15 +53,31 @@
TOP = ../..
include $(TOP)/configs/config.mgw
ALL_USING_STDCALL ?= 1
GL_USING_STDCALL ?= 1
GLUT_USING_STDCALL ?= 1
CC = mingw32-gcc
CFLAGS = -Wall -W -pedantic
CFLAGS = -Wall -pedantic
CFLAGS += -O2 -ffast-math
CFLAGS += -I$(TOP)/include -I../util
ifeq ($(FX),1)
CFLAGS += -DFX
CFLAGS += -DFX
endif
CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK
ifeq ($(GL_USING_STDCALL),0)
CFLAGS += -DGL_NO_STDCALL
endif
ifeq ($(GLUT_USING_STDCALL),1)
CFLAGS += -D_STDCALL_SUPPORTED
else
CFLAGS += -DGLUT_NO_STDCALL
endif
CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK -D_STDCALL_SUPPORTED
CFLAGS += -D_WINDEF_ -D_WINGDI_
LD = mingw32-g++
LDFLAGS = -s -L$(TOP)/lib
......
# Mesa 3-D graphics library
# Version: 5.1
#
# Copyright (C) 1999-2003 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"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# MinGW core makefile v1.4 for Mesa
#
# Copyright (C) 2002 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
# MinGW core-glu makefile updated for Mesa 7.0
#
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
#
# Available options:
#
# Environment variables:
# CFLAGS
#
# GLIDE path to Glide3 SDK; used with FX.
# default = $(TOP)/glide3
# FX=1 build for 3dfx Glide3. Note that this disables
# compilation of most WMesa code and requires fxMesa.
# As a consequence, you'll need the Win32 Glide3
# library to build any application.
# default = no
# ICD=1 build the installable client driver interface
# (windows opengl driver interface)
# default = no
# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
# default = no
#
# Targets:
# all: build GL
# clean: remove object files
#
.PHONY: all clean
.INTERMEDIATE: x86/gen_matypes.exe
.SUFFIXES: .rc .res
# Set this to the prefix of your build tools, i.e. mingw32-
TOOLS_PREFIX = mingw32-
TOP = ../../..
LIBDIR = $(TOP)/lib
GLU_DLL = glu32.dll
GLU_IMP = libglu32.a
GLU_DEF = glu.def
include $(TOP)/configs/config.mgw
GL_USING_STDCALL ?= 1
LDLIBS = -L$(LIBDIR) -lopengl32
LDFLAGS = -Wl,--out-implib=$(LIBDIR)/$(GLU_IMP) -Wl,--output-def=$(LIBDIR)/$(GLU_DEF)
CFLAGS += -DBUILD_GLU32 -D_DLL
ifeq ($(GL_USING_STDCALL),1)
LDFLAGS += -Wl,--add-stdcall-alias
else
CFLAGS += -DGL_NO_STDCALL
endif
CC = gcc
CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude
CXX = g++
CXXFLAGS = $(CFLAGS) -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
AR = ar
ARFLAGS = crus
UNLINK = del $(subst /,\,$(1))
ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = $(RM) $(1)
endif
ifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
UNLINK = $(RM) $(1)
endif
C_SOURCES = \
libutil/error.c \
libutil/glue.c \
libutil/mipmap.c \
libutil/project.c \
libutil/quad.c \
libutil/registry.c \
libtess/dict.c \
libtess/geom.c \
libtess/memalloc.c \
libtess/mesh.c \
libtess/normal.c \
libtess/priorityq.c \
libtess/render.c \
libtess/sweep.c \
libtess/tess.c \
libtess/tessmono.c
CC_SOURCES = \
libnurbs/interface/bezierEval.cc \
libnurbs/interface/bezierPatch.cc \
libnurbs/interface/bezierPatchMesh.cc \
libnurbs/interface/glcurveval.cc \
libnurbs/interface/glinterface.cc \
libnurbs/interface/glrenderer.cc \
libnurbs/interface/glsurfeval.cc \
libnurbs/interface/incurveeval.cc \
libnurbs/interface/insurfeval.cc \
libnurbs/internals/arc.cc \
libnurbs/internals/arcsorter.cc \
libnurbs/internals/arctess.cc \
libnurbs/internals/backend.cc \
libnurbs/internals/basiccrveval.cc \
libnurbs/internals/basicsurfeval.cc \
libnurbs/internals/bin.cc \
libnurbs/internals/bufpool.cc \
libnurbs/internals/cachingeval.cc \
libnurbs/internals/ccw.cc \
libnurbs/internals/coveandtiler.cc \
libnurbs/internals/curve.cc \
libnurbs/internals/curvelist.cc \
libnurbs/internals/curvesub.cc \
libnurbs/internals/dataTransform.cc \
libnurbs/internals/displaylist.cc \
libnurbs/internals/flist.cc \
libnurbs/internals/flistsorter.cc \
libnurbs/internals/hull.cc \
libnurbs/internals/intersect.cc \
libnurbs/internals/knotvector.cc \
libnurbs/internals/mapdesc.cc \
libnurbs/internals/mapdescv.cc \
libnurbs/internals/maplist.cc \
libnurbs/internals/mesher.cc \
libnurbs/internals/monoTriangulationBackend.cc \
libnurbs/internals/monotonizer.cc \
libnurbs/internals/mycode.cc \
libnurbs/internals/nurbsinterfac.cc \
libnurbs/internals/nurbstess.cc \
libnurbs/internals/patch.cc \
libnurbs/internals/patchlist.cc \
libnurbs/internals/quilt.cc \
libnurbs/internals/reader.cc \
libnurbs/internals/renderhints.cc \
libnurbs/internals/slicer.cc \
libnurbs/internals/sorter.cc \
libnurbs/internals/splitarcs.cc \
libnurbs/internals/subdivider.cc \
libnurbs/internals/tobezier.cc \
libnurbs/internals/trimline.cc \
libnurbs/internals/trimregion.cc \
libnurbs/internals/trimvertpool.cc \
libnurbs/internals/uarray.cc \
libnurbs/internals/varray.cc \
libnurbs/nurbtess/directedLine.cc \
libnurbs/nurbtess/gridWrap.cc \
libnurbs/nurbtess/monoChain.cc \
libnurbs/nurbtess/monoPolyPart.cc \
libnurbs/nurbtess/monoTriangulation.cc \
libnurbs/nurbtess/partitionX.cc \
libnurbs/nurbtess/partitionY.cc \
libnurbs/nurbtess/polyDBG.cc \
libnurbs/nurbtess/polyUtil.cc \
libnurbs/nurbtess/primitiveStream.cc \
libnurbs/nurbtess/quicksort.cc \
libnurbs/nurbtess/rectBlock.cc \
libnurbs/nurbtess/sampleComp.cc \
libnurbs/nurbtess/sampleCompBot.cc \
libnurbs/nurbtess/sampleCompRight.cc \
libnurbs/nurbtess/sampleCompTop.cc \
libnurbs/nurbtess/sampleMonoPoly.cc \
libnurbs/nurbtess/sampledLine.cc \
libnurbs/nurbtess/searchTree.cc
SOURCES = $(C_SOURCES) $(CC_SOURCES)
OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
.c.o:
$(CC) -o $@ $(CFLAGS) -c $<
.cc.o:
$(CXX) -o $@ $(CXXFLAGS) -c $<
all: $(LIBDIR) $(LIBDIR)/$(GLU_DLL) $(LIBDIR)/$(GLU_IMP)
$(LIBDIR):
mkdir -p $(LIBDIR)
$(LIBDIR)/$(GLU_DLL) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)
g++ -shared -fPIC -o $(LIBDIR)/$(GLU_DLL) $(LDFLAGS) \
$^ $(LDLIBS)
clean:
-$(call UNLINK,libutil/*.o)
-$(call UNLINK,libtess/*.o)
-$(call UNLINK,libnurbs/interface/*.o)
-$(call UNLINK,libnurbs/internals/*.o)
-$(call UNLINK,libnurbs/nurbtess/*.o)
......@@ -93,7 +93,7 @@ public:
output_triangles = flag;
}
#ifdef _WIN32
void putCallBack(GLenum which, void (APIENTRY *fn)() );
void putCallBack(GLenum which, void (GLAPIENTRY *fn)() );
#else
void putCallBack(GLenum which, _GLUfuncptr fn );
#endif
......
......@@ -1184,8 +1184,11 @@ return;
}
void
OpenGLSurfaceEvaluator::putCallBack(GLenum which, _GLUfuncptr fn )
#ifdef _WIN32
void OpenGLSurfaceEvaluator::putCallBack(GLenum which, void (GLAPIENTRY *fn)() )
#else
void OpenGLSurfaceEvaluator::putCallBack(GLenum which, _GLUfuncptr fn )
#endif
{
switch(which)
{
......
......@@ -145,7 +145,7 @@ public:
void newtmeshvert( long, long );
#ifdef _WIN32
void putCallBack(GLenum which, void (APIENTRY *fn)() );
void putCallBack(GLenum which, void (GLAPIENTRY *fn)() );
#else
void putCallBack(GLenum which, _GLUfuncptr fn );
#endif
......
# Mesa 3-D graphics library
# Version: 5.1
#
# Copyright (C) 1999-2003 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"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# MinGW core makefile v1.4 for Mesa
#
# Copyright (C) 2002 - Daniel Borca
# Email : dborca@users.sourceforge.net
# Web : http://www.geocities.com/dborca
# MinGW core-glut makefile updated for Mesa 7.0
#
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
#
# Available options:
#
# Environment variables:
# CFLAGS
#
# GLIDE path to Glide3 SDK; used with FX.
# default = $(TOP)/glide3
# FX=1 build for 3dfx Glide3. Note that this disables
# compilation of most WMesa code and requires fxMesa.
# As a consequence, you'll need the Win32 Glide3
# library to build any application.
# default = no
# ICD=1 build the installable client driver interface
# (windows opengl driver interface)
# default = no
# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
# default = no
#
# Targets:
# all: build GL
# clean: remove object files
#
.PHONY: all clean
.INTERMEDIATE: x86/gen_matypes.exe
.SUFFIXES: .rc .res
# Set this to the prefix of your build tools, i.e. mingw32-
TOOLS_PREFIX = mingw32-
TOP = ../../..
LIBDIR = $(TOP)/lib
GLUT_DLL = glut32.dll
GLUT_IMP = libglut32.a
GLUT_DEF = glut.def