Convert crlf->lf line endings.

Windows/DOS users should enable core.autocrlf from now on.
This commit is contained in:
José Fonseca 2008-02-28 15:53:13 +09:00
parent 2d8d472426
commit 2573f0e5d6
62 changed files with 27976 additions and 27976 deletions

View File

@ -1,163 +1,163 @@
File: docs/README.WIN32
Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
Quick Start
----- -----
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
directory. The libs and demos build separately, so if you do not care
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
more than one ZIP file, they all need to be unzipped into the same
directory. Don't worry, you will not overwrite anything.
The Windows build system uses Microsoft Visual Studio. Project files
for a specific version of Visual Studio are in their own directory in
the top-level "windows" directory. For example, Visual Studio 8 files
are in windows/VC8.
Support has been dropped for versions of Visual Studio prior to 8. The
main reason is because Microsoft now provides a free compiler and
developer environment. Visual Studio Express can be found at
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
You'll also need the Platform SDK. Instructions for obtaining and
using the SDK with Visual Studio Express can be found at
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
If you are stuck using VC6 or VC7, you may start with these project
files, but you may need to modify them to reflect changes in the
Mesa source code tree. If you sucessfully update the project files,
please submit them to the author of this document so that they may
be included in the next distribution.
The project files to build the core Mesa library, Windows Mesa
drivers, OSMesa, and GLU are in the mesa directory. The project files
to build GLUT and some demo programs are in the progs directory.
Makefiles are no longer shipped or supported, but can be generated
from the projects using Visual Studio.
Windows Drivers
------- -------
At this time, only the GDI driver is known to work. Most of the demos
in progs/demos should work with this driver.
Source code also exists in the tree for other drivers in
src/mesa/drivers/windows, but the status of this code is unknown.
The GDI driver operates basically by writing pixel spans into a DIB
section and then blitting the DIB to the window. The driver was
recently cleaned up and rewitten and so may have bugs or may be
missing some functionality. The older versions of the CVS source may
be useful in figuring out any problems, or report them to me.
To build Mesa with the GDI driver, build the mesa, gdi, and glu
projects in the Visual Studio workspace found at
windows/VC8/mesa/mesa.sln
The osmesa DLL can also be built with the osmesa project.
The build system creates a lib top-level directory and copies
resulting LIB and DLL files to this lib directory. The files are:
OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
If the MesaDemos ZIP file was extracted, the DLL files are also copied
to the demos directory. This facilitates running the demos as described
below.
GLUT and Demos
---- --- -----
A Visual Studio workspace can be found at
windows/VC8/progs/progs.sln
It can be used to build GLUT and a few demos. The GLUT lib and DLL
are copied to the top-level lib directory, along with the Mesa libs.
The demo build system expects to find the LIB files in the top level
lib directory, so you must build the Mesa libs first. The demo
executables are placed in the demos directory, because some of them
rely on data files found there. Also, the Mesa lib DLL's were copied
there by the Mesa lib build process. Therefore, you should be able to
simply run the demo executables from the demo directory.
If you want to run the demos from the Visual Studio, you may have to
change the startup directory and explicitly state where the executables are.
You may also build all the demo programs by using a makefile. Go to
the progs/demos directory and make sure you have executed VCVARS32.BAT
or whatever setup script is appropriate for your compiler. Then,
nmake -f Makefile.win
should build all the demos.
Build System Notes
----- ------ -----
VC6 (not actively supported)
---
Visual Studio 6 does not recognize files with the .cc extension as C++
language files, without a lot of unnatural tweaking. So, the VC6
build process uses custom build steps to compile these files in the
GLU library.
Two additional configurations are provided, Debug x86 and Release x86
that activate the shader code compilation by defining SLANG_86. It is
unknown if and how this works.
VC7 (not actively supported)
---
The above-mentioned .cc problem does not exist in this version.
VC8
---
No notes.
General
-------
After building, you can copy the above DLL files to a place in your
PATH such as $SystemRoot/SYSTEM32. If you don't like putting things
in a system directory, place them in the same directory as the
executable(s). Be careful about accidentially overwriting files of
the same name in the SYSTEM32 directory.
The DLL files are built so that the external entry points use the
stdcall calling convention.
Static LIB files are not built. The LIB files that are built with are
the linker import files associated with the DLL files.
The si-glu sources are used to build the GLU libs. This was done
mainly to get the better tessellator code.
To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
to the project settings. You will also need to edit src/mesa.def to
change all the gl* symbols to mgl*. Because this is easy to do with a
global replace operation in a text editor, no additional mangled
version of mesa.def is maintained or shipped.
If you have a Windows-related build problem or question, it is
probably better to direct it to me (kschultz@users.sourceforge.net),
rather than directly to the other Mesa developers. I will help you as
much as I can. I also monitor the Mesa mailing lists and will answer
questions in this area there as well.
Karl Schultz
File: docs/README.WIN32
Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
Quick Start
----- -----
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
directory. The libs and demos build separately, so if you do not care
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
more than one ZIP file, they all need to be unzipped into the same
directory. Don't worry, you will not overwrite anything.
The Windows build system uses Microsoft Visual Studio. Project files
for a specific version of Visual Studio are in their own directory in
the top-level "windows" directory. For example, Visual Studio 8 files
are in windows/VC8.
Support has been dropped for versions of Visual Studio prior to 8. The
main reason is because Microsoft now provides a free compiler and
developer environment. Visual Studio Express can be found at
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
You'll also need the Platform SDK. Instructions for obtaining and
using the SDK with Visual Studio Express can be found at
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
If you are stuck using VC6 or VC7, you may start with these project
files, but you may need to modify them to reflect changes in the
Mesa source code tree. If you sucessfully update the project files,
please submit them to the author of this document so that they may
be included in the next distribution.
The project files to build the core Mesa library, Windows Mesa
drivers, OSMesa, and GLU are in the mesa directory. The project files
to build GLUT and some demo programs are in the progs directory.
Makefiles are no longer shipped or supported, but can be generated
from the projects using Visual Studio.
Windows Drivers
------- -------
At this time, only the GDI driver is known to work. Most of the demos
in progs/demos should work with this driver.
Source code also exists in the tree for other drivers in
src/mesa/drivers/windows, but the status of this code is unknown.
The GDI driver operates basically by writing pixel spans into a DIB
section and then blitting the DIB to the window. The driver was
recently cleaned up and rewitten and so may have bugs or may be
missing some functionality. The older versions of the CVS source may
be useful in figuring out any problems, or report them to me.
To build Mesa with the GDI driver, build the mesa, gdi, and glu
projects in the Visual Studio workspace found at
windows/VC8/mesa/mesa.sln
The osmesa DLL can also be built with the osmesa project.
The build system creates a lib top-level directory and copies
resulting LIB and DLL files to this lib directory. The files are:
OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
If the MesaDemos ZIP file was extracted, the DLL files are also copied
to the demos directory. This facilitates running the demos as described
below.
GLUT and Demos
---- --- -----
A Visual Studio workspace can be found at
windows/VC8/progs/progs.sln
It can be used to build GLUT and a few demos. The GLUT lib and DLL
are copied to the top-level lib directory, along with the Mesa libs.
The demo build system expects to find the LIB files in the top level
lib directory, so you must build the Mesa libs first. The demo
executables are placed in the demos directory, because some of them
rely on data files found there. Also, the Mesa lib DLL's were copied
there by the Mesa lib build process. Therefore, you should be able to
simply run the demo executables from the demo directory.
If you want to run the demos from the Visual Studio, you may have to
change the startup directory and explicitly state where the executables are.
You may also build all the demo programs by using a makefile. Go to
the progs/demos directory and make sure you have executed VCVARS32.BAT
or whatever setup script is appropriate for your compiler. Then,
nmake -f Makefile.win
should build all the demos.
Build System Notes
----- ------ -----
VC6 (not actively supported)
---
Visual Studio 6 does not recognize files with the .cc extension as C++
language files, without a lot of unnatural tweaking. So, the VC6
build process uses custom build steps to compile these files in the
GLU library.
Two additional configurations are provided, Debug x86 and Release x86
that activate the shader code compilation by defining SLANG_86. It is
unknown if and how this works.
VC7 (not actively supported)
---
The above-mentioned .cc problem does not exist in this version.
VC8
---
No notes.
General
-------
After building, you can copy the above DLL files to a place in your
PATH such as $SystemRoot/SYSTEM32. If you don't like putting things
in a system directory, place them in the same directory as the
executable(s). Be careful about accidentially overwriting files of
the same name in the SYSTEM32 directory.
The DLL files are built so that the external entry points use the
stdcall calling convention.
Static LIB files are not built. The LIB files that are built with are
the linker import files associated with the DLL files.
The si-glu sources are used to build the GLU libs. This was done
mainly to get the better tessellator code.
To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
to the project settings. You will also need to edit src/mesa.def to
change all the gl* symbols to mgl*. Because this is easy to do with a
global replace operation in a text editor, no additional mangled
version of mesa.def is maintained or shipped.
If you have a Windows-related build problem or question, it is
probably better to direct it to me (kschultz@users.sourceforge.net),
rather than directly to the other Mesa developers. I will help you as
much as I can. I also monitor the Mesa mailing lists and will answer
questions in this area there as well.
Karl Schultz

View File

@ -1,33 +1,33 @@
default: full
all: full subset
%.tag: %.doxy
doxygen $<
FULL = \
main.doxy \
math.doxy \
vbo.doxy \
glapi.doxy \
shader.doxy \
swrast.doxy \
swrast_setup.doxy \
tnl.doxy \
tnl_dd.doxy
full: $(FULL:.doxy=.tag)
$(foreach FILE,$(FULL),doxygen $(FILE);)
SUBSET = \
main.doxy \
math.doxy \
miniglx.doxy
subset: $(SUBSET:.doxy=.tag)
$(foreach FILE,$(SUBSET),doxygen $(FILE);)
clean:
rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
rm -rf *.tag
default: full
all: full subset
%.tag: %.doxy
doxygen $<
FULL = \
main.doxy \
math.doxy \
vbo.doxy \
glapi.doxy \
shader.doxy \
swrast.doxy \
swrast_setup.doxy \
tnl.doxy \
tnl_dd.doxy
full: $(FULL:.doxy=.tag)
$(foreach FILE,$(FULL),doxygen $(FILE);)
SUBSET = \
main.doxy \
math.doxy \
miniglx.doxy
subset: $(SUBSET:.doxy=.tag)
$(foreach FILE,$(SUBSET),doxygen $(FILE);)
clean:
rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
rm -rf *.tag

View File

@ -1,19 +1,19 @@
doxygen tnl_dd.doxy
doxygen vbo.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy
doxygen core.doxy
doxygen glapi.doxy
doxygen shader.doxy
echo Building again, to resolve tags
doxygen tnl_dd.doxy
doxygen vbo.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy
doxygen glapi.doxy
doxygen shader.doxy
doxygen tnl_dd.doxy
doxygen vbo.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy
doxygen core.doxy
doxygen glapi.doxy
doxygen shader.doxy
echo Building again, to resolve tags
doxygen tnl_dd.doxy
doxygen vbo.doxy
doxygen math.doxy
doxygen swrast.doxy
doxygen swrast_setup.doxy
doxygen tnl.doxy
doxygen glapi.doxy
doxygen shader.doxy

View File

@ -1,79 +1,79 @@
/****************************************************************************
*
* Mesa bindings for SciTech MGL
*
* Copyright (C) 1996 SciTech Software.
* All rights reserved.
*
* Filename: mglmesa.h
* Version: Revision: 1.1.1.1
*
* Language: ANSI C
* Environment: Any
*
* Description: Header file for the Mesa/OpenGL interface bindings for the
* SciTech MGL graphics library. Uses the MGL internal
* device context structures to get direct access to the
* high performance MGL rasterization functions for maximum
* performance. Utilizes the VESA VBE/AF Accelerator Functions
* via the MGL's accelerated device driver functions, as well
* as basic DirectDraw accelerated functions provided by the
* MGL.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
****************************************************************************/
#ifndef __MGLMESA_H
#define __MGLMESA_H
#include "mgraph.h"
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" { /* Use "C" linkage when in C++ mode */
#endif
#ifndef __WINDOWS__
#define GLAPIENTRY
#endif
#ifdef __WINDOWS__
bool GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);
#endif
void GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);
bool GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);
bool GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);
void GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);
void GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);
void GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);
/* Palette manipulation support. The reason we provide palette manipulation
* routines is so that when rendering in double buffered modes with a
* software backbuffer, the palette for the backbuffer is kept consistent
* with the hardware front buffer.
*/
void GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);
void GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);
void GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);
#ifdef __cplusplus
} /* End of "C" linkage for C++ */
#endif /* __cplusplus */
#endif /* __MGLMESA_H */
/****************************************************************************
*
* Mesa bindings for SciTech MGL
*
* Copyright (C) 1996 SciTech Software.
* All rights reserved.
*
* Filename: mglmesa.h
* Version: Revision: 1.1.1.1
*
* Language: ANSI C
* Environment: Any
*
* Description: Header file for the Mesa/OpenGL interface bindings for the
* SciTech MGL graphics library. Uses the MGL internal
* device context structures to get direct access to the
* high performance MGL rasterization functions for maximum
* performance. Utilizes the VESA VBE/AF Accelerator Functions
* via the MGL's accelerated device driver functions, as well
* as basic DirectDraw accelerated functions provided by the
* MGL.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
****************************************************************************/
#ifndef __MGLMESA_H
#define __MGLMESA_H
#include "mgraph.h"
/*------------------------- Function Prototypes ---------------------------*/
#ifdef __cplusplus
extern "C" { /* Use "C" linkage when in C++ mode */
#endif
#ifndef __WINDOWS__
#define GLAPIENTRY
#endif
#ifdef __WINDOWS__
bool GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);
#endif
void GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);
bool GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);
bool GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);
void GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);
void GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);
void GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);
/* Palette manipulation support. The reason we provide palette manipulation
* routines is so that when rendering in double buffered modes with a
* software backbuffer, the palette for the backbuffer is kept consistent
* with the hardware front buffer.
*/
void GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);
void GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);
void GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);
#ifdef __cplusplus
} /* End of "C" linkage for C++ */
#endif /* __cplusplus */
#endif /* __MGLMESA_H */

View File

@ -1,119 +1,119 @@
BACKGROUND = 0.000 0.500 0.700
ANAME = AXLE1
ARADIUS = 1.000
AAXIS = 2
APOSITION = -7.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 6.000
AMOTORED = 1
AANGULARVELOCITY = 90.000
ADIRECTION = 1
ANAME = AXLE2
ARADIUS = 1.000
AAXIS = 2
APOSITION = -3.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 12.000
AMOTORED = 0
ANAME = AXLE3
ARADIUS = 1.000
AAXIS = 2
APOSITION = 1.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 6.000
AMOTORED = 0
ANAME = AXLE4
ARADIUS = 1.000
AAXIS = 2
APOSITION = 8.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 18.000
AMOTORED = 0
ANAME = AXLE5
ARADIUS = 1.000
AAXIS = 1
APOSITION = 8.000 -8.200 -7.400
ACOLOR = 0.800 0.500 0.200
ALENGTH = 12.000
AMOTORED = 0
GNAME = GEAR1
GTYPE = NORMAL
GRADIUS = 2.200
GWIDTH = 3.000
GTEETH = 40
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE1
GPOSITION = 0.000
GNAME = GEAR2
GTYPE = NORMAL
GRADIUS = 2.200
GWIDTH = 3.000
GTEETH = 30
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE2
GPOSITION = 0.000
GNAME = GEAR3
GTYPE = NORMAL
GRADIUS = 2.200
GWIDTH = 3.000
GTEETH = 20
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE3
GPOSITION = 0.000
GNAME = GEAR4
GTYPE = NORMAL
GRADIUS = 1.700
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE2
GPOSITION = 5.000
GNAME = GEAR5
GTYPE = NORMAL
GRADIUS = 3.000
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE4
GPOSITION = 5.000
GNAME = GEAR6
GTYPE = BEVEL
GFACE = 0
GRADIUS = 4.000
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 1.700
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE4
GPOSITION = -4.000
GNAME = GEAR7
GTYPE = BEVEL
GFACE = 0
GRADIUS = 4.000
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 1.700
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE5
GPOSITION = 5.000
BELTNAME = BELT1
GEAR1NAME = GEAR5
GEAR2NAME = GEAR4
BACKGROUND = 0.000 0.500 0.700
ANAME = AXLE1
ARADIUS = 1.000
AAXIS = 2
APOSITION = -7.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 6.000
AMOTORED = 1
AANGULARVELOCITY = 90.000
ADIRECTION = 1
ANAME = AXLE2
ARADIUS = 1.000
AAXIS = 2
APOSITION = -3.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 12.000
AMOTORED = 0
ANAME = AXLE3
ARADIUS = 1.000
AAXIS = 2
APOSITION = 1.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 6.000
AMOTORED = 0
ANAME = AXLE4
ARADIUS = 1.000
AAXIS = 2
APOSITION = 8.000 0.000 0.000
ACOLOR = 0.800 0.500 0.200
ALENGTH = 18.000
AMOTORED = 0
ANAME = AXLE5
ARADIUS = 1.000
AAXIS = 1
APOSITION = 8.000 -8.200 -7.400
ACOLOR = 0.800 0.500 0.200
ALENGTH = 12.000
AMOTORED = 0
GNAME = GEAR1
GTYPE = NORMAL
GRADIUS = 2.200
GWIDTH = 3.000
GTEETH = 40
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE1
GPOSITION = 0.000
GNAME = GEAR2
GTYPE = NORMAL
GRADIUS = 2.200
GWIDTH = 3.000
GTEETH = 30
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE2
GPOSITION = 0.000
GNAME = GEAR3
GTYPE = NORMAL
GRADIUS = 2.200
GWIDTH = 3.000
GTEETH = 20
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE3
GPOSITION = 0.000
GNAME = GEAR4
GTYPE = NORMAL
GRADIUS = 1.700
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE2
GPOSITION = 5.000
GNAME = GEAR5
GTYPE = NORMAL
GRADIUS = 3.000
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 0.500
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE4
GPOSITION = 5.000
GNAME = GEAR6
GTYPE = BEVEL
GFACE = 0
GRADIUS = 4.000
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 1.700
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE4
GPOSITION = -4.000
GNAME = GEAR7
GTYPE = BEVEL
GFACE = 0
GRADIUS = 4.000
GWIDTH = 1.000
GTEETH = 20
GTOOTHDEPTH = 1.700
GCOLOR = 0.500 0.500 0.500
GAXLE = AXLE5
GPOSITION = 5.000
BELTNAME = BELT1
GEAR1NAME = GEAR5
GEAR2NAME = GEAR4

View File

@ -1,132 +1,132 @@
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 20 Faces: 36
Vertex list:
Vertex 0: X: -210 Y: -432.781738 Z: 180.000031
Vertex 1: X: -610.810303 Y: 144.260559 Z: 103.580154
Vertex 2: X: 56.586655 Y: 144.260544 Z: -128.902023
Vertex 3: X: -75.776352 Y: 144.260605 Z: 565.321838
Vertex 4: X: -462.815979 Y: -347.937683 Z: 131.797302
Vertex 5: X: -616.506042 Y: -126.67173 Z: 102.494209
Vertex 6: X: -41.847229 Y: -347.937683 Z: -14.843644
Vertex 7: X: 60.375015 Y: -126.671753 Z: -133.291641
Vertex 8: X: -125.336807 Y: -347.937653 Z: 423.046448
Vertex 9: X: -73.868958 Y: -126.671692 Z: 570.797424
Vertex 10: X: -448.353271 Y: 237.304672 Z: -92.34951
Vertex 11: X: -192.440964 Y: 237.304672 Z: -181.494431
Vertex 12: X: 145.038193 Y: 237.304672 Z: 109.754745
Vertex 13: X: 94.283768 Y: 237.304688 Z: 375.953766
Vertex 14: X: -326.684937 Y: 237.304733 Z: 522.594727
Vertex 15: X: -531.842834 Y: 237.304718 Z: 345.540588
Vertex 16: X: -331.419525 Y: -225.964966 Z: -168.564438
Vertex 17: X: 152.575485 Y: -225.964935 Z: 249.129868
Vertex 18: X: -451.155914 Y: -225.964905 Z: 459.434662
Vertex 19: X: -298.413483 Y: 423.31897 Z: 163.142761
Face list:
Face 0: A:0 B:4 C:6 AB:1 BC:1 CA:1
Face 1: A:4 B:5 C:16 AB:1 BC:1 CA:1
Face 2: A:4 B:16 C:6 AB:1 BC:1 CA:1
Face 3: A:6 B:16 C:7 AB:1 BC:1 CA:1
Face 4: A:5 B:1 C:10 AB:1 BC:1 CA:1
Face 5: A:5 B:10 C:16 AB:1 BC:1 CA:1
Face 6: A:16 B:10 C:11 AB:1 BC:1 CA:1
Face 7: A:16 B:11 C:7 AB:1 BC:1 CA:1
Face 8: A:7 B:11 C:2 AB:1 BC:1 CA:1
Face 9: A:0 B:6 C:8 AB:1 BC:1 CA:1
Face 10: A:6 B:7 C:17 AB:1 BC:1 CA:1
Face 11: A:6 B:17 C:8 AB:1 BC:1 CA:1
Face 12: A:8 B:17 C:9 AB:1 BC:1 CA:1
Face 13: A:7 B:2 C:12 AB:1 BC:1 CA:1
Face 14: A:7 B:12 C:17 AB:1 BC:1 CA:1
Face 15: A:17 B:12 C:13 AB:1 BC:1 CA:1
Face 16: A:17 B:13 C:9 AB:1 BC:1 CA:1
Face 17: A:9 B:13 C:3 AB:1 BC:1 CA:1
Face 18: A:0 B:8 C:4 AB:1 BC:1 CA:1
Face 19: A:8 B:9 C:18 AB:1 BC:1 CA:1
Face 20: A:8 B:18 C:4 AB:1 BC:1 CA:1
Face 21: A:4 B:18 C:5 AB:1 BC:1 CA:1
Face 22: A:9 B:3 C:14 AB:1 BC:1 CA:1
Face 23: A:9 B:14 C:18 AB:1 BC:1 CA:1
Face 24: A:18 B:14 C:15 AB:1 BC:1 CA:1
Face 25: A:18 B:15 C:5 AB:1 BC:1 CA:1
Face 26: A:5 B:15 C:1 AB:1 BC:1 CA:1
Face 27: A:1 B:15 C:10 AB:1 BC:1 CA:1
Face 28: A:15 B:14 C:19 AB:1 BC:1 CA:1
Face 29: A:15 B:19 C:10 AB:1 BC:1 CA:1
Face 30: A:10 B:19 C:11 AB:1 BC:1 CA:1
Face 31: A:14 B:3 C:13 AB:1 BC:1 CA:1
Face 32: A:14 B:13 C:19 AB:1 BC:1 CA:1
Face 33: A:19 B:13 C:12 AB:1 BC:1 CA:1
Face 34: A:19 B:12 C:11 AB:1 BC:1 CA:1
Page 1
Face 35: A:11 B:12 C:2 AB:1 BC:1 CA:1
Page 2
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 20 Faces: 36
Vertex list:
Vertex 0: X: -210 Y: -432.781738 Z: 180.000031
Vertex 1: X: -610.810303 Y: 144.260559 Z: 103.580154
Vertex 2: X: 56.586655 Y: 144.260544 Z: -128.902023
Vertex 3: X: -75.776352 Y: 144.260605 Z: 565.321838
Vertex 4: X: -462.815979 Y: -347.937683 Z: 131.797302
Vertex 5: X: -616.506042 Y: -126.67173 Z: 102.494209
Vertex 6: X: -41.847229 Y: -347.937683 Z: -14.843644
Vertex 7: X: 60.375015 Y: -126.671753 Z: -133.291641
Vertex 8: X: -125.336807 Y: -347.937653 Z: 423.046448
Vertex 9: X: -73.868958 Y: -126.671692 Z: 570.797424
Vertex 10: X: -448.353271 Y: 237.304672 Z: -92.34951
Vertex 11: X: -192.440964 Y: 237.304672 Z: -181.494431
Vertex 12: X: 145.038193 Y: 237.304672 Z: 109.754745
Vertex 13: X: 94.283768 Y: 237.304688 Z: 375.953766
Vertex 14: X: -326.684937 Y: 237.304733 Z: 522.594727
Vertex 15: X: -531.842834 Y: 237.304718 Z: 345.540588
Vertex 16: X: -331.419525 Y: -225.964966 Z: -168.564438
Vertex 17: X: 152.575485 Y: -225.964935 Z: 249.129868
Vertex 18: X: -451.155914 Y: -225.964905 Z: 459.434662
Vertex 19: X: -298.413483 Y: 423.31897 Z: 163.142761
Face list:
Face 0: A:0 B:4 C:6 AB:1 BC:1 CA:1
Face 1: A:4 B:5 C:16 AB:1 BC:1 CA:1
Face 2: A:4 B:16 C:6 AB:1 BC:1 CA:1
Face 3: A:6 B:16 C:7 AB:1 BC:1 CA:1
Face 4: A:5 B:1 C:10 AB:1 BC:1 CA:1
Face 5: A:5 B:10 C:16 AB:1 BC:1 CA:1
Face 6: A:16 B:10 C:11 AB:1 BC:1 CA:1
Face 7: A:16 B:11 C:7 AB:1 BC:1 CA:1
Face 8: A:7 B:11 C:2 AB:1 BC:1 CA:1
Face 9: A:0 B:6 C:8 AB:1 BC:1 CA:1
Face 10: A:6 B:7 C:17 AB:1 BC:1 CA:1
Face 11: A:6 B:17 C:8 AB:1 BC:1 CA:1
Face 12: A:8 B:17 C:9 AB:1 BC:1 CA:1
Face 13: A:7 B:2 C:12 AB:1 BC:1 CA:1
Face 14: A:7 B:12 C:17 AB:1 BC:1 CA:1
Face 15: A:17 B:12 C:13 AB:1 BC:1 CA:1
Face 16: A:17 B:13 C:9 AB:1 BC:1 CA:1
Face 17: A:9 B:13 C:3 AB:1 BC:1 CA:1
Face 18: A:0 B:8 C:4 AB:1 BC:1 CA:1
Face 19: A:8 B:9 C:18 AB:1 BC:1 CA:1
Face 20: A:8 B:18 C:4 AB:1 BC:1 CA:1
Face 21: A:4 B:18 C:5 AB:1 BC:1 CA:1
Face 22: A:9 B:3 C:14 AB:1 BC:1 CA:1
Face 23: A:9 B:14 C:18 AB:1 BC:1 CA:1
Face 24: A:18 B:14 C:15 AB:1 BC:1 CA:1
Face 25: A:18 B:15 C:5 AB:1 BC:1 CA:1
Face 26: A:5 B:15 C:1 AB:1 BC:1 CA:1
Face 27: A:1 B:15 C:10 AB:1 BC:1 CA:1
Face 28: A:15 B:14 C:19 AB:1 BC:1 CA:1
Face 29: A:15 B:19 C:10 AB:1 BC:1 CA:1
Face 30: A:10 B:19 C:11 AB:1 BC:1 CA:1
Face 31: A:14 B:3 C:13 AB:1 BC:1 CA:1
Face 32: A:14 B:13 C:19 AB:1 BC:1 CA:1
Face 33: A:19 B:13 C:12 AB:1 BC:1 CA:1
Face 34: A:19 B:12 C:11 AB:1 BC:1 CA:1
Page 1
Face 35: A:11 B:12 C:2 AB:1 BC:1 CA:1
Page 2

View File

@ -1,264 +1,264 @@
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 40 Faces: 80
Vertex list:
Vertex 0: X: -50.170624 Y: -0.000026 Z: -240.147842
Vertex 1: X: -80.584503 Y: -63.958851 Z: -205.014572
Vertex 2: X: -129.795166 Y: -39.528744 Z: -148.16774
Vertex 3: X: -129.795166 Y: 39.528721 Z: -148.16774
Vertex 4: X: -80.584503 Y: 63.958797 Z: -205.014572
Vertex 5: X: 85.963654 Y: -0.000002 Z: 31.490465
Vertex 6: X: 39.614838 Y: -63.958828 Z: 34.827602
Vertex 7: X: -35.37915 Y: -39.528728 Z: 40.227196
Vertex 8: X: -35.37912 Y: 39.528736 Z: 40.227188
Vertex 9: X: 39.614838 Y: 63.95882 Z: 34.827595
Vertex 10: X: -9.852051 Y: 0.000023 Z: 319.829254
Vertex 11: X: -44.985352 Y: -63.958805 Z: 289.415405
Vertex 12: X: -101.832199 Y: -39.528709 Z: 240.204758
Vertex 13: X: -101.832184 Y: 39.528755 Z: 240.204773
Vertex 14: X: -44.985352 Y: 63.958843 Z: 289.415405
Vertex 15: X: -281.490326 Y: 0.000035 Z: 455.963654
Vertex 16: X: -284.827484 Y: -63.958794 Z: 409.614868
Vertex 17: X: -290.227112 Y: -39.528702 Z: 334.62085
Vertex 18: X: -290.227112 Y: 39.528763 Z: 334.62088
Vertex 19: X: -284.827484 Y: 63.958855 Z: 409.614838
Vertex 20: X: -569.829163 Y: 0.000026 Z: 360.14798
Vertex 21: X: -539.415344 Y: -63.958801 Z: 325.014709
Vertex 22: X: -490.204712 Y: -39.528709 Z: 268.167847
Vertex 23: X: -490.204712 Y: 39.528755 Z: 268.167847
Vertex 24: X: -539.415344 Y: 63.958847 Z: 325.014679
Vertex 25: X: -705.963684 Y: 0.000002 Z: 88.509598
Vertex 26: X: -659.614807 Y: -63.958824 Z: 85.172462
Vertex 27: X: -584.62085 Y: -39.528725 Z: 79.77285
Vertex 28: X: -584.62085 Y: 39.52874 Z: 79.77285
Vertex 29: X: -659.614868 Y: 63.958824 Z: 85.172447
Vertex 30: X: -610.147827 Y: -0.000023 Z: -199.829361
Vertex 31: X: -575.014587 Y: -63.958847 Z: -169.415497
Vertex 32: X: -518.167725 Y: -39.528744 Z: -120.204819
Vertex 33: X: -518.167725 Y: 39.528721 Z: -120.204834
Vertex 34: X: -575.014587 Y: 63.958801 Z: -169.415497
Vertex 35: X: -338.509338 Y: -0.000035 Z: -335.963745
Vertex 36: X: -335.172241 Y: -63.958858 Z: -289.614868
Vertex 37: X: -329.772675 Y: -39.528751 Z: -214.620865
Vertex 38: X: -329.772675 Y: 39.528713 Z: -214.620865
Vertex 39: X: -335.172241 Y: 63.95879 Z: -289.614899
Face list:
Face 0: A:0 B:6 C:1 AB:0 BC:1 CA:1
Smoothing: 1
Face 1: A:0 B:5 C:6 AB:1 BC:1 CA:0
Smoothing: 1
Face 2: A:1 B:7 C:2 AB:0 BC:1 CA:1
Smoothing: 2
Face 3: A:1 B:6 C:7 AB:1 BC:1 CA:0
Smoothing: 2
Face 4: A:2 B:8 C:3 AB:0 BC:1 CA:1
Smoothing: 3
Face 5: A:2 B:7 C:8 AB:1 BC:1 CA:0
Smoothing: 3
Face 6: A:3 B:9 C:4 AB:0 BC:1 CA:1
Smoothing: 4
Face 7: A:3 B:8 C:9 AB:1 BC:1 CA:0
Page 1
Smoothing: 4
Face 8: A:4 B:5 C:0 AB:0 BC:1 CA:1
Smoothing: 5
Face 9: A:4 B:9 C:5 AB:1 BC:1 CA:0
Smoothing: 5
Face 10: A:5 B:11 C:6 AB:0 BC:1 CA:1
Smoothing: 6
Face 11: A:5 B:10 C:11 AB:1 BC:1 CA:0
Smoothing: 6
Face 12: A:6 B:12 C:7 AB:0 BC:1 CA:1
Smoothing: 7
Face 13: A:6 B:11 C:12 AB:1 BC:1 CA:0
Smoothing: 7
Face 14: A:7 B:13 C:8 AB:0 BC:1 CA:1
Smoothing: 8
Face 15: A:7 B:12 C:13 AB:1 BC:1 CA:0
Smoothing: 8
Face 16: A:8 B:14 C:9 AB:0 BC:1 CA:1
Smoothing: 9
Face 17: A:8 B:13 C:14 AB:1 BC:1 CA:0
Smoothing: 9
Face 18: A:9 B:10 C:5 AB:0 BC:1 CA:1
Smoothing: 10
Face 19: A:9 B:14 C:10 AB:1 BC:1 CA:0
Smoothing: 10
Face 20: A:10 B:16 C:11 AB:0 BC:1 CA:1
Smoothing: 11
Face 21: A:10 B:15 C:16 AB:1 BC:1 CA:0
Smoothing: 11
Face 22: A:11 B:17 C:12 AB:0 BC:1 CA:1
Smoothing: 12
Face 23: A:11 B:16 C:17 AB:1 BC:1 CA:0
Smoothing: 12
Face 24: A:12 B:18 C:13 AB:0 BC:1 CA:1
Smoothing: 13
Face 25: A:12 B:17 C:18 AB:1 BC:1 CA:0
Smoothing: 13
Face 26: A:13 B:19 C:14 AB:0 BC:1 CA:1
Smoothing: 14
Face 27: A:13 B:18 C:19 AB:1 BC:1 CA:0
Smoothing: 14
Face 28: A:14 B:15 C:10 AB:0 BC:1 CA:1
Smoothing: 15
Face 29: A:14 B:19 C:15 AB:1 BC:1 CA:0
Smoothing: 15
Face 30: A:15 B:21 C:16 AB:0 BC:1 CA:1
Smoothing: 16
Face 31: A:15 B:20 C:21 AB:1 BC:1 CA:0
Smoothing: 16
Face 32: A:16 B:22 C:17 AB:0 BC:1 CA:1
Smoothing: 17
Face 33: A:16 B:21 C:22 AB:1 BC:1 CA:0
Smoothing: 17
Face 34: A:17 B:23 C:18 AB:0 BC:1 CA:1
Smoothing: 18
Face 35: A:17 B:22 C:23 AB:1 BC:1 CA:0
Smoothing: 18
Face 36: A:18 B:24 C:19 AB:0 BC:1 CA:1
Smoothing: 19
Face 37: A:18 B:23 C:24 AB:1 BC:1 CA:0
Smoothing: 19
Page 2
Face 38: A:19 B:20 C:15 AB:0 BC:1 CA:1
Smoothing: 20
Face 39: A:19 B:24 C:20 AB:1 BC:1 CA:0
Smoothing: 20
Face 40: A:20 B:26 C:21 AB:0 BC:1 CA:1
Smoothing: 21
Face 41: A:20 B:25 C:26 AB:1 BC:1 CA:0
Smoothing: 21
Face 42: A:21 B:27 C:22 AB:0 BC:1 CA:1
Smoothing: 22
Face 43: A:21 B:26 C:27 AB:1 BC:1 CA:0
Smoothing: 22
Face 44: A:22 B:28 C:23 AB:0 BC:1 CA:1
Smoothing: 23
Face 45: A:22 B:27 C:28 AB:1 BC:1 CA:0
Smoothing: 23
Face 46: A:23 B:29 C:24 AB:0 BC:1 CA:1
Smoothing: 24
Face 47: A:23 B:28 C:29 AB:1 BC:1 CA:0
Smoothing: 24
Face 48: A:24 B:25 C:20 AB:0 BC:1 CA:1
Smoothing: 25
Face 49: A:24 B:29 C:25 AB:1 BC:1 CA:0
Smoothing: 25
Face 50: A:25 B:31 C:26 AB:0 BC:1 CA:1
Smoothing: 26
Face 51: A:25 B:30 C:31 AB:1 BC:1 CA:0
Smoothing: 26
Face 52: A:26 B:32 C:27 AB:0 BC:1 CA:1
Smoothing: 27
Face 53: A:26 B:31 C:32 AB:1 BC:1 CA:0
Smoothing: 27
Face 54: A:27 B:33 C:28 AB:0 BC:1 CA:1
Smoothing: 28
Face 55: A:27 B:32 C:33 AB:1 BC:1 CA:0
Smoothing: 28
Face 56: A:28 B:34 C:29 AB:0 BC:1 CA:1
Smoothing: 29
Face 57: A:28 B:33 C:34 AB:1 BC:1 CA:0
Smoothing: 29
Face 58: A:29 B:30 C:25 AB:0 BC:1 CA:1
Smoothing: 30
Face 59: A:29 B:34 C:30 AB:1 BC:1 CA:0
Smoothing: 30
Face 60: A:30 B:36 C:31 AB:0 BC:1 CA:1
Smoothing: 31
Face 61: A:30 B:35 C:36 AB:1 BC:1 CA:0
Smoothing: 31
Face 62: A:31 B:37 C:32 AB:0 BC:1 CA:1
Smoothing: 32
Face 63: A:31 B:36 C:37 AB:1 BC:1 CA:0
Smoothing: 32
Face 64: A:32 B:38 C:33 AB:0 BC:1 CA:1
Smoothing: 1
Face 65: A:32 B:37 C:38 AB:1 BC:1 CA:0
Smoothing: 1
Face 66: A:33 B:39 C:34 AB:0 BC:1 CA:1
Smoothing: 2
Face 67: A:33 B:38 C:39 AB:1 BC:1 CA:0
Smoothing: 2
Face 68: A:34 B:35 C:30 AB:0 BC:1 CA:1
Page 3
Smoothing: 3
Face 69: A:34 B:39 C:35 AB:1 BC:1 CA:0
Smoothing: 3
Face 70: A:35 B:1 C:36 AB:0 BC:1 CA:1
Smoothing: 4
Face 71: A:35 B:0 C:1 AB:1 BC:1 CA:0
Smoothing: 4
Face 72: A:36 B:2 C:37 AB:0 BC:1 CA:1
Smoothing: 5
Face 73: A:36 B:1 C:2 AB:1 BC:1 CA:0
Smoothing: 5
Face 74: A:37 B:3 C:38 AB:0 BC:1 CA:1
Smoothing: 6
Face 75: A:37 B:2 C:3 AB:1 BC:1 CA:0
Smoothing: 6
Face 76: A:38 B:4 C:39 AB:0 BC:1 CA:1
Smoothing: 7
Face 77: A:38 B:3 C:4 AB:1 BC:1 CA:0
Smoothing: 7
Face 78: A:39 B:0 C:35 AB:0 BC:1 CA:1
Smoothing: 8
Face 79: A:39 B:4 C:0 AB:1 BC:1 CA:0
Smoothing: 8
Page 4
Ambient light color: Red=0.039216 Green=0.039216 Blue=0.039216
Named object: "Object01"
Tri-mesh, Vertices: 40 Faces: 80
Vertex list:
Vertex 0: X: -50.170624 Y: -0.000026 Z: -240.147842
Vertex 1: X: -80.584503 Y: -63.958851 Z: -205.014572
Vertex 2: X: -129.795166 Y: -39.528744 Z: -148.16774
Vertex 3: X: -129.795166 Y: 39.528721 Z: -148.16774
Vertex 4: X: -80.584503 Y: 63.958797 Z: -205.014572
Vertex 5: X: 85.963654 Y: -0.000002 Z: 31.490465
Vertex 6: X: 39.614838 Y: -63.958828 Z: 34.827602
Vertex 7: X: -35.37915 Y: -39.528728 Z: 40.227196
Vertex 8: X: -35.37912 Y: 39.528736 Z: 40.227188
Vertex 9: X: 39.614838 Y: 63.95882 Z: 34.827595
Vertex 10: X: -9.852051 Y: 0.000023 Z: 319.829254
Vertex 11: X: -44.985352 Y: -63.958805 Z: 289.415405
Vertex 12: X: -101.832199 Y: -39.528709 Z: 240.204758
Vertex 13: X: -101.832184 Y: 39.528755 Z: 240.204773
Vertex 14: X: -44.985352 Y: 63.958843 Z: 289.415405
Vertex 15: X: -281.490326 Y: 0.000035 Z: 455.963654
Vertex 16: X: -284.827484 Y: -63.958794 Z: 409.614868
Vertex 17: X: -290.227112 Y: -39.528702 Z: 334.62085
Vertex 18: X: -290.227112 Y: 39.528763 Z: 334.62088
Vertex 19: X: -284.827484 Y: 63.958855 Z: 409.614838
Vertex 20: X: -569.829163 Y: 0.000026 Z: 360.14798
Vertex 21: X: -539.415344 Y: -63.958801 Z: 325.014709
Vertex 22: X: -490.204712 Y: -39.528709 Z: 268.167847
Vertex 23: X: -490.204712 Y: 39.528755 Z: 268.167847
Vertex 24: X: -539.415344 Y: 63.958847 Z: 325.014679
Vertex 25: X: -705.963684 Y: 0.000002 Z: 88.509598
Vertex 26: X: -659.614807 Y: -63.958824 Z: 85.172462
Vertex 27: X: -584.62085 Y: -39.528725 Z: 79.77285
Vertex 28: X: -584.62085 Y: 39.52874 Z: 79.77285
Vertex 29: X: -659.614868 Y: 63.958824 Z: 85.172447
Vertex 30: X: -610.147827 Y: -0.000023 Z: -199.829361
Vertex 31: X: -575.014587 Y: -63.958847 Z: -169.415497
Vertex 32: X: -518.167725 Y: -39.528744 Z: -120.204819
Vertex 33: X: -518.167725 Y: 39.528721 Z: -120.204834
Vertex 34: X: -575.014587 Y: 63.958801 Z: -169.415497
Vertex 35: X: -338.509338 Y: -0.000035 Z: -335.963745
Vertex 36: X: -335.172241 Y: -63.958858 Z: -289.614868
Vertex 37: X: -329.772675 Y: -39.528751 Z: -214.620865
Vertex 38: X: -329.772675 Y: 39.528713 Z: -214.620865
Vertex 39: X: -335.172241 Y: 63.95879 Z: -289.614899
Face list:
Face 0: A:0 B:6 C:1 AB:0 BC:1 CA:1
Smoothing: 1
Face 1: A:0 B:5 C:6 AB:1 BC:1 CA:0
Smoothing: 1
Face 2: A:1 B:7 C:2 AB:0 BC:1 CA:1
Smoothing: 2
Face 3: A:1 B:6 C:7 AB:1 BC:1 CA:0
Smoothing: 2
Face 4: A:2 B:8 C:3 AB:0 BC:1 CA:1
Smoothing: 3
Face 5: A:2 B:7 C:8 AB:1 BC:1 CA:0
Smoothing: 3
Face 6: A:3 B:9 C:4 AB:0 BC:1 CA:1
Smoothing: 4
Face 7: A:3 B:8 C:9 AB:1 BC:1 CA:0
Page 1
Smoothing: 4
Face 8: A:4 B:5 C:0 AB:0 BC:1 CA:1
Smoothing: 5
Face 9: A:4 B:9 C:5 AB:1 BC:1 CA:0
Smoothing: 5
Face 10: A:5 B:11 C:6 AB:0 BC:1 CA:1
Smoothing: 6
Face 11: A:5 B:10 C:11 AB:1 BC:1 CA:0
Smoothing: 6
Face 12: A:6 B:12 C:7 AB:0 BC:1 CA:1
Smoothing: 7
Face 13: A:6 B:11 C:12 AB:1 BC:1 CA:0
Smoothing: 7
Face 14: A:7 B:13 C:8 AB:0 BC:1 CA:1
Smoothing: 8
Face 15: A:7 B:12 C:13 AB:1 BC:1 CA:0
Smoothing: 8
Face 16: A:8 B:14 C:9 AB:0 BC:1 CA:1
Smoothing: 9
Face 17: A:8 B:13 C:14 AB:1 BC:1 CA:0
Smoothing: 9
Face 18: A:9 B:10 C:5 AB:0 BC:1 CA:1
Smoothing: 10
Face 19: A:9 B:14 C:10 AB:1 BC:1 CA:0
Smoothing: 10
Face 20: A:10 B:16 C:11 AB:0 BC:1 CA:1
Smoothing: 11
Face 21: A:10 B:15 C:16 AB:1 BC:1 CA:0
Smoothing: 11
Face 22: A:11 B:17 C:12 AB:0 BC:1 CA:1
Smoothing: 12
Face 23: A:11 B:16 C:17 AB:1 BC:1 CA:0
Smoothing: 12
Face 24: A:12 B:18 C:13 AB:0 BC:1 CA:1
Smoothing: 13
Face 25: A:12 B:17 C:18 AB:1 BC:1 CA:0
Smoothing: 13
Face 26: A:13 B:19 C:14 AB:0 BC:1 CA:1
Smoothing: 14
Face 27: A:13 B:18 C:19 AB:1 BC:1 CA:0
Smoothing: 14
Face 28: A:14 B:15 C:10 AB:0 BC:1 CA:1
Smoothing: 15
Face 29: A:14 B:19 C:15 AB:1 BC:1 CA:0
Smoothing: 15
Face 30: A:15 B:21 C:16 AB:0 BC:1 CA:1
Smoothing: 16
Face 31: A:15 B:20 C:21 AB:1 BC:1 CA:0
Smoothing: 16
Face 32: A:16 B:22 C:17 AB:0 BC:1 CA:1
Smoothing: 17
Face 33: A:16 B:21 C:22 AB:1 BC:1 CA:0
Smoothing: 17
Face 34: A:17 B:23 C:18 AB:0 BC:1 CA:1
Smoothing: 18
Face 35: A:17 B:22 C:23 AB:1 BC:1 CA:0
Smoothing: 18
Face 36: A:18 B:24 C:19 AB:0 BC:1 CA:1
Smoothing: 19
Face 37: A:18 B:23 C:24 AB:1 BC:1 CA:0
Smoothing: 19
Page 2
Face 38: A:19 B:20 C:15 AB:0 BC:1 CA:1
Smoothing: 20
Face 39: A:19 B:24 C:20 AB:1 BC:1 CA:0
Smoothing: 20
Face 40: A:20 B:26 C:21 AB:0 BC:1 CA:1
Smoothing: 21
Face 41: A:20 B:25 C:26 AB:1 BC:1 CA:0
Smoothing: 21
Face 42: A:21 B:27 C:22 AB:0 BC:1 CA:1
Smoothing: 22
Face 43: A:21 B:26 C:27 AB:1 BC:1 CA:0
Smoothing: 22
Face 44: A:22 B:28 C:23 AB:0 BC:1 CA:1
Smoothing: 23
Face 45: A:22 B:27 C:28 AB:1 BC:1 CA:0
Smoothing: 23
Face 46: A:23 B:29 C:24 AB:0 BC:1 CA:1
Smoothing: 24
Face 47: A:23 B:28 C:29 AB:1 BC:1 CA:0
Smoothing: 24
Face 48: A:24 B:25 C:20 AB:0 BC:1 CA:1
Smoothing: 25
Face 49: A:24 B:29 C:25 AB:1 BC:1 CA:0
Smoothing: 25
Face 50: A:25 B:31 C:26 AB:0 BC:1 CA:1
Smoothing: 26
Face 51: A:25 B:30 C:31 AB:1 BC:1 CA:0
Smoothing: 26
Face 52: A:26 B:32 C:27 AB:0 BC:1 CA:1
Smoothing: 27
Face 53: A:26 B:31 C:32 AB:1 BC:1 CA:0
Smoothing: 27
Face 54: A:27 B:33 C:28 AB:0 BC:1 CA:1
Smoothing: 28
Face 55: A:27 B:32 C:33 AB:1 BC:1 CA:0
Smoothing: 28
Face 56: A:28 B:34 C:29 AB:0 BC:1 CA:1
Smoothing: 29
Face 57: A:28 B:33 C:34 AB:1 BC:1 CA:0
Smoothing: 29
Face 58: A:29 B:30 C:25 AB:0 BC:1 CA:1
Smoothing: 30
Face 59: A:29 B:34 C:30 AB:1 BC:1 CA:0
Smoothing: 30
Face 60: A:30 B:36 C:31 AB:0 BC:1 CA:1
Smoothing: 31
Face 61: A:30 B:35 C:36 AB:1 BC:1 CA:0
Smoothing: 31
Face 62: A:31 B:37 C:32 AB:0 BC:1 CA:1
Smoothing: 32
Face 63: A:31 B:36 C:37 AB:1 BC:1 CA:0
Smoothing: 32
Face 64: A:32 B:38 C:33 AB:0 BC:1 CA:1
Smoothing: 1
Face 65: A:32 B:37 C:38 AB:1 BC:1 CA:0
Smoothing: 1
Face 66: A:33 B:39 C:34 AB:0 BC:1 CA:1
Smoothing: 2
Face 67: A:33 B:38 C:39 AB:1 BC:1 CA:0
Smoothing: 2
Face 68: A:34 B:35 C:30 AB:0 BC:1 CA:1
Page 3
Smoothing: 3
Face 69: A:34 B:39 C:35 AB:1 BC:1 CA:0
Smoothing: 3
Face 70: A:35 B:1 C:36 AB:0 BC:1 CA:1
Smoothing: 4
Face 71: A:35 B:0 C:1 AB:1 BC:1 CA:0
Smoothing: 4
Face 72: A:36 B:2 C:37 AB:0 BC:1 CA:1
Smoothing: 5
Face 73: A:36 B:1 C:2 AB:1 BC:1 CA:0
Smoothing: 5
Face 74: A:37 B:3 C:38 AB:0 BC:1 CA:1
Smoothing: 6
Face 75: A:37 B:2 C:3 AB:1 BC:1 CA:0
Smoothing: 6
Face 76: A:38 B:4 C:39 AB:0 BC:1 CA:1
Smoothing: 7
Face 77: A:38 B:3 C:4 AB:1 BC:1 CA:0
Smoothing: 7
Face 78: A:39 B:0 C:35 AB:0 BC:1 CA:1
Smoothing: 8
Face 79: A:39 B:4 C:0 AB:1 BC:1 CA:0
Smoothing: 8
Page 4

View File

@ -1,63 +1,63 @@
# Makefile for GLU for GCC-2.95.2/Mingw32 contributed by
# Paul Garceau <pgarceau@teleport.com>
# Mesa 3-D graphics library
# Version: 3.3
# Copyright (C) 1995-1999 Brian Paul
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
MESA_MAJOR=3
MESA_MINOR=3
MESA_TINY=0
VERSION=$(MESA_MAJOR).$(MESA_MINOR)
CFLAGS = -I. -DWIN32 -D__WIN32__ -D_WINDOWS \
-O2 -funroll-loops \
-fexpensive-optimizations -fomit-frame-pointer -ffast-math \
-malign-loops=2 -malign-jumps=2 -malign-functions=2 \
-mwindows
CC = gcc
MAKELIB = ar ru
GLU_LIB = libGLU.a
##### MACROS #####
VPATH = RCS
INCDIR = ../include
LIBDIR = ../lib
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
polytest.c project.c quadric.c tess.c tesselat.c
OBJECTS = $(SOURCES:.c=.o)
##### RULES #####
.c.o:
$(CC) -c -I$(INCDIR) $(CFLAGS) $<
##### TARGETS #####
# Make the library:
$(LIBDIR)/$(GLU_LIB): $(OBJECTS)
# Makefile for GLU for GCC-2.95.2/Mingw32 contributed by
# Paul Garceau <pgarceau@teleport.com>
# Mesa 3-D graphics library
# Version: 3.3
# Copyright (C) 1995-1999 Brian Paul
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
MESA_MAJOR=3
MESA_MINOR=3
MESA_TINY=0
VERSION=$(MESA_MAJOR).$(MESA_MINOR)
CFLAGS = -I. -DWIN32 -D__WIN32__ -D_WINDOWS \
-O2 -funroll-loops \
-fexpensive-optimizations -fomit-frame-pointer -ffast-math \
-malign-loops=2 -malign-jumps=2 -malign-functions=2 \
-mwindows
CC = gcc
MAKELIB = ar ru
GLU_LIB = libGLU.a
##### MACROS #####
VPATH = RCS
INCDIR = ../include
LIBDIR = ../lib
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
polytest.c project.c quadric.c tess.c tesselat.c
OBJECTS = $(SOURCES:.c=.o)
##### RULES #####
.c.o:
$(CC) -c -I$(INCDIR) $(CFLAGS) $<
##### TARGETS #####
# Make the library:
$(LIBDIR)/$(GLU_LIB): $(OBJECTS)
$(MAKELIB) $(GLU_LIB) $(MAJOR) $(MINOR) $(TINY) $(OBJECTS)

View File

@ -1,103 +1,103 @@
EXPORTS
glutInit
glutInitDisplayMode
glutInitDisplayString
glutInitWindowPosition
glutInitWindowSize
glutMainLoop
glutCreateWindow
glutCreateSubWindow
glutDestroyWindow
glutPostRedisplay
glutSwapBuffers
glutGetWindow
glutSetWindow
glutSetWindowTitle
glutSetIconTitle
glutPositionWindow
glutReshapeWindow
glutPopWindow
glutPushWindow
glutIconifyWindow
glutShowWindow
glutHideWindow
glutFullScreen
glutSetCursor
glutWarpPointer
glutEstablishOverlay
glutRemoveOverlay
glutUseLayer
glutPostOverlayRedisplay
glutShowOverlay
glutHideOverlay
glutCreateMenu
glutDestroyMenu
glutGetMenu
glutSetMenu
glutAddMenuEntry
glutAddSubMenu
glutChangeToMenuEntry
glutChangeToSubMenu
glutRemoveMenuItem
glutAttachMenu
glutDetachMenu
glutDisplayFunc
glutReshapeFunc
glutKeyboardFunc
glutMouseFunc
glutMotionFunc
glutPassiveMotionFunc
glutEntryFunc
glutVisibilityFunc
glutIdleFunc
glutTimerFunc
glutMenuStateFunc
glutSpecialFunc
glutSpaceballMotionFunc
glutSpaceballRotateFunc
glutSpaceballButtonFunc
glutButtonBoxFunc
glutDialsFunc
glutTabletMotionFunc
glutTabletButtonFunc
glutMenuStatusFunc
glutOverlayDisplayFunc
glutWindowStatusFunc
glutSetColor
glutGetColor
glutCopyColormap
glutGet
glutDeviceGet
glutExtensionSupported
glutGetModifiers
glutLayerGet
glutBitmapCharacter
glutBitmapWidth
glutStrokeCharacter
glutStrokeWidth
glutBitmapLength
glutStrokeLength
glutWireSphere
glutSolidSphere
glutWireCone
glutSolidCone
glutWireCube
glutSolidCube
glutWireTorus
glutSolidTorus
glutWireDodecahedron
glutSolidDodecahedron
glutWireTeapot
glutSolidTeapot
glutWireOctahedron
glutSolidOctahedron
glutWireTetrahedron
glutSolidTetrahedron
glutWireIcosahedron
glutSolidIcosahedron
glutVideoResizeGet
glutSetupVideoResizing
glutStopVideoResizing
glutVideoResize
glutVideoPan
glutReportErrors
EXPORTS
glutInit
glutInitDisplayMode
glutInitDisplayString
glutInitWindowPosition
glutInitWindowSize
glutMainLoop
glutCreateWindow
glutCreateSubWindow
glutDestroyWindow
glutPostRedisplay
glutSwapBuffers
glutGetWindow
glutSetWindow
glutSetWindowTitle
glutSetIconTitle
glutPositionWindow
glutReshapeWindow
glutPopWindow
glutPushWindow
glutIconifyWindow
glutShowWindow
glutHideWindow
glutFullScreen
glutSetCursor
glutWarpPointer
glutEstablishOverlay
glutRemoveOverlay
glutUseLayer
glutPostOverlayRedisplay
glutShowOverlay
glutHideOverlay
glutCreateMenu
glutDestroyMenu
glutGetMenu
glutSetMenu
glutAddMenuEntry
glutAddSubMenu
glutChangeToMenuEntry
glutChangeToSubMenu
glutRemoveMenuItem
glutAttachMenu
glutDetachMenu
glutDisplayFunc
glutReshapeFunc
glutKeyboardFunc
glutMouseFunc
glutMotionFunc
glutPassiveMotionFunc
glutEntryFunc
glutVisibilityFunc
glutIdleFunc
glutTimerFunc
glutMenuStateFunc
glutSpecialFunc
glutSpaceballMotionFunc
glutSpaceballRotateFunc
glutSpaceballButtonFunc
glutButtonBoxFunc
glutDialsFunc
glutTabletMotionFunc
glutTabletButtonFunc
glutMenuStatusFunc
glutOverlayDisplayFunc
glutWindowStatusFunc
glutSetColor
glutGetColor
glutCopyColormap
glutGet
glutDeviceGet
glutExtensionSupported
glutGetModifiers
glutLayerGet
glutBitmapCharacter
glutBitmapWidth
glutStrokeCharacter
glutStrokeWidth
glutBitmapLength
glutStrokeLength
glutWireSphere
glutSolidSphere
glutWireCone
glutSolidCone
glutWireCube
glutSolidCube
glutWireTorus
glutSolidTorus
glutWireDodecahedron
glutSolidDodecahedron
glutWireTeapot
glutSolidTeapot
glutWireOctahedron
glutSolidOctahedron
glutWireTetrahedron
glutSolidTetrahedron
glutWireIcosahedron
glutSolidIcosahedron
glutVideoResizeGet
glutSetupVideoResizing
glutStopVideoResizing
glutVideoResize
glutVideoPan
glutReportErrors

View File

@ -1,420 +1,420 @@
# Makefile
# Created by IBM WorkFrame/2 MakeMake at 12:46:25 on 3 June 2003
#
# The actions included in this make file are:
# Compile::C++ Compiler
# Link::Linker
# Lib::Import Lib
.SUFFIXES:
.SUFFIXES: \
.LIB .cpp .dll .obj
.cpp.obj:
@echo " Compile::C++ Compiler "
icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s
{G:\EVGEN\MESA5\src-glut.os2pm}.cpp.obj:
@echo " Compile::C++ Compiler "
icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s
.dll.LIB:
@echo " Lib::Import Lib "
implib.exe %|dpfF.LIB %s
{G:\EVGEN\MESA5\src-glut.os2pm}.dll.LIB:
@echo " Lib::Import Lib "
implib.exe %|dpfF.LIB %s
all: \
.\libGlut.LIB
.\libGlut.dll: \
.\os2_winproc.obj \
.\WarpWin.obj \
.\glutOverlay.obj \
.\glut_8x13.obj \
.\glut_9x15.obj \
.\glut_bitmap.obj \
.\glut_cindex.obj \
.\glut_cmap.obj \
.\glut_cursor.obj \
.\glut_event.obj \
.\glut_ext.obj \
.\glut_fullscrn.obj \
.\glut_gamemode.obj \
.\glut_get.obj \
.\glut_hel10.obj \
.\glut_hel12.obj \
.\glut_hel18.obj \
.\glut_init.obj \
.\glut_input.obj \
.\glut_key.obj \
.\glut_keyctrl.obj \
.\glut_keyup.obj \
.\glut_mesa.obj \
.\glut_modifier.obj \
.\glut_roman.obj \
.\glut_shapes.obj \
.\glut_stroke.obj \
.\glut_swap.obj \
.\glut_teapot.obj \
.\glut_tr24.obj \
.\glut_util.obj \
.\glut_vidresize.obj \
.\glut_warp.obj \
.\glut_win.obj \
.\glut_winmisc.obj \
.\os2_glx.obj \
.\os2_menu.obj \
..\si-glu\libGLU.lib \
..\MesaDll\MesaGL2.lib \
..\drv\DrvLoad\MesaDrvLoad.lib \
{$(LIB)}libGlut.DEF
@echo " Link::Linker "
icc.exe @<<
/B" /dbgpack /exepack:2 /st:200000 /packd /optfunc"
/FelibGlut.dll
..\si-glu\libGLU.lib
..\MesaDll\MesaGL2.lib
..\drv\DrvLoad\MesaDrvLoad.lib
libGlut.DEF
.\os2_winproc.obj
.\WarpWin.obj
.\glutOverlay.obj
.\glut_8x13.obj
.\glut_9x15.obj
.\glut_bitmap.obj
.\glut_cindex.obj
.\glut_cmap.obj
.\glut_cursor.obj
.\glut_event.obj
.\glut_ext.obj
.\glut_fullscrn.obj
.\glut_gamemode.obj
.\glut_get.obj
.\glut_hel10.obj
.\glut_hel12.obj
.\glut_hel18.obj
.\glut_init.obj
.\glut_input.obj
.\glut_key.obj
.\glut_keyctrl.obj
.\glut_keyup.obj
.\glut_mesa.obj
.\glut_modifier.obj
.\glut_roman.obj
.\glut_shapes.obj
.\glut_stroke.obj
.\glut_swap.obj
.\glut_teapot.obj
.\glut_tr24.obj
.\glut_util.obj
.\glut_vidresize.obj
.\glut_warp.obj
.\glut_win.obj
.\glut_winmisc.obj
.\os2_glx.obj
.\os2_menu.obj
<<
.\os2_winproc.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\os2_winproc.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
gl\os2mesa.h \
gl\gl.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2mesadef.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}context.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapi.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}mtypes.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glheader.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}config.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapitable.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glthread.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}math/m_matrix.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Trace/tr_context.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}dd.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}conf.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_config.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/glext.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Xthreads.h
.\os2_menu.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\os2_menu.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\os2_glx.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\os2_glx.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
gl\os2mesa.h \
gl\gl.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h
.\glut_winmisc.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_winmisc.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_win.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_win.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutos2.h \
gl\os2mesa.h \
gl\gl.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h
.\glut_warp.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_warp.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_vidresize.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_vidresize.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_util.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_util.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_tr24.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_tr24.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_teapot.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_teapot.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_swap.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_swap.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_stroke.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_stroke.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_shapes.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_shapes.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_roman.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_roman.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h
.\glut_modifier.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_modifier.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_mesa.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_mesa.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_keyup.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_keyup.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_keyctrl.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_keyctrl.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_key.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_key.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_input.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_input.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_init.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_init.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_hel18.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_hel18.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_hel12.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_hel12.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_hel10.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_hel10.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_get.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_get.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_gamemode.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_gamemode.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_fullscrn.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_fullscrn.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_ext.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_ext.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_event.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_event.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_cursor.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_cursor.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_cmap.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_cmap.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}layerutil.h
.\glut_cindex.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_cindex.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_bitmap.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_bitmap.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_9x15.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_9x15.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_8x13.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_8x13.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glutOverlay.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glutOverlay.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\WarpWin.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\WarpWin.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpWin.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h
.\libGlut.LIB: \
.\libGlut.dll
# Makefile
# Created by IBM WorkFrame/2 MakeMake at 12:46:25 on 3 June 2003
#
# The actions included in this make file are:
# Compile::C++ Compiler
# Link::Linker
# Lib::Import Lib
.SUFFIXES:
.SUFFIXES: \
.LIB .cpp .dll .obj
.cpp.obj:
@echo " Compile::C++ Compiler "
icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s
{G:\EVGEN\MESA5\src-glut.os2pm}.cpp.obj:
@echo " Compile::C++ Compiler "
icc.exe /I..\ /I..\X86 /I..\GL /I..\swrast /I..\swrast_setup /Ss /Wcmpcndcnscnvcpydclenuextgeninilanobsordparporppcprorearettrdtruund /Tx /O /Gm /Ge- /G5 /Gf /Gi /Oi /C %s
.dll.LIB:
@echo " Lib::Import Lib "
implib.exe %|dpfF.LIB %s
{G:\EVGEN\MESA5\src-glut.os2pm}.dll.LIB:
@echo " Lib::Import Lib "
implib.exe %|dpfF.LIB %s
all: \
.\libGlut.LIB
.\libGlut.dll: \
.\os2_winproc.obj \
.\WarpWin.obj \
.\glutOverlay.obj \
.\glut_8x13.obj \
.\glut_9x15.obj \
.\glut_bitmap.obj \
.\glut_cindex.obj \
.\glut_cmap.obj \
.\glut_cursor.obj \
.\glut_event.obj \
.\glut_ext.obj \
.\glut_fullscrn.obj \
.\glut_gamemode.obj \
.\glut_get.obj \
.\glut_hel10.obj \
.\glut_hel12.obj \
.\glut_hel18.obj \
.\glut_init.obj \
.\glut_input.obj \
.\glut_key.obj \
.\glut_keyctrl.obj \
.\glut_keyup.obj \
.\glut_mesa.obj \
.\glut_modifier.obj \
.\glut_roman.obj \
.\glut_shapes.obj \
.\glut_stroke.obj \
.\glut_swap.obj \
.\glut_teapot.obj \
.\glut_tr24.obj \
.\glut_util.obj \
.\glut_vidresize.obj \
.\glut_warp.obj \
.\glut_win.obj \
.\glut_winmisc.obj \
.\os2_glx.obj \
.\os2_menu.obj \
..\si-glu\libGLU.lib \
..\MesaDll\MesaGL2.lib \
..\drv\DrvLoad\MesaDrvLoad.lib \
{$(LIB)}libGlut.DEF
@echo " Link::Linker "
icc.exe @<<
/B" /dbgpack /exepack:2 /st:200000 /packd /optfunc"
/FelibGlut.dll
..\si-glu\libGLU.lib
..\MesaDll\MesaGL2.lib
..\drv\DrvLoad\MesaDrvLoad.lib
libGlut.DEF
.\os2_winproc.obj
.\WarpWin.obj
.\glutOverlay.obj
.\glut_8x13.obj
.\glut_9x15.obj
.\glut_bitmap.obj
.\glut_cindex.obj
.\glut_cmap.obj
.\glut_cursor.obj
.\glut_event.obj
.\glut_ext.obj
.\glut_fullscrn.obj
.\glut_gamemode.obj
.\glut_get.obj
.\glut_hel10.obj
.\glut_hel12.obj
.\glut_hel18.obj
.\glut_init.obj
.\glut_input.obj
.\glut_key.obj
.\glut_keyctrl.obj
.\glut_keyup.obj
.\glut_mesa.obj
.\glut_modifier.obj
.\glut_roman.obj
.\glut_shapes.obj
.\glut_stroke.obj
.\glut_swap.obj
.\glut_teapot.obj
.\glut_tr24.obj
.\glut_util.obj
.\glut_vidresize.obj
.\glut_warp.obj
.\glut_win.obj
.\glut_winmisc.obj
.\os2_glx.obj
.\os2_menu.obj
<<
.\os2_winproc.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\os2_winproc.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
gl\os2mesa.h \
gl\gl.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2mesadef.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}context.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapi.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}mtypes.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glheader.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}config.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glapitable.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glthread.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}math/m_matrix.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Trace/tr_context.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}dd.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}conf.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_config.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/glext.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}Xthreads.h
.\os2_menu.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\os2_menu.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\os2_glx.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\os2_glx.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
gl\os2mesa.h \
gl\gl.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h
.\glut_winmisc.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_winmisc.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_win.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_win.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutos2.h \
gl\os2mesa.h \
gl\gl.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}gl_mangle.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}GL/os2_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}os2_config.h
.\glut_warp.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_warp.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_vidresize.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_vidresize.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_util.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_util.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_tr24.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_tr24.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_teapot.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_teapot.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_swap.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_swap.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_stroke.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_stroke.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_shapes.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_shapes.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_roman.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_roman.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h
.\glut_modifier.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_modifier.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_mesa.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_mesa.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_keyup.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_keyup.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_keyctrl.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_keyctrl.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_key.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_key.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_input.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_input.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_init.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_init.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_hel18.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_hel18.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_hel12.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_hel12.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_hel10.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_hel10.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_get.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_get.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_gamemode.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_gamemode.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_fullscrn.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_fullscrn.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_ext.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_ext.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_event.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_event.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_cursor.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_cursor.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_cmap.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_cmap.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}layerutil.h
.\glut_cindex.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_cindex.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_bitmap.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_bitmap.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\glut_9x15.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_9x15.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glut_8x13.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glut_8x13.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h
.\glutOverlay.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\glutOverlay.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutint.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutbitmap.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutstroke.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}glutwin32.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_x11.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}win32_glx.h
.\WarpWin.obj: \
G:\EVGEN\MESA5\src-glut.os2pm\WarpWin.cpp \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpWin.h \
{G:\EVGEN\MESA5\src-glut.os2pm;..\;..\X86;..\GL;..\swrast;..\swrast_setup;$(INCLUDE);}WarpGL.h
.\libGlut.LIB: \
.\libGlut.dll

View File

@ -1,133 +1,133 @@
/***********************************************************
* Copyright (C) 1997, Be Inc. All rights reserved.
*
* FILE: glutOverlay.cpp
*
* DESCRIPTION: we don't support overlays, so this code is
* really simple
***********************************************************/
/***********************************************************
* Headers
***********************************************************/
#include <GL/glut.h>
#include "glutint.h"
#include "glutbitmap.h"
#include "glutstroke.h"
GLUTAPI void GLUTAPIENTRY
glutEstablishOverlay(void)
{
__glutFatalError("OS2PM lacks overlay support.");
}
GLUTAPI void GLUTAPIENTRY
glutUseLayer(GLenum layer) {
// ignore
}
GLUTAPI void GLUTAPIENTRY
glutRemoveOverlay(void) {
// ignore
}
GLUTAPI void GLUTAPIENTRY
glutPostOverlayRedisplay(void) {
// ignore
}
GLUTAPI void GLUTAPIENTRY
glutShowOverlay(void) {
// ignore
}
GLUTAPI void GLUTAPIENTRY glutHideOverlay(void)
{
// ignore
}
int GLUTAPIENTRY
glutLayerGet(GLenum param)
{
// ignore
}
/***********************************************************
* Unsupported callbacks
***********************************************************/
GLUTAPI void GLUTAPIENTRY
glutOverlayDisplayFunc(GLUTdisplayCB displayFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutDialsFunc(GLUTdialsCB dialsFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutPostWindowOverlayRedisplay(int win)
{ //
}
void GLUTAPIENTRY
glutInitDisplayString(const char *string)
{ //
}
void GLUTAPIENTRY
glutJoystickFunc(GLUTjoystickCB joystickFunc, int pollInterval)
{ //
}
void GLUTAPIENTRY
glutForceJoystickFunc(void)
{ //
}
int GLUTAPIENTRY
glutBitmapWidth(GLUTbitmapFont font, int c)
{ return 0;
}
int GLUTAPIENTRY
glutBitmapLength(GLUTbitmapFont font, const unsigned char *string)
{ //
return 0;
}
int GLUTAPIENTRY
glutStrokeWidth(GLUTstrokeFont font, int c)
{ return 0;
}
int GLUTAPIENTRY
glutStrokeLength(GLUTstrokeFont font, const unsigned char *string)
{ return 0;
}
/***********************************************************
* Copyright (C) 1997, Be Inc. All rights reserved.
*
* FILE: glutOverlay.cpp
*
* DESCRIPTION: we don't support overlays, so this code is
* really simple
***********************************************************/
/***********************************************************
* Headers
***********************************************************/
#include <GL/glut.h>
#include "glutint.h"
#include "glutbitmap.h"
#include "glutstroke.h"
GLUTAPI void GLUTAPIENTRY
glutEstablishOverlay(void)
{
__glutFatalError("OS2PM lacks overlay support.");
}
GLUTAPI void GLUTAPIENTRY
glutUseLayer(GLenum layer) {
// ignore
}
GLUTAPI void GLUTAPIENTRY
glutRemoveOverlay(void) {
// ignore
}
GLUTAPI void GLUTAPIENTRY
glutPostOverlayRedisplay(void) {
// ignore
}
GLUTAPI void GLUTAPIENTRY
glutShowOverlay(void) {
// ignore
}
GLUTAPI void GLUTAPIENTRY glutHideOverlay(void)
{
// ignore
}
int GLUTAPIENTRY
glutLayerGet(GLenum param)
{
// ignore
}
/***********************************************************
* Unsupported callbacks
***********************************************************/
GLUTAPI void GLUTAPIENTRY
glutOverlayDisplayFunc(GLUTdisplayCB displayFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutDialsFunc(GLUTdialsCB dialsFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
{
}
GLUTAPI void GLUTAPIENTRY
glutPostWindowOverlayRedisplay(int win)
{ //
}
void GLUTAPIENTRY
glutInitDisplayString(const char *string)
{ //
}
void GLUTAPIENTRY
glutJoystickFunc(GLUTjoystickCB joystickFunc, int pollInterval)
{ //
}
void GLUTAPIENTRY
glutForceJoystickFunc(void)
{ //
}
int GLUTAPIENTRY
glutBitmapWidth(GLUTbitmapFont font, int c)
{ return 0;
}
int GLUTAPIENTRY
glutBitmapLength(GLUTbitmapFont font, const unsigned char *string)
{ //
return 0;
}
int GLUTAPIENTRY
glutStrokeWidth(GLUTstrokeFont font, int c)
{ return 0;
}
int GLUTAPIENTRY
glutStrokeLength(GLUTstrokeFont font, const unsigned char *string)
{ return 0;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,57 +1,57 @@
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
#include "glutbitmap.h"
void GLUTAPIENTRY
glutBitmapCharacter(GLUTbitmapFont font, int c)
{
const BitmapCharRec *ch;
BitmapFontPtr fontinfo;
GLint swapbytes, lsbfirst, rowlength;
GLint skiprows, skippixels, alignment;
#if defined(_WIN32)
fontinfo = (BitmapFontPtr) __glutFont(font);
#else
fontinfo = (BitmapFontPtr) font;
#endif
if (c < fontinfo->first ||
c >= fontinfo->first + fontinfo->num_chars)
return;
ch = fontinfo->ch[c - fontinfo->first];
if (ch) {
/* Save current modes. */
glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes);
glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst);
glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength);
glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows);
glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels);
glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
/* Little endian machines (DEC Alpha for example) could
benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE
instead of GL_FALSE, but this would require changing the
generated bitmaps too. */
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,
ch->advance, 0, ch->bitmap);
/* Restore saved modes. */
glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes);
glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst);
glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength);
glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);
glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
}
}
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
#include "glutbitmap.h"
void GLUTAPIENTRY
glutBitmapCharacter(GLUTbitmapFont font, int c)
{
const BitmapCharRec *ch;
BitmapFontPtr fontinfo;
GLint swapbytes, lsbfirst, rowlength;
GLint skiprows, skippixels, alignment;
#if defined(_WIN32)
fontinfo = (BitmapFontPtr) __glutFont(font);
#else
fontinfo = (BitmapFontPtr) font;
#endif
if (c < fontinfo->first ||
c >= fontinfo->first + fontinfo->num_chars)
return;
ch = fontinfo->ch[c - fontinfo->first];
if (ch) {
/* Save current modes. */
glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes);
glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst);
glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength);
glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows);
glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels);
glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
/* Little endian machines (DEC Alpha for example) could
benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE
instead of GL_FALSE, but this would require changing the
generated bitmaps too. */
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,
ch->advance, 0, ch->bitmap);
/* Restore saved modes. */
glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes);
glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst);
glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength);
glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);
glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
}
}

View File

@ -1,399 +1,399 @@
/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#ifdef __VMS
//EK#include <GL/vms_x_fix.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h> /* SunOS multithreaded assert() needs <stdio.h>. Lame. */
#include <assert.h>
#if !defined(_WIN32) && !defined(__OS2__)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h> /* for XA_RGB_DEFAULT_MAP atom */
#if defined(__vms)
#include <Xmu/StdCmap.h> /* for XmuLookupStandardColormap */
#else
#include <X11/Xmu/StdCmap.h> /* for XmuLookupStandardColormap */
#endif
#endif
/* SGI optimization introduced in IRIX 6.3 to avoid X server
round trips for interning common X atoms. */
#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
#include <X11/SGIFastAtom.h>
#else
#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
#endif
#include "glutint.h"
#include "layerutil.h"
GLUTcolormap *__glutColormapList = NULL;
GLUTcolormap *
__glutAssociateNewColormap(XVisualInfo * vis)
{
GLUTcolormap *cmap;
int transparentPixel, i;
unsigned long pixels[255];
cmap = (GLUTcolormap *) malloc(sizeof(GLUTcolormap));
if (!cmap)
__glutFatalError("out of memory.");
#if defined(_WIN32) || defined(__OS2__)
pixels[0] = 0; /* avoid compilation warnings on win32 */
cmap->visual = 0;
cmap->size = 256; /* always assume 256 on Win32 */
#else
cmap->visual = vis->visual;
cmap->size = vis->visual->map_entries;
#endif
cmap->refcnt = 1;
cmap->cells = (GLUTcolorcell *)
malloc(sizeof(GLUTcolorcell) * cmap->size);
if (!cmap->cells)
__glutFatalError("out of memory.");
/* make all color cell entries be invalid */
for (i = cmap->size - 1; i >= 0; i--) {
cmap->cells[i].component[GLUT_RED] = -1.0;
cmap->cells[i].component[GLUT_GREEN] = -1.0;
cmap->cells[i].component[GLUT_BLUE] = -1.0;
}
transparentPixel = __glutGetTransparentPixel(__glutDisplay, vis);
if (transparentPixel == -1 || transparentPixel >= cmap->size) {
/* If there is no transparent pixel or if the transparent
pixel is outside the range of valid colormap cells (HP
can implement their overlays this smart way since their
transparent pixel is 255), we can AllocAll the colormap.
See note below. */
cmap->cmap = XCreateColormap(__glutDisplay,
__glutRoot, cmap->visual, AllocAll);
} else {
/* On machines where zero (or some other value in the range
of 0 through map_entries-1), BadAlloc may be generated
when an AllocAll overlay colormap is allocated since the
transparent pixel precludes all the cells in the colormap
being allocated (the transparent pixel is pre-allocated).
So in this case, use XAllocColorCells to allocate
map_entries-1 pixels (that is, all but the transparent
pixel. */
#if defined(_WIN32) || defined(__OS2__)
cmap->cmap = XCreateColormap(__glutDisplay,
__glutRoot, 0, AllocNone);
#else
cmap->cmap = XCreateColormap(__glutDisplay,
__glutRoot, vis->visual, AllocNone);
XAllocColorCells(__glutDisplay, cmap->cmap, False, 0, 0,
pixels, cmap->size - 1);
#endif
}
cmap->next = __glutColormapList;
__glutColormapList = cmap;
return cmap;
}
static GLUTcolormap *
associateColormap(XVisualInfo * vis)
{
#if !defined(_WIN32) && !defined(__OS2__)
GLUTcolormap *cmap = __glutColormapList;
while (cmap != NULL) {
/* Play safe: compare visual IDs, not Visual*'s. */
if (cmap->visual->visualid == vis->visual->visualid) {
/* Already have created colormap for the visual. */
cmap->refcnt++;
return cmap;
}
cmap = cmap->next;
}
#endif
return __glutAssociateNewColormap(vis);
}
void
__glutSetupColormap(XVisualInfo * vi, GLUTcolormap ** colormap, Colormap * cmap)
{
#if defined(_WIN32) || defined(__OS2__)
if (vi->dwFlags & PFD_NEED_PALETTE || vi->iPixelType == PFD_TYPE_COLORINDEX) {
*colormap = associateColormap(vi);
*cmap = (*colormap)->cmap;
} else {
*colormap = NULL;
*cmap = 0;
}
#else
Status status;
XStandardColormap *standardCmaps;
int i, numCmaps;
static Atom hpColorRecoveryAtom = -1;
int isRGB, visualClass, rc;
#if defined(__cplusplus) || defined(c_plusplus)
visualClass = vi->c_class;
#else
visualClass = vi->class;
#endif
switch (visualClass) {
case PseudoColor:
/* Mesa might return a PseudoColor visual for RGB mode. */
rc = glXGetConfig(__glutDisplay, vi, GLX_RGBA, &isRGB);
if (rc == 0 && isRGB) {
/* Must be Mesa. */
*colormap = NULL;
if (MaxCmapsOfScreen(DefaultScreenOfDisplay(__glutDisplay)) == 1
&& vi->visual == DefaultVisual(__glutDisplay, __glutScreen)) {
char *privateCmap = getenv("MESA_PRIVATE_CMAP");
if (privateCmap) {
/* User doesn't want to share colormaps. */
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
} else {
/* Share the root colormap. */
*cmap = DefaultColormap(__glutDisplay, __glutScreen);
}
} else {
/* Get our own PseudoColor colormap. */
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
}
} else {
/* CI mode, real GLX never returns a PseudoColor visual
for RGB mode. */
*colormap = associateColormap(vi);
*cmap = (*colormap)->cmap;
}
break;
case TrueColor:
case DirectColor:
*colormap = NULL; /* NULL if RGBA */
/* Hewlett-Packard supports a feature called "HP Color
Recovery". Mesa has code to use HP Color Recovery. For
Mesa to use this feature, the atom
_HP_RGB_SMOOTH_MAP_LIST must be defined on the root
window AND the colormap obtainable by XGetRGBColormaps
for that atom must be set on the window. If that
colormap is not set, the output will look stripy. */
if (hpColorRecoveryAtom == -1) {
char *xvendor;
#define VENDOR_HP "Hewlett-Packard"
/* Only makes sense to make XInternAtom round-trip if we
know that we are connected to an HP X server. */
xvendor = ServerVendor(__glutDisplay);
if (!strncmp(xvendor, VENDOR_HP, sizeof(VENDOR_HP) - 1)) {
hpColorRecoveryAtom = XInternAtom(__glutDisplay, "_HP_RGB_SMOOTH_MAP_LIST", True);
} else {
hpColorRecoveryAtom = None;
}
}
if (hpColorRecoveryAtom != None) {
status = XGetRGBColormaps(__glutDisplay, __glutRoot,
&standardCmaps, &numCmaps, hpColorRecoveryAtom);
if (status == 1) {
for (i = 0; i < numCmaps; i++) {
if (standardCmaps[i].visualid == vi->visualid) {
*cmap = standardCmaps[i].colormap;
XFree(standardCmaps);
return;
}
}
XFree(standardCmaps);
}
}
#ifndef SOLARIS_2_4_BUG
/* Solaris 2.4 and 2.5 have a bug in their
XmuLookupStandardColormap implementations. Please
compile your Solaris 2.4 or 2.5 version of GLUT with
-DSOLARIS_2_4_BUG to work around this bug. The symptom
of the bug is that programs will get a BadMatch error
from X_CreateWindow when creating a GLUT window because
Solaris 2.4 and 2.5 create a corrupted RGB_DEFAULT_MAP
property. Note that this workaround prevents Colormap
sharing between applications, perhaps leading
unnecessary colormap installations or colormap flashing.
Sun fixed this bug in Solaris 2.6. */
status = XmuLookupStandardColormap(__glutDisplay,
vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP,
/* replace */ False, /* retain */ True);
if (status == 1) {
status = XGetRGBColormaps(__glutDisplay, __glutRoot,
&standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP);
if (status == 1) {
for (i = 0; i < numCmaps; i++) {
if (standardCmaps[i].visualid == vi->visualid) {
*cmap = standardCmaps[i].colormap;
XFree(standardCmaps);
return;
}
}
XFree(standardCmaps);
}
}
#endif
/* If no standard colormap but TrueColor, just make a
private one. */
/* XXX Should do a better job of internal sharing for
privately allocated TrueColor colormaps. */
/* XXX DirectColor probably needs ramps hand initialized! */
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
break;
case StaticColor:
case StaticGray:
case GrayScale:
/* Mesa supports these visuals */
*colormap = NULL;
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
break;
default:
__glutFatalError(
"could not allocate colormap for visual type: %d.",
visualClass);
}
return;
#endif
}
#if !defined(_WIN32) && !defined(__OS2__)
static int
findColormaps(GLUTwindow * window,
Window * winlist, Colormap * cmaplist, int num, int max)
{
GLUTwindow *child;
int i;
/* Do not allow more entries that maximum number of
colormaps! */
if (num >= max)
return num;
/* Is cmap for this window already on the list? */
for (i = 0; i < num; i++) {
if (cmaplist[i] == window->cmap)
goto normalColormapAlreadyListed;
}
/* Not found on the list; add colormap and window. */
winlist[num] = window->win;
cmaplist[num] = window->cmap;
num++;
normalColormapAlreadyListed:
/* Repeat above but for the overlay colormap if there one. */
if (window->overlay) {
if (num >= max)
return num;
for (i = 0; i < num; i++) {
if (cmaplist[i] == window->overlay->cmap)
goto overlayColormapAlreadyListed;
}
winlist[num] = window->overlay->win;
cmaplist[num] = window->overlay->cmap;
num++;
}
overlayColormapAlreadyListed:
/* Recursively search children. */
child = window->children;
while (child) {
num = findColormaps(child, winlist, cmaplist, num, max);
child = child->siblings;
}
return num;
}
void
__glutEstablishColormapsProperty(GLUTwindow * window)
{
/* this routine is strictly X. Win32 doesn't need to do
anything of this sort (but has to do other wacky stuff
later). */
static Atom wmColormapWindows = None;
Window *winlist;
Colormap *cmaplist;
Status status;
int maxcmaps, num;
assert(!window->parent);
maxcmaps = MaxCmapsOfScreen(ScreenOfDisplay(__glutDisplay,
__glutScreen));
/* For portability reasons we don't use alloca for winlist
and cmaplist, but we could. */
winlist = (Window *) malloc(maxcmaps * sizeof(Window));
cmaplist = (Colormap *) malloc(maxcmaps * sizeof(Colormap));
num = findColormaps(window, winlist, cmaplist, 0, maxcmaps);
if (num < 2) {
/* Property no longer needed; remove it. */
wmColormapWindows = XSGIFastInternAtom(__glutDisplay,
"WM_COLORMAP_WINDOWS", SGI_XA_WM_COLORMAP_WINDOWS, False);
if (wmColormapWindows == None) {
__glutWarning("Could not intern X atom for WM_COLORMAP_WINDOWS.");
return;
}
XDeleteProperty(__glutDisplay, window->win, wmColormapWindows);
} else {
status = XSetWMColormapWindows(__glutDisplay, window->win,
winlist, num);
/* XSetWMColormapWindows should always work unless the
WM_COLORMAP_WINDOWS property cannot be intern'ed. We
check to be safe. */
if (status == False)
__glutFatalError("XSetWMColormapWindows returned False.");
}
/* For portability reasons we don't use alloca for winlist
and cmaplist, but we could. */
free(winlist);
free(cmaplist);
}
GLUTwindow *
__glutToplevelOf(GLUTwindow * window)
{
while (window->parent) {
window = window->parent;
}
return window;
}
#endif
void
__glutFreeColormap(GLUTcolormap * cmap)
{
GLUTcolormap *cur, **prev;
cmap->refcnt--;
if (cmap->refcnt == 0) {
/* remove from colormap list */
cur = __glutColormapList;
prev = &__glutColormapList;
while (cur) {
if (cur == cmap) {
*prev = cmap->next;
break;
}
prev = &(cur->next);
cur = cur->next;
}
/* actually free colormap */
XFreeColormap(__glutDisplay, cmap->cmap);
free(cmap->cells);
free(cmap);
}
}
/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#ifdef __VMS
//EK#include <GL/vms_x_fix.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h> /* SunOS multithreaded assert() needs <stdio.h>. Lame. */
#include <assert.h>
#if !defined(_WIN32) && !defined(__OS2__)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h> /* for XA_RGB_DEFAULT_MAP atom */
#if defined(__vms)
#include <Xmu/StdCmap.h> /* for XmuLookupStandardColormap */
#else
#include <X11/Xmu/StdCmap.h> /* for XmuLookupStandardColormap */
#endif
#endif
/* SGI optimization introduced in IRIX 6.3 to avoid X server
round trips for interning common X atoms. */
#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
#include <X11/SGIFastAtom.h>
#else
#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
#endif
#include "glutint.h"
#include "layerutil.h"
GLUTcolormap *__glutColormapList = NULL;
GLUTcolormap *
__glutAssociateNewColormap(XVisualInfo * vis)
{
GLUTcolormap *cmap;
int transparentPixel, i;
unsigned long pixels[255];
cmap = (GLUTcolormap *) malloc(sizeof(GLUTcolormap));
if (!cmap)
__glutFatalError("out of memory.");
#if defined(_WIN32) || defined(__OS2__)
pixels[0] = 0; /* avoid compilation warnings on win32 */
cmap->visual = 0;
cmap->size = 256; /* always assume 256 on Win32 */
#else
cmap->visual = vis->visual;
cmap->size = vis->visual->map_entries;
#endif
cmap->refcnt = 1;
cmap->cells = (GLUTcolorcell *)
malloc(sizeof(GLUTcolorcell) * cmap->size);
if (!cmap->cells)
__glutFatalError("out of memory.");
/* make all color cell entries be invalid */
for (i = cmap->size - 1; i >= 0; i--) {
cmap->cells[i].component[GLUT_RED] = -1.0;
cmap->cells[i].component[GLUT_GREEN] = -1.0;
cmap->cells[i].component[GLUT_BLUE] = -1.0;
}
transparentPixel = __glutGetTransparentPixel(__glutDisplay, vis);
if (transparentPixel == -1 || transparentPixel >= cmap->size) {
/* If there is no transparent pixel or if the transparent
pixel is outside the range of valid colormap cells (HP
can implement their overlays this smart way since their
transparent pixel is 255), we can AllocAll the colormap.
See note below. */
cmap->cmap = XCreateColormap(__glutDisplay,
__glutRoot, cmap->visual, AllocAll);
} else {
/* On machines where zero (or some other value in the range
of 0 through map_entries-1), BadAlloc may be generated
when an AllocAll overlay colormap is allocated since the
transparent pixel precludes all the cells in the colormap
being allocated (the transparent pixel is pre-allocated).
So in this case, use XAllocColorCells to allocate
map_entries-1 pixels (that is, all but the transparent
pixel. */
#if defined(_WIN32) || defined(__OS2__)
cmap->cmap = XCreateColormap(__glutDisplay,
__glutRoot, 0, AllocNone);
#else
cmap->cmap = XCreateColormap(__glutDisplay,
__glutRoot, vis->visual, AllocNone);
XAllocColorCells(__glutDisplay, cmap->cmap, False, 0, 0,
pixels, cmap->size - 1);
#endif
}
cmap->next = __glutColormapList;
__glutColormapList = cmap;
return cmap;
}
static GLUTcolormap *
associateColormap(XVisualInfo * vis)
{
#if !defined(_WIN32) && !defined(__OS2__)
GLUTcolormap *cmap = __glutColormapList;
while (cmap != NULL) {
/* Play safe: compare visual IDs, not Visual*'s. */
if (cmap->visual->visualid == vis->visual->visualid) {
/* Already have created colormap for the visual. */
cmap->refcnt++;
return cmap;
}
cmap = cmap->next;
}
#endif
return __glutAssociateNewColormap(vis);
}
void
__glutSetupColormap(XVisualInfo * vi, GLUTcolormap ** colormap, Colormap * cmap)
{
#if defined(_WIN32) || defined(__OS2__)
if (vi->dwFlags & PFD_NEED_PALETTE || vi->iPixelType == PFD_TYPE_COLORINDEX) {
*colormap = associateColormap(vi);
*cmap = (*colormap)->cmap;
} else {
*colormap = NULL;
*cmap = 0;
}
#else
Status status;
XStandardColormap *standardCmaps;
int i, numCmaps;
static Atom hpColorRecoveryAtom = -1;
int isRGB, visualClass, rc;
#if defined(__cplusplus) || defined(c_plusplus)
visualClass = vi->c_class;
#else
visualClass = vi->class;
#endif
switch (visualClass) {
case PseudoColor:
/* Mesa might return a PseudoColor visual for RGB mode. */
rc = glXGetConfig(__glutDisplay, vi, GLX_RGBA, &isRGB);
if (rc == 0 && isRGB) {
/* Must be Mesa. */
*colormap = NULL;
if (MaxCmapsOfScreen(DefaultScreenOfDisplay(__glutDisplay)) == 1
&& vi->visual == DefaultVisual(__glutDisplay, __glutScreen)) {
char *privateCmap = getenv("MESA_PRIVATE_CMAP");
if (privateCmap) {
/* User doesn't want to share colormaps. */
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
} else {
/* Share the root colormap. */
*cmap = DefaultColormap(__glutDisplay, __glutScreen);
}
} else {
/* Get our own PseudoColor colormap. */
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
}
} else {
/* CI mode, real GLX never returns a PseudoColor visual
for RGB mode. */
*colormap = associateColormap(vi);
*cmap = (*colormap)->cmap;
}
break;
case TrueColor:
case DirectColor:
*colormap = NULL; /* NULL if RGBA */
/* Hewlett-Packard supports a feature called "HP Color
Recovery". Mesa has code to use HP Color Recovery. For
Mesa to use this feature, the atom
_HP_RGB_SMOOTH_MAP_LIST must be defined on the root
window AND the colormap obtainable by XGetRGBColormaps
for that atom must be set on the window. If that
colormap is not set, the output will look stripy. */
if (hpColorRecoveryAtom == -1) {
char *xvendor;
#define VENDOR_HP "Hewlett-Packard"
/* Only makes sense to make XInternAtom round-trip if we
know that we are connected to an HP X server. */
xvendor = ServerVendor(__glutDisplay);
if (!strncmp(xvendor, VENDOR_HP, sizeof(VENDOR_HP) - 1)) {
hpColorRecoveryAtom = XInternAtom(__glutDisplay, "_HP_RGB_SMOOTH_MAP_LIST", True);
} else {
hpColorRecoveryAtom = None;
}
}
if (hpColorRecoveryAtom != None) {
status = XGetRGBColormaps(__glutDisplay, __glutRoot,
&standardCmaps, &numCmaps, hpColorRecoveryAtom);
if (status == 1) {
for (i = 0; i < numCmaps; i++) {
if (standardCmaps[i].visualid == vi->visualid) {
*cmap = standardCmaps[i].colormap;
XFree(standardCmaps);
return;
}
}
XFree(standardCmaps);
}
}
#ifndef SOLARIS_2_4_BUG
/* Solaris 2.4 and 2.5 have a bug in their
XmuLookupStandardColormap implementations. Please
compile your Solaris 2.4 or 2.5 version of GLUT with
-DSOLARIS_2_4_BUG to work around this bug. The symptom
of the bug is that programs will get a BadMatch error
from X_CreateWindow when creating a GLUT window because
Solaris 2.4 and 2.5 create a corrupted RGB_DEFAULT_MAP
property. Note that this workaround prevents Colormap
sharing between applications, perhaps leading
unnecessary colormap installations or colormap flashing.
Sun fixed this bug in Solaris 2.6. */
status = XmuLookupStandardColormap(__glutDisplay,
vi->screen, vi->visualid, vi->depth, XA_RGB_DEFAULT_MAP,
/* replace */ False, /* retain */ True);
if (status == 1) {
status = XGetRGBColormaps(__glutDisplay, __glutRoot,
&standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP);
if (status == 1) {
for (i = 0; i < numCmaps; i++) {
if (standardCmaps[i].visualid == vi->visualid) {
*cmap = standardCmaps[i].colormap;
XFree(standardCmaps);
return;
}
}
XFree(standardCmaps);
}
}
#endif
/* If no standard colormap but TrueColor, just make a
private one. */
/* XXX Should do a better job of internal sharing for
privately allocated TrueColor colormaps. */
/* XXX DirectColor probably needs ramps hand initialized! */
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
break;
case StaticColor:
case StaticGray:
case GrayScale:
/* Mesa supports these visuals */
*colormap = NULL;
*cmap = XCreateColormap(__glutDisplay, __glutRoot,
vi->visual, AllocNone);
break;
default:
__glutFatalError(
"could not allocate colormap for visual type: %d.",
visualClass);
}
return;
#endif
}
#if !defined(_WIN32) && !defined(__OS2__)
static int
findColormaps(GLUTwindow * window,
Window * winlist, Colormap * cmaplist, int num, int max)
{
GLUTwindow *child;
int i;
/* Do not allow more entries that maximum number of
colormaps! */
if (num >= max)
return num;
/* Is cmap for this window already on the list? */
for (i = 0; i < num; i++) {
if (cmaplist[i] == window->cmap)
goto normalColormapAlreadyListed;
}
/* Not found on the list; add colormap and window. */
winlist[num] = window->win;
cmaplist[num] = window->cmap;
num++;
normalColormapAlreadyListed:
/* Repeat above but for the overlay colormap if there one. */
if (window->overlay) {
if (num >= max)
return num;
for (i = 0; i < num; i++) {
if (cmaplist[i] == window->overlay->cmap)
goto overlayColormapAlreadyListed;
}
winlist[num] = window->overlay->win;
cmaplist[num] = window->overlay->cmap;
num++;
}
overlayColormapAlreadyListed:
/* Recursively search children. */
child = window->children;
while (child) {
num = findColormaps(child, winlist, cmaplist, num, max);
child = child->siblings;
}
return num;
}
void
__glutEstablishColormapsProperty(GLUTwindow * window)
{
/* this routine is strictly X. Win32 doesn't need to do
anything of this sort (but has to do other wacky stuff
later). */
static Atom wmColormapWindows = None;
Window *winlist;
Colormap *cmaplist;
Status status;
int maxcmaps, num;
assert(!window->parent);
maxcmaps = MaxCmapsOfScreen(ScreenOfDisplay(__glutDisplay,
__glutScreen));
/* For portability reasons we don't use alloca for winlist
and cmaplist, but we could. */
winlist = (Window *) malloc(maxcmaps * sizeof(Window));
cmaplist = (Colormap *) malloc(maxcmaps * sizeof(Colormap));
num = findColormaps(window, winlist, cmaplist, 0, maxcmaps);
if (num < 2) {
/* Property no longer needed; remove it. */
wmColormapWindows = XSGIFastInternAtom(__glutDisplay,
"WM_COLORMAP_WINDOWS", SGI_XA_WM_COLORMAP_WINDOWS, False);
if (wmColormapWindows == None) {
__glutWarning("Could not intern X atom for WM_COLORMAP_WINDOWS.");
return;
}
XDeleteProperty(__glutDisplay, window->win, wmColormapWindows);
} else {
status = XSetWMColormapWindows(__glutDisplay, window->win,
winlist, num);
/* XSetWMColormapWindows should always work unless the
WM_COLORMAP_WINDOWS property cannot be intern'ed. We
check to be safe. */
if (status == False)
__glutFatalError("XSetWMColormapWindows returned False.");
}
/* For portability reasons we don't use alloca for winlist
and cmaplist, but we could. */
free(winlist);
free(cmaplist);
}
GLUTwindow *
__glutToplevelOf(GLUTwindow * window)
{
while (window->parent) {
window = window->parent;
}
return window;
}
#endif
void
__glutFreeColormap(GLUTcolormap * cmap)
{
GLUTcolormap *cur, **prev;
cmap->refcnt--;
if (cmap->refcnt == 0) {
/* remove from colormap list */
cur = __glutColormapList;
prev = &__glutColormapList;
while (cur) {
if (cur == cmap) {
*prev = cmap->next;
break;
}
prev = &(cur->next);
cur = cur->next;
}
/* actually free colormap */
XFreeColormap(__glutDisplay, cmap->cmap);
free(cmap->cells);
free(cmap);
}
}

View File

@ -1,210 +1,210 @@
/* Copyright (c) Mark J. Kilgard, 1995, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
#if !defined(_WIN32) && !defined(__OS2PM__)
#include <X11/Xatom.h> /* For XA_CURSOR */
#include <X11/cursorfont.h>
#endif
typedef struct _CursorTable {
#if defined(_WIN32)
char* glyph;
#else
int glyph;
#endif
Cursor cursor;
} CursorTable;
/* *INDENT-OFF* */
static CursorTable cursorTable[] = {
{XC_arrow, None}, /* GLUT_CURSOR_RIGHT_ARROW */
{XC_top_left_arrow, None}, /* GLUT_CURSOR_LEFT_ARROW */
{XC_hand1, None}, /* GLUT_CURSOR_INFO */
{XC_pirate, None}, /* GLUT_CURSOR_DESTROY */
{XC_question_arrow, None}, /* GLUT_CURSOR_HELP */
{XC_exchange, None}, /* GLUT_CURSOR_CYCLE */
{XC_spraycan, None}, /* GLUT_CURSOR_SPRAY */
{XC_watch, None}, /* GLUT_CURSOR_WAIT */
{XC_xterm, None}, /* GLUT_CURSOR_TEXT */
{XC_crosshair, None}, /* GLUT_CURSOR_CROSSHAIR */
{XC_sb_v_double_arrow, None}, /* GLUT_CURSOR_UP_DOWN */
{XC_sb_h_double_arrow, None}, /* GLUT_CURSOR_LEFT_RIGHT */
{XC_top_side, None}, /* GLUT_CURSOR_TOP_SIDE */
{XC_bottom_side, None}, /* GLUT_CURSOR_BOTTOM_SIDE */
{XC_left_side, None}, /* GLUT_CURSOR_LEFT_SIDE */
{XC_right_side, None}, /* GLUT_CURSOR_RIGHT_SIDE */
{XC_top_left_corner, None}, /* GLUT_CURSOR_TOP_LEFT_CORNER */
{XC_top_right_corner, None}, /* GLUT_CURSOR_TOP_RIGHT_CORNER */
{XC_bottom_right_corner, None}, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */
{XC_bottom_left_corner, None}, /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */
};
/* *INDENT-ON* */
#if !defined(_WIN32) && !defined(__OS2PM__)
static Cursor blankCursor = None;
static Cursor fullCrosshairCusor = None;
/* SGI X server's support a special property called the
_SGI_CROSSHAIR_CURSOR that when installed as a window's
cursor, becomes a full screen crosshair cursor. SGI
has special cursor generation hardware for this case. */
static Cursor
getFullCrosshairCursor(void)
{
Cursor cursor;
Atom crosshairAtom, actualType;
int rc, actualFormat;
unsigned long n, left;
unsigned long *value;
if (fullCrosshairCusor == None) {
crosshairAtom = XInternAtom(__glutDisplay,
"_SGI_CROSSHAIR_CURSOR", True);
if (crosshairAtom != None) {
value = 0; /* Make compiler happy. */
rc = XGetWindowProperty(__glutDisplay, __glutRoot,
crosshairAtom, 0, 1, False, XA_CURSOR, &actualType,
&actualFormat, &n, &left, (unsigned char **) &value);
if (rc == Success && actualFormat == 32 && n >= 1) {
cursor = value[0];
XFree(value);
return cursor;
}
}
}
return XCreateFontCursor(__glutDisplay, XC_crosshair);
}
/* X11 forces you to create a blank cursor if you want
to disable the cursor. */
static Cursor
makeBlankCursor(void)
{
static char data[1] =
{0};
Cursor cursor;
Pixmap blank;
XColor dummy;
blank = XCreateBitmapFromData(__glutDisplay, __glutRoot,
data, 1, 1);
if (blank == None)
__glutFatalError("out of memory.");
cursor = XCreatePixmapCursor(__glutDisplay, blank, blank,
&dummy, &dummy, 0, 0);
XFreePixmap(__glutDisplay, blank);
return cursor;
}
#endif /* !_WIN32 && !__OS2PM__*/
/* Win32 and X11 use this same function to accomplish
fairly different tasks. X11 lets you just define the
cursor for a window and the window system takes care
of making sure that the window's cursor is installed
when the mouse is in the window. Win32 requires the
application to handle a WM_SETCURSOR message to install
the right cursor when windows are entered. Think of
the Win32 __glutSetCursor (called from __glutWindowProc)
as "install cursor". Think of the X11 __glutSetCursor
(called from glutSetCursor) as "define cursor". */
void
__glutSetCursor(GLUTwindow *window)
{
int cursor = window->cursor;
Cursor xcursor = 0;
if (cursor >= 0 &&
cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) {
if (cursorTable[cursor].cursor == None) {
cursorTable[cursor].cursor = XCreateFontCursor(__glutDisplay,
cursorTable[cursor].glyph);
}
xcursor = cursorTable[cursor].cursor;
} else {
/* Special cases. */
switch (cursor) {
case GLUT_CURSOR_INHERIT:
#if defined(_WIN32)
while (window->parent) {
window = window->parent;
if (window->cursor != GLUT_CURSOR_INHERIT) {
__glutSetCursor(window);
return;
}
}
/* XXX Default to an arrow cursor. Is this
right or should we be letting the default
window proc be installing some system cursor? */
xcursor = cursorTable[0].cursor;
if (xcursor == NULL) {
xcursor =
cursorTable[0].cursor =
LoadCursor(NULL, cursorTable[0].glyph);
}
#elif defined(__OS2PM__)
//todo
xcursor = None;
#else
xcursor = None;
#endif
break;
case GLUT_CURSOR_NONE:
#if defined(_WIN32) || defined(__OS2PM__)
xcursor = NULL;
#else
if (blankCursor == None) {
blankCursor = makeBlankCursor();
}
xcursor = blankCursor;
#endif
break;
case GLUT_CURSOR_FULL_CROSSHAIR:
#if defined(_WIN32)
xcursor = (HICON) IDC_CROSS;
#elif defined(__OS2PM__)
//todo
#else
if (fullCrosshairCusor == None) {
fullCrosshairCusor = getFullCrosshairCursor();
}
xcursor = fullCrosshairCusor;
#endif
break;
}
}
XDefineCursor(__glutDisplay,
window->win, xcursor);
XFlush(__glutDisplay);
}
/* CENTRY */
void GLUTAPIENTRY
glutSetCursor(int cursor)
{
#ifdef _WIN32
POINT point;
__glutCurrentWindow->cursor = cursor;
/* Are we in the window right now? If so,
install the cursor. */
GetCursorPos(&point);
if (__glutCurrentWindow->win == WindowFromPoint(point)) {
__glutSetCursor(__glutCurrentWindow);
}
#elif defined(__OS2PM__)
//todo
#else
__glutCurrentWindow->cursor = cursor;
__glutSetCursor(__glutCurrentWindow);
#endif
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1995, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
#if !defined(_WIN32) && !defined(__OS2PM__)
#include <X11/Xatom.h> /* For XA_CURSOR */
#include <X11/cursorfont.h>
#endif
typedef struct _CursorTable {
#if defined(_WIN32)
char* glyph;
#else
int glyph;
#endif
Cursor cursor;
} CursorTable;
/* *INDENT-OFF* */
static CursorTable cursorTable[] = {
{XC_arrow, None}, /* GLUT_CURSOR_RIGHT_ARROW */
{XC_top_left_arrow, None}, /* GLUT_CURSOR_LEFT_ARROW */
{XC_hand1, None}, /* GLUT_CURSOR_INFO */
{XC_pirate, None}, /* GLUT_CURSOR_DESTROY */
{XC_question_arrow, None}, /* GLUT_CURSOR_HELP */
{XC_exchange, None}, /* GLUT_CURSOR_CYCLE */
{XC_spraycan, None}, /* GLUT_CURSOR_SPRAY */
{XC_watch, None}, /* GLUT_CURSOR_WAIT */
{XC_xterm, None}, /* GLUT_CURSOR_TEXT */
{XC_crosshair, None}, /* GLUT_CURSOR_CROSSHAIR */
{XC_sb_v_double_arrow, None}, /* GLUT_CURSOR_UP_DOWN */
{XC_sb_h_double_arrow, None}, /* GLUT_CURSOR_LEFT_RIGHT */
{XC_top_side, None}, /* GLUT_CURSOR_TOP_SIDE */
{XC_bottom_side, None}, /* GLUT_CURSOR_BOTTOM_SIDE */
{XC_left_side, None}, /* GLUT_CURSOR_LEFT_SIDE */
{XC_right_side, None}, /* GLUT_CURSOR_RIGHT_SIDE */
{XC_top_left_corner, None}, /* GLUT_CURSOR_TOP_LEFT_CORNER */
{XC_top_right_corner, None}, /* GLUT_CURSOR_TOP_RIGHT_CORNER */
{XC_bottom_right_corner, None}, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */
{XC_bottom_left_corner, None}, /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */
};
/* *INDENT-ON* */
#if !defined(_WIN32) && !defined(__OS2PM__)
static Cursor blankCursor = None;
static Cursor fullCrosshairCusor = None;
/* SGI X server's support a special property called the
_SGI_CROSSHAIR_CURSOR that when installed as a window's
cursor, becomes a full screen crosshair cursor. SGI
has special cursor generation hardware for this case. */
static Cursor
getFullCrosshairCursor(void)
{
Cursor cursor;
Atom crosshairAtom, actualType;
int rc, actualFormat;
unsigned long n, left;
unsigned long *value;
if (fullCrosshairCusor == None) {
crosshairAtom = XInternAtom(__glutDisplay,
"_SGI_CROSSHAIR_CURSOR", True);
if (crosshairAtom != None) {
value = 0; /* Make compiler happy. */
rc = XGetWindowProperty(__glutDisplay, __glutRoot,
crosshairAtom, 0, 1, False, XA_CURSOR, &actualType,
&actualFormat, &n, &left, (unsigned char **) &value);
if (rc == Success && actualFormat == 32 && n >= 1) {
cursor = value[0];
XFree(value);
return cursor;
}
}
}
return XCreateFontCursor(__glutDisplay, XC_crosshair);
}
/* X11 forces you to create a blank cursor if you want
to disable the cursor. */
static Cursor
makeBlankCursor(void)
{
static char data[1] =
{0};
Cursor cursor;
Pixmap blank;
XColor dummy;
blank = XCreateBitmapFromData(__glutDisplay, __glutRoot,
data, 1, 1);
if (blank == None)
__glutFatalError("out of memory.");
cursor = XCreatePixmapCursor(__glutDisplay, blank, blank,
&dummy, &dummy, 0, 0);
XFreePixmap(__glutDisplay, blank);
return cursor;
}
#endif /* !_WIN32 && !__OS2PM__*/
/* Win32 and X11 use this same function to accomplish
fairly different tasks. X11 lets you just define the
cursor for a window and the window system takes care
of making sure that the window's cursor is installed
when the mouse is in the window. Win32 requires the
application to handle a WM_SETCURSOR message to install
the right cursor when windows are entered. Think of
the Win32 __glutSetCursor (called from __glutWindowProc)
as "install cursor". Think of the X11 __glutSetCursor
(called from glutSetCursor) as "define cursor". */
void
__glutSetCursor(GLUTwindow *window)
{
int cursor = window->cursor;
Cursor xcursor = 0;
if (cursor >= 0 &&
cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) {
if (cursorTable[cursor].cursor == None) {
cursorTable[cursor].cursor = XCreateFontCursor(__glutDisplay,
cursorTable[cursor].glyph);
}
xcursor = cursorTable[cursor].cursor;
} else {
/* Special cases. */
switch (cursor) {
case GLUT_CURSOR_INHERIT:
#if defined(_WIN32)
while (window->parent) {
window = window->parent;
if (window->cursor != GLUT_CURSOR_INHERIT) {
__glutSetCursor(window);
return;
}
}
/* XXX Default to an arrow cursor. Is this
right or should we be letting the default
window proc be installing some system cursor? */
xcursor = cursorTable[0].cursor;
if (xcursor == NULL) {
xcursor =
cursorTable[0].cursor =
LoadCursor(NULL, cursorTable[0].glyph);
}
#elif defined(__OS2PM__)
//todo
xcursor = None;
#else
xcursor = None;
#endif
break;
case GLUT_CURSOR_NONE:
#if defined(_WIN32) || defined(__OS2PM__)
xcursor = NULL;
#else
if (blankCursor == None) {
blankCursor = makeBlankCursor();
}
xcursor = blankCursor;
#endif
break;
case GLUT_CURSOR_FULL_CROSSHAIR:
#if defined(_WIN32)
xcursor = (HICON) IDC_CROSS;
#elif defined(__OS2PM__)
//todo
#else
if (fullCrosshairCusor == None) {
fullCrosshairCusor = getFullCrosshairCursor();
}
xcursor = fullCrosshairCusor;
#endif
break;
}
}
XDefineCursor(__glutDisplay,
window->win, xcursor);
XFlush(__glutDisplay);
}
/* CENTRY */
void GLUTAPIENTRY
glutSetCursor(int cursor)
{
#ifdef _WIN32
POINT point;
__glutCurrentWindow->cursor = cursor;
/* Are we in the window right now? If so,
install the cursor. */
GetCursorPos(&point);
if (__glutCurrentWindow->win == WindowFromPoint(point)) {
__glutSetCursor(__glutCurrentWindow);
}
#elif defined(__OS2PM__)
//todo
#else
__glutCurrentWindow->cursor = cursor;
__glutSetCursor(__glutCurrentWindow);
#endif
}
/* ENDCENTRY */

File diff suppressed because it is too large Load Diff

View File

@ -1,204 +1,204 @@
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <string.h>
#include "glutint.h"
/* CENTRY */
int GLUTAPIENTRY
glutExtensionSupported(const char *extension)
{
static const GLubyte *extensions = NULL;
const GLubyte *start;
GLubyte *where, *terminator;
/* Extension names should not have spaces. */
where = (GLubyte *) strchr(extension, ' ');
if (where || *extension == '\0')
return 0;
if (!extensions) {
extensions = glGetString(GL_EXTENSIONS);
}
/* It takes a bit of care to be fool-proof about parsing the
OpenGL extensions string. Don't be fooled by sub-strings,
etc. */
start = extensions;
for (;;) {
/* If your application crashes in the strstr routine below,
you are probably calling glutExtensionSupported without
having a current window. Calling glGetString without
a current OpenGL context has unpredictable results.
Please fix your program. */
where = (GLubyte *) strstr((const char *) start, extension);
if (!where)
break;
terminator = where + strlen(extension);
if (where == start || *(where - 1) == ' ') {
if (*terminator == ' ' || *terminator == '\0') {
return 1;
}
}
start = terminator;
}
return 0;
}
struct name_address_pair {
const char *name;
const void *address;
};
static struct name_address_pair glut_functions[] = {
{ "glutInit", (const void *) glutInit },
{ "glutInitDisplayMode", (const void *) glutInitDisplayMode },
{ "glutInitDisplayString", (const void *) glutInitDisplayString },
{ "glutInitWindowPosition", (const void *) glutInitWindowPosition },
{ "glutInitWindowSize", (const void *) glutInitWindowSize },
{ "glutMainLoop", (const void *) glutMainLoop },
{ "glutCreateWindow", (const void *) glutCreateWindow },
{ "glutCreateSubWindow", (const void *) glutCreateSubWindow },
{ "glutDestroyWindow", (const void *) glutDestroyWindow },
{ "glutPostRedisplay", (const void *) glutPostRedisplay },
{ "glutPostWindowRedisplay", (const void *) glutPostWindowRedisplay },
{ "glutSwapBuffers", (const void *) glutSwapBuffers },
{ "glutGetWindow", (const void *) glutGetWindow },
{ "glutSetWindow", (const void *) glutSetWindow },
{ "glutSetWindowTitle", (const void *) glutSetWindowTitle },
{ "glutSetIconTitle", (const void *) glutSetIconTitle },
{ "glutPositionWindow", (const void *) glutPositionWindow },
{ "glutReshapeWindow", (const void *) glutReshapeWindow },
{ "glutPopWindow", (const void *) glutPopWindow },
{ "glutPushWindow", (const void *) glutPushWindow },
{ "glutIconifyWindow", (const void *) glutIconifyWindow },
{ "glutShowWindow", (const void *) glutShowWindow },
{ "glutHideWindow", (const void *) glutHideWindow },
{ "glutFullScreen", (const void *) glutFullScreen },
{ "glutSetCursor", (const void *) glutSetCursor },
{ "glutWarpPointer", (const void *) glutWarpPointer },
{ "glutEstablishOverlay", (const void *) glutEstablishOverlay },
{ "glutRemoveOverlay", (const void *) glutRemoveOverlay },
{ "glutUseLayer", (const void *) glutUseLayer },
{ "glutPostOverlayRedisplay", (const void *) glutPostOverlayRedisplay },
{ "glutPostWindowOverlayRedisplay", (const void *) glutPostWindowOverlayRedisplay },
{ "glutShowOverlay", (const void *) glutShowOverlay },
{ "glutHideOverlay", (const void *) glutHideOverlay },
{ "glutCreateMenu", (const void *) glutCreateMenu },
{ "glutDestroyMenu", (const void *) glutDestroyMenu },
{ "glutGetMenu", (const void *) glutGetMenu },
{ "glutSetMenu", (const void *) glutSetMenu },
{ "glutAddMenuEntry", (const void *) glutAddMenuEntry },
{ "glutAddSubMenu", (const void *) glutAddSubMenu },
{ "glutChangeToMenuEntry", (const void *) glutChangeToMenuEntry },
{ "glutChangeToSubMenu", (const void *) glutChangeToSubMenu },
{ "glutRemoveMenuItem", (const void *) glutRemoveMenuItem },
{ "glutAttachMenu", (const void *) glutAttachMenu },
{ "glutDetachMenu", (const void *) glutDetachMenu },
{ "glutDisplayFunc", (const void *) glutDisplayFunc },
{ "glutReshapeFunc", (const void *) glutReshapeFunc },
{ "glutKeyboardFunc", (const void *) glutKeyboardFunc },
{ "glutMouseFunc", (const void *) glutMouseFunc },
{ "glutMotionFunc", (const void *) glutMotionFunc },
{ "glutPassiveMotionFunc", (const void *) glutPassiveMotionFunc },
{ "glutEntryFunc", (const void *) glutEntryFunc },
{ "glutVisibilityFunc", (const void *) glutVisibilityFunc },
{ "glutIdleFunc", (const void *) glutIdleFunc },
{ "glutTimerFunc", (const void *) glutTimerFunc },
{ "glutMenuStateFunc", (const void *) glutMenuStateFunc },
{ "glutSpecialFunc", (const void *) glutSpecialFunc },
{ "glutSpaceballMotionFunc", (const void *) glutSpaceballMotionFunc },
{ "glutSpaceballRotateFunc", (const void *) glutSpaceballRotateFunc },
{ "glutSpaceballButtonFunc", (const void *) glutSpaceballButtonFunc },
{ "glutButtonBoxFunc", (const void *) glutButtonBoxFunc },
{ "glutDialsFunc", (const void *) glutDialsFunc },
{ "glutTabletMotionFunc", (const void *) glutTabletMotionFunc },
{ "glutTabletButtonFunc", (const void *) glutTabletButtonFunc },
{ "glutMenuStatusFunc", (const void *) glutMenuStatusFunc },
{ "glutOverlayDisplayFunc", (const void *) glutOverlayDisplayFunc },
{ "glutWindowStatusFunc", (const void *) glutWindowStatusFunc },
{ "glutKeyboardUpFunc", (const void *) glutKeyboardUpFunc },
{ "glutSpecialUpFunc", (const void *) glutSpecialUpFunc },
{ "glutJoystickFunc", (const void *) glutJoystickFunc },
{ "glutSetColor", (const void *) glutSetColor },
{ "glutGetColor", (const void *) glutGetColor },
{ "glutCopyColormap", (const void *) glutCopyColormap },
{ "glutGet", (const void *) glutGet },
{ "glutDeviceGet", (const void *) glutDeviceGet },
{ "glutExtensionSupported", (const void *) glutExtensionSupported },
{ "glutGetModifiers", (const void *) glutGetModifiers },
{ "glutLayerGet", (const void *) glutLayerGet },
{ "glutGetProcAddress", (const void *) glutGetProcAddress },
{ "glutBitmapCharacter", (const void *) glutBitmapCharacter },
{ "glutBitmapWidth", (const void *) glutBitmapWidth },
{ "glutStrokeCharacter", (const void *) glutStrokeCharacter },
{ "glutStrokeWidth", (const void *) glutStrokeWidth },
{ "glutBitmapLength", (const void *) glutBitmapLength },
{ "glutStrokeLength", (const void *) glutStrokeLength },
{ "glutWireSphere", (const void *) glutWireSphere },
{ "glutSolidSphere", (const void *) glutSolidSphere },
{ "glutWireCone", (const void *) glutWireCone },
{ "glutSolidCone", (const void *) glutSolidCone },
{ "glutWireCube", (const void *) glutWireCube },
{ "glutSolidCube", (const void *) glutSolidCube },
{ "glutWireTorus", (const void *) glutWireTorus },
{ "glutSolidTorus", (const void *) glutSolidTorus },
{ "glutWireDodecahedron", (const void *) glutWireDodecahedron },
{ "glutSolidDodecahedron", (const void *) glutSolidDodecahedron },
{ "glutWireTeapot", (const void *) glutWireTeapot },
{ "glutSolidTeapot", (const void *) glutSolidTeapot },
{ "glutWireOctahedron", (const void *) glutWireOctahedron },
{ "glutSolidOctahedron", (const void *) glutSolidOctahedron },
{ "glutWireTetrahedron", (const void *) glutWireTetrahedron },
{ "glutSolidTetrahedron", (const void *) glutSolidTetrahedron },
{ "glutWireIcosahedron", (const void *) glutWireIcosahedron },
{ "glutSolidIcosahedron", (const void *) glutSolidIcosahedron },
{ "glutVideoResizeGet", (const void *) glutVideoResizeGet },
{ "glutSetupVideoResizing", (const void *) glutSetupVideoResizing },
{ "glutStopVideoResizing", (const void *) glutStopVideoResizing },
{ "glutVideoResize", (const void *) glutVideoResize },
{ "glutVideoPan", (const void *) glutVideoPan },
{ "glutReportErrors", (const void *) glutReportErrors },
{ "glutIgnoreKeyRepeat", (const void *) glutIgnoreKeyRepeat },
{ "glutSetKeyRepeat", (const void *) glutSetKeyRepeat },
{ "glutForceJoystickFunc", (const void *) glutForceJoystickFunc },
{ "glutGameModeString", (const void *) glutGameModeString },
{ "glutEnterGameMode", (const void *) glutEnterGameMode },
{ "glutLeaveGameMode", (const void *) glutLeaveGameMode },
{ "glutGameModeGet", (const void *) glutGameModeGet },
{ NULL, NULL }
};
/* XXX This isn't an official GLUT function, yet */
void * GLUTAPIENTRY
glutGetProcAddress(const char *procName)
{
/* Try GLUT functions first */
int i;
for (i = 0; glut_functions[i].name; i++) {
if (strcmp(glut_functions[i].name, procName) == 0)
return (void *) glut_functions[i].address;
}
/* Try core GL functions */
#if defined(_WIN32)
return (void *) wglGetProcAddress((LPCSTR) procName);
#elif defined(__OS2PM__)
return (void *) wglGetProcAddress((char *) procName);
#elif defined(GLX_ARB_get_proc_address)
return (void *) glXGetProcAddressARB((const GLubyte *) procName);
#else
return NULL;
#endif
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <string.h>
#include "glutint.h"
/* CENTRY */
int GLUTAPIENTRY
glutExtensionSupported(const char *extension)
{
static const GLubyte *extensions = NULL;
const GLubyte *start;
GLubyte *where, *terminator;
/* Extension names should not have spaces. */
where = (GLubyte *) strchr(extension, ' ');
if (where || *extension == '\0')
return 0;
if (!extensions) {
extensions = glGetString(GL_EXTENSIONS);
}
/* It takes a bit of care to be fool-proof about parsing the
OpenGL extensions string. Don't be fooled by sub-strings,
etc. */
start = extensions;
for (;;) {
/* If your application crashes in the strstr routine below,
you are probably calling glutExtensionSupported without
having a current window. Calling glGetString without
a current OpenGL context has unpredictable results.
Please fix your program. */
where = (GLubyte *) strstr((const char *) start, extension);
if (!where)
break;
terminator = where + strlen(extension);
if (where == start || *(where - 1) == ' ') {
if (*terminator == ' ' || *terminator == '\0') {
return 1;
}
}
start = terminator;
}
return 0;
}
struct name_address_pair {
const char *name;
const void *address;
};
static struct name_address_pair glut_functions[] = {
{ "glutInit", (const void *) glutInit },
{ "glutInitDisplayMode", (const void *) glutInitDisplayMode },
{ "glutInitDisplayString", (const void *) glutInitDisplayString },
{ "glutInitWindowPosition", (const void *) glutInitWindowPosition },
{ "glutInitWindowSize", (const void *) glutInitWindowSize },
{ "glutMainLoop", (const void *) glutMainLoop },
{ "glutCreateWindow", (const void *) glutCreateWindow },
{ "glutCreateSubWindow", (const void *) glutCreateSubWindow },
{ "glutDestroyWindow", (const void *) glutDestroyWindow },
{ "glutPostRedisplay", (const void *) glutPostRedisplay },
{ "glutPostWindowRedisplay", (const void *) glutPostWindowRedisplay },
{ "glutSwapBuffers", (const void *) glutSwapBuffers },
{ "glutGetWindow", (const void *) glutGetWindow },
{ "glutSetWindow", (const void *) glutSetWindow },
{ "glutSetWindowTitle", (const void *) glutSetWindowTitle },
{ "glutSetIconTitle", (const void *) glutSetIconTitle },
{ "glutPositionWindow", (const void *) glutPositionWindow },
{ "glutReshapeWindow", (const void *) glutReshapeWindow },
{ "glutPopWindow", (const void *) glutPopWindow },
{ "glutPushWindow", (const void *) glutPushWindow },
{ "glutIconifyWindow", (const void *) glutIconifyWindow },
{ "glutShowWindow", (const void *) glutShowWindow },
{ "glutHideWindow", (const void *) glutHideWindow },
{ "glutFullScreen", (const void *) glutFullScreen },
{ "glutSetCursor", (const void *) glutSetCursor },
{ "glutWarpPointer", (const void *) glutWarpPointer },
{ "glutEstablishOverlay", (const void *) glutEstablishOverlay },
{ "glutRemoveOverlay", (const void *) glutRemoveOverlay },
{ "glutUseLayer", (const void *) glutUseLayer },
{ "glutPostOverlayRedisplay", (const void *) glutPostOverlayRedisplay },
{ "glutPostWindowOverlayRedisplay", (const void *) glutPostWindowOverlayRedisplay },
{ "glutShowOverlay", (const void *) glutShowOverlay },
{ "glutHideOverlay", (const void *) glutHideOverlay },
{ "glutCreateMenu", (const void *) glutCreateMenu },
{ "glutDestroyMenu", (const void *) glutDestroyMenu },
{ "glutGetMenu", (const void *) glutGetMenu },
{ "glutSetMenu", (const void *) glutSetMenu },
{ "glutAddMenuEntry", (const void *) glutAddMenuEntry },
{ "glutAddSubMenu", (const void *) glutAddSubMenu },
{ "glutChangeToMenuEntry", (const void *) glutChangeToMenuEntry },
{ "glutChangeToSubMenu", (const void *) glutChangeToSubMenu },
{ "glutRemoveMenuItem", (const void *) glutRemoveMenuItem },
{ "glutAttachMenu", (const void *) glutAttachMenu },
{ "glutDetachMenu", (const void *) glutDetachMenu },
{ "glutDisplayFunc", (const void *) glutDisplayFunc },
{ "glutReshapeFunc", (const void *) glutReshapeFunc },
{ "glutKeyboardFunc", (const void *) glutKeyboardFunc },
{ "glutMouseFunc", (const void *) glutMouseFunc },
{ "glutMotionFunc", (const void *) glutMotionFunc },
{ "glutPassiveMotionFunc", (const void *) glutPassiveMotionFunc },
{ "glutEntryFunc", (const void *) glutEntryFunc },
{ "glutVisibilityFunc", (const void *) glutVisibilityFunc },
{ "glutIdleFunc", (const void *) glutIdleFunc },
{ "glutTimerFunc", (const void *) glutTimerFunc },
{ "glutMenuStateFunc", (const void *) glutMenuStateFunc },
{ "glutSpecialFunc", (const void *) glutSpecialFunc },
{ "glutSpaceballMotionFunc", (const void *) glutSpaceballMotionFunc },
{ "glutSpaceballRotateFunc", (const void *) glutSpaceballRotateFunc },
{ "glutSpaceballButtonFunc", (const void *) glutSpaceballButtonFunc },
{ "glutButtonBoxFunc", (const void *) glutButtonBoxFunc },
{ "glutDialsFunc", (const void *) glutDialsFunc },
{ "glutTabletMotionFunc", (const void *) glutTabletMotionFunc },
{ "glutTabletButtonFunc", (const void *) glutTabletButtonFunc },
{ "glutMenuStatusFunc", (const void *) glutMenuStatusFunc },
{ "glutOverlayDisplayFunc", (const void *) glutOverlayDisplayFunc },
{ "glutWindowStatusFunc", (const void *) glutWindowStatusFunc },
{ "glutKeyboardUpFunc", (const void *) glutKeyboardUpFunc },
{ "glutSpecialUpFunc", (const void *) glutSpecialUpFunc },
{ "glutJoystickFunc", (const void *) glutJoystickFunc },
{ "glutSetColor", (const void *) glutSetColor },
{ "glutGetColor", (const void *) glutGetColor },
{ "glutCopyColormap", (const void *) glutCopyColormap },
{ "glutGet", (const void *) glutGet },
{ "glutDeviceGet", (const void *) glutDeviceGet },
{ "glutExtensionSupported", (const void *) glutExtensionSupported },
{ "glutGetModifiers", (const void *) glutGetModifiers },
{ "glutLayerGet", (const void *) glutLayerGet },
{ "glutGetProcAddress", (const void *) glutGetProcAddress },
{ "glutBitmapCharacter", (const void *) glutBitmapCharacter },
{ "glutBitmapWidth", (const void *) glutBitmapWidth },
{ "glutStrokeCharacter", (const void *) glutStrokeCharacter },
{ "glutStrokeWidth", (const void *) glutStrokeWidth },
{ "glutBitmapLength", (const void *) glutBitmapLength },
{ "glutStrokeLength", (const void *) glutStrokeLength },
{ "glutWireSphere", (const void *) glutWireSphere },
{ "glutSolidSphere", (const void *) glutSolidSphere },
{ "glutWireCone", (const void *) glutWireCone },
{ "glutSolidCone", (const void *) glutSolidCone },
{ "glutWireCube", (const void *) glutWireCube },
{ "glutSolidCube", (const void *) glutSolidCube },
{ "glutWireTorus", (const void *) glutWireTorus },
{ "glutSolidTorus", (const void *) glutSolidTorus },
{ "glutWireDodecahedron", (const void *) glutWireDodecahedron },
{ "glutSolidDodecahedron", (const void *) glutSolidDodecahedron },
{ "glutWireTeapot", (const void *) glutWireTeapot },
{ "glutSolidTeapot", (const void *) glutSolidTeapot },
{ "glutWireOctahedron", (const void *) glutWireOctahedron },
{ "glutSolidOctahedron", (const void *) glutSolidOctahedron },
{ "glutWireTetrahedron", (const void *) glutWireTetrahedron },
{ "glutSolidTetrahedron", (const void *) glutSolidTetrahedron },
{ "glutWireIcosahedron", (const void *) glutWireIcosahedron },
{ "glutSolidIcosahedron", (const void *) glutSolidIcosahedron },
{ "glutVideoResizeGet", (const void *) glutVideoResizeGet },
{ "glutSetupVideoResizing", (const void *) glutSetupVideoResizing },
{ "glutStopVideoResizing", (const void *) glutStopVideoResizing },
{ "glutVideoResize", (const void *) glutVideoResize },
{ "glutVideoPan", (const void *) glutVideoPan },
{ "glutReportErrors", (const void *) glutReportErrors },
{ "glutIgnoreKeyRepeat", (const void *) glutIgnoreKeyRepeat },
{ "glutSetKeyRepeat", (const void *) glutSetKeyRepeat },
{ "glutForceJoystickFunc", (const void *) glutForceJoystickFunc },
{ "glutGameModeString", (const void *) glutGameModeString },
{ "glutEnterGameMode", (const void *) glutEnterGameMode },
{ "glutLeaveGameMode", (const void *) glutLeaveGameMode },
{ "glutGameModeGet", (const void *) glutGameModeGet },
{ NULL, NULL }
};
/* XXX This isn't an official GLUT function, yet */
void * GLUTAPIENTRY
glutGetProcAddress(const char *procName)
{
/* Try GLUT functions first */
int i;
for (i = 0; glut_functions[i].name; i++) {
if (strcmp(glut_functions[i].name, procName) == 0)
return (void *) glut_functions[i].address;
}
/* Try core GL functions */
#if defined(_WIN32)
return (void *) wglGetProcAddress((LPCSTR) procName);
#elif defined(__OS2PM__)
return (void *) wglGetProcAddress((char *) procName);
#elif defined(GLX_ARB_get_proc_address)
return (void *) glXGetProcAddressARB((const GLubyte *) procName);
#else
return NULL;
#endif
}
/* ENDCENTRY */

View File

@ -1,38 +1,38 @@
/* Copyright (c) Mark J. Kilgard, 1995, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <assert.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutFullScreen(void)
{
assert(!__glutCurrentWindow->parent);
IGNORE_IN_GAME_MODE();
#if !defined(_WIN32) && !defined(__OS2PM__)
if (__glutMotifHints == None) {
__glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS",
SGI_XA__MOTIF_WM_HINTS, 0);
if (__glutMotifHints == None) {
__glutWarning("Could not intern X atom for _MOTIF_WM_HINTS.");
}
}
#endif
__glutCurrentWindow->desiredX = 0;
__glutCurrentWindow->desiredY = 0;
__glutCurrentWindow->desiredWidth = __glutScreenWidth;
__glutCurrentWindow->desiredHeight = __glutScreenHeight;
__glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight;
__glutPutOnWorkList(__glutCurrentWindow,
GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK);
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1995, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <assert.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutFullScreen(void)
{
assert(!__glutCurrentWindow->parent);
IGNORE_IN_GAME_MODE();
#if !defined(_WIN32) && !defined(__OS2PM__)
if (__glutMotifHints == None) {
__glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS",
SGI_XA__MOTIF_WM_HINTS, 0);
if (__glutMotifHints == None) {
__glutWarning("Could not intern X atom for _MOTIF_WM_HINTS.");
}
}
#endif
__glutCurrentWindow->desiredX = 0;
__glutCurrentWindow->desiredY = 0;
__glutCurrentWindow->desiredWidth = __glutScreenWidth;
__glutCurrentWindow->desiredHeight = __glutScreenHeight;
__glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight;
__glutPutOnWorkList(__glutCurrentWindow,
GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK);
}
/* ENDCENTRY */

View File

@ -1,232 +1,232 @@
/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <assert.h>
#include <stdlib.h> /* SunOS 4 needs NULL defined for GETTIMEOFDAY macro. */
#include "glutint.h"
/* CENTRY */
int GLUTAPIENTRY
glutGet(GLenum param)
{
Window win, root;
int x, y, value;
unsigned int width, height, border, depth;
switch (param) {
case GLUT_INIT_WINDOW_X:
return __glutInitX;
case GLUT_INIT_WINDOW_Y:
return __glutInitY;
case GLUT_INIT_WINDOW_WIDTH:
return __glutInitWidth;
case GLUT_INIT_WINDOW_HEIGHT:
return __glutInitHeight;
case GLUT_INIT_DISPLAY_MODE:
return __glutDisplayMode;
case GLUT_WINDOW_X:
XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,
__glutRoot, 0, 0, &x, &y, &win);
return x;
case GLUT_WINDOW_Y:
XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,
__glutRoot, 0, 0, &x, &y, &win);
return y;
case GLUT_WINDOW_WIDTH:
if (!__glutCurrentWindow->reshape) {
XGetGeometry(__glutDisplay, __glutCurrentWindow->win,
&root, &x, &y,
&width, &height, &border, &depth);
return width;
}
return __glutCurrentWindow->width;
case GLUT_WINDOW_HEIGHT:
if (!__glutCurrentWindow->reshape) {
XGetGeometry(__glutDisplay, __glutCurrentWindow->win,
&root, &x, &y,
&width, &height, &border, &depth);
return height;
}
return __glutCurrentWindow->height;
#ifdef __OS2__
#define GET_CONFIG(attrib) \
{ if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) \
glXGetConfig( __glutCurrentWindow->vis, attrib, &value); \
else \
glXGetConfig(__glutCurrentWindow->overlay->vis, attrib, &value); \
} \
#else
#define GET_CONFIG(attrib) { \
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { \
glXGetConfig(__glutDisplay, __glutCurrentWindow->vis, \
attrib, &value); \
} else { \
glXGetConfig(__glutDisplay, __glutCurrentWindow->overlay->vis, \
attrib, &value); \
} \
}
#endif
case GLUT_WINDOW_BUFFER_SIZE:
GET_CONFIG(GLX_BUFFER_SIZE);
return value;
case GLUT_WINDOW_STENCIL_SIZE:
GET_CONFIG(GLX_STENCIL_SIZE);
return value;
case GLUT_WINDOW_DEPTH_SIZE:
GET_CONFIG(GLX_DEPTH_SIZE);
return value;
case GLUT_WINDOW_RED_SIZE:
GET_CONFIG(GLX_RED_SIZE);
return value;
case GLUT_WINDOW_GREEN_SIZE:
GET_CONFIG(GLX_GREEN_SIZE);
return value;
case GLUT_WINDOW_BLUE_SIZE:
GET_CONFIG(GLX_BLUE_SIZE);
return value;
case GLUT_WINDOW_ALPHA_SIZE:
GET_CONFIG(GLX_ALPHA_SIZE);
return value;
case GLUT_WINDOW_ACCUM_RED_SIZE:
GET_CONFIG(GLX_ACCUM_RED_SIZE);
return value;
case GLUT_WINDOW_ACCUM_GREEN_SIZE:
GET_CONFIG(GLX_ACCUM_GREEN_SIZE);
return value;
case GLUT_WINDOW_ACCUM_BLUE_SIZE:
GET_CONFIG(GLX_ACCUM_BLUE_SIZE);
return value;
case GLUT_WINDOW_ACCUM_ALPHA_SIZE:
GET_CONFIG(GLX_ACCUM_ALPHA_SIZE);
return value;
case GLUT_WINDOW_DOUBLEBUFFER:
GET_CONFIG(GLX_DOUBLEBUFFER);
return value;
case GLUT_WINDOW_RGBA:
GET_CONFIG(GLX_RGBA);
return value;
case GLUT_WINDOW_COLORMAP_SIZE:
GET_CONFIG(GLX_RGBA);
if (value) {
return 0;
} else {
#if defined(_WIN32) || defined(__OS2__)
/* KLUDGE: we always assume 256 colors in CI mode on
Win32 */
return 256;
#else
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
return __glutCurrentWindow->vis->visual->map_entries;
} else {
return __glutCurrentWindow->overlay->vis->visual->map_entries;
}
#endif /* _WIN32 */
}
case GLUT_WINDOW_PARENT:
return __glutCurrentWindow->parent ?
__glutCurrentWindow->parent->num + 1 : 0;
case GLUT_WINDOW_NUM_CHILDREN:
{
int num = 0;
GLUTwindow *children = __glutCurrentWindow->children;
while (children) {
num++;
children = children->siblings;
}
return num;
}
case GLUT_WINDOW_NUM_SAMPLES:
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) {
GET_CONFIG(GLX_SAMPLES_SGIS);
return value;
} else {
return 0;
}
#else
/* Independent of GLX server support, multisampling not
supported by GLX client-side. */
return 0;
#endif
case GLUT_WINDOW_STEREO:
GET_CONFIG(GLX_STEREO);
return value;
case GLUT_WINDOW_CURSOR:
return __glutCurrentWindow->cursor;
case GLUT_SCREEN_WIDTH:
return DisplayWidth(__glutDisplay, __glutScreen);
case GLUT_SCREEN_HEIGHT:
return DisplayHeight(__glutDisplay, __glutScreen);
case GLUT_SCREEN_WIDTH_MM:
return DisplayWidthMM(__glutDisplay, __glutScreen);
case GLUT_SCREEN_HEIGHT_MM:
return DisplayHeightMM(__glutDisplay, __glutScreen);
case GLUT_MENU_NUM_ITEMS:
return __glutCurrentMenu->num;
case GLUT_DISPLAY_MODE_POSSIBLE:
{
XVisualInfo *vi;
Bool dummy, visAlloced;
void *fbc;
#if defined(_WIN32)
/* Our fake glXChooseVisual (which is called by
__glutDetermineVisual) needs an HDC to work with, so grab one
from the "root" window. */
XHDC = GetDC(GetDesktopWindow());
#endif
vi = __glutDetermineWindowVisual(&dummy, &visAlloced, &fbc);
#if defined(_WIN32)
ReleaseDC(GetDesktopWindow(), XHDC);
#endif
if (vi) {
if (visAlloced)
XFree(vi);
return 1;
}
return 0;
}
case GLUT_ELAPSED_TIME:
{
#ifdef OLD_VMS
struct timeval6 elapsed, beginning, now;
#else
struct timeval elapsed, beginning, now;
#endif
__glutInitTime(&beginning);
GETTIMEOFDAY(&now);
TIMEDELTA(elapsed, now, beginning);
/* Return elapsed milliseconds. */
#if defined(__vms) && ( __VMS_VER < 70000000 )
return (int) (elapsed.val / TICKS_PER_MILLISECOND);
#else
return (int) ((elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000));
#endif
}
case GLUT_WINDOW_FORMAT_ID:
#if defined(__OS2__)
return wglGetPixelFormat(__glutCurrentWindow->hdc);
#elif defined(_WIN32)
return GetPixelFormat(__glutCurrentWindow->hdc);
#else
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
return (int) __glutCurrentWindow->vis->visualid;
} else {
return (int) __glutCurrentWindow->overlay->vis->visualid;
}
#endif
default:
__glutWarning("invalid glutGet parameter: %d", param);
return -1;
}
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1994, 1997, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <assert.h>
#include <stdlib.h> /* SunOS 4 needs NULL defined for GETTIMEOFDAY macro. */
#include "glutint.h"
/* CENTRY */
int GLUTAPIENTRY
glutGet(GLenum param)
{
Window win, root;
int x, y, value;
unsigned int width, height, border, depth;
switch (param) {
case GLUT_INIT_WINDOW_X:
return __glutInitX;
case GLUT_INIT_WINDOW_Y:
return __glutInitY;
case GLUT_INIT_WINDOW_WIDTH:
return __glutInitWidth;
case GLUT_INIT_WINDOW_HEIGHT:
return __glutInitHeight;
case GLUT_INIT_DISPLAY_MODE:
return __glutDisplayMode;
case GLUT_WINDOW_X:
XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,
__glutRoot, 0, 0, &x, &y, &win);
return x;
case GLUT_WINDOW_Y:
XTranslateCoordinates(__glutDisplay, __glutCurrentWindow->win,
__glutRoot, 0, 0, &x, &y, &win);
return y;
case GLUT_WINDOW_WIDTH:
if (!__glutCurrentWindow->reshape) {
XGetGeometry(__glutDisplay, __glutCurrentWindow->win,
&root, &x, &y,
&width, &height, &border, &depth);
return width;
}
return __glutCurrentWindow->width;
case GLUT_WINDOW_HEIGHT:
if (!__glutCurrentWindow->reshape) {
XGetGeometry(__glutDisplay, __glutCurrentWindow->win,
&root, &x, &y,
&width, &height, &border, &depth);
return height;
}
return __glutCurrentWindow->height;
#ifdef __OS2__
#define GET_CONFIG(attrib) \
{ if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) \
glXGetConfig( __glutCurrentWindow->vis, attrib, &value); \
else \
glXGetConfig(__glutCurrentWindow->overlay->vis, attrib, &value); \
} \
#else
#define GET_CONFIG(attrib) { \
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) { \
glXGetConfig(__glutDisplay, __glutCurrentWindow->vis, \
attrib, &value); \
} else { \
glXGetConfig(__glutDisplay, __glutCurrentWindow->overlay->vis, \
attrib, &value); \
} \
}
#endif
case GLUT_WINDOW_BUFFER_SIZE:
GET_CONFIG(GLX_BUFFER_SIZE);
return value;
case GLUT_WINDOW_STENCIL_SIZE:
GET_CONFIG(GLX_STENCIL_SIZE);
return value;
case GLUT_WINDOW_DEPTH_SIZE:
GET_CONFIG(GLX_DEPTH_SIZE);
return value;
case GLUT_WINDOW_RED_SIZE:
GET_CONFIG(GLX_RED_SIZE);
return value;
case GLUT_WINDOW_GREEN_SIZE:
GET_CONFIG(GLX_GREEN_SIZE);
return value;
case GLUT_WINDOW_BLUE_SIZE:
GET_CONFIG(GLX_BLUE_SIZE);
return value;
case GLUT_WINDOW_ALPHA_SIZE:
GET_CONFIG(GLX_ALPHA_SIZE);
return value;
case GLUT_WINDOW_ACCUM_RED_SIZE:
GET_CONFIG(GLX_ACCUM_RED_SIZE);
return value;
case GLUT_WINDOW_ACCUM_GREEN_SIZE:
GET_CONFIG(GLX_ACCUM_GREEN_SIZE);
return value;
case GLUT_WINDOW_ACCUM_BLUE_SIZE:
GET_CONFIG(GLX_ACCUM_BLUE_SIZE);
return value;
case GLUT_WINDOW_ACCUM_ALPHA_SIZE:
GET_CONFIG(GLX_ACCUM_ALPHA_SIZE);
return value;
case GLUT_WINDOW_DOUBLEBUFFER:
GET_CONFIG(GLX_DOUBLEBUFFER);
return value;
case GLUT_WINDOW_RGBA:
GET_CONFIG(GLX_RGBA);
return value;
case GLUT_WINDOW_COLORMAP_SIZE:
GET_CONFIG(GLX_RGBA);
if (value) {
return 0;
} else {
#if defined(_WIN32) || defined(__OS2__)
/* KLUDGE: we always assume 256 colors in CI mode on
Win32 */
return 256;
#else
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
return __glutCurrentWindow->vis->visual->map_entries;
} else {
return __glutCurrentWindow->overlay->vis->visual->map_entries;
}
#endif /* _WIN32 */
}
case GLUT_WINDOW_PARENT:
return __glutCurrentWindow->parent ?
__glutCurrentWindow->parent->num + 1 : 0;
case GLUT_WINDOW_NUM_CHILDREN:
{
int num = 0;
GLUTwindow *children = __glutCurrentWindow->children;
while (children) {
num++;
children = children->siblings;
}
return num;
}
case GLUT_WINDOW_NUM_SAMPLES:
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIS_multisample)
if (__glutIsSupportedByGLX("GLX_SGIS_multisample")) {
GET_CONFIG(GLX_SAMPLES_SGIS);
return value;
} else {
return 0;
}
#else
/* Independent of GLX server support, multisampling not
supported by GLX client-side. */
return 0;
#endif
case GLUT_WINDOW_STEREO:
GET_CONFIG(GLX_STEREO);
return value;
case GLUT_WINDOW_CURSOR:
return __glutCurrentWindow->cursor;
case GLUT_SCREEN_WIDTH:
return DisplayWidth(__glutDisplay, __glutScreen);
case GLUT_SCREEN_HEIGHT:
return DisplayHeight(__glutDisplay, __glutScreen);
case GLUT_SCREEN_WIDTH_MM:
return DisplayWidthMM(__glutDisplay, __glutScreen);
case GLUT_SCREEN_HEIGHT_MM:
return DisplayHeightMM(__glutDisplay, __glutScreen);
case GLUT_MENU_NUM_ITEMS:
return __glutCurrentMenu->num;
case GLUT_DISPLAY_MODE_POSSIBLE:
{
XVisualInfo *vi;
Bool dummy, visAlloced;
void *fbc;
#if defined(_WIN32)
/* Our fake glXChooseVisual (which is called by
__glutDetermineVisual) needs an HDC to work with, so grab one
from the "root" window. */
XHDC = GetDC(GetDesktopWindow());
#endif
vi = __glutDetermineWindowVisual(&dummy, &visAlloced, &fbc);
#if defined(_WIN32)
ReleaseDC(GetDesktopWindow(), XHDC);
#endif
if (vi) {
if (visAlloced)
XFree(vi);
return 1;
}
return 0;
}
case GLUT_ELAPSED_TIME:
{
#ifdef OLD_VMS
struct timeval6 elapsed, beginning, now;
#else
struct timeval elapsed, beginning, now;
#endif
__glutInitTime(&beginning);
GETTIMEOFDAY(&now);
TIMEDELTA(elapsed, now, beginning);
/* Return elapsed milliseconds. */
#if defined(__vms) && ( __VMS_VER < 70000000 )
return (int) (elapsed.val / TICKS_PER_MILLISECOND);
#else
return (int) ((elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000));
#endif
}
case GLUT_WINDOW_FORMAT_ID:
#if defined(__OS2__)
return wglGetPixelFormat(__glutCurrentWindow->hdc);
#elif defined(_WIN32)
return GetPixelFormat(__glutCurrentWindow->hdc);
#else
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
return (int) __glutCurrentWindow->vis->visualid;
} else {
return (int) __glutCurrentWindow->overlay->vis->visualid;
}
#endif
default:
__glutWarning("invalid glutGet parameter: %d", param);
return -1;
}
}
/* ENDCENTRY */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,451 +1,451 @@
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#ifdef __VMS
#include <GL/vms_x_fix.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#if !defined(_WIN32) && !defined(__OS2__)
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#endif
/* SGI optimization introduced in IRIX 6.3 to avoid X server
round trips for interning common X atoms. */
#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
#include <X11/SGIFastAtom.h>
#else
#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
#endif
#include "glutint.h"
/* GLUT inter-file variables */
/* *INDENT-OFF* */
char *__glutProgramName = NULL;
int __glutArgc = 0;
char **__glutArgv = NULL;
char *__glutGeometry = NULL;
Display *__glutDisplay = NULL;
int __glutScreen;
Window __glutRoot;
int __glutScreenHeight;
int __glutScreenWidth;
GLboolean __glutIconic = GL_FALSE;
GLboolean __glutDebug = GL_FALSE;
unsigned int __glutDisplayMode =
GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH;
char *__glutDisplayString = NULL;
int __glutConnectionFD;
XSizeHints __glutSizeHints = {0};
int __glutInitWidth = 300, __glutInitHeight = 300;
int __glutInitX = -1, __glutInitY = -1;
GLboolean __glutForceDirect = GL_FALSE,
__glutTryDirect = GL_TRUE;
Atom __glutWMDeleteWindow;
/* *INDENT-ON* */
#ifdef _WIN32
void (__cdecl *__glutExitFunc)(int retval) = NULL;
#endif
static Bool synchronize = False;
#if defined(__OS2__)
MRESULT EXPENTRY GlutWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
MRESULT EXPENTRY GlutWindowChildProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
void __glutOpenOS2Connection(char* display)
{
static char *classname=NULL;
extern HAB hab; /* PM anchor block handle */
ERRORID erridErrorCode;/* last error id code */
int ii;
/* Make sure we register the window only once. */
if(classname)
return;
classname = "GLUT";
if ( !WinRegisterClass( hab, /* PM anchor block handle */
classname,/* window class name */
GlutWindowProc,/* address of window procedure*/
CS_SIZEREDRAW, /* |CS_SYNCPAINT size changes cause redrawing */
0UL ) ) /* window data */
{ erridErrorCode = WinGetLastError(hab);
ii = erridErrorCode;
return;
}
classname = "GLUTCHILD";
if ( !WinRegisterClass( hab, /* PM anchor block handle */
classname,/* window class name */
GlutWindowChildProc,/* address of window procedure*/
CS_SIZEREDRAW, /* size changes cause redrawing */
0UL ) ) /* window data */
{ erridErrorCode = WinGetLastError(hab);
ii = erridErrorCode;
return;
}
__glutScreenWidth = GetSystemMetrics(SM_CXSCREEN);
__glutScreenHeight = GetSystemMetrics(SM_CYSCREEN);
/* Set the root window to NULL because windows creates a top-level
window when the parent is NULL. X creates a top-level window
when the parent is the root window. */
__glutRoot = NULLHANDLE;
/* Set the display to 1 -- we shouldn't be using this anywhere
(except as an argument to X calls). */
__glutDisplay = (Display*)1;
/* There isn't any concept of multiple screens in Win32, therefore,
we don't need to keep track of the screen we're on... it's always
the same one. */
__glutScreen = 0;
}
#elif defined(_WIN32)
#ifdef __BORLANDC__
#include <float.h> /* For masking floating point exceptions. */
#endif
void
__glutOpenWin32Connection(char* display)
{
static char *classname;
WNDCLASS wc;
HINSTANCE hInstance = GetModuleHandle(NULL);
/* Make sure we register the window only once. */
if(classname)
return;
#ifdef __BORLANDC__
/* Under certain conditions (e.g. while rendering solid surfaces with
lighting enabled) Microsoft OpenGL libraries cause some illegal
operations like floating point overflow or division by zero. The
default behaviour of Microsoft compilers is to mask (ignore)
floating point exceptions, while Borland compilers do not. The
following function of Borland RTL allows to mask exceptions.
Advice from Pier Giorgio Esposito (mc2172@mclink.it). */
_control87(MCW_EM,MCW_EM);
#endif
classname = "GLUT";
/* Clear (important!) and then fill in the window class structure. */
memset(&wc, 0, sizeof(WNDCLASS));
wc.style = CS_OWNDC;
wc.lpfnWndProc = (WNDPROC)__glutWindowProc;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(hInstance, "GLUT_ICON");
wc.hCursor = LoadCursor(hInstance, IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = classname;
/* Fill in a default icon if one isn't specified as a resource. */
if(!wc.hIcon)
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
if(!RegisterClass(&wc)) {
__glutFatalError("RegisterClass() failed:"
"Cannot register GLUT window class.");
}
__glutScreenWidth = GetSystemMetrics(SM_CXSCREEN);
__glutScreenHeight = GetSystemMetrics(SM_CYSCREEN);
/* Set the root window to NULL because windows creates a top-level
window when the parent is NULL. X creates a top-level window
when the parent is the root window. */
__glutRoot = NULL;
/* Set the display to 1 -- we shouldn't be using this anywhere
(except as an argument to X calls). */
__glutDisplay = (Display*)1;
/* There isn't any concept of multiple screens in Win32, therefore,
we don't need to keep track of the screen we're on... it's always
the same one. */
__glutScreen = 0;
}
#else /* !_WIN32 */
void
__glutOpenXConnection(char *display)
{
int errorBase, eventBase;
__glutDisplay = XOpenDisplay(display);
if (!__glutDisplay)
__glutFatalError("could not open display: %s",
XDisplayName(display));
if (synchronize)
XSynchronize(__glutDisplay, True);
if (!glXQueryExtension(__glutDisplay, &errorBase, &eventBase))
__glutFatalError(
"OpenGL GLX extension not supported by display: %s",
XDisplayName(display));
__glutScreen = DefaultScreen(__glutDisplay);
__glutRoot = RootWindow(__glutDisplay, __glutScreen);
__glutScreenWidth = DisplayWidth(__glutDisplay, __glutScreen);
__glutScreenHeight = DisplayHeight(__glutDisplay,
__glutScreen);
__glutConnectionFD = ConnectionNumber(__glutDisplay);
__glutWMDeleteWindow = XSGIFastInternAtom(__glutDisplay,
"WM_DELETE_WINDOW", SGI_XA_WM_DELETE_WINDOW, False);
}
#endif /* _WIN32 */
void
#ifdef OLD_VMS
__glutInitTime(struct timeval6 *beginning)
#else
__glutInitTime(struct timeval *beginning)
#endif
{
static int beenhere = 0;
#ifdef OLD_VMS
static struct timeval6 genesis;
#else
static struct timeval genesis;
#endif
if (!beenhere) {
GETTIMEOFDAY(&genesis);
beenhere = 1;
}
*beginning = genesis;
}
static void
removeArgs(int *argcp, char **argv, int numToRemove)
{
int i, j;
for (i = 0, j = numToRemove; argv[j]; i++, j++) {
argv[i] = argv[j];
}
argv[i] = NULL;
*argcp -= numToRemove;
}
void GLUTAPIENTRY
glutInit(int *argcp, char **argv)
{
char *display = NULL;
char *str, *geometry = NULL;
#ifdef OLD_VMS
struct timeval6 unused;
#else
struct timeval unused;
#endif
int i;
if (__glutDisplay) {
__glutWarning("glutInit being called a second time.");
return;
}
/* Determine temporary program name. */
str = strrchr(argv[0], '/');
if (str == NULL) {
__glutProgramName = argv[0];
} else {
__glutProgramName = str + 1;
}
/* Make private copy of command line arguments. */
__glutArgc = *argcp;
__glutArgv = (char **) malloc(__glutArgc * sizeof(char *));
if (!__glutArgv)
__glutFatalError("out of memory.");
for (i = 0; i < __glutArgc; i++) {
__glutArgv[i] = __glutStrdup(argv[i]);
if (!__glutArgv[i])
__glutFatalError("out of memory.");
}
/* determine permanent program name */
str = strrchr(__glutArgv[0], '/');
if (str == NULL) {
__glutProgramName = __glutArgv[0];
} else {
__glutProgramName = str + 1;
}
/* parse arguments for standard options */
for (i = 1; i < __glutArgc; i++) {
if (!strcmp(__glutArgv[i], "-display")) {
#if defined(_WIN32)
__glutWarning("-display option not supported by Win32 GLUT.");
#endif
if (++i >= __glutArgc) {
__glutFatalError(
"follow -display option with X display name.");
}
display = __glutArgv[i];
removeArgs(argcp, &argv[1], 2);
} else if (!strcmp(__glutArgv[i], "-geometry")) {
if (++i >= __glutArgc) {
__glutFatalError(
"follow -geometry option with geometry parameter.");
}
geometry = __glutArgv[i];
removeArgs(argcp, &argv[1], 2);
} else if (!strcmp(__glutArgv[i], "-direct")) {
#if defined(_WIN32)
__glutWarning("-direct option not supported by Win32 GLUT.");
#endif
if (!__glutTryDirect)
__glutFatalError(
"cannot force both direct and indirect rendering.");
__glutForceDirect = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-indirect")) {
#if defined(_WIN32)
__glutWarning("-indirect option not supported by Win32 GLUT.");
#endif
if (__glutForceDirect)
__glutFatalError(
"cannot force both direct and indirect rendering.");
__glutTryDirect = GL_FALSE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-iconic")) {
__glutIconic = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-gldebug")) {
__glutDebug = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-sync")) {
#if defined(_WIN32)
__glutWarning("-sync option not supported by Win32 GLUT.");
#endif
synchronize = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else {
/* Once unknown option encountered, stop command line
processing. */
break;
}
}
#if defined(__OS2__)
__glutOpenOS2Connection(display);
#elif defined(_WIN32)
__glutOpenWin32Connection(display);
#else
__glutOpenXConnection(display);
#endif
if (geometry) {
int flags, x, y, width, height;
/* Fix bogus "{width|height} may be used before set"
warning */
width = 0;
height = 0;
flags = XParseGeometry(geometry, &x, &y,
(unsigned int *) &width, (unsigned int *) &height);
if (WidthValue & flags) {
/* Careful because X does not allow zero or negative
width windows */
if (width > 0)
__glutInitWidth = width;
}
if (HeightValue & flags) {
/* Careful because X does not allow zero or negative
height windows */
if (height > 0)
__glutInitHeight = height;
}
glutInitWindowSize(__glutInitWidth, __glutInitHeight);
if (XValue & flags) {
if (XNegative & flags)
x = DisplayWidth(__glutDisplay, __glutScreen) +
x - __glutSizeHints.width;
/* Play safe: reject negative X locations */
if (x >= 0)
__glutInitX = x;
}
if (YValue & flags) {
if (YNegative & flags)
y = DisplayHeight(__glutDisplay, __glutScreen) +
y - __glutSizeHints.height;
/* Play safe: reject negative Y locations */
if (y >= 0)
__glutInitY = y;
}
glutInitWindowPosition(__glutInitX, __glutInitY);
}
__glutInitTime(&unused);
/* check if GLUT_FPS env var is set */
{
const char *fps = getenv("GLUT_FPS");
if (fps) {
sscanf(fps, "%d", &__glutFPS);
if (__glutFPS <= 0)
__glutFPS = 5000; /* 5000 milliseconds */
}
}
}
#ifdef _WIN32
void APIENTRY
__glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int))
{
__glutExitFunc = exitfunc;
glutInit(argcp, argv);
}
#endif
/* CENTRY */
void GLUTAPIENTRY
glutInitWindowPosition(int x, int y)
{
__glutInitX = x;
__glutInitY = y;
if (x >= 0 && y >= 0) {
__glutSizeHints.x = x;
__glutSizeHints.y = y;
__glutSizeHints.flags |= USPosition;
} else {
__glutSizeHints.flags &= ~USPosition;
}
}
void GLUTAPIENTRY
glutInitWindowSize(int width, int height)
{
__glutInitWidth = width;
__glutInitHeight = height;
if (width > 0 && height > 0) {
__glutSizeHints.width = width;
__glutSizeHints.height = height;
__glutSizeHints.flags |= USSize;
} else {
__glutSizeHints.flags &= ~USSize;
}
}
void GLUTAPIENTRY
glutInitDisplayMode(unsigned int mask)
{
__glutDisplayMode = mask;
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#ifdef __VMS
#include <GL/vms_x_fix.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#if !defined(_WIN32) && !defined(__OS2__)
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#endif
/* SGI optimization introduced in IRIX 6.3 to avoid X server
round trips for interning common X atoms. */
#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
#include <X11/SGIFastAtom.h>
#else
#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
#endif
#include "glutint.h"
/* GLUT inter-file variables */
/* *INDENT-OFF* */
char *__glutProgramName = NULL;
int __glutArgc = 0;
char **__glutArgv = NULL;
char *__glutGeometry = NULL;
Display *__glutDisplay = NULL;
int __glutScreen;
Window __glutRoot;
int __glutScreenHeight;
int __glutScreenWidth;
GLboolean __glutIconic = GL_FALSE;
GLboolean __glutDebug = GL_FALSE;
unsigned int __glutDisplayMode =
GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH;
char *__glutDisplayString = NULL;
int __glutConnectionFD;
XSizeHints __glutSizeHints = {0};
int __glutInitWidth = 300, __glutInitHeight = 300;
int __glutInitX = -1, __glutInitY = -1;
GLboolean __glutForceDirect = GL_FALSE,
__glutTryDirect = GL_TRUE;
Atom __glutWMDeleteWindow;
/* *INDENT-ON* */
#ifdef _WIN32
void (__cdecl *__glutExitFunc)(int retval) = NULL;
#endif
static Bool synchronize = False;
#if defined(__OS2__)
MRESULT EXPENTRY GlutWindowProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
MRESULT EXPENTRY GlutWindowChildProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 );
void __glutOpenOS2Connection(char* display)
{
static char *classname=NULL;
extern HAB hab; /* PM anchor block handle */
ERRORID erridErrorCode;/* last error id code */
int ii;
/* Make sure we register the window only once. */
if(classname)
return;
classname = "GLUT";
if ( !WinRegisterClass( hab, /* PM anchor block handle */
classname,/* window class name */
GlutWindowProc,/* address of window procedure*/
CS_SIZEREDRAW, /* |CS_SYNCPAINT size changes cause redrawing */
0UL ) ) /* window data */
{ erridErrorCode = WinGetLastError(hab);
ii = erridErrorCode;
return;
}
classname = "GLUTCHILD";
if ( !WinRegisterClass( hab, /* PM anchor block handle */
classname,/* window class name */
GlutWindowChildProc,/* address of window procedure*/
CS_SIZEREDRAW, /* size changes cause redrawing */
0UL ) ) /* window data */
{ erridErrorCode = WinGetLastError(hab);
ii = erridErrorCode;
return;
}
__glutScreenWidth = GetSystemMetrics(SM_CXSCREEN);
__glutScreenHeight = GetSystemMetrics(SM_CYSCREEN);
/* Set the root window to NULL because windows creates a top-level
window when the parent is NULL. X creates a top-level window
when the parent is the root window. */
__glutRoot = NULLHANDLE;
/* Set the display to 1 -- we shouldn't be using this anywhere
(except as an argument to X calls). */
__glutDisplay = (Display*)1;
/* There isn't any concept of multiple screens in Win32, therefore,
we don't need to keep track of the screen we're on... it's always
the same one. */
__glutScreen = 0;
}
#elif defined(_WIN32)
#ifdef __BORLANDC__
#include <float.h> /* For masking floating point exceptions. */
#endif
void
__glutOpenWin32Connection(char* display)
{
static char *classname;
WNDCLASS wc;
HINSTANCE hInstance = GetModuleHandle(NULL);
/* Make sure we register the window only once. */
if(classname)
return;
#ifdef __BORLANDC__
/* Under certain conditions (e.g. while rendering solid surfaces with
lighting enabled) Microsoft OpenGL libraries cause some illegal
operations like floating point overflow or division by zero. The
default behaviour of Microsoft compilers is to mask (ignore)
floating point exceptions, while Borland compilers do not. The
following function of Borland RTL allows to mask exceptions.
Advice from Pier Giorgio Esposito (mc2172@mclink.it). */
_control87(MCW_EM,MCW_EM);
#endif
classname = "GLUT";
/* Clear (important!) and then fill in the window class structure. */
memset(&wc, 0, sizeof(WNDCLASS));
wc.style = CS_OWNDC;
wc.lpfnWndProc = (WNDPROC)__glutWindowProc;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(hInstance, "GLUT_ICON");
wc.hCursor = LoadCursor(hInstance, IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = classname;
/* Fill in a default icon if one isn't specified as a resource. */
if(!wc.hIcon)
wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
if(!RegisterClass(&wc)) {
__glutFatalError("RegisterClass() failed:"
"Cannot register GLUT window class.");
}
__glutScreenWidth = GetSystemMetrics(SM_CXSCREEN);
__glutScreenHeight = GetSystemMetrics(SM_CYSCREEN);
/* Set the root window to NULL because windows creates a top-level
window when the parent is NULL. X creates a top-level window
when the parent is the root window. */
__glutRoot = NULL;
/* Set the display to 1 -- we shouldn't be using this anywhere
(except as an argument to X calls). */
__glutDisplay = (Display*)1;
/* There isn't any concept of multiple screens in Win32, therefore,
we don't need to keep track of the screen we're on... it's always
the same one. */
__glutScreen = 0;
}
#else /* !_WIN32 */
void
__glutOpenXConnection(char *display)
{
int errorBase, eventBase;
__glutDisplay = XOpenDisplay(display);
if (!__glutDisplay)
__glutFatalError("could not open display: %s",
XDisplayName(display));
if (synchronize)
XSynchronize(__glutDisplay, True);
if (!glXQueryExtension(__glutDisplay, &errorBase, &eventBase))
__glutFatalError(
"OpenGL GLX extension not supported by display: %s",
XDisplayName(display));
__glutScreen = DefaultScreen(__glutDisplay);
__glutRoot = RootWindow(__glutDisplay, __glutScreen);
__glutScreenWidth = DisplayWidth(__glutDisplay, __glutScreen);
__glutScreenHeight = DisplayHeight(__glutDisplay,
__glutScreen);
__glutConnectionFD = ConnectionNumber(__glutDisplay);
__glutWMDeleteWindow = XSGIFastInternAtom(__glutDisplay,
"WM_DELETE_WINDOW", SGI_XA_WM_DELETE_WINDOW, False);
}
#endif /* _WIN32 */
void
#ifdef OLD_VMS
__glutInitTime(struct timeval6 *beginning)
#else
__glutInitTime(struct timeval *beginning)
#endif
{
static int beenhere = 0;
#ifdef OLD_VMS
static struct timeval6 genesis;
#else
static struct timeval genesis;
#endif
if (!beenhere) {
GETTIMEOFDAY(&genesis);
beenhere = 1;
}
*beginning = genesis;
}
static void
removeArgs(int *argcp, char **argv, int numToRemove)
{
int i, j;
for (i = 0, j = numToRemove; argv[j]; i++, j++) {
argv[i] = argv[j];
}
argv[i] = NULL;
*argcp -= numToRemove;
}
void GLUTAPIENTRY
glutInit(int *argcp, char **argv)
{
char *display = NULL;
char *str, *geometry = NULL;
#ifdef OLD_VMS
struct timeval6 unused;
#else
struct timeval unused;
#endif
int i;
if (__glutDisplay) {
__glutWarning("glutInit being called a second time.");
return;
}
/* Determine temporary program name. */
str = strrchr(argv[0], '/');
if (str == NULL) {
__glutProgramName = argv[0];
} else {
__glutProgramName = str + 1;
}
/* Make private copy of command line arguments. */
__glutArgc = *argcp;
__glutArgv = (char **) malloc(__glutArgc * sizeof(char *));
if (!__glutArgv)
__glutFatalError("out of memory.");
for (i = 0; i < __glutArgc; i++) {
__glutArgv[i] = __glutStrdup(argv[i]);
if (!__glutArgv[i])
__glutFatalError("out of memory.");
}
/* determine permanent program name */
str = strrchr(__glutArgv[0], '/');
if (str == NULL) {
__glutProgramName = __glutArgv[0];
} else {
__glutProgramName = str + 1;
}
/* parse arguments for standard options */
for (i = 1; i < __glutArgc; i++) {
if (!strcmp(__glutArgv[i], "-display")) {
#if defined(_WIN32)
__glutWarning("-display option not supported by Win32 GLUT.");
#endif
if (++i >= __glutArgc) {
__glutFatalError(
"follow -display option with X display name.");
}
display = __glutArgv[i];
removeArgs(argcp, &argv[1], 2);
} else if (!strcmp(__glutArgv[i], "-geometry")) {
if (++i >= __glutArgc) {
__glutFatalError(
"follow -geometry option with geometry parameter.");
}
geometry = __glutArgv[i];
removeArgs(argcp, &argv[1], 2);
} else if (!strcmp(__glutArgv[i], "-direct")) {
#if defined(_WIN32)
__glutWarning("-direct option not supported by Win32 GLUT.");
#endif
if (!__glutTryDirect)
__glutFatalError(
"cannot force both direct and indirect rendering.");
__glutForceDirect = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-indirect")) {
#if defined(_WIN32)
__glutWarning("-indirect option not supported by Win32 GLUT.");
#endif
if (__glutForceDirect)
__glutFatalError(
"cannot force both direct and indirect rendering.");
__glutTryDirect = GL_FALSE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-iconic")) {
__glutIconic = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-gldebug")) {
__glutDebug = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else if (!strcmp(__glutArgv[i], "-sync")) {
#if defined(_WIN32)
__glutWarning("-sync option not supported by Win32 GLUT.");
#endif
synchronize = GL_TRUE;
removeArgs(argcp, &argv[1], 1);
} else {
/* Once unknown option encountered, stop command line
processing. */
break;
}
}
#if defined(__OS2__)
__glutOpenOS2Connection(display);
#elif defined(_WIN32)
__glutOpenWin32Connection(display);
#else
__glutOpenXConnection(display);
#endif
if (geometry) {
int flags, x, y, width, height;
/* Fix bogus "{width|height} may be used before set"
warning */
width = 0;
height = 0;
flags = XParseGeometry(geometry, &x, &y,
(unsigned int *) &width, (unsigned int *) &height);
if (WidthValue & flags) {
/* Careful because X does not allow zero or negative
width windows */
if (width > 0)
__glutInitWidth = width;
}
if (HeightValue & flags) {
/* Careful because X does not allow zero or negative
height windows */
if (height > 0)
__glutInitHeight = height;
}
glutInitWindowSize(__glutInitWidth, __glutInitHeight);
if (XValue & flags) {
if (XNegative & flags)
x = DisplayWidth(__glutDisplay, __glutScreen) +
x - __glutSizeHints.width;
/* Play safe: reject negative X locations */
if (x >= 0)
__glutInitX = x;
}
if (YValue & flags) {
if (YNegative & flags)
y = DisplayHeight(__glutDisplay, __glutScreen) +
y - __glutSizeHints.height;
/* Play safe: reject negative Y locations */
if (y >= 0)
__glutInitY = y;
}
glutInitWindowPosition(__glutInitX, __glutInitY);
}
__glutInitTime(&unused);
/* check if GLUT_FPS env var is set */
{
const char *fps = getenv("GLUT_FPS");
if (fps) {
sscanf(fps, "%d", &__glutFPS);
if (__glutFPS <= 0)
__glutFPS = 5000; /* 5000 milliseconds */
}
}
}
#ifdef _WIN32
void APIENTRY
__glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int))
{
__glutExitFunc = exitfunc;
glutInit(argcp, argv);
}
#endif
/* CENTRY */
void GLUTAPIENTRY
glutInitWindowPosition(int x, int y)
{
__glutInitX = x;
__glutInitY = y;
if (x >= 0 && y >= 0) {
__glutSizeHints.x = x;
__glutSizeHints.y = y;
__glutSizeHints.flags |= USPosition;
} else {
__glutSizeHints.flags &= ~USPosition;
}
}
void GLUTAPIENTRY
glutInitWindowSize(int width, int height)
{
__glutInitWidth = width;
__glutInitHeight = height;
if (width > 0 && height > 0) {
__glutSizeHints.width = width;
__glutSizeHints.height = height;
__glutSizeHints.flags |= USSize;
} else {
__glutSizeHints.flags &= ~USSize;
}
}
void GLUTAPIENTRY
glutInitDisplayMode(unsigned int mask)
{
__glutDisplayMode = mask;
}
/* ENDCENTRY */

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +1,29 @@
/* Copyright (c) Mark J. Kilgard, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutKeyboardFunc(GLUTkeyboardCB keyboardFunc)
{
__glutChangeWindowEventMask(KeyPressMask,
keyboardFunc != NULL || __glutCurrentWindow->special != NULL);
__glutCurrentWindow->keyboard = keyboardFunc;
}
void GLUTAPIENTRY
glutSpecialFunc(GLUTspecialCB specialFunc)
{
__glutChangeWindowEventMask(KeyPressMask,
specialFunc != NULL || __glutCurrentWindow->keyboard != NULL);
__glutCurrentWindow->special = specialFunc;
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutKeyboardFunc(GLUTkeyboardCB keyboardFunc)
{
__glutChangeWindowEventMask(KeyPressMask,
keyboardFunc != NULL || __glutCurrentWindow->special != NULL);
__glutCurrentWindow->keyboard = keyboardFunc;
}
void GLUTAPIENTRY
glutSpecialFunc(GLUTspecialCB specialFunc)
{
__glutChangeWindowEventMask(KeyPressMask,
specialFunc != NULL || __glutCurrentWindow->keyboard != NULL);
__glutCurrentWindow->special = specialFunc;
}
/* ENDCENTRY */

View File

@ -1,29 +1,29 @@
/* Copyright (c) Mark J. Kilgard, 1996, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutIgnoreKeyRepeat(int ignore)
{
__glutCurrentWindow->ignoreKeyRepeat = ignore;
}
void GLUTAPIENTRY
glutSetKeyRepeat(int repeatMode)
{
#if !defined(_WIN32) && !defined(__OS2PM__)
XKeyboardControl values;
/* GLUT's repeatMode #define's match the Xlib API values. */
values.auto_repeat_mode = repeatMode;
XChangeKeyboardControl(__glutDisplay, KBAutoRepeatMode, &values);
#endif
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1996, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutIgnoreKeyRepeat(int ignore)
{
__glutCurrentWindow->ignoreKeyRepeat = ignore;
}
void GLUTAPIENTRY
glutSetKeyRepeat(int repeatMode)
{
#if !defined(_WIN32) && !defined(__OS2PM__)
XKeyboardControl values;
/* GLUT's repeatMode #define's match the Xlib API values. */
values.auto_repeat_mode = repeatMode;
XChangeKeyboardControl(__glutDisplay, KBAutoRepeatMode, &values);
#endif
}
/* ENDCENTRY */

View File

@ -1,29 +1,29 @@
/* Copyright (c) Mark J. Kilgard, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutKeyboardUpFunc(GLUTkeyboardCB keyboardUpFunc)
{
__glutChangeWindowEventMask(KeyReleaseMask,
keyboardUpFunc != NULL || __glutCurrentWindow->specialUp != NULL);
__glutCurrentWindow->keyboardUp = keyboardUpFunc;
}
void GLUTAPIENTRY
glutSpecialUpFunc(GLUTspecialCB specialUpFunc)
{
__glutChangeWindowEventMask(KeyReleaseMask,
specialUpFunc != NULL || __glutCurrentWindow->keyboardUp != NULL);
__glutCurrentWindow->specialUp = specialUpFunc;
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutKeyboardUpFunc(GLUTkeyboardCB keyboardUpFunc)
{
__glutChangeWindowEventMask(KeyReleaseMask,
keyboardUpFunc != NULL || __glutCurrentWindow->specialUp != NULL);
__glutCurrentWindow->keyboardUp = keyboardUpFunc;
}
void GLUTAPIENTRY
glutSpecialUpFunc(GLUTspecialCB specialUpFunc)
{
__glutChangeWindowEventMask(KeyReleaseMask,
specialUpFunc != NULL || __glutCurrentWindow->keyboardUp != NULL);
__glutCurrentWindow->specialUp = specialUpFunc;
}
/* ENDCENTRY */

View File

@ -1,57 +1,57 @@
/* Copyright (c) Mark J. Kilgard, 1996. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <string.h>
#include "glutint.h"
int __glutMesaSwapHackSupport = 0; /* Not supported until
proven otherwise. */
/* Use the "Mesa swap hack" if reasonable if and only if
MESA_SWAP_HACK is set to something whose first character is
not "N" or "n" AND "Brian Paul" is the vendor string AND
"Mesa X11"* (or "Mesa" for backward compatibility) is the
renderer string.
Anyone who modifies Mesa so that glXSwapBuffers does not
simply blit the previously rendered back buffer should
change either their vendor or renderer string to avoid
confusing GLUT. */
void
__glutDetermineMesaSwapHackSupport(void)
{
static int doneAlready = 0;
char *env, *vendor, *renderer;
if (doneAlready)
return;
env = getenv("MESA_SWAP_HACK");
if (env) {
if ((env[0] != 'n') && (env[0] != 'N')) {
vendor = (char *) glGetString(GL_VENDOR);
renderer = (char *) glGetString(GL_RENDERER);
/* Old versions of X11 Mesa uses the renderer string
"Mesa"; Brian plans to start using "Mesa X11" to
distinguish the X version of Mesa from other flavor
such as Windows or 3Dfx. */
#define MESA_X11 "Mesa X11"
/* XXX At some point in the future, eliminate the
backward compatibility for the old "Mesa" renderer
string. */
if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") ||
!strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1)))
__glutMesaSwapHackSupport = 1;
}
}
doneAlready = 1;
}
/* Copyright (c) Mark J. Kilgard, 1996. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <string.h>
#include "glutint.h"
int __glutMesaSwapHackSupport = 0; /* Not supported until
proven otherwise. */
/* Use the "Mesa swap hack" if reasonable if and only if
MESA_SWAP_HACK is set to something whose first character is
not "N" or "n" AND "Brian Paul" is the vendor string AND
"Mesa X11"* (or "Mesa" for backward compatibility) is the
renderer string.
Anyone who modifies Mesa so that glXSwapBuffers does not
simply blit the previously rendered back buffer should
change either their vendor or renderer string to avoid
confusing GLUT. */
void
__glutDetermineMesaSwapHackSupport(void)
{
static int doneAlready = 0;
char *env, *vendor, *renderer;
if (doneAlready)
return;
env = getenv("MESA_SWAP_HACK");
if (env) {
if ((env[0] != 'n') && (env[0] != 'N')) {
vendor = (char *) glGetString(GL_VENDOR);
renderer = (char *) glGetString(GL_RENDERER);
/* Old versions of X11 Mesa uses the renderer string
"Mesa"; Brian plans to start using "Mesa X11" to
distinguish the X version of Mesa from other flavor
such as Windows or 3Dfx. */
#define MESA_X11 "Mesa X11"
/* XXX At some point in the future, eliminate the
backward compatibility for the old "Mesa" renderer
string. */
if (!strcmp(vendor, "Brian Paul") && (!strcmp(renderer, "Mesa") ||
!strncmp(renderer, MESA_X11, sizeof(MESA_X11) - 1)))
__glutMesaSwapHackSupport = 1;
}
}
doneAlready = 1;
}

View File

@ -1,31 +1,31 @@
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
/* CENTRY */
int GLUTAPIENTRY
glutGetModifiers(void)
{
int modifiers;
if(__glutModifierMask == (unsigned int) ~0) {
__glutWarning(
"glutCurrentModifiers: do not call outside core input callback.");
return 0;
}
modifiers = 0;
if(__glutModifierMask & (ShiftMask|LockMask))
modifiers |= GLUT_ACTIVE_SHIFT;
if(__glutModifierMask & ControlMask)
modifiers |= GLUT_ACTIVE_CTRL;
if(__glutModifierMask & Mod1Mask)
modifiers |= GLUT_ACTIVE_ALT;
return modifiers;
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
/* CENTRY */
int GLUTAPIENTRY
glutGetModifiers(void)
{
int modifiers;
if(__glutModifierMask == (unsigned int) ~0) {
__glutWarning(
"glutCurrentModifiers: do not call outside core input callback.");
return 0;
}
modifiers = 0;
if(__glutModifierMask & (ShiftMask|LockMask))
modifiers |= GLUT_ACTIVE_SHIFT;
if(__glutModifierMask & ControlMask)
modifiers |= GLUT_ACTIVE_CTRL;
if(__glutModifierMask & Mod1Mask)
modifiers |= GLUT_ACTIVE_ALT;
return modifiers;
}
/* ENDCENTRY */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +1,42 @@
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
#include "glutstroke.h"
void GLUTAPIENTRY
glutStrokeCharacter(GLUTstrokeFont font, int c)
{
const StrokeCharRec *ch;
const StrokeRec *stroke;
const CoordRec *coord;
StrokeFontPtr fontinfo;
int i, j;
#if defined(_WIN32)
fontinfo = (StrokeFontPtr) __glutFont(font);
#else
fontinfo = (StrokeFontPtr) font;
#endif
if (c < 0 || c >= fontinfo->num_chars)
return;
ch = &(fontinfo->ch[c]);
if (ch) {
for (i = ch->num_strokes, stroke = ch->stroke;
i > 0; i--, stroke++) {
glBegin(GL_LINE_STRIP);
for (j = stroke->num_coords, coord = stroke->coord;
j > 0; j--, coord++) {
glVertex2f(coord->x, coord->y);
}
glEnd();
}
glTranslatef(ch->right, 0.0, 0.0);
}
}
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include "glutint.h"
#include "glutstroke.h"
void GLUTAPIENTRY
glutStrokeCharacter(GLUTstrokeFont font, int c)
{
const StrokeCharRec *ch;
const StrokeRec *stroke;
const CoordRec *coord;
StrokeFontPtr fontinfo;
int i, j;
#if defined(_WIN32)
fontinfo = (StrokeFontPtr) __glutFont(font);
#else
fontinfo = (StrokeFontPtr) font;
#endif
if (c < 0 || c >= fontinfo->num_chars)
return;
ch = &(fontinfo->ch[c]);
if (ch) {
for (i = ch->num_strokes, stroke = ch->stroke;
i > 0; i--, stroke++) {
glBegin(GL_LINE_STRIP);
for (j = stroke->num_coords, coord = stroke->coord;
j > 0; j--, coord++) {
glVertex2f(coord->x, coord->y);
}
glEnd();
}
glTranslatef(ch->right, 0.0, 0.0);
}
}

View File

@ -1,67 +1,67 @@
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdio.h>
#include "glutint.h"
GLint __glutFPS = 0;
GLint __glutSwapCount = 0;
GLint __glutSwapTime = 0;
/* CENTRY */
void GLUTAPIENTRY
glutSwapBuffers(void)
{
GLUTwindow *window = __glutCurrentWindow;
if (window->renderWin == window->win) {
if (__glutCurrentWindow->treatAsSingle) {
/* Pretend the double buffered window is single buffered,
so treat glutSwapBuffers as a no-op. */
return;
}
} else {
if (__glutCurrentWindow->overlay->treatAsSingle) {
/* Pretend the double buffered overlay is single
buffered, so treat glutSwapBuffers as a no-op. */
return;
}
}
/* For the MESA_SWAP_HACK. */
window->usedSwapBuffers = 1;
SWAP_BUFFERS_LAYER(__glutCurrentWindow);
/* I considered putting the window being swapped on the
GLUT_FINISH_WORK work list because you could call
glutSwapBuffers from an idle callback which doesn't call
__glutSetWindow which normally adds indirect rendering
windows to the GLUT_FINISH_WORK work list. Not being put
on the list could lead to the buffering up of multiple
redisplays and buffer swaps and hamper interactivity. I
consider this an application bug due to not using
glutPostRedisplay to trigger redraws. If
glutPostRedisplay were used, __glutSetWindow would be
called and a glFinish to throttle buffering would occur. */
if (__glutFPS) {
GLint t = glutGet(GLUT_ELAPSED_TIME);
__glutSwapCount++;
if (__glutSwapTime == 0)
__glutSwapTime = t;
else if (t - __glutSwapTime > __glutFPS) {
float time = 0.001 * (t - __glutSwapTime);
float fps = (float) __glutSwapCount / time;
fprintf(stderr, "GLUT: %d frames in %.2f seconds = %.2f FPS\n",
__glutSwapCount, time, fps);
__glutSwapTime = t;
__glutSwapCount = 0;
}
}
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdio.h>
#include "glutint.h"
GLint __glutFPS = 0;
GLint __glutSwapCount = 0;
GLint __glutSwapTime = 0;
/* CENTRY */
void GLUTAPIENTRY
glutSwapBuffers(void)
{
GLUTwindow *window = __glutCurrentWindow;
if (window->renderWin == window->win) {
if (__glutCurrentWindow->treatAsSingle) {
/* Pretend the double buffered window is single buffered,
so treat glutSwapBuffers as a no-op. */
return;
}
} else {
if (__glutCurrentWindow->overlay->treatAsSingle) {
/* Pretend the double buffered overlay is single
buffered, so treat glutSwapBuffers as a no-op. */
return;
}
}
/* For the MESA_SWAP_HACK. */
window->usedSwapBuffers = 1;
SWAP_BUFFERS_LAYER(__glutCurrentWindow);
/* I considered putting the window being swapped on the
GLUT_FINISH_WORK work list because you could call
glutSwapBuffers from an idle callback which doesn't call
__glutSetWindow which normally adds indirect rendering
windows to the GLUT_FINISH_WORK work list. Not being put
on the list could lead to the buffering up of multiple
redisplays and buffer swaps and hamper interactivity. I
consider this an application bug due to not using
glutPostRedisplay to trigger redraws. If
glutPostRedisplay were used, __glutSetWindow would be
called and a glFinish to throttle buffering would occur. */
if (__glutFPS) {
GLint t = glutGet(GLUT_ELAPSED_TIME);
__glutSwapCount++;
if (__glutSwapTime == 0)
__glutSwapTime = t;
else if (t - __glutSwapTime > __glutFPS) {
float time = 0.001 * (t - __glutSwapTime);
float fps = (float) __glutSwapCount / time;
fprintf(stderr, "GLUT: %d frames in %.2f seconds = %.2f FPS\n",
__glutSwapCount, time, fps);
__glutSwapTime = t;
__glutSwapCount = 0;
}
}
}
/* ENDCENTRY */

View File

@ -1,210 +1,210 @@
/* Copyright (c) Mark J. Kilgard, 1994. */
/**
(c) Copyright 1993, Silicon Graphics, Inc.
ALL RIGHTS RESERVED
Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that
both the copyright notice and this permission notice appear in
supporting documentation, and that the name of Silicon
Graphics, Inc. not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission.
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO
EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE
ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
PERFORMANCE OF THIS SOFTWARE.
US Government Users Restricted Rights
Use, duplication, or disclosure by the Government is subject to
restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer
Software clause at DFARS 252.227-7013 and/or in similar or
successor clauses in the FAR or the DOD or NASA FAR
Supplement. Unpublished-- rights reserved under the copyright
laws of the United States. Contractor/manufacturer is Silicon
Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA
94039-7311.
OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
#include "glutint.h"
/* Rim, body, lid, and bottom data must be reflected in x and
y; handle and spout data across the y axis only. */
static int patchdata[][16] =
{
/* rim */
{102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15},
/* body */
{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27},
{24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40},
/* lid */
{96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101,
101, 0, 1, 2, 3,},
{0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117},
/* bottom */
{118, 118, 118, 118, 124, 122, 119, 121, 123, 126,
125, 120, 40, 39, 38, 37},
/* handle */
{41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 55, 56},
{53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
28, 65, 66, 67},
/* spout */
{68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83},
{80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95}
};
/* *INDENT-OFF* */
static float cpdata[][3] =
{
{0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0,
-0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125},
{0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375,
0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375,
2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84,
2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875},
{1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75,
1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35},
{0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2,
0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12,
0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225},
{1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225},
{1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0,
-1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5,
-0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3,
2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0,
2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0,
2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8},
{-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3,
-0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3,
1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2,
-0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0,
1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0,
0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66,
0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1},
{2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7,
-0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0,
2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375},
{3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475},
{3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4},
{2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0,
3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8,
3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4,
-0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0,
2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4,
2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3,
2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4},
{0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425,
-0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425,
0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075},
{0.84, -1.5, 0.075}
};
static float tex[2][2][2] =
{
{ {0, 0},
{1, 0}},
{ {0, 1},
{1, 1}}
};
/* *INDENT-ON* */
static void
teapot(GLint grid, GLdouble scale, GLenum type)
{
float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];
long i, j, k, l;
glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT);
glEnable(GL_AUTO_NORMAL);
glEnable(GL_NORMALIZE);
glEnable(GL_MAP2_VERTEX_3);
glEnable(GL_MAP2_TEXTURE_COORD_2);
glPushMatrix();
glRotatef(270.0, 1.0, 0.0, 0.0);
glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale);
glTranslatef(0.0, 0.0, -1.5);
for (i = 0; i < 10; i++) {
for (j = 0; j < 4; j++) {
for (k = 0; k < 4; k++) {
for (l = 0; l < 3; l++) {
p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l];
if (l == 1)
q[j][k][l] *= -1.0;
if (i < 6) {
r[j][k][l] =
cpdata[patchdata[i][j * 4 + (3 - k)]][l];
if (l == 0)
r[j][k][l] *= -1.0;
s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
if (l == 0)
s[j][k][l] *= -1.0;
if (l == 1)
s[j][k][l] *= -1.0;
}
}
}
}
glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2,
&tex[0][0][0]);
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&p[0][0][0]);
glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0);
glEvalMesh2(type, 0, grid, 0, grid);
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&q[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid);
if (i < 6) {
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&r[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid);
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&s[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid);
}
}
glPopMatrix();
glPopAttrib();
}
/* CENTRY */
void GLUTAPIENTRY
glutSolidTeapot(GLdouble scale)
{
teapot(7, scale, GL_FILL);
}
void GLUTAPIENTRY
glutWireTeapot(GLdouble scale)
{
teapot(10, scale, GL_LINE);
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1994. */
/**
(c) Copyright 1993, Silicon Graphics, Inc.
ALL RIGHTS RESERVED
Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that
both the copyright notice and this permission notice appear in
supporting documentation, and that the name of Silicon
Graphics, Inc. not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission.
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO
EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE
ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
PERFORMANCE OF THIS SOFTWARE.
US Government Users Restricted Rights
Use, duplication, or disclosure by the Government is subject to
restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer
Software clause at DFARS 252.227-7013 and/or in similar or
successor clauses in the FAR or the DOD or NASA FAR
Supplement. Unpublished-- rights reserved under the copyright
laws of the United States. Contractor/manufacturer is Silicon
Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA
94039-7311.
OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/
#include "glutint.h"
/* Rim, body, lid, and bottom data must be reflected in x and
y; handle and spout data across the y axis only. */
static int patchdata[][16] =
{
/* rim */
{102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15},
/* body */
{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27},
{24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40},
/* lid */
{96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101,
101, 0, 1, 2, 3,},
{0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112,
113, 114, 115, 116, 117},
/* bottom */
{118, 118, 118, 118, 124, 122, 119, 121, 123, 126,
125, 120, 40, 39, 38, 37},
/* handle */
{41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 55, 56},
{53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
28, 65, 66, 67},
/* spout */
{68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83},
{80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95}
};
/* *INDENT-OFF* */
static float cpdata[][3] =
{
{0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0,
-0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125},
{0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375,
0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375,
2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84,
2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875},
{1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75,
1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35},
{0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2,
0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12,
0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225},
{1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225},
{1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0,
-1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5,
-0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3,
2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0,
2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0,
2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8},
{-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3,
-0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3,
1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2,
-0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0,
1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0,
0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66,
0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1},
{2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7,
-0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0,
2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375},
{3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475},
{3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4},
{2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0,
3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8,
3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4,
-0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0,
2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4,
2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3,
2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4},
{0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425,
-0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425,
0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075},
{0.84, -1.5, 0.075}
};
static float tex[2][2][2] =
{
{ {0, 0},
{1, 0}},
{ {0, 1},
{1, 1}}
};
/* *INDENT-ON* */
static void
teapot(GLint grid, GLdouble scale, GLenum type)
{
float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];
long i, j, k, l;
glPushAttrib(GL_ENABLE_BIT | GL_EVAL_BIT);
glEnable(GL_AUTO_NORMAL);
glEnable(GL_NORMALIZE);
glEnable(GL_MAP2_VERTEX_3);
glEnable(GL_MAP2_TEXTURE_COORD_2);
glPushMatrix();
glRotatef(270.0, 1.0, 0.0, 0.0);
glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale);
glTranslatef(0.0, 0.0, -1.5);
for (i = 0; i < 10; i++) {
for (j = 0; j < 4; j++) {
for (k = 0; k < 4; k++) {
for (l = 0; l < 3; l++) {
p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l];
if (l == 1)
q[j][k][l] *= -1.0;
if (i < 6) {
r[j][k][l] =
cpdata[patchdata[i][j * 4 + (3 - k)]][l];
if (l == 0)
r[j][k][l] *= -1.0;
s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
if (l == 0)
s[j][k][l] *= -1.0;
if (l == 1)
s[j][k][l] *= -1.0;
}
}
}
}
glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2,
&tex[0][0][0]);
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&p[0][0][0]);
glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0);
glEvalMesh2(type, 0, grid, 0, grid);
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&q[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid);
if (i < 6) {
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&r[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid);
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
&s[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid);
}
}
glPopMatrix();
glPopAttrib();
}
/* CENTRY */
void GLUTAPIENTRY
glutSolidTeapot(GLdouble scale)
{
teapot(7, scale, GL_FILL);
}
void GLUTAPIENTRY
glutWireTeapot(GLdouble scale)
{
teapot(10, scale, GL_LINE);
}
/* ENDCENTRY */

File diff suppressed because it is too large Load Diff

View File

@ -1,90 +1,90 @@
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include "glutint.h"
#if !defined(__OS2__)
/* strdup is actually not a standard ANSI C or POSIX routine
so implement a private one for GLUT. OpenVMS does not have a
strdup; Linux's standard libc doesn't declare strdup by default
(unless BSD or SVID interfaces are requested). */
char *
__glutStrdup(const char *string)
{
char *copy;
copy = (char*) malloc(strlen(string) + 1);
if (copy == NULL)
return NULL;
strcpy(copy, string);
return copy;
}
#endif
void
__glutWarning(char *format,...)
{
va_list args;
va_start(args, format);
fprintf(stderr, "GLUT: Warning in %s: ",
__glutProgramName ? __glutProgramName : "(unamed)");
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
}
/* CENTRY */
void GLUTAPIENTRY
glutReportErrors(void)
{
GLenum error;
while ((error = glGetError()) != GL_NO_ERROR)
__glutWarning("GL error: %s", gluErrorString(error));
}
/* ENDCENTRY */
void
__glutFatalError(char *format,...)
{
va_list args;
va_start(args, format);
fprintf(stderr, "GLUT: Fatal Error in %s: ",
__glutProgramName ? __glutProgramName : "(unamed)");
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
/* || defined(__OS2__) */
#if defined(_WIN32)
if (__glutExitFunc) {
__glutExitFunc(1);
}
#endif
exit(1);
}
void
__glutFatalUsage(char *format,...)
{
va_list args;
va_start(args, format);
fprintf(stderr, "GLUT: Fatal API Usage in %s: ",
__glutProgramName ? __glutProgramName : "(unamed)");
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
abort();
}
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include "glutint.h"
#if !defined(__OS2__)
/* strdup is actually not a standard ANSI C or POSIX routine
so implement a private one for GLUT. OpenVMS does not have a
strdup; Linux's standard libc doesn't declare strdup by default
(unless BSD or SVID interfaces are requested). */
char *
__glutStrdup(const char *string)
{
char *copy;
copy = (char*) malloc(strlen(string) + 1);
if (copy == NULL)
return NULL;
strcpy(copy, string);
return copy;
}
#endif
void
__glutWarning(char *format,...)
{
va_list args;
va_start(args, format);
fprintf(stderr, "GLUT: Warning in %s: ",
__glutProgramName ? __glutProgramName : "(unamed)");
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
}
/* CENTRY */
void GLUTAPIENTRY
glutReportErrors(void)
{
GLenum error;
while ((error = glGetError()) != GL_NO_ERROR)
__glutWarning("GL error: %s", gluErrorString(error));
}
/* ENDCENTRY */
void
__glutFatalError(char *format,...)
{
va_list args;
va_start(args, format);
fprintf(stderr, "GLUT: Fatal Error in %s: ",
__glutProgramName ? __glutProgramName : "(unamed)");
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
/* || defined(__OS2__) */
#if defined(_WIN32)
if (__glutExitFunc) {
__glutExitFunc(1);
}
#endif
exit(1);
}
void
__glutFatalUsage(char *format,...)
{
va_list args;
va_start(args, format);
fprintf(stderr, "GLUT: Fatal API Usage in %s: ",
__glutProgramName ? __glutProgramName : "(unamed)");
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
abort();
}

View File

@ -1,232 +1,232 @@
/* Copyright (c) Mark J. Kilgard, 1996. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#ifdef __sgi
#include <dlfcn.h>
#endif
#include "glutint.h"
/* Grumble. The IRIX 6.3 and early IRIX 6.4 OpenGL headers
support the video resize extension, but failed to define
GLX_SGIX_video_resize. */
#if 0
#ifdef GLX_SYNC_FRAME_SGIX
#define GLX_SGIX_video_resize 1
#endif
#endif
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
static int canVideoResize = -1;
static int videoResizeChannel;
#else
static int canVideoResize = 0;
#endif
static int videoResizeInUse = 0;
static int dx = -1, dy = -1, dw = -1, dh = -1;
/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a
bug where programs seg-fault when they attempt video
resizing from an indirect OpenGL context (either local or
over a network). */
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
static volatile int errorCaught;
/* ARGSUSED */
static int
catchXSGIvcErrors(Display * dpy, XErrorEvent * event)
{
errorCaught = 1;
return 0;
}
#endif
/* CENTRY */
int GLUTAPIENTRY
glutVideoResizeGet(GLenum param)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (canVideoResize < 0) {
canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize");
if (canVideoResize) {
#if defined(__sgi) && __sgi
/* This is a hack because IRIX 6.2, 6.3, and some 6.4
versions were released with GLX_SGIX_video_resize
being advertised by the X server though the video
resize extension is not actually supported. We try to
determine if the libGL.so we are using actually has a
video resize entrypoint before we try to use the
feature. */
void (*func) (void);
void *glxDso = dlopen("libGL.so", RTLD_LAZY);
func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX");
if (!func) {
canVideoResize = 0;
} else
#endif
{
char *channelString;
int (*handler) (Display *, XErrorEvent *);
channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL");
videoResizeChannel = channelString ? atoi(channelString) : 0;
/* Work around another annoying problem with SGI's
GLX_SGIX_video_resize implementation. Early IRIX
6.4 OpenGL's advertise the extension and have the
video resize API, but an XSGIvc X protocol errors
result trying to use the API. Set up an error
handler to intercept what would otherwise be a fatal
error. If an error was recieved, do not report that
video resize is possible. */
handler = XSetErrorHandler(catchXSGIvcErrors);
errorCaught = 0;
#if defined(GLX_GLXEXT_PROTOTYPES)
#endif
__glut_glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, &dx, &dy, &dw, &dh);
/* glXQueryChannelDeltasSGIX is an inherent X server
round-trip so we know we will have gotten either the
correct reply or and error by this time. */
XSetErrorHandler(handler);
/* Still yet another work around. In IRIX 6.4 betas,
glXQueryChannelDeltasSGIX will return as if it
succeeded, but the values are filled with junk.
Watch to make sure the delta variables really make
sense. */
if (errorCaught ||
dx < 0 || dy < 0 || dw < 0 || dh < 0 ||
dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) {
canVideoResize = 0;
}
}
}
}
#endif /* GLX_SGIX_video_resize */
switch (param) {
case GLUT_VIDEO_RESIZE_POSSIBLE:
return canVideoResize;
case GLUT_VIDEO_RESIZE_IN_USE:
return videoResizeInUse;
case GLUT_VIDEO_RESIZE_X_DELTA:
return dx;
case GLUT_VIDEO_RESIZE_Y_DELTA:
return dy;
case GLUT_VIDEO_RESIZE_WIDTH_DELTA:
return dw;
case GLUT_VIDEO_RESIZE_HEIGHT_DELTA:
return dh;
case GLUT_VIDEO_RESIZE_X:
case GLUT_VIDEO_RESIZE_Y:
case GLUT_VIDEO_RESIZE_WIDTH:
case GLUT_VIDEO_RESIZE_HEIGHT:
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (videoResizeInUse) {
int x, y, width, height;
__glut_glXQueryChannelRectSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, &x, &y, &width, &height);
switch (param) {
case GLUT_VIDEO_RESIZE_X:
return x;
case GLUT_VIDEO_RESIZE_Y:
return y;
case GLUT_VIDEO_RESIZE_WIDTH:
return width;
case GLUT_VIDEO_RESIZE_HEIGHT:
return height;
}
}
#endif
return -1;
default:
__glutWarning("invalid glutVideoResizeGet parameter: %d", param);
return -1;
}
}
void GLUTAPIENTRY
glutSetupVideoResizing(void)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {
__glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, __glutCurrentWindow->win);
videoResizeInUse = 1;
} else
#endif
__glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n");
}
void GLUTAPIENTRY
glutStopVideoResizing(void)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {
if (videoResizeInUse) {
__glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, None);
videoResizeInUse = 0;
}
}
#endif
}
/* ARGSUSED */
void GLUTAPIENTRY
glutVideoResize(int x, int y, int width, int height)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (videoResizeInUse) {
#ifdef GLX_SYNC_SWAP_SGIX
/* glXChannelRectSyncSGIX introduced in a patch to IRIX
6.2; the original unpatched IRIX 6.2 behavior is always
GLX_SYNC_SWAP_SGIX. */
__glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, GLX_SYNC_SWAP_SGIX);
#endif
__glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, x, y, width, height);
}
#endif
}
/* ARGSUSED */
void GLUTAPIENTRY
glutVideoPan(int x, int y, int width, int height)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (videoResizeInUse) {
#ifdef GLX_SYNC_FRAME_SGIX
/* glXChannelRectSyncSGIX introduced in a patch to IRIX
6.2; the original unpatched IRIX 6.2 behavior is always
GLX_SYNC_SWAP_SGIX. We just ignore that we cannot
accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2;
this means you'd need a glutSwapBuffers to actually
realize the video resize. */
__glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, GLX_SYNC_FRAME_SGIX);
#endif
__glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, x, y, width, height);
}
#endif
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1996. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#ifdef __sgi
#include <dlfcn.h>
#endif
#include "glutint.h"
/* Grumble. The IRIX 6.3 and early IRIX 6.4 OpenGL headers
support the video resize extension, but failed to define
GLX_SGIX_video_resize. */
#if 0
#ifdef GLX_SYNC_FRAME_SGIX
#define GLX_SGIX_video_resize 1
#endif
#endif
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
static int canVideoResize = -1;
static int videoResizeChannel;
#else
static int canVideoResize = 0;
#endif
static int videoResizeInUse = 0;
static int dx = -1, dy = -1, dw = -1, dh = -1;
/* XXX Note that IRIX 6.2, 6.3, and some 6.4 versions have a
bug where programs seg-fault when they attempt video
resizing from an indirect OpenGL context (either local or
over a network). */
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
static volatile int errorCaught;
/* ARGSUSED */
static int
catchXSGIvcErrors(Display * dpy, XErrorEvent * event)
{
errorCaught = 1;
return 0;
}
#endif
/* CENTRY */
int GLUTAPIENTRY
glutVideoResizeGet(GLenum param)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (canVideoResize < 0) {
canVideoResize = __glutIsSupportedByGLX("GLX_SGIX_video_resize");
if (canVideoResize) {
#if defined(__sgi) && __sgi
/* This is a hack because IRIX 6.2, 6.3, and some 6.4
versions were released with GLX_SGIX_video_resize
being advertised by the X server though the video
resize extension is not actually supported. We try to
determine if the libGL.so we are using actually has a
video resize entrypoint before we try to use the
feature. */
void (*func) (void);
void *glxDso = dlopen("libGL.so", RTLD_LAZY);
func = (void (*)(void)) dlsym(glxDso, "glXQueryChannelDeltasSGIX");
if (!func) {
canVideoResize = 0;
} else
#endif
{
char *channelString;
int (*handler) (Display *, XErrorEvent *);
channelString = getenv("GLUT_VIDEO_RESIZE_CHANNEL");
videoResizeChannel = channelString ? atoi(channelString) : 0;
/* Work around another annoying problem with SGI's
GLX_SGIX_video_resize implementation. Early IRIX
6.4 OpenGL's advertise the extension and have the
video resize API, but an XSGIvc X protocol errors
result trying to use the API. Set up an error
handler to intercept what would otherwise be a fatal
error. If an error was recieved, do not report that
video resize is possible. */
handler = XSetErrorHandler(catchXSGIvcErrors);
errorCaught = 0;
#if defined(GLX_GLXEXT_PROTOTYPES)
#endif
__glut_glXQueryChannelDeltasSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, &dx, &dy, &dw, &dh);
/* glXQueryChannelDeltasSGIX is an inherent X server
round-trip so we know we will have gotten either the
correct reply or and error by this time. */
XSetErrorHandler(handler);
/* Still yet another work around. In IRIX 6.4 betas,
glXQueryChannelDeltasSGIX will return as if it
succeeded, but the values are filled with junk.
Watch to make sure the delta variables really make
sense. */
if (errorCaught ||
dx < 0 || dy < 0 || dw < 0 || dh < 0 ||
dx > 2048 || dy > 2048 || dw > 2048 || dh > 2048) {
canVideoResize = 0;
}
}
}
}
#endif /* GLX_SGIX_video_resize */
switch (param) {
case GLUT_VIDEO_RESIZE_POSSIBLE:
return canVideoResize;
case GLUT_VIDEO_RESIZE_IN_USE:
return videoResizeInUse;
case GLUT_VIDEO_RESIZE_X_DELTA:
return dx;
case GLUT_VIDEO_RESIZE_Y_DELTA:
return dy;
case GLUT_VIDEO_RESIZE_WIDTH_DELTA:
return dw;
case GLUT_VIDEO_RESIZE_HEIGHT_DELTA:
return dh;
case GLUT_VIDEO_RESIZE_X:
case GLUT_VIDEO_RESIZE_Y:
case GLUT_VIDEO_RESIZE_WIDTH:
case GLUT_VIDEO_RESIZE_HEIGHT:
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (videoResizeInUse) {
int x, y, width, height;
__glut_glXQueryChannelRectSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, &x, &y, &width, &height);
switch (param) {
case GLUT_VIDEO_RESIZE_X:
return x;
case GLUT_VIDEO_RESIZE_Y:
return y;
case GLUT_VIDEO_RESIZE_WIDTH:
return width;
case GLUT_VIDEO_RESIZE_HEIGHT:
return height;
}
}
#endif
return -1;
default:
__glutWarning("invalid glutVideoResizeGet parameter: %d", param);
return -1;
}
}
void GLUTAPIENTRY
glutSetupVideoResizing(void)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {
__glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, __glutCurrentWindow->win);
videoResizeInUse = 1;
} else
#endif
__glutFatalError("glutEstablishVideoResizing: video resizing not possible.\n");
}
void GLUTAPIENTRY
glutStopVideoResizing(void)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (glutVideoResizeGet(GLUT_VIDEO_RESIZE_POSSIBLE)) {
if (videoResizeInUse) {
__glut_glXBindChannelToWindowSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, None);
videoResizeInUse = 0;
}
}
#endif
}
/* ARGSUSED */
void GLUTAPIENTRY
glutVideoResize(int x, int y, int width, int height)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (videoResizeInUse) {
#ifdef GLX_SYNC_SWAP_SGIX
/* glXChannelRectSyncSGIX introduced in a patch to IRIX
6.2; the original unpatched IRIX 6.2 behavior is always
GLX_SYNC_SWAP_SGIX. */
__glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, GLX_SYNC_SWAP_SGIX);
#endif
__glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, x, y, width, height);
}
#endif
}
/* ARGSUSED */
void GLUTAPIENTRY
glutVideoPan(int x, int y, int width, int height)
{
#if defined(GLX_VERSION_1_1) && defined(GLX_SGIX_video_resize)
if (videoResizeInUse) {
#ifdef GLX_SYNC_FRAME_SGIX
/* glXChannelRectSyncSGIX introduced in a patch to IRIX
6.2; the original unpatched IRIX 6.2 behavior is always
GLX_SYNC_SWAP_SGIX. We just ignore that we cannot
accomplish GLX_SYNC_FRAME_SGIX on IRIX unpatched 6.2;
this means you'd need a glutSwapBuffers to actually
realize the video resize. */
__glut_glXChannelRectSyncSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, GLX_SYNC_FRAME_SGIX);
#endif
__glut_glXChannelRectSGIX(__glutDisplay, __glutScreen,
videoResizeChannel, x, y, width, height);
}
#endif
}
/* ENDCENTRY */

View File

@ -1,29 +1,29 @@
/* Copyright (c) Mark J. Kilgard, 1996, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutWarpPointer(int x, int y)
{
// XWarpPointer(__glutDisplay, None, __glutCurrentWindow->win,
// 0, 0, 0, 0, x, y);
POINTL point;
point.x = x;
point.y = y;
WinMapWindowPoints(__glutCurrentWindow->win,HWND_DESKTOP,&point,1);
WinSetPointerPos(HWND_DESKTOP, point.x, point.y);
XFlush(__glutDisplay);
}
/* ENDCENTRY */
/* Copyright (c) Mark J. Kilgard, 1996, 1997. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include "glutint.h"
/* CENTRY */
void GLUTAPIENTRY
glutWarpPointer(int x, int y)
{
// XWarpPointer(__glutDisplay, None, __glutCurrentWindow->win,
// 0, 0, 0, 0, x, y);
POINTL point;
point.x = x;
point.y = y;
WinMapWindowPoints(__glutCurrentWindow->win,HWND_DESKTOP,&point,1);
WinSetPointerPos(HWND_DESKTOP, point.x, point.y);
XFlush(__glutDisplay);
}
/* ENDCENTRY */

View File

@ -1,32 +1,32 @@
#ifndef __glutbitmap_h__
#define __glutbitmap_h__
/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#define GLUT_NO_LIB_PRAGMA /* Avoid auto library linking when building
the GLUT library itself. */
#include <GL/glut.h>
typedef struct {
const GLsizei width;
const GLsizei height;
const GLfloat xorig;
const GLfloat yorig;
const GLfloat advance;
const GLubyte *bitmap;
} BitmapCharRec, *BitmapCharPtr;
typedef struct {
const char *name;
const int num_chars;
const int first;
const BitmapCharRec * const *ch;
} BitmapFontRec, *BitmapFontPtr;
typedef void *GLUTbitmapFont;
#endif /* __glutbitmap_h__ */
#ifndef __glutbitmap_h__
#define __glutbitmap_h__
/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#define GLUT_NO_LIB_PRAGMA /* Avoid auto library linking when building
the GLUT library itself. */
#include <GL/glut.h>
typedef struct {
const GLsizei width;
const GLsizei height;
const GLfloat xorig;
const GLfloat yorig;
const GLfloat advance;
const GLubyte *bitmap;
} BitmapCharRec, *BitmapCharPtr;
typedef struct {
const char *name;
const int num_chars;
const int first;
const BitmapCharRec * const *ch;
} BitmapFontRec, *BitmapFontPtr;
typedef void *GLUTbitmapFont;
#endif /* __glutbitmap_h__ */

View File

@ -1,42 +1,42 @@
#ifndef __glutstroke_h__
#define __glutstroke_h__
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#if defined(_WIN32)
#pragma warning (disable:4244) /* disable bogus conversion warnings */
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
#endif
typedef struct {
float x;
float y;
} CoordRec, *CoordPtr;
typedef struct {
int num_coords;
const CoordRec *coord;
} StrokeRec, *StrokePtr;
typedef struct {
int num_strokes;
const StrokeRec *stroke;
float center;
float right;
} StrokeCharRec, *StrokeCharPtr;
typedef struct {
const char *name;
int num_chars;
const StrokeCharRec *ch;
float top;
float bottom;
} StrokeFontRec, *StrokeFontPtr;
typedef void *GLUTstrokeFont;
#endif /* __glutstroke_h__ */
#ifndef __glutstroke_h__
#define __glutstroke_h__
/* Copyright (c) Mark J. Kilgard, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
#if defined(_WIN32)
#pragma warning (disable:4244) /* disable bogus conversion warnings */
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
#endif
typedef struct {
float x;
float y;
} CoordRec, *CoordPtr;
typedef struct {
int num_coords;
const CoordRec *coord;
} StrokeRec, *StrokePtr;
typedef struct {
int num_strokes;
const StrokeRec *stroke;
float center;
float right;
} StrokeCharRec, *StrokeCharPtr;
typedef struct {
const char *name;
int num_chars;
const StrokeCharRec *ch;
float top;
float bottom;
} StrokeFontRec, *StrokeFontPtr;
typedef void *GLUTstrokeFont;
#endif /* __glutstroke_h__ */

View File

@ -1,59 +1,59 @@
#ifndef __layerutil_h__
#define __layerutil_h__
/* Copyright (c) Mark J. Kilgard, 1993, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
/* Based on XLayerUtil.h: Revision: 1.3 */
#ifdef __VMS
#include <GL/vms_x_fix.h>
#endif
#if !defined(_WIN32) && !defined(__OS2__)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xmd.h>
#endif /* !_WIN32 */
/* Transparent type values */
/* None 0 */
#define TransparentPixel 1
#define TransparentMask 2
/* layered visual info template flags */
#define VisualLayerMask 0x200
#define VisualTransparentType 0x400
#define VisualTransparentValue 0x800
#define VisualAllLayerMask 0xFFF
/* layered visual info structure */
typedef struct _XLayerVisualInfo {
XVisualInfo vinfo;
long layer;
long type;
unsigned long value;
} XLayerVisualInfo;
/* SERVER_OVERLAY_VISUALS property element */
typedef struct _OverlayInfo {
/* Avoid 64-bit portability problems by being careful to use
longs due to the way XGetWindowProperty is specified. Note
that these parameters are passed as CARD32s over X
protocol. */
long overlay_visual;
long transparent_type;
long value;
long layer;
} OverlayInfo;
extern int __glutGetTransparentPixel(Display *, XVisualInfo *);
extern XLayerVisualInfo *__glutXGetLayerVisualInfo(Display *,
long, XLayerVisualInfo *, int *);
extern Status __glutXMatchLayerVisualInfo(Display *,
int, int, int, int, XLayerVisualInfo *);
#endif /* __layerutil_h__ */
#ifndef __layerutil_h__
#define __layerutil_h__
/* Copyright (c) Mark J. Kilgard, 1993, 1994. */
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
/* Based on XLayerUtil.h: Revision: 1.3 */
#ifdef __VMS
#include <GL/vms_x_fix.h>
#endif
#if !defined(_WIN32) && !defined(__OS2__)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xmd.h>
#endif /* !_WIN32 */
/* Transparent type values */
/* None 0 */
#define TransparentPixel 1
#define TransparentMask 2
/* layered visual info template flags */
#define VisualLayerMask 0x200
#define VisualTransparentType 0x400
#define VisualTransparentValue 0x800
#define VisualAllLayerMask 0xFFF
/* layered visual info structure */
typedef struct _XLayerVisualInfo {
XVisualInfo vinfo;
long layer;
long type;
unsigned long value;
} XLayerVisualInfo;
/* SERVER_OVERLAY_VISUALS property element */
typedef struct _OverlayInfo {
/* Avoid 64-bit portability problems by being careful to use
longs due to the way XGetWindowProperty is specified. Note
that these parameters are passed as CARD32s over X
protocol. */
long overlay_visual;
long transparent_type;
long value;
long layer;
} OverlayInfo;
extern int __glutGetTransparentPixel(Display *, XVisualInfo *);
extern XLayerVisualInfo *__glutXGetLayerVisualInfo(Display *,
long, XLayerVisualInfo *, int *);
extern Status __glutXMatchLayerVisualInfo(Display *,
int, int, int, int, XLayerVisualInfo *);
#endif /* __layerutil_h__ */

View File

@ -1,94 +1,94 @@
;-----------------------------------------------------
; def Module definition file for the DLL
;-----------------------------------------------------
LIBRARY libGlut INITINSTANCE TERMINSTANCE
PROTMODE
DATA MULTIPLE NONSHARED READWRITE LOADONCALL
CODE LOADONCALL
EXPORTS ; Names of exported functions and data
;*********************************
;MesaGLUT
glutCommandFunc @3001
glutCreateWindow @3002
glutCreateSubWindow @3003
glutDestroyWindow @3004
glutDisplayFunc @3005
glutEntryFunc @3006
glutExtensionSupported @3007
glutIdleFunc @3008
glutInit @3009
glutInitDisplayMode @3010
glutInitWindowPosition @3011
glutInitWindowSize @3012
glutMainLoop @3013
glutGet @3014
glutGetColor @3015
glutGetWindow @3016
glutKeyboardFunc @3017
glutMouseFunc @3018
glutSpecialFunc @3019
glutStrokeCharacter @3020
glutSetColor @3021
glutSetIconTitle @3022
glutSetWindow @3023
glutSetWindowTitle @3024
glutReshapeFunc @3025
glutReshapeWindow @3026
glutSwapBuffers @3027
glutPostRedisplay @3028
glutPositionWindow @3029
glutVisibilityFunc @3030
glutTimerFunc @3031
glutMotionFunc @3032
glutCreateMenu @3033
glutAttachMenu @3034
glutDestroyMenu @3035
glutAddMenuEntry @3036
glutPassiveMotionFunc @3037
glutSolidCone @3038
glutSolidCube @3039
glutSolidDodecahedron @3040
glutSolidOctahedron @3041
glutSolidIcosahedron @3042
glutSolidSphere @3043
glutSolidTeapot @3044
glutSolidTetrahedron @3045
glutSolidTorus @3046
glutWireCone @3047
glutWireCube @3048
glutWireDodecahedron @3049
glutWireIcosahedron @3050
glutWireOctahedron @3051
glutWireSphere @3052
glutWireTetrahedron @3053
glutWireTorus @3054
glutWireTeapot @3055
;GL_GLEXT_PROTOTYPES
glutBitmapCharacter @3101
glutBitmap9By15 @3102
glutBitmapHelvetica10 @3103
glutBitmapHelvetica12 @3104
glutBitmapHelvetica18 @3105
glutBitmapTimesRoman24 @3106
glutStrokeRoman @3107
glutBitmap8By13 @3108
;Global constants
; hab @12001
; /* PM anchor block handle */
; hpsCurrent @12002
XHDC @12004
XHWND @12005
;-----------------------------------------------------
; def Module definition file for the DLL
;-----------------------------------------------------
LIBRARY libGlut INITINSTANCE TERMINSTANCE
PROTMODE
DATA MULTIPLE NONSHARED READWRITE LOADONCALL
CODE LOADONCALL
EXPORTS ; Names of exported functions and data
;*********************************
;MesaGLUT
glutCommandFunc @3001
glutCreateWindow @3002
glutCreateSubWindow @3003
glutDestroyWindow @3004
glutDisplayFunc @3005
glutEntryFunc @3006
glutExtensionSupported @3007
glutIdleFunc @3008
glutInit @3009
glutInitDisplayMode @3010
glutInitWindowPosition @3011
glutInitWindowSize @3012
glutMainLoop @3013
glutGet @3014
glutGetColor @3015
glutGetWindow @3016
glutKeyboardFunc @3017
glutMouseFunc @3018
glutSpecialFunc @3019
glutStrokeCharacter @3020
glutSetColor @3021
glutSetIconTitle @3022
glutSetWindow @3023
glutSetWindowTitle @3024
glutReshapeFunc @3025
glutReshapeWindow @3026
glutSwapBuffers @3027
glutPostRedisplay @3028
glutPositionWindow @3029
glutVisibilityFunc @3030
glutTimerFunc @3031
glutMotionFunc @3032
glutCreateMenu @3033
glutAttachMenu @3034
glutDestroyMenu @3035
glutAddMenuEntry @3036
glutPassiveMotionFunc @3037
glutSolidCone @3038
glutSolidCube @3039
glutSolidDodecahedron @3040
glutSolidOctahedron @3041
glutSolidIcosahedron @3042
glutSolidSphere @3043
glutSolidTeapot @3044
glutSolidTetrahedron @3045
glutSolidTorus @3046
glutWireCone @3047
glutWireCube @3048
glutWireDodecahedron @3049
glutWireIcosahedron @3050
glutWireOctahedron @3051
glutWireSphere @3052
glutWireTetrahedron @3053
glutWireTorus @3054
glutWireTeapot @3055
;GL_GLEXT_PROTOTYPES
glutBitmapCharacter @3101
glutBitmap9By15 @3102
glutBitmapHelvetica10 @3103
glutBitmapHelvetica12 @3104
glutBitmapHelvetica18 @3105
glutBitmapTimesRoman24 @3106
glutStrokeRoman @3107
glutBitmap8By13 @3108
;Global constants
; hab @12001
; /* PM anchor block handle */
; hpsCurrent @12002
XHDC @12004
XHWND @12005

View File

@ -1,414 +1,414 @@
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>
#include "buffers.h"
#include "context.h"
#include "imports.h"
#include "matrix.h"
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>
#include "buffers.h"
#include "context.h"
#include "imports.h"
#include "matrix.h"
#include "mtypes.h"
#include "GL/amesa.h"
struct amesa_visual
{
GLvisual *GLVisual; /* inherit from GLvisual */
GLboolean DBFlag; /* double buffered? */
GLuint Depth; /* bits per pixel ( >= 15 ) */
};
struct amesa_buffer
{
GLframebuffer *GLBuffer; /* inherit from GLframebuffer */
GLuint Width, Height;
BITMAP *Screen;
BITMAP *Background;
BITMAP *Active;
};
struct amesa_context
{
GLcontext *GLContext; /* inherit from GLcontext */
AMesaVisual Visual;
AMesaBuffer Buffer;
GLuint ClearColor;
GLuint CurrentColor;
};
static void setup_dd_pointers(GLcontext *ctx);
/**********************************************************************/
/***** drawing functions *****/
/**********************************************************************/
#define FLIP(context, y) (context->Buffer->Height - (y) - 1)
#include "allegro/generic.h"
#include "allegro/direct.h"
/**********************************************************************/
/***** 15-bit accelerated drawing funcs *****/
/**********************************************************************/
IMPLEMENT_WRITE_RGBA_SPAN(15, unsigned short)
IMPLEMENT_WRITE_RGB_SPAN(15, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_SPAN(15, unsigned short)
IMPLEMENT_READ_RGBA_SPAN(15, unsigned short)
IMPLEMENT_WRITE_RGBA_PIXELS(15, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_PIXELS(15, unsigned short)
IMPLEMENT_READ_RGBA_PIXELS(15, unsigned short)
/**********************************************************************/
/***** 16-bit accelerated drawing funcs *****/
/**********************************************************************/
IMPLEMENT_WRITE_RGBA_SPAN(16, unsigned short)
IMPLEMENT_WRITE_RGB_SPAN(16, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_SPAN(16, unsigned short)
IMPLEMENT_READ_RGBA_SPAN(16, unsigned short)
IMPLEMENT_WRITE_RGBA_PIXELS(16, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_PIXELS(16, unsigned short)
IMPLEMENT_READ_RGBA_PIXELS(16, unsigned short)
/**********************************************************************/
/***** 32-bit accelerated drawing funcs *****/
/**********************************************************************/
IMPLEMENT_WRITE_RGBA_SPAN(32, unsigned long)
IMPLEMENT_WRITE_RGB_SPAN(32, unsigned long)
IMPLEMENT_WRITE_MONO_RGBA_SPAN(32, unsigned long)
IMPLEMENT_READ_RGBA_SPAN(32, unsigned long)
IMPLEMENT_WRITE_RGBA_PIXELS(32, unsigned long)
IMPLEMENT_WRITE_MONO_RGBA_PIXELS(32, unsigned long)
IMPLEMENT_READ_RGBA_PIXELS(32, unsigned long)
/**********************************************************************/
/***** Miscellaneous device driver funcs *****/
/**********************************************************************/
static GLboolean set_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bit)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
GLboolean ok = GL_TRUE;
if (bit == DD_FRONT_LEFT_BIT)
context->Buffer->Active = context->Buffer->Screen;
else if (bit == DD_BACK_LEFT)
{
if (context->Buffer->Background)
context->Buffer->Active = context->Buffer->Background;
else
ok = GL_FALSE;
}
else
ok = GL_FALSE;
return ok;
}
static void get_buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
*width = context->Buffer->Width;
*height = context->Buffer->Height;
}
/**
* We only implement this function as a mechanism to check if the
* framebuffer size has changed (and update corresponding state).
*/
static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
/* poll for window size change and realloc software Z/stencil/etc if needed */
GLuint newWidth, newHeight;
GLframebuffer *buffer = ctx->WinSysDrawBuffer;
get_buffer_size( &newWidth, &newHeight );
if (buffer->Width != newWidth || buffer->Height != newHeight) {
_mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
}
}
/**********************************************************************/
/**********************************************************************/
static void setup_dd_pointers(GLcontext *ctx)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
/* Initialize all the pointers in the driver struct. Do this whenever */
/* a new context is made current or we change buffers via set_buffer! */
ctx->Driver.UpdateState = setup_dd_pointers;
ctx->Driver.SetBuffer = set_buffer;
ctx->Driver.GetBufferSize = get_buffer_size;
ctx->Driver.Viewport = viewport;
ctx->Driver.Color = set_color_generic;
ctx->Driver.ClearColor = clear_color_generic;
ctx->Driver.Clear = clear_generic;
ctx->Driver.WriteRGBASpan = write_rgba_span_generic;
ctx->Driver.WriteRGBSpan = write_rgb_span_generic;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_generic;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_generic;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_generic;
ctx->Driver.ReadRGBASpan = read_rgba_span_generic;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_generic;
if (context->Buffer->Active != screen)
{
switch (context->Visual->Depth)
{
case 15:
ctx->Driver.WriteRGBASpan = write_rgba_span_15;
ctx->Driver.WriteRGBSpan = write_rgb_span_15;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_15;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_15;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_15;
ctx->Driver.ReadRGBASpan = read_rgba_span_15;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_15;
break;
case 16:
ctx->Driver.WriteRGBASpan = write_rgba_span_16;
ctx->Driver.WriteRGBSpan = write_rgb_span_16;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_16;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_16;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_16;
ctx->Driver.ReadRGBASpan = read_rgba_span_16;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_16;
break;
case 32:
ctx->Driver.WriteRGBASpan = write_rgba_span_32;
ctx->Driver.WriteRGBSpan = write_rgb_span_32;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_32;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_32;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_32;
ctx->Driver.ReadRGBASpan = read_rgba_span_32;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_32;
break;
}
}
}
/**********************************************************************/
/***** AMesa Public API Functions *****/
/**********************************************************************/
AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth,
GLint depthSize, GLint stencilSize, GLint accumSize)
{
AMesaVisual visual;
GLbyte redBits, greenBits, blueBits;
visual = (AMesaVisual)calloc(1, sizeof(struct amesa_visual));
if (!visual)
return NULL;
switch (depth)
{
case 15:
redBits = 5;
greenBits = 5;
blueBits = 5;
break;
case 16:
redBits = 5;
greenBits = 6;
blueBits = 5;
break;
case 24: case 32:
redBits = 8;
greenBits = 8;
blueBits = 8;
break;
default:
free(visual);
return NULL;
}
visual->DBFlag = dbFlag;
visual->Depth = depth;
visual->GLVisual = _mesa_create_visual(GL_TRUE, /* rgb mode */
dbFlag, /* db_flag */
GL_FALSE, /* stereo */
redBits, greenBits, blueBits, 8,
0, /* index bits */
depthSize, /* depth bits */
stencilSize,/* stencil bits */
accumSize, /* accum bits */
accumSize, /* accum bits */
accumSize, /* accum bits */
accumSize, /* accum bits */
1 );
if (!visual->GLVisual)
{
free(visual);
return NULL;
}
return visual;
}
void AMesaDestroyVisual(AMesaVisual visual)
{
_mesa_destroy_visual(visual->GLVisual);
free(visual);
}
AMesaBuffer AMesaCreateBuffer(AMesaVisual visual,
GLint width, GLint height)
{
AMesaBuffer buffer;
buffer = (AMesaBuffer)calloc(1, sizeof(struct amesa_buffer));
if (!buffer)
return NULL;
buffer->Screen = NULL;
buffer->Background = NULL;
buffer->Active = NULL;
buffer->Width = width;
buffer->Height = height;
if (visual->DBFlag)
{
buffer->Background = create_bitmap_ex(visual->Depth, width, height);
if (!buffer->Background)
{
free(buffer);
return NULL;
}
}
buffer->GLBuffer = _mesa_create_framebuffer(visual->GLVisual);
if (!buffer->GLBuffer)
{
if (buffer->Background) destroy_bitmap(buffer->Background);
free(buffer);
return NULL;
}
return buffer;
}
void AMesaDestroyBuffer(AMesaBuffer buffer)
{
if (buffer->Screen) destroy_bitmap(buffer->Screen);
if (buffer->Background) destroy_bitmap(buffer->Background);
_mesa_unreference_framebuffer(&buffer->GLBuffer);
free(buffer);
}
AMesaContext AMesaCreateContext(AMesaVisual visual,
AMesaContext share)
{
AMesaContext context;
GLboolean direct = GL_FALSE;
context = (AMesaContext)calloc(1, sizeof(struct amesa_context));
if (!context)
return NULL;
context->Visual = visual;
context->Buffer = NULL;
context->ClearColor = 0;
context->CurrentColor = 0;
context->GLContext = _mesa_create_context(visual->GLVisual,
share ? share->GLContext : NULL,
(void *) context, GL_FALSE );
if (!context->GLContext)
{
free(context);
return NULL;
}
return context;
}
void AMesaDestroyContext(AMesaContext context)
{
_mesa_destroy_context(context->GLContext);
free(context);
}
GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer)
{
if (context && buffer) {
set_color_depth(context->Visual->Depth);
if (set_gfx_mode(GFX_AUTODETECT, buffer->Width, buffer->Height, 0, 0) != 0)
return GL_FALSE;
context->Buffer = buffer;
buffer->Screen = screen;
buffer->Active = buffer->Background ? buffer->Background : screen;
setup_dd_pointers(context->GLContext);
_mesa_make_current(context->GLContext, buffer->GLBuffer);
}
else {
#include "GL/amesa.h"
struct amesa_visual
{
GLvisual *GLVisual; /* inherit from GLvisual */
GLboolean DBFlag; /* double buffered? */
GLuint Depth; /* bits per pixel ( >= 15 ) */
};
struct amesa_buffer
{
GLframebuffer *GLBuffer; /* inherit from GLframebuffer */
GLuint Width, Height;
BITMAP *Screen;
BITMAP *Background;
BITMAP *Active;
};
struct amesa_context
{
GLcontext *GLContext; /* inherit from GLcontext */
AMesaVisual Visual;
AMesaBuffer Buffer;
GLuint ClearColor;
GLuint CurrentColor;
};
static void setup_dd_pointers(GLcontext *ctx);
/**********************************************************************/
/***** drawing functions *****/
/**********************************************************************/
#define FLIP(context, y) (context->Buffer->Height - (y) - 1)
#include "allegro/generic.h"
#include "allegro/direct.h"
/**********************************************************************/
/***** 15-bit accelerated drawing funcs *****/
/**********************************************************************/
IMPLEMENT_WRITE_RGBA_SPAN(15, unsigned short)
IMPLEMENT_WRITE_RGB_SPAN(15, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_SPAN(15, unsigned short)
IMPLEMENT_READ_RGBA_SPAN(15, unsigned short)
IMPLEMENT_WRITE_RGBA_PIXELS(15, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_PIXELS(15, unsigned short)
IMPLEMENT_READ_RGBA_PIXELS(15, unsigned short)
/**********************************************************************/
/***** 16-bit accelerated drawing funcs *****/
/**********************************************************************/
IMPLEMENT_WRITE_RGBA_SPAN(16, unsigned short)
IMPLEMENT_WRITE_RGB_SPAN(16, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_SPAN(16, unsigned short)
IMPLEMENT_READ_RGBA_SPAN(16, unsigned short)
IMPLEMENT_WRITE_RGBA_PIXELS(16, unsigned short)
IMPLEMENT_WRITE_MONO_RGBA_PIXELS(16, unsigned short)
IMPLEMENT_READ_RGBA_PIXELS(16, unsigned short)
/**********************************************************************/
/***** 32-bit accelerated drawing funcs *****/
/**********************************************************************/
IMPLEMENT_WRITE_RGBA_SPAN(32, unsigned long)
IMPLEMENT_WRITE_RGB_SPAN(32, unsigned long)
IMPLEMENT_WRITE_MONO_RGBA_SPAN(32, unsigned long)
IMPLEMENT_READ_RGBA_SPAN(32, unsigned long)
IMPLEMENT_WRITE_RGBA_PIXELS(32, unsigned long)
IMPLEMENT_WRITE_MONO_RGBA_PIXELS(32, unsigned long)
IMPLEMENT_READ_RGBA_PIXELS(32, unsigned long)
/**********************************************************************/
/***** Miscellaneous device driver funcs *****/
/**********************************************************************/
static GLboolean set_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bit)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
GLboolean ok = GL_TRUE;
if (bit == DD_FRONT_LEFT_BIT)
context->Buffer->Active = context->Buffer->Screen;
else if (bit == DD_BACK_LEFT)
{
if (context->Buffer->Background)
context->Buffer->Active = context->Buffer->Background;
else
ok = GL_FALSE;
}
else
ok = GL_FALSE;
return ok;
}
static void get_buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
*width = context->Buffer->Width;
*height = context->Buffer->Height;
}
/**
* We only implement this function as a mechanism to check if the
* framebuffer size has changed (and update corresponding state).
*/
static void viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
/* poll for window size change and realloc software Z/stencil/etc if needed */
GLuint newWidth, newHeight;
GLframebuffer *buffer = ctx->WinSysDrawBuffer;
get_buffer_size( &newWidth, &newHeight );
if (buffer->Width != newWidth || buffer->Height != newHeight) {
_mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
}
}
/**********************************************************************/
/**********************************************************************/
static void setup_dd_pointers(GLcontext *ctx)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
/* Initialize all the pointers in the driver struct. Do this whenever */
/* a new context is made current or we change buffers via set_buffer! */
ctx->Driver.UpdateState = setup_dd_pointers;
ctx->Driver.SetBuffer = set_buffer;
ctx->Driver.GetBufferSize = get_buffer_size;
ctx->Driver.Viewport = viewport;
ctx->Driver.Color = set_color_generic;
ctx->Driver.ClearColor = clear_color_generic;
ctx->Driver.Clear = clear_generic;
ctx->Driver.WriteRGBASpan = write_rgba_span_generic;
ctx->Driver.WriteRGBSpan = write_rgb_span_generic;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_generic;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_generic;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_generic;
ctx->Driver.ReadRGBASpan = read_rgba_span_generic;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_generic;
if (context->Buffer->Active != screen)
{
switch (context->Visual->Depth)
{
case 15:
ctx->Driver.WriteRGBASpan = write_rgba_span_15;
ctx->Driver.WriteRGBSpan = write_rgb_span_15;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_15;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_15;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_15;
ctx->Driver.ReadRGBASpan = read_rgba_span_15;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_15;
break;
case 16:
ctx->Driver.WriteRGBASpan = write_rgba_span_16;
ctx->Driver.WriteRGBSpan = write_rgb_span_16;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_16;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_16;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_16;
ctx->Driver.ReadRGBASpan = read_rgba_span_16;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_16;
break;
case 32:
ctx->Driver.WriteRGBASpan = write_rgba_span_32;
ctx->Driver.WriteRGBSpan = write_rgb_span_32;
ctx->Driver.WriteMonoRGBASpan = write_mono_rgba_span_32;
ctx->Driver.WriteRGBAPixels = write_rgba_pixels_32;
ctx->Driver.WriteMonoRGBAPixels = write_mono_rgba_pixels_32;
ctx->Driver.ReadRGBASpan = read_rgba_span_32;
ctx->Driver.ReadRGBAPixels = read_rgba_pixels_32;
break;
}
}
}
/**********************************************************************/
/***** AMesa Public API Functions *****/
/**********************************************************************/
AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth,
GLint depthSize, GLint stencilSize, GLint accumSize)
{
AMesaVisual visual;
GLbyte redBits, greenBits, blueBits;
visual = (AMesaVisual)calloc(1, sizeof(struct amesa_visual));
if (!visual)
return NULL;
switch (depth)
{
case 15:
redBits = 5;
greenBits = 5;
blueBits = 5;
break;
case 16:
redBits = 5;
greenBits = 6;
blueBits = 5;
break;
case 24: case 32:
redBits = 8;
greenBits = 8;
blueBits = 8;
break;
default:
free(visual);
return NULL;
}
visual->DBFlag = dbFlag;
visual->Depth = depth;
visual->GLVisual = _mesa_create_visual(GL_TRUE, /* rgb mode */
dbFlag, /* db_flag */
GL_FALSE, /* stereo */
redBits, greenBits, blueBits, 8,
0, /* index bits */
depthSize, /* depth bits */
stencilSize,/* stencil bits */
accumSize, /* accum bits */
accumSize, /* accum bits */
accumSize, /* accum bits */
accumSize, /* accum bits */
1 );
if (!visual->GLVisual)
{
free(visual);
return NULL;
}
return visual;
}
void AMesaDestroyVisual(AMesaVisual visual)
{
_mesa_destroy_visual(visual->GLVisual);
free(visual);
}
AMesaBuffer AMesaCreateBuffer(AMesaVisual visual,
GLint width, GLint height)
{
AMesaBuffer buffer;
buffer = (AMesaBuffer)calloc(1, sizeof(struct amesa_buffer));
if (!buffer)
return NULL;
buffer->Screen = NULL;
buffer->Background = NULL;
buffer->Active = NULL;
buffer->Width = width;
buffer->Height = height;
if (visual->DBFlag)
{
buffer->Background = create_bitmap_ex(visual->Depth, width, height);
if (!buffer->Background)
{
free(buffer);
return NULL;
}
}
buffer->GLBuffer = _mesa_create_framebuffer(visual->GLVisual);
if (!buffer->GLBuffer)
{
if (buffer->Background) destroy_bitmap(buffer->Background);
free(buffer);
return NULL;
}
return buffer;
}
void AMesaDestroyBuffer(AMesaBuffer buffer)
{
if (buffer->Screen) destroy_bitmap(buffer->Screen);
if (buffer->Background) destroy_bitmap(buffer->Background);
_mesa_unreference_framebuffer(&buffer->GLBuffer);
free(buffer);
}
AMesaContext AMesaCreateContext(AMesaVisual visual,
AMesaContext share)
{
AMesaContext context;
GLboolean direct = GL_FALSE;
context = (AMesaContext)calloc(1, sizeof(struct amesa_context));
if (!context)
return NULL;
context->Visual = visual;
context->Buffer = NULL;
context->ClearColor = 0;
context->CurrentColor = 0;
context->GLContext = _mesa_create_context(visual->GLVisual,
share ? share->GLContext : NULL,
(void *) context, GL_FALSE );
if (!context->GLContext)
{
free(context);
return NULL;
}
return context;
}
void AMesaDestroyContext(AMesaContext context)
{
_mesa_destroy_context(context->GLContext);
free(context);
}
GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer)
{
if (context && buffer) {
set_color_depth(context->Visual->Depth);
if (set_gfx_mode(GFX_AUTODETECT, buffer->Width, buffer->Height, 0, 0) != 0)
return GL_FALSE;
context->Buffer = buffer;
buffer->Screen = screen;
buffer->Active = buffer->Background ? buffer->Background : screen;
setup_dd_pointers(context->GLContext);
_mesa_make_current(context->GLContext, buffer->GLBuffer);
}
else {
/* XXX I don't think you want to destroy anything here! */
destroy_bitmap(context->Buffer->Screen);
context->Buffer->Screen = NULL;
context->Buffer->Active = NULL;
context->Buffer = NULL;
_mesa_make_current(NULL, NULL);
}
return GL_TRUE;
}
void AMesaSwapBuffers(AMesaBuffer buffer)
{
if (buffer->Background) {
blit(buffer->Background, buffer->Screen,
0, 0, 0, 0,
buffer->Width, buffer->Height);
}
}
destroy_bitmap(context->Buffer->Screen);
context->Buffer->Screen = NULL;
context->Buffer->Active = NULL;
context->Buffer = NULL;
_mesa_make_current(NULL, NULL);
}
return GL_TRUE;
}
void AMesaSwapBuffers(AMesaBuffer buffer)
{
if (buffer->Background) {
blit(buffer->Background, buffer->Screen,
0, 0, 0, 0,
buffer->Width, buffer->Height);
}
}

View File

@ -1,189 +1,189 @@
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define DESTINATION(BMP, X, Y, TYPE) \
({ \
BITMAP *_bmp = BMP; \
\
(TYPE*)(_bmp->line[_bmp->h - (Y) - 1]) + (X); \
})
#define IMPLEMENT_WRITE_RGBA_SPAN(DEPTH, TYPE) \
static void write_rgba_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
const GLubyte rgba[][4], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \
\
if (mask) \
{ \
while (n--) \
{ \
if (mask[0]) d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \
d++; rgba++; mask++; \
} \
} \
else \
{ \
while (n--) \
{ \
d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \
d++; rgba++; \
} \
} \
}
#define IMPLEMENT_WRITE_RGB_SPAN(DEPTH, TYPE) \
static void write_rgb_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
const GLubyte rgb[][3], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \
\
if (mask) \
{ \
while (n--) \
{ \
if (mask[0]) d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]); \
d++; rgb++; mask++; \
} \
} \
else \
{ \
while (n--) \
{ \
d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]); \
d++; rgb++; \
} \
} \
}
#define IMPLEMENT_WRITE_MONO_RGBA_SPAN(DEPTH, TYPE) \
static void write_mono_rgba_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE color = context->CurrentColor; \
TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \
\
while (n--) \
{ \
if (mask[0]) d[0] = color; \
d++; mask++; \
} \
}
#define IMPLEMENT_READ_RGBA_SPAN(DEPTH, TYPE) \
static void read_rgba_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
GLubyte rgba[][4]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
BITMAP *bmp = context->Buffer->Active; \
TYPE *d = DESTINATION(bmp, x, y, TYPE); \
\
while (n--) \
{ \
rgba[0][RCOMP] = getr##DEPTH(d[0]); \
rgba[0][GCOMP] = getg##DEPTH(d[0]); \
rgba[0][BCOMP] = getb##DEPTH(d[0]); \
rgba[0][ACOMP] = 255; \
\
d++; rgba++; \
} \
}
#define IMPLEMENT_WRITE_RGBA_PIXELS(DEPTH, TYPE) \
static void write_rgba_pixels_##DEPTH (const GLcontext *ctx, \
GLuint n, \
const GLint x[], \
const GLint y[], \
const GLubyte rgba[][4], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
BITMAP *bmp = context->Buffer->Active; \
\
while (n--) \
{ \
if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \
rgba++; x++; y++; mask++; \
} \
}
#define IMPLEMENT_WRITE_MONO_RGBA_PIXELS(DEPTH, TYPE) \
static void write_mono_rgba_pixels_##DEPTH (const GLcontext *ctx, \
GLuint n, \
const GLint x[], \
const GLint y[], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE color = context->CurrentColor; \
BITMAP *bmp = context->Buffer->Active; \
\
while (n--) \
{ \
if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = color; \
x++; y++; mask++; \
} \
}
#define IMPLEMENT_READ_RGBA_PIXELS(DEPTH, TYPE) \
static void read_rgba_pixels_##DEPTH (const GLcontext *ctx, \
GLuint n, \
const GLint x[], \
const GLint y[], \
GLubyte rgba[][4], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
BITMAP *bmp = context->Buffer->Active; \
\
while (n--) \
{ \
if (mask[0]) \
{ \
int color = *DESTINATION(bmp, x[0], y[0], TYPE); \
\
rgba[0][RCOMP] = getr##DEPTH(color); \
rgba[0][GCOMP] = getg##DEPTH(color); \
rgba[0][BCOMP] = getb##DEPTH(color); \
rgba[0][ACOMP] = 255; \
} \
\
x++; y++; rgba++; mask++; \
} \
}
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define DESTINATION(BMP, X, Y, TYPE) \
({ \
BITMAP *_bmp = BMP; \
\
(TYPE*)(_bmp->line[_bmp->h - (Y) - 1]) + (X); \
})
#define IMPLEMENT_WRITE_RGBA_SPAN(DEPTH, TYPE) \
static void write_rgba_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
const GLubyte rgba[][4], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \
\
if (mask) \
{ \
while (n--) \
{ \
if (mask[0]) d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \
d++; rgba++; mask++; \
} \
} \
else \
{ \
while (n--) \
{ \
d[0] = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \
d++; rgba++; \
} \
} \
}
#define IMPLEMENT_WRITE_RGB_SPAN(DEPTH, TYPE) \
static void write_rgb_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
const GLubyte rgb[][3], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \
\
if (mask) \
{ \
while (n--) \
{ \
if (mask[0]) d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]); \
d++; rgb++; mask++; \
} \
} \
else \
{ \
while (n--) \
{ \
d[0] = makecol##DEPTH(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]); \
d++; rgb++; \
} \
} \
}
#define IMPLEMENT_WRITE_MONO_RGBA_SPAN(DEPTH, TYPE) \
static void write_mono_rgba_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE color = context->CurrentColor; \
TYPE *d = DESTINATION(context->Buffer->Active, x, y, TYPE); \
\
while (n--) \
{ \
if (mask[0]) d[0] = color; \
d++; mask++; \
} \
}
#define IMPLEMENT_READ_RGBA_SPAN(DEPTH, TYPE) \
static void read_rgba_span_##DEPTH (const GLcontext *ctx, \
GLuint n, GLint x, GLint y, \
GLubyte rgba[][4]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
BITMAP *bmp = context->Buffer->Active; \
TYPE *d = DESTINATION(bmp, x, y, TYPE); \
\
while (n--) \
{ \
rgba[0][RCOMP] = getr##DEPTH(d[0]); \
rgba[0][GCOMP] = getg##DEPTH(d[0]); \
rgba[0][BCOMP] = getb##DEPTH(d[0]); \
rgba[0][ACOMP] = 255; \
\
d++; rgba++; \
} \
}
#define IMPLEMENT_WRITE_RGBA_PIXELS(DEPTH, TYPE) \
static void write_rgba_pixels_##DEPTH (const GLcontext *ctx, \
GLuint n, \
const GLint x[], \
const GLint y[], \
const GLubyte rgba[][4], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
BITMAP *bmp = context->Buffer->Active; \
\
while (n--) \
{ \
if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = makecol##DEPTH(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]); \
rgba++; x++; y++; mask++; \
} \
}
#define IMPLEMENT_WRITE_MONO_RGBA_PIXELS(DEPTH, TYPE) \
static void write_mono_rgba_pixels_##DEPTH (const GLcontext *ctx, \
GLuint n, \
const GLint x[], \
const GLint y[], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
TYPE color = context->CurrentColor; \
BITMAP *bmp = context->Buffer->Active; \
\
while (n--) \
{ \
if (mask[0]) *DESTINATION(bmp, x[0], y[0], TYPE) = color; \
x++; y++; mask++; \
} \
}
#define IMPLEMENT_READ_RGBA_PIXELS(DEPTH, TYPE) \
static void read_rgba_pixels_##DEPTH (const GLcontext *ctx, \
GLuint n, \
const GLint x[], \
const GLint y[], \
GLubyte rgba[][4], \
const GLubyte mask[]) \
{ \
AMesaContext context = (AMesaContext)(ctx->DriverCtx); \
BITMAP *bmp = context->Buffer->Active; \
\
while (n--) \
{ \
if (mask[0]) \
{ \
int color = *DESTINATION(bmp, x[0], y[0], TYPE); \
\
rgba[0][RCOMP] = getr##DEPTH(color); \
rgba[0][GCOMP] = getg##DEPTH(color); \
rgba[0][BCOMP] = getb##DEPTH(color); \
rgba[0][ACOMP] = 255; \
} \
\
x++; y++; rgba++; mask++; \
} \
}

View File

@ -1,234 +1,234 @@
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
static void clear_color_generic(GLcontext *ctx, const GLfloat color[4])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
GLubyte r, g, b;
CLAMPED_FLOAT_TO_UBYTE(r, color[0]);
CLAMPED_FLOAT_TO_UBYTE(g, color[1]);
CLAMPED_FLOAT_TO_UBYTE(b, color[2]);
context->ClearColor = makecol(r, g, b);
}
static void set_color_generic(GLcontext *ctx,
GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
context->CurrentColor = makecol(red, green, blue);
}
static GLbitfield clear_generic(GLcontext *ctx,
GLbitfield mask, GLboolean all,
GLint x, GLint y,
GLint width, GLint height)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
if (mask & GL_COLOR_BUFFER_BIT)
{
if (all)
clear_to_color(context->Buffer->Active, context->ClearColor);
else
rect(context->Buffer->Active,
x, y, x+width-1, y+height-1,
context->ClearColor);
}
return mask & (~GL_COLOR_BUFFER_BIT);
}
static void write_rgba_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
const GLubyte rgba[][4],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
y = FLIP(context, y);
if (mask)
{
while (n--)
{
if (mask[0]) putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
x++; mask++; rgba++;
}
}
else
{
while (n--)
{
putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
x++; rgba++;
}
}
}
static void write_rgb_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
const GLubyte rgb[][3],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
y = FLIP(context, y);
if (mask)
{
while(n--)
{
if (mask[0]) putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));
x++; mask++; rgb++;
}
}
else
{
while (n--)
{
putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));
x++; rgb++;
}
}
}
static void write_mono_rgba_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
int color = context->CurrentColor;
y = FLIP(context, y);
if (mask)
{
while(n--)
{
if (mask[0]) putpixel(bmp, x, y, color);
x++; mask++;
}
}
else
{
while(n--)
{
putpixel(bmp, x, y, color);
x++;
}
}
}
static void read_rgba_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
GLubyte rgba[][4])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
y = FLIP(context, y);
while (n--)
{
int color = getpixel(bmp, x, y);
rgba[0][RCOMP] = getr(color);
rgba[0][GCOMP] = getg(color);
rgba[0][BCOMP] = getb(color);
rgba[0][ACOMP] = 255;
x++; rgba++;
}
}
static void write_rgba_pixels_generic(const GLcontext *ctx,
GLuint n,
const GLint x[],
const GLint y[],
const GLubyte rgba[][4],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
while (n--)
{
if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
x++; y++; mask++;
}
}
static void write_mono_rgba_pixels_generic(const GLcontext *ctx,
GLuint n,
const GLint x[],
const GLint y[],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
int color = context->CurrentColor;
while (n--)
{
if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), color);
x++; y++; mask++;
}
}
static void read_rgba_pixels_generic(const GLcontext *ctx,
GLuint n,
const GLint x[],
const GLint y[],
GLubyte rgba[][4],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
while (n--)
{
if (mask[0])
{
int color = getpixel(bmp, x[0], FLIP(context, y[0]));
rgba[0][RCOMP] = getr(color);
rgba[0][GCOMP] = getg(color);
rgba[0][BCOMP] = getb(color);
rgba[0][ACOMP] = 255;
}
x++; y++; mask++; rgba++;
}
}
/*
* Mesa 3-D graphics library
* Version: 3.0
* Copyright (C) 1995-1998 Brian Paul
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
static void clear_color_generic(GLcontext *ctx, const GLfloat color[4])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
GLubyte r, g, b;
CLAMPED_FLOAT_TO_UBYTE(r, color[0]);
CLAMPED_FLOAT_TO_UBYTE(g, color[1]);
CLAMPED_FLOAT_TO_UBYTE(b, color[2]);
context->ClearColor = makecol(r, g, b);
}
static void set_color_generic(GLcontext *ctx,
GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
context->CurrentColor = makecol(red, green, blue);
}
static GLbitfield clear_generic(GLcontext *ctx,
GLbitfield mask, GLboolean all,
GLint x, GLint y,
GLint width, GLint height)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
if (mask & GL_COLOR_BUFFER_BIT)
{
if (all)
clear_to_color(context->Buffer->Active, context->ClearColor);
else
rect(context->Buffer->Active,
x, y, x+width-1, y+height-1,
context->ClearColor);
}
return mask & (~GL_COLOR_BUFFER_BIT);
}
static void write_rgba_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
const GLubyte rgba[][4],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
y = FLIP(context, y);
if (mask)
{
while (n--)
{
if (mask[0]) putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
x++; mask++; rgba++;
}
}
else
{
while (n--)
{
putpixel(bmp, x, y, makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
x++; rgba++;
}
}
}
static void write_rgb_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
const GLubyte rgb[][3],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
y = FLIP(context, y);
if (mask)
{
while(n--)
{
if (mask[0]) putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));
x++; mask++; rgb++;
}
}
else
{
while (n--)
{
putpixel(bmp, x, y, makecol(rgb[0][RCOMP], rgb[0][GCOMP], rgb[0][BCOMP]));
x++; rgb++;
}
}
}
static void write_mono_rgba_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
int color = context->CurrentColor;
y = FLIP(context, y);
if (mask)
{
while(n--)
{
if (mask[0]) putpixel(bmp, x, y, color);
x++; mask++;
}
}
else
{
while(n--)
{
putpixel(bmp, x, y, color);
x++;
}
}
}
static void read_rgba_span_generic(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
GLubyte rgba[][4])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
y = FLIP(context, y);
while (n--)
{
int color = getpixel(bmp, x, y);
rgba[0][RCOMP] = getr(color);
rgba[0][GCOMP] = getg(color);
rgba[0][BCOMP] = getb(color);
rgba[0][ACOMP] = 255;
x++; rgba++;
}
}
static void write_rgba_pixels_generic(const GLcontext *ctx,
GLuint n,
const GLint x[],
const GLint y[],
const GLubyte rgba[][4],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
while (n--)
{
if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), makecol(rgba[0][RCOMP], rgba[0][GCOMP], rgba[0][BCOMP]));
x++; y++; mask++;
}
}
static void write_mono_rgba_pixels_generic(const GLcontext *ctx,
GLuint n,
const GLint x[],
const GLint y[],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
int color = context->CurrentColor;
while (n--)
{
if (mask[0]) putpixel(bmp, x[0], FLIP(context, y[0]), color);
x++; y++; mask++;
}
}
static void read_rgba_pixels_generic(const GLcontext *ctx,
GLuint n,
const GLint x[],
const GLint y[],
GLubyte rgba[][4],
const GLubyte mask[])
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
BITMAP *bmp = context->Buffer->Active;
while (n--)
{
if (mask[0])
{
int color = getpixel(bmp, x[0], FLIP(context, y[0]));
rgba[0][RCOMP] = getr(color);
rgba[0][GCOMP] = getg(color);
rgba[0][BCOMP] = getb(color);
rgba[0][ACOMP] = 255;
}
x++; y++; mask++; rgba++;
}
}

View File

@ -1,250 +1,250 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver Build 5 */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "D3DHAL.h"
/*===========================================================================*/
/* Macros. */
/*===========================================================================*/
#define SRCBLEND_MAP(gl,d3d,fall) if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwSrcBlendCaps & d3d ) \
{ \
sprintf( buffer, "SRC Blend: %s -> %s", # gl, # d3d ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwSrcBlendCaps[index] = d3d; \
} \
else \
{ \
sprintf( buffer, "SRC Blend: %s -> %s", # gl, # fall ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwSrcBlendCaps[index] = fall; \
}
#define DSTBLEND_MAP(gl,d3d,fall) if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwDestBlendCaps & d3d ) \
{ \
sprintf( buffer, "DST Blend: %s -> %s", # gl, # d3d ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwDestBlendCaps[index] = d3d; \
} \
else \
{ \
sprintf( buffer, "DST Blend: %s -> %s", # gl, # fall ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwDestBlendCaps[index] = fall; \
}
/*===========================================================================*/
/* I use this function to handle the fact that the D3D texture blending and */
/* OpenGL texture blending functions don't map one to one. Also there is the*/
/* problem with cards not supporting all the D3D functions. So I use the CAPS*/
/* of the card to make a table of functions that will have defaults for the */
/* unsupported functions. */
/* So first I fill the table with the fallback function then I check to see */
/* if the card supports the requested function. If it does I replace the */
/* default thats already in the array. Now order does matter as I used an */
/* enum type in D3DShared.h so that the mapping would be a little easier. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void AlphaBlendTableHAL( PMESAD3DHAL pHAL )
{
PMESAD3DSHARED pShared = &pHAL->shared;
int index;
char buffer[128];
DPF(( DBG_FUNC, "AlphaBlendTableHAL();" ));
/* Make the fallback for the Source blend. */
for( index = 0; index < 14; index++ )
{
switch( index )
{
case s_zero:
SRCBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );
break;
case s_one:
SRCBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );
break;
case s_dst_color:
SRCBLEND_MAP( GL_DST_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );
break;
case s_one_minus_dst_color:
SRCBLEND_MAP( GL_ONE_MINUS_DST_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );
break;
case s_src_alpha:
SRCBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );
break;
case s_one_minus_src_alpha:
SRCBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );
break;
case s_dst_alpha:
SRCBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );
break;
case s_one_minus_dst_alpha:
SRCBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );
break;
case s_src_alpha_saturate:
SRCBLEND_MAP( GL_SRC_ALPHA_SATURATE, D3DBLEND_SRCALPHASAT, D3DBLEND_ONE );
break;
case s_constant_color:
SRCBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );
break;
case s_one_minus_constant_color:
SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );
break;
case s_constant_alpha:
SRCBLEND_MAP( GL_CONSTANT_ALPHA, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );
break;
case s_one_minus_constant_alpha:
SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );
break;
}
}
/* Make the fallback for the Destination blend. */
for( index = 0; index < 14; index++ )
{
switch( index )
{
case d_zero:
DSTBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );
break;
case d_one:
DSTBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );
break;
case d_src_color:
DSTBLEND_MAP( GL_SRC_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );
break;
case d_one_minus_src_color:
DSTBLEND_MAP( GL_ONE_MINUS_SRC_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );
break;
case d_src_alpha:
DSTBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );
break;
case d_one_minus_src_alpha:
DSTBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );
break;
case d_dst_alpha:
DSTBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );
break;
case d_one_minus_dst_alpha:
DSTBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );
break;
case d_constant_color:
DSTBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );
break;
case d_one_minus_constant_color:
DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );
break;
case d_constant_alpha:
DSTBLEND_MAP( GL_CONSTANT_ALPHAR, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );
break;
case d_one_minus_constant_alpha:
DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );
break;
}
}
/* Make the fallbacks for the texture functions. */
for( index = 0; index < 4; index++ )
{
switch( index )
{
case d3dtblend_decal:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_DECAL" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_MODULATE" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
case d3dtblend_decalalpha:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECALALPHA )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_DECALALPHA" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECALALPHA;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPA -> D3DTBLEND_DECAL" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
case d3dtblend_modulate:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATE" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATEALPHA" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA;
}
else if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_DECAL" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
case d3dtblend_modulatealpha:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATEALPHA" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATE" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;
}
else if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_DECALE" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
}
}
}
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver Build 5 */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "D3DHAL.h"
/*===========================================================================*/
/* Macros. */
/*===========================================================================*/
#define SRCBLEND_MAP(gl,d3d,fall) if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwSrcBlendCaps & d3d ) \
{ \
sprintf( buffer, "SRC Blend: %s -> %s", # gl, # d3d ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwSrcBlendCaps[index] = d3d; \
} \
else \
{ \
sprintf( buffer, "SRC Blend: %s -> %s", # gl, # fall ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwSrcBlendCaps[index] = fall; \
}
#define DSTBLEND_MAP(gl,d3d,fall) if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwDestBlendCaps & d3d ) \
{ \
sprintf( buffer, "DST Blend: %s -> %s", # gl, # d3d ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwDestBlendCaps[index] = d3d; \
} \
else \
{ \
sprintf( buffer, "DST Blend: %s -> %s", # gl, # fall ); \
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), buffer )); \
pShared->dwDestBlendCaps[index] = fall; \
}
/*===========================================================================*/
/* I use this function to handle the fact that the D3D texture blending and */
/* OpenGL texture blending functions don't map one to one. Also there is the*/
/* problem with cards not supporting all the D3D functions. So I use the CAPS*/
/* of the card to make a table of functions that will have defaults for the */
/* unsupported functions. */
/* So first I fill the table with the fallback function then I check to see */
/* if the card supports the requested function. If it does I replace the */
/* default thats already in the array. Now order does matter as I used an */
/* enum type in D3DShared.h so that the mapping would be a little easier. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void AlphaBlendTableHAL( PMESAD3DHAL pHAL )
{
PMESAD3DSHARED pShared = &pHAL->shared;
int index;
char buffer[128];
DPF(( DBG_FUNC, "AlphaBlendTableHAL();" ));
/* Make the fallback for the Source blend. */
for( index = 0; index < 14; index++ )
{
switch( index )
{
case s_zero:
SRCBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );
break;
case s_one:
SRCBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );
break;
case s_dst_color:
SRCBLEND_MAP( GL_DST_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );
break;
case s_one_minus_dst_color:
SRCBLEND_MAP( GL_ONE_MINUS_DST_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );
break;
case s_src_alpha:
SRCBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );
break;
case s_one_minus_src_alpha:
SRCBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );
break;
case s_dst_alpha:
SRCBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );
break;
case s_one_minus_dst_alpha:
SRCBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );
break;
case s_src_alpha_saturate:
SRCBLEND_MAP( GL_SRC_ALPHA_SATURATE, D3DBLEND_SRCALPHASAT, D3DBLEND_ONE );
break;
case s_constant_color:
SRCBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );
break;
case s_one_minus_constant_color:
SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );
break;
case s_constant_alpha:
SRCBLEND_MAP( GL_CONSTANT_ALPHA, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );
break;
case s_one_minus_constant_alpha:
SRCBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );
break;
}
}
/* Make the fallback for the Destination blend. */
for( index = 0; index < 14; index++ )
{
switch( index )
{
case d_zero:
DSTBLEND_MAP( GL_ZERO, D3DBLEND_ZERO, D3DBLEND_ONE );
break;
case d_one:
DSTBLEND_MAP( GL_ONE, D3DBLEND_ONE, D3DBLEND_ONE );
break;
case d_src_color:
DSTBLEND_MAP( GL_SRC_COLOR, D3DBLEND_SRCCOLOR, D3DBLEND_ONE );
break;
case d_one_minus_src_color:
DSTBLEND_MAP( GL_ONE_MINUS_SRC_COLOR, D3DBLEND_INVSRCCOLOR, D3DBLEND_ONE );
break;
case d_src_alpha:
DSTBLEND_MAP( GL_SRC_ALPHA, D3DBLEND_SRCALPHA, D3DBLEND_ONE );
break;
case d_one_minus_src_alpha:
DSTBLEND_MAP( GL_ONE_MINUS_SRC_ALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_ONE );
break;
case d_dst_alpha:
DSTBLEND_MAP( GL_DST_ALPHA, D3DBLEND_DESTALPHA, D3DBLEND_ONE );
break;
case d_one_minus_dst_alpha:
DSTBLEND_MAP( GL_ONE_MINUS_DST_ALPHA, D3DBLEND_INVDESTALPHA, D3DBLEND_ONE );
break;
case d_constant_color:
DSTBLEND_MAP( GL_CONSTANT_COLOR, D3DBLEND_DESTCOLOR, D3DBLEND_ONE );
break;
case d_one_minus_constant_color:
DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_COLOR, D3DBLEND_INVDESTCOLOR, D3DBLEND_ONE );
break;
case d_constant_alpha:
DSTBLEND_MAP( GL_CONSTANT_ALPHAR, D3DBLEND_BOTHSRCALPHA, D3DBLEND_ONE );
break;
case d_one_minus_constant_alpha:
DSTBLEND_MAP( GL_ONE_MINUS_CONSTANT_ALPHA, D3DBLEND_BOTHINVSRCALPHA, D3DBLEND_ONE );
break;
}
}
/* Make the fallbacks for the texture functions. */
for( index = 0; index < 4; index++ )
{
switch( index )
{
case d3dtblend_decal:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_DECAL" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_MODULATE" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECAL -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
case d3dtblend_decalalpha:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECALALPHA )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_DECALALPHA" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECALALPHA;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPA -> D3DTBLEND_DECAL" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_DECALALPHA -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
case d3dtblend_modulate:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATE" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_MODULATEALPHA" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA;
}
else if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_DECAL" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATE -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
case d3dtblend_modulatealpha:
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATEALPHA )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATEALPHA" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATEALPHA;
}
else
{
if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_MODULATE )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_MODULATE" ));
pShared->dwTexFunc[index] = D3DTBLEND_MODULATE;
}
else if ( pHAL->D3DHWDevDesc.dpcTriCaps.dwTextureBlendCaps & D3DTBLEND_DECAL )
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_DECALE" ));
pShared->dwTexFunc[index] = D3DTBLEND_DECAL;
}
else
{
DPF(( (DBG_CNTX_INFO|DBG_TXT_INFO), "D3DTBLEND_MODULATEALPHA -> D3DTBLEND_ADD" ));
pShared->dwTexFunc[index] = D3DTBLEND_ADD;
}
}
break;
}
}
}

View File

@ -1,68 +1,68 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef _D3D_HAL_INC
#define _D3D_HAL_INC
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <windows.h>
#include <ddraw.h>
#include <d3d.h>
#include <stdlib.h>
#include <time.h>
#include "D3DShared.h"
#include "D3DTextureMgr.h"
#include "Debug.h"
/*===========================================================================*/
/* Defines. */
/*===========================================================================*/
#define DX_RESTORE(ps) if ( (ps) && (ps)->IsLost() ) (ps)->Restore();
/*===========================================================================*/
/* Type defines. */
/*===========================================================================*/
typedef struct _d3d_hal_struct
{
MESAD3DSHARED shared;
GUID guid;
LPDIRECTDRAW lpDD;
LPDIRECTDRAW4 lpDD4;
LPDIRECT3D3 lpD3D3;
LPDIRECT3DDEVICE3 lpD3DDevice;
D3DDEVICEDESC D3DHWDevDesc;
LPDIRECTDRAWSURFACE4 lpDDSPrimary,
lpDDSRender,
lpDDSZbuffer;
LPDIRECT3DVIEWPORT3 lpViewport;
LPDIRECTDRAWCLIPPER lpClipper;
DDPIXELFORMAT ddpf,
ddpfZBuffer;
PTM_OBJECT pTMList;
} MESAD3DHAL, *PMESAD3DHAL;
/*===========================================================================*/
/* External function prototypes. */
/*===========================================================================*/
extern BOOL InitTMgrHAL( PMESAD3DHAL pHAL );
extern void TermTMgrHAL( PMESAD3DHAL pHAL );
extern void AlphaBlendTableHAL( PMESAD3DHAL pHAL );
extern void Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel );
extern char *ErrorStringD3D( HRESULT hr );
extern void FatalShutDown( PMESAD3DHAL pHAL );
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
extern char *errorMsg;
#endif
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef _D3D_HAL_INC
#define _D3D_HAL_INC
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <windows.h>
#include <ddraw.h>
#include <d3d.h>
#include <stdlib.h>
#include <time.h>
#include "D3DShared.h"
#include "D3DTextureMgr.h"
#include "Debug.h"
/*===========================================================================*/
/* Defines. */
/*===========================================================================*/
#define DX_RESTORE(ps) if ( (ps) && (ps)->IsLost() ) (ps)->Restore();
/*===========================================================================*/
/* Type defines. */
/*===========================================================================*/
typedef struct _d3d_hal_struct
{
MESAD3DSHARED shared;
GUID guid;
LPDIRECTDRAW lpDD;
LPDIRECTDRAW4 lpDD4;
LPDIRECT3D3 lpD3D3;
LPDIRECT3DDEVICE3 lpD3DDevice;
D3DDEVICEDESC D3DHWDevDesc;
LPDIRECTDRAWSURFACE4 lpDDSPrimary,
lpDDSRender,
lpDDSZbuffer;
LPDIRECT3DVIEWPORT3 lpViewport;
LPDIRECTDRAWCLIPPER lpClipper;
DDPIXELFORMAT ddpf,
ddpfZBuffer;
PTM_OBJECT pTMList;
} MESAD3DHAL, *PMESAD3DHAL;
/*===========================================================================*/
/* External function prototypes. */
/*===========================================================================*/
extern BOOL InitTMgrHAL( PMESAD3DHAL pHAL );
extern void TermTMgrHAL( PMESAD3DHAL pHAL );
extern void AlphaBlendTableHAL( PMESAD3DHAL pHAL );
extern void Solve8BitChannelPixelFormat( DDPIXELFORMAT *pddpf, PPIXELINFO pPixel );
extern char *ErrorStringD3D( HRESULT hr );
extern void FatalShutDown( PMESAD3DHAL pHAL );
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
extern char *errorMsg;
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,84 +1,84 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef D3D_MESA_H
#define D3D_MESA_H
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <windows.h>
#include <ddraw.h>
#include <d3d.h>
#include "matrix.h"
#include "context.h"
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef D3D_MESA_H
#define D3D_MESA_H
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <windows.h>
#include <ddraw.h>
#include <d3d.h>
#include "matrix.h"
#include "context.h"
#include "mtypes.h"
#include "vb.h"
#include "D3DShared.h"
#include "Debug.h"
#include "NULLProcs.h"
/*===========================================================================*/
/* Macros. */
/*===========================================================================*/
#define FLIP(h,y) (h-y)
/*===========================================================================*/
/* Magic numbers. */
/*===========================================================================*/
/*===========================================================================*/
/* Type defines. */
/*===========================================================================*/
struct __extensions__
{
PROC proc;
char *name;
};
typedef GLbitfield (*ClearPROC)( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
typedef void (*WSpanRGBPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );
typedef void (*WSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
typedef void (*WSpanRGBAMonoPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );
typedef void (*WPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
typedef void (*WPixelsRGBAMonoPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
typedef void (*RSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
typedef void (*RPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
typedef struct D3D_mesa_context
{
PMESAD3DSHARED pShared;
GLcontext *gl_ctx; /* The core GL/Mesa context */
GLvisual *gl_visual; /* Describes the buffers */
GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */
HDC hdc;
WNDPROC hOldProc;
UCHAR rClear, /* Current clear colors. */
gClear,
bClear,
aClear,
rCurrent, /* Current rendering colors. */
gCurrent,
bCurrent,
aCurrent;
struct D3D_mesa_context *next;
} D3DMESACONTEXT, *PD3DMESACONTEXT;
/*===========================================================================*/
/* Extern function prototypes. */
/*===========================================================================*/
extern void gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
extern D3DTLVERTEX D3DTLVertices[(VB_MAX*6)];
#endif
#include "vb.h"
#include "D3DShared.h"
#include "Debug.h"
#include "NULLProcs.h"
/*===========================================================================*/
/* Macros. */
/*===========================================================================*/
#define FLIP(h,y) (h-y)
/*===========================================================================*/
/* Magic numbers. */
/*===========================================================================*/
/*===========================================================================*/
/* Type defines. */
/*===========================================================================*/
struct __extensions__
{
PROC proc;
char *name;
};
typedef GLbitfield (*ClearPROC)( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
typedef void (*WSpanRGBPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );
typedef void (*WSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
typedef void (*WSpanRGBAMonoPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );
typedef void (*WPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
typedef void (*WPixelsRGBAMonoPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
typedef void (*RSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
typedef void (*RPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
typedef struct D3D_mesa_context
{
PMESAD3DSHARED pShared;
GLcontext *gl_ctx; /* The core GL/Mesa context */
GLvisual *gl_visual; /* Describes the buffers */
GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */
HDC hdc;
WNDPROC hOldProc;
UCHAR rClear, /* Current clear colors. */
gClear,
bClear,
aClear,
rCurrent, /* Current rendering colors. */
gCurrent,
bCurrent,
aCurrent;
struct D3D_mesa_context *next;
} D3DMESACONTEXT, *PD3DMESACONTEXT;
/*===========================================================================*/
/* Extern function prototypes. */
/*===========================================================================*/
extern void gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
extern D3DTLVERTEX D3DTLVertices[(VB_MAX*6)];
#endif

View File

@ -1,213 +1,213 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "D3DHAL.h"
/*===========================================================================*/
/* This function clears the context bound to the supplied shared context. */
/* The function takes the D3D flags D3DCLEAR_TARGET, D3DCLEAR_STENCIL and */
/* D3DCLEAR_ZBUFFER. Set bAll to TRUE for a full clear else supply the coord*/
/* of the rect to be cleared relative to the window. The color is always a */
/* 32bit value (RGBA). Fill in the z-value and stencil if needed. */
/* */
/* TODO: this can be redone to be called by Mesa directly. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void ClearHAL( PMESAD3DSHARED pShared, DWORD dwFlags, BOOL bAll, int x, int y, int cx, int cy, DWORD dwColor, float zv, DWORD dwStencil )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
D3DRECT d3dRect;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "CleaHAL();" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpViewport == NULL) )
return;
#endif
if ( bAll )
{
/* I assume my viewport is valid. */
d3dRect.lX1 = pShared->rectV.left;
d3dRect.lY1 = pShared->rectV.top;
d3dRect.lX2 = pShared->rectV.right;
d3dRect.lY2 = pShared->rectV.bottom;
}
else
{
d3dRect.lX1 = pShared->rectV.left + x;
d3dRect.lY1 = pShared->rectV.top + y;
d3dRect.lX2 = d3dRect.lX1 + cx;
d3dRect.lY2 = d3dRect.lY1 + cy;
}
#ifdef D3D_DEBUG
rc = pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
if ( FAILED(rc) )
{
RIP( pHAL, "Clear2 ->", ErrorStringD3D(rc) );
}
#else
pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
#endif
}
/*===========================================================================*/
/* Well this is the guts of it all. Here we rasterize the primitives that */
/* are in their final form. OpenGL has done all the lighting, transfomations*/
/* and clipping at this point. */
/* */
/* TODO: I'm not sure if I want to bother to check for errors on this call. */
/* The overhead kills me... */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "DrawPrimitveHAL();" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
return;
DPF(( DBG_PRIM_INFO, "DP( %d )", dwCount ));
rc = pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
D3DFVF_TLVERTEX,
(LPVOID)pVertices,
dwCount,
(D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
if ( FAILED(rc) )
{
RIP( pHAL, "DrawPrimitive ->", ErrorStringD3D(rc) );
}
#else
pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
D3DFVF_TLVERTEX,
(LPVOID)pVertices,
dwCount,
(D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
#endif
}
/*===========================================================================*/
/* This call will handle the swapping of the buffers. Now I didn't bother */
/* to support single buffered so this will be used for glFlush() as its all */
/* the same. So first we do an EndScene as we are always considered to be in*/
/* a BeginScene because when we leave we do a BeginScene. Now note that when*/
/* the context is created in the first place we do a BeginScene also just to */
/* get things going. The call will use either Flip/blt based on the type of */
/* surface was created for rendering. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void SwapBuffersHAL( PMESAD3DSHARED pShared )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "SwapBuffersHAL();" ));
DPF(( DBG_ALL_PROFILE, "=================SWAP===================" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
return;
/* Make sure we have enough info. */
if ( pHAL->lpDDSPrimary != NULL )
{
rc = pHAL->lpD3DDevice->EndScene();
if ( FAILED(rc) )
{
RIP( pHAL, "EndScene ->", ErrorStringD3D(rc) );
}
if ( pShared->bFlipable )
{
DPF(( DBG_CNTX_PROFILE, "Swap->FLIP" ));
rc = pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
}
else
{
DPF(( DBG_CNTX_PROFILE, "Swap->Blt" ));
rc = pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
}
if ( FAILED(rc) )
{
RIP( pHAL, "Blt (RENDER/PRIMARY) ->", ErrorStringD3D(rc) );
}
rc = pHAL->lpD3DDevice->BeginScene();
if ( FAILED(rc) )
{
RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );
}
}
#else
pHAL->lpD3DDevice->EndScene();
if ( pShared->bFlipable )
pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
else
pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
pHAL->lpD3DDevice->BeginScene();
#endif
}
/*===========================================================================*/
/* This function is a very thin wrapper for the D3D call 'SetRenderState'. */
/* Using this function requires all the types to be defined by including the */
/* D3D header file. */
/* */
/* TODO: would be much better to get ride of all these calls per VBRender. */
/* I feel I should get this call into SetRenderStates() the RenderVB. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void SetStateHAL( PMESAD3DSHARED pShared, DWORD dwType, DWORD dwState )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "SetStateHAL();" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
return;
rc = pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );
if ( FAILED(rc) )
{
RIP( pHAL, "SetRenderState ->", ErrorStringD3D(rc) );
}
#else
pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );
#endif
}
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "D3DHAL.h"
/*===========================================================================*/
/* This function clears the context bound to the supplied shared context. */
/* The function takes the D3D flags D3DCLEAR_TARGET, D3DCLEAR_STENCIL and */
/* D3DCLEAR_ZBUFFER. Set bAll to TRUE for a full clear else supply the coord*/
/* of the rect to be cleared relative to the window. The color is always a */
/* 32bit value (RGBA). Fill in the z-value and stencil if needed. */
/* */
/* TODO: this can be redone to be called by Mesa directly. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void ClearHAL( PMESAD3DSHARED pShared, DWORD dwFlags, BOOL bAll, int x, int y, int cx, int cy, DWORD dwColor, float zv, DWORD dwStencil )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
D3DRECT d3dRect;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "CleaHAL();" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpViewport == NULL) )
return;
#endif
if ( bAll )
{
/* I assume my viewport is valid. */
d3dRect.lX1 = pShared->rectV.left;
d3dRect.lY1 = pShared->rectV.top;
d3dRect.lX2 = pShared->rectV.right;
d3dRect.lY2 = pShared->rectV.bottom;
}
else
{
d3dRect.lX1 = pShared->rectV.left + x;
d3dRect.lY1 = pShared->rectV.top + y;
d3dRect.lX2 = d3dRect.lX1 + cx;
d3dRect.lY2 = d3dRect.lY1 + cy;
}
#ifdef D3D_DEBUG
rc = pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
if ( FAILED(rc) )
{
RIP( pHAL, "Clear2 ->", ErrorStringD3D(rc) );
}
#else
pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
#endif
}
/*===========================================================================*/
/* Well this is the guts of it all. Here we rasterize the primitives that */
/* are in their final form. OpenGL has done all the lighting, transfomations*/
/* and clipping at this point. */
/* */
/* TODO: I'm not sure if I want to bother to check for errors on this call. */
/* The overhead kills me... */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "DrawPrimitveHAL();" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
return;
DPF(( DBG_PRIM_INFO, "DP( %d )", dwCount ));
rc = pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
D3DFVF_TLVERTEX,
(LPVOID)pVertices,
dwCount,
(D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
if ( FAILED(rc) )
{
RIP( pHAL, "DrawPrimitive ->", ErrorStringD3D(rc) );
}
#else
pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
D3DFVF_TLVERTEX,
(LPVOID)pVertices,
dwCount,
(D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
#endif
}
/*===========================================================================*/
/* This call will handle the swapping of the buffers. Now I didn't bother */
/* to support single buffered so this will be used for glFlush() as its all */
/* the same. So first we do an EndScene as we are always considered to be in*/
/* a BeginScene because when we leave we do a BeginScene. Now note that when*/
/* the context is created in the first place we do a BeginScene also just to */
/* get things going. The call will use either Flip/blt based on the type of */
/* surface was created for rendering. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void SwapBuffersHAL( PMESAD3DSHARED pShared )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "SwapBuffersHAL();" ));
DPF(( DBG_ALL_PROFILE, "=================SWAP===================" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
return;
/* Make sure we have enough info. */
if ( pHAL->lpDDSPrimary != NULL )
{
rc = pHAL->lpD3DDevice->EndScene();
if ( FAILED(rc) )
{
RIP( pHAL, "EndScene ->", ErrorStringD3D(rc) );
}
if ( pShared->bFlipable )
{
DPF(( DBG_CNTX_PROFILE, "Swap->FLIP" ));
rc = pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
}
else
{
DPF(( DBG_CNTX_PROFILE, "Swap->Blt" ));
rc = pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
}
if ( FAILED(rc) )
{
RIP( pHAL, "Blt (RENDER/PRIMARY) ->", ErrorStringD3D(rc) );
}
rc = pHAL->lpD3DDevice->BeginScene();
if ( FAILED(rc) )
{
RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );
}
}
#else
pHAL->lpD3DDevice->EndScene();
if ( pShared->bFlipable )
pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
else
pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
pHAL->lpD3DDevice->BeginScene();
#endif
}
/*===========================================================================*/
/* This function is a very thin wrapper for the D3D call 'SetRenderState'. */
/* Using this function requires all the types to be defined by including the */
/* D3D header file. */
/* */
/* TODO: would be much better to get ride of all these calls per VBRender. */
/* I feel I should get this call into SetRenderStates() the RenderVB. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
extern "C" void SetStateHAL( PMESAD3DSHARED pShared, DWORD dwType, DWORD dwState )
{
PMESAD3DHAL pHAL = (PMESAD3DHAL)pShared;
#ifdef D3D_DEBUG
HRESULT rc;
DPF(( DBG_FUNC, "SetStateHAL();" ));
/* Make sure we have enough info. */
if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
return;
rc = pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );
if ( FAILED(rc) )
{
RIP( pHAL, "SetRenderState ->", ErrorStringD3D(rc) );
}
#else
pHAL->lpD3DDevice->SetRenderState( (D3DRENDERSTATETYPE)dwType, dwState );
#endif
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,62 +1,62 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef _TEXTURE_MGR_INC
#define _TEXTURE_MGR_INC
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <windows.h>
#include <ddraw.h>
#include <d3d.h>
#include <stdlib.h>
#include <stdlib.h>
#include "GL/gl.h"
/*========================================================================*/
/* Defines. */
/*========================================================================*/
/*========================================================================*/
/* Type defines. */
/*========================================================================*/
typedef struct _local_texture_object
{
DWORD dwName,
dwPriority,
dwFlags,
dwSWidth,
dwSHeight,
dwVWidth,
dwVHeight;
BOOL bLock,
bDirty; /* I only update VID on SubImage calls so the system */
/* texture can get invalid. */
LPDIRECT3DDEVICE3 lpD3DDevice; /* If the device changes we must get new handles... */
LPDIRECTDRAWSURFACE4 lpDDS_System,
lpDDS_Video;
LPDIRECT3DTEXTURE2 lpD3DTexture2;
PIXELINFO pixel;
struct _local_texture_object *next;
struct _local_texture_object *prev;
} TM_OBJECT, *PTM_OBJECT;
/*========================================================================*/
/* Function prototypes. */
/*========================================================================*/
void APIENTRY InitTMD3D( void *pVoid );
void APIENTRY TermTMD3D( void *pVoid );
/*========================================================================*/
/* Global variables declaration. */
/*========================================================================*/
#endif
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef _TEXTURE_MGR_INC
#define _TEXTURE_MGR_INC
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <windows.h>
#include <ddraw.h>
#include <d3d.h>
#include <stdlib.h>
#include <stdlib.h>
#include "GL/gl.h"
/*========================================================================*/
/* Defines. */
/*========================================================================*/
/*========================================================================*/
/* Type defines. */
/*========================================================================*/
typedef struct _local_texture_object
{
DWORD dwName,
dwPriority,
dwFlags,
dwSWidth,
dwSHeight,
dwVWidth,
dwVHeight;
BOOL bLock,
bDirty; /* I only update VID on SubImage calls so the system */
/* texture can get invalid. */
LPDIRECT3DDEVICE3 lpD3DDevice; /* If the device changes we must get new handles... */
LPDIRECTDRAWSURFACE4 lpDDS_System,
lpDDS_Video;
LPDIRECT3DTEXTURE2 lpD3DTexture2;
PIXELINFO pixel;
struct _local_texture_object *next;
struct _local_texture_object *prev;
} TM_OBJECT, *PTM_OBJECT;
/*========================================================================*/
/* Function prototypes. */
/*========================================================================*/
void APIENTRY InitTMD3D( void *pVoid );
void APIENTRY TermTMD3D( void *pVoid );
/*========================================================================*/
/* Global variables declaration. */
/*========================================================================*/
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,399 +1,399 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "D3DMesa.h"
/*===========================================================================*/
/* This call will clear the render surface using the pixel info built from */
/* the surface at creation time. The call uses Lock/Unlock to access the */
/* surface. The call also special cases a full clear or a dirty rectangle. */
/* Finally the call returns the new clear mask that reflects that the color */
/* buffer was cleared. */
/*===========================================================================*/
/* RETURN: the original mask with the bits cleared that represents the buffer*/
/* or buffers we just cleared. */
/*===========================================================================*/
GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer,
*pScanLine;
int index,
index2;
DWORD dwColor;
if ( mask & GL_COLOR_BUFFER_BIT )
{
/* Lock the surface to get the surface pointer. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Solve the color once only. */
dwColor = ( ((DWORD)((float)pContext->rClear * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)pContext->gClear * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)pContext->bClear * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
if ( all )
{
for( index = 0, pScanLine = (UCHAR *)pddsd2->lpSurface; index < pContext->pShared->dwHeight; index++, pScanLine += pddsd2->lPitch )
for( pBuffer = pScanLine, index2 = 0; index2 < pContext->pShared->dwWidth; index2++, pBuffer += pContext->pShared->pixel.cb )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
else
{
pScanLine = ((UCHAR *)pddsd2->lpSurface) +
( (FLIP( pContext->pShared->dwHeight, (y+height)) * pddsd2->lPitch) + (x * pContext->pShared->pixel.cb) );
for( index = 0; index < height; index++, pScanLine += pddsd2->lPitch )
{
for( index2 = 0, pBuffer = pScanLine; index2 < width; index2++, pBuffer += pContext->pShared->pixel.cb )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
UnlockHAL( pContext->pShared, TRUE );
}
return (mask & ~GL_COLOR_BUFFER_BIT);
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
if ( mask )
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
if ( mask[index] )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
if ( mask )
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
if ( mask[index] )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The color is solved once from the current */
/* color components. The alpha is ignored as Mesa is doing it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Lock the surface to get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Solve the color once only. (no alpha) */
dwColor = ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
if ( mask )
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
if ( mask[index] )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
else
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
if ( mask )
{
for( index = 0; index < n; index++ )
{
if ( mask[index] )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
for( index = 0; index < n; index++ )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The color is solved once from the current */
/* color components. The alpha is ignored as Mesa is doing it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Solve the color once only. I don't uses the alpha. */
dwColor = ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
if ( mask )
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
if ( mask[index] )
{
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc isn't written for speed rather its to handle the general case. */
/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/
/* structure that was generated from the OffScreen surface pixelformat. The */
/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/
/* own alpha channel when the context was created. I did this as I didn't */
/* feel that it was worth the effort to try and get HW to work (bus bound). */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD *pdwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface +
(FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) +
(x*pContext->pShared->pixel.cb);
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
pdwColor = (DWORD *)pBuffer;
rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc isn't written for speed rather its to handle the general case. */
/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/
/* structure that was generated from the OffScreen surface pixelformat. The */
/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/
/* own alpha channel when the context was created. I did this as I didn't */
/* feel that it was worth the effort to try and get HW to work (bus bound). */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
int index;
DWORD *pdwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
if ( mask )
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
if ( mask[index] )
{
/* Find the start of the pixel. Invert y for Windows. */
pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));
rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
}
}
}
else
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
/* Find the start of the pixel. Invert y for Windows. */
pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));
rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "D3DMesa.h"
/*===========================================================================*/
/* This call will clear the render surface using the pixel info built from */
/* the surface at creation time. The call uses Lock/Unlock to access the */
/* surface. The call also special cases a full clear or a dirty rectangle. */
/* Finally the call returns the new clear mask that reflects that the color */
/* buffer was cleared. */
/*===========================================================================*/
/* RETURN: the original mask with the bits cleared that represents the buffer*/
/* or buffers we just cleared. */
/*===========================================================================*/
GLbitfield ClearBuffers( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer,
*pScanLine;
int index,
index2;
DWORD dwColor;
if ( mask & GL_COLOR_BUFFER_BIT )
{
/* Lock the surface to get the surface pointer. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Solve the color once only. */
dwColor = ( ((DWORD)((float)pContext->rClear * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)pContext->gClear * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)pContext->bClear * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
if ( all )
{
for( index = 0, pScanLine = (UCHAR *)pddsd2->lpSurface; index < pContext->pShared->dwHeight; index++, pScanLine += pddsd2->lPitch )
for( pBuffer = pScanLine, index2 = 0; index2 < pContext->pShared->dwWidth; index2++, pBuffer += pContext->pShared->pixel.cb )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
else
{
pScanLine = ((UCHAR *)pddsd2->lpSurface) +
( (FLIP( pContext->pShared->dwHeight, (y+height)) * pddsd2->lPitch) + (x * pContext->pShared->pixel.cb) );
for( index = 0; index < height; index++, pScanLine += pddsd2->lPitch )
{
for( index2 = 0, pBuffer = pScanLine; index2 < width; index2++, pBuffer += pContext->pShared->pixel.cb )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
UnlockHAL( pContext->pShared, TRUE );
}
return (mask & ~GL_COLOR_BUFFER_BIT);
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WSpanRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
if ( mask )
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
if ( mask[index] )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgb[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgb[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgb[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
if ( mask )
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
if ( mask[index] )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The color is solved once from the current */
/* color components. The alpha is ignored as Mesa is doing it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WSpanRGBAMono( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Lock the surface to get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Solve the color once only. (no alpha) */
dwColor = ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) + (x*pContext->pShared->pixel.cb);
if ( mask )
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
if ( mask[index] )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
else
{
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The alpha is ignored as Mesa does it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
if ( mask )
{
for( index = 0; index < n; index++ )
{
if ( mask[index] )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
for( index = 0; index < n; index++ )
{
/* Pack the color components. */
dwColor = ( ((DWORD)((float)rgba[index][RCOMP] * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)rgba[index][GCOMP] * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)rgba[index][BCOMP] * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc (as all others) has been written for the general case. I use */
/* the PIXELINFO structure to pack the pixel from RGB24 to whatever the Off- */
/* Screen render surface uses. The color is solved once from the current */
/* color components. The alpha is ignored as Mesa is doing it in SW. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void WPixelsRGBAMono( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD dwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Solve the color once only. I don't uses the alpha. */
dwColor = ( ((DWORD)((float)pContext->rCurrent * pContext->pShared->pixel.rScale)) << pContext->pShared->pixel.rShift );
dwColor |= ( ((DWORD)((float)pContext->gCurrent * pContext->pShared->pixel.gScale)) << pContext->pShared->pixel.gShift );
dwColor |= ( ((DWORD)((float)pContext->bCurrent * pContext->pShared->pixel.bScale)) << pContext->pShared->pixel.bShift );
if ( mask )
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
if ( mask[index] )
{
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
}
else
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
/* Find the pixel. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb);
memcpy( pBuffer, &dwColor, pContext->pShared->pixel.cb );
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc isn't written for speed rather its to handle the general case. */
/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/
/* structure that was generated from the OffScreen surface pixelformat. The */
/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/
/* own alpha channel when the context was created. I did this as I didn't */
/* feel that it was worth the effort to try and get HW to work (bus bound). */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void RSpanRGBA( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
UCHAR *pBuffer;
int index;
DWORD *pdwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
/* Find the start of the span. Invert y for Windows. */
pBuffer = (UCHAR *)pddsd2->lpSurface +
(FLIP(pContext->pShared->dwHeight,y) * pddsd2->lPitch) +
(x*pContext->pShared->pixel.cb);
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++, pBuffer += pContext->pShared->pixel.cb )
{
pdwColor = (DWORD *)pBuffer;
rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}
/*===========================================================================*/
/* This proc isn't written for speed rather its to handle the general case. */
/* I grab each pixel from the surface and unpack the info using the PIXELINFO*/
/* structure that was generated from the OffScreen surface pixelformat. The */
/* function will not fill in the alpha value as Mesa I have Mesa allocate its*/
/* own alpha channel when the context was created. I did this as I didn't */
/* feel that it was worth the effort to try and get HW to work (bus bound). */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void RPixelsRGBA( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] )
{
D3DMESACONTEXT *pContext = (D3DMESACONTEXT *)ctx->DriverCtx;
DDSURFACEDESC2 *pddsd2;
int index;
DWORD *pdwColor;
/* Get the surface pointer and the pitch. */
pddsd2 = LockHAL( pContext->pShared, TRUE );
if ( mask )
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
if ( mask[index] )
{
/* Find the start of the pixel. Invert y for Windows. */
pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));
rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
}
}
}
else
{
/* We store the surface pointer as a UCHAR so that pixel.cb (count in btyles) will work for all. */
for( index = 0; index < n; index++ )
{
/* Find the start of the pixel. Invert y for Windows. */
pdwColor = (DWORD *)((UCHAR *)pddsd2->lpSurface + (FLIP(pContext->pShared->dwHeight,y[index]) * pddsd2->lPitch) + (x[index]*pContext->pShared->pixel.cb));
rgba[index][RCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwRMask) >> pContext->pShared->pixel.rShift) / pContext->pShared->pixel.rScale);
rgba[index][GCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwGMask) >> pContext->pShared->pixel.gShift) / pContext->pShared->pixel.gScale);
rgba[index][BCOMP] = (GLubyte)((float)((*pdwColor & pContext->pShared->pixel.dwBMask) >> pContext->pShared->pixel.bShift) / pContext->pShared->pixel.bScale);
}
}
/* Giver back. */
UnlockHAL( pContext->pShared, TRUE );
}

View File

@ -1,143 +1,143 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "Debug.h"
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
DWORD g_DBGMask = DBG_ALL_ERROR;
/*===========================================================================*/
/* This is your basic DPF function with printf like support. The function */
/* also works with a global debug mask variable. I have written support that*/
/* allows for the user's enviroment variable space to be read and set the */
/* masks. This is done when the dll starts and is only in the debug version.*/
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void _cdecl DebugPrint( int mask, char *pszFormat, ... )
{
char buffer[512];
va_list args;
/* A mask of 0 will always pass. Easy to remeber. */
if ( (mask == 0) || (mask & g_DBGMask) )
{
va_start( args, pszFormat );
if ( mask & DBG_ALL_ERROR )
OutputDebugString( "MesaD3D: (ERROR)" );
else
OutputDebugString( "MesaD3D: " );
vsprintf( buffer, pszFormat, args );
strcat( buffer, "\n" );
OutputDebugString( buffer );
va_end( args );
}
}
/*===========================================================================*/
/* This call reads the users enviroment variables and sets any debug mask */
/* that they have set to TRUE. Now the value must be "TRUE". */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void ReadDBGEnv( void )
{
g_DBGMask = DBG_ALL_ERROR;
#define IS_VAR_SET(v) if ( getenv( # v ) && !strcmp(getenv( # v ),"TRUE") ) g_DBGMask |= v;
IS_VAR_SET( DBG_FUNC );
IS_VAR_SET( DBG_STATES );
IS_VAR_SET( DBG_CNTX_INFO );
IS_VAR_SET( DBG_CNTX_WARN );
IS_VAR_SET( DBG_CNTX_PROFILE );
IS_VAR_SET( DBG_CNTX_ERROR );
IS_VAR_SET( DBG_CNTX_ALL );
IS_VAR_SET( DBG_PRIM_INFO );
IS_VAR_SET( DBG_PRIM_WARN );
IS_VAR_SET( DBG_PRIM_PROFILE );
IS_VAR_SET( DBG_PRIM_ERROR );
IS_VAR_SET( DBG_PRIM_ALL );
IS_VAR_SET( DBG_TXT_INFO );
IS_VAR_SET( DBG_TXT_WARN );
IS_VAR_SET( DBG_TXT_PROFILE );
IS_VAR_SET( DBG_TXT_ERROR );
IS_VAR_SET( DBG_TXT_ALL );
IS_VAR_SET( DBG_ALL_INFO );
IS_VAR_SET( DBG_ALL_WARN );
IS_VAR_SET( DBG_ALL_PROFILE );
IS_VAR_SET( DBG_ALL_ERROR );
IS_VAR_SET( DBG_ALL );
#undef IS_VAR_SET
}
/*===========================================================================*/
/* This function will take a pointer to a DDSURFACEDESC2 structure & display*/
/* the parsed information using a DPF call. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf )
{
char buffer[256];
/* Parse the flag type and write the string equivalent. */
if ( pddpf->dwFlags & DDPF_ALPHA )
strcat( buffer, "DDPF_ALPHA " );
if ( pddpf->dwFlags & DDPF_ALPHAPIXELS )
strcat( buffer, "DDPF_ALPHAPIXELS " );
if ( pddpf->dwFlags & DDPF_ALPHAPREMULT )
strcat( buffer, "DDPF_ALPHAPREMULT " );
if ( pddpf->dwFlags & DDPF_BUMPLUMINANCE )
strcat( buffer, "DDPF_BUMPLUMINANCE " );
if ( pddpf->dwFlags & DDPF_BUMPDUDV )
strcat( buffer, "DDPF_BUMPDUDV " );
if ( pddpf->dwFlags & DDPF_COMPRESSED )
strcat( buffer, "DDPF_COMPRESSED " );
if ( pddpf->dwFlags & DDPF_FOURCC )
strcat( buffer, "DDPF_FOURCC " );
if ( pddpf->dwFlags & DDPF_LUMINANCE )
strcat( buffer, "DDPF_LUMINANCE " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED1 )
strcat( buffer, "DDPF_PALETTEINDEXED1 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED2 )
strcat( buffer, "DDPF_PALETTEINDEXED2 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED4 )
strcat( buffer, "DDPF_PALETTEINDEXED4 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED8 )
strcat( buffer, "DDPF_PALETTEINDEXED8 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXEDTO8 )
strcat( buffer, "DDPF_PALETTEINDEXEDTO8 " );
if ( pddpf->dwFlags & DDPF_RGB )
strcat( buffer, "DDPF_RGB " );
if ( pddpf->dwFlags & DDPF_RGBTOYUV )
strcat( buffer, "DDPF_RGBTOYUV " );
if ( pddpf->dwFlags & DDPF_STENCILBUFFER )
strcat( buffer, "DDPF_STENCILBUFFER " );
if ( pddpf->dwFlags & DDPF_YUV )
strcat( buffer, "DDPF_YUV " );
if ( pddpf->dwFlags & DDPF_ZBUFFER )
strcat( buffer, "DDPF_ZBUFFER " );
if ( pddpf->dwFlags & DDPF_ZPIXELS )
strcat( buffer, "DDPF_ZPIXELS " );
DPF(( (DBG_TXT_INFO|DBG_CNTX_INFO),"%s", buffer ));
}
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#include "Debug.h"
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
DWORD g_DBGMask = DBG_ALL_ERROR;
/*===========================================================================*/
/* This is your basic DPF function with printf like support. The function */
/* also works with a global debug mask variable. I have written support that*/
/* allows for the user's enviroment variable space to be read and set the */
/* masks. This is done when the dll starts and is only in the debug version.*/
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void _cdecl DebugPrint( int mask, char *pszFormat, ... )
{
char buffer[512];
va_list args;
/* A mask of 0 will always pass. Easy to remeber. */
if ( (mask == 0) || (mask & g_DBGMask) )
{
va_start( args, pszFormat );
if ( mask & DBG_ALL_ERROR )
OutputDebugString( "MesaD3D: (ERROR)" );
else
OutputDebugString( "MesaD3D: " );
vsprintf( buffer, pszFormat, args );
strcat( buffer, "\n" );
OutputDebugString( buffer );
va_end( args );
}
}
/*===========================================================================*/
/* This call reads the users enviroment variables and sets any debug mask */
/* that they have set to TRUE. Now the value must be "TRUE". */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void ReadDBGEnv( void )
{
g_DBGMask = DBG_ALL_ERROR;
#define IS_VAR_SET(v) if ( getenv( # v ) && !strcmp(getenv( # v ),"TRUE") ) g_DBGMask |= v;
IS_VAR_SET( DBG_FUNC );
IS_VAR_SET( DBG_STATES );
IS_VAR_SET( DBG_CNTX_INFO );
IS_VAR_SET( DBG_CNTX_WARN );
IS_VAR_SET( DBG_CNTX_PROFILE );
IS_VAR_SET( DBG_CNTX_ERROR );
IS_VAR_SET( DBG_CNTX_ALL );
IS_VAR_SET( DBG_PRIM_INFO );
IS_VAR_SET( DBG_PRIM_WARN );
IS_VAR_SET( DBG_PRIM_PROFILE );
IS_VAR_SET( DBG_PRIM_ERROR );
IS_VAR_SET( DBG_PRIM_ALL );
IS_VAR_SET( DBG_TXT_INFO );
IS_VAR_SET( DBG_TXT_WARN );
IS_VAR_SET( DBG_TXT_PROFILE );
IS_VAR_SET( DBG_TXT_ERROR );
IS_VAR_SET( DBG_TXT_ALL );
IS_VAR_SET( DBG_ALL_INFO );
IS_VAR_SET( DBG_ALL_WARN );
IS_VAR_SET( DBG_ALL_PROFILE );
IS_VAR_SET( DBG_ALL_ERROR );
IS_VAR_SET( DBG_ALL );
#undef IS_VAR_SET
}
/*===========================================================================*/
/* This function will take a pointer to a DDSURFACEDESC2 structure & display*/
/* the parsed information using a DPF call. */
/*===========================================================================*/
/* RETURN: */
/*===========================================================================*/
void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf )
{
char buffer[256];
/* Parse the flag type and write the string equivalent. */
if ( pddpf->dwFlags & DDPF_ALPHA )
strcat( buffer, "DDPF_ALPHA " );
if ( pddpf->dwFlags & DDPF_ALPHAPIXELS )
strcat( buffer, "DDPF_ALPHAPIXELS " );
if ( pddpf->dwFlags & DDPF_ALPHAPREMULT )
strcat( buffer, "DDPF_ALPHAPREMULT " );
if ( pddpf->dwFlags & DDPF_BUMPLUMINANCE )
strcat( buffer, "DDPF_BUMPLUMINANCE " );
if ( pddpf->dwFlags & DDPF_BUMPDUDV )
strcat( buffer, "DDPF_BUMPDUDV " );
if ( pddpf->dwFlags & DDPF_COMPRESSED )
strcat( buffer, "DDPF_COMPRESSED " );
if ( pddpf->dwFlags & DDPF_FOURCC )
strcat( buffer, "DDPF_FOURCC " );
if ( pddpf->dwFlags & DDPF_LUMINANCE )
strcat( buffer, "DDPF_LUMINANCE " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED1 )
strcat( buffer, "DDPF_PALETTEINDEXED1 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED2 )
strcat( buffer, "DDPF_PALETTEINDEXED2 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED4 )
strcat( buffer, "DDPF_PALETTEINDEXED4 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXED8 )
strcat( buffer, "DDPF_PALETTEINDEXED8 " );
if ( pddpf->dwFlags & DDPF_PALETTEINDEXEDTO8 )
strcat( buffer, "DDPF_PALETTEINDEXEDTO8 " );
if ( pddpf->dwFlags & DDPF_RGB )
strcat( buffer, "DDPF_RGB " );
if ( pddpf->dwFlags & DDPF_RGBTOYUV )
strcat( buffer, "DDPF_RGBTOYUV " );
if ( pddpf->dwFlags & DDPF_STENCILBUFFER )
strcat( buffer, "DDPF_STENCILBUFFER " );
if ( pddpf->dwFlags & DDPF_YUV )
strcat( buffer, "DDPF_YUV " );
if ( pddpf->dwFlags & DDPF_ZBUFFER )
strcat( buffer, "DDPF_ZBUFFER " );
if ( pddpf->dwFlags & DDPF_ZPIXELS )
strcat( buffer, "DDPF_ZPIXELS " );
DPF(( (DBG_TXT_INFO|DBG_CNTX_INFO),"%s", buffer ));
}

View File

@ -1,90 +1,90 @@
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef _DEBUG_H
#define _DEBUG_H
#ifdef __cplusplus
extern "C" {
#endif
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <stdio.h>
#include <string.h>
#include <ddraw.h>
#include <d3d.h>
#include "D3DShared.h"
/*===========================================================================*/
/* Magic numbers. */
/*===========================================================================*/
/*===========================================================================*/
/* Macros defines. */
/*===========================================================================*/
#define DBG_FUNC 0x00000001
#define DBG_STATES 0x00000002
#define DBG_CNTX_INFO 0x00000010
#define DBG_CNTX_WARN 0x00000020
#define DBG_CNTX_PROFILE 0x00000040
#define DBG_CNTX_ERROR 0x00000080
#define DBG_CNTX_ALL 0x000000F0
#define DBG_PRIM_INFO 0x00000100
#define DBG_PRIM_WARN 0x00000200
#define DBG_PRIM_PROFILE 0x00000400
#define DBG_PRIM_ERROR 0x00000800
#define DBG_PRIM_ALL 0x00000F00
#define DBG_TXT_INFO 0x00001000
#define DBG_TXT_WARN 0x00002000
#define DBG_TXT_PROFILE 0x00004000
#define DBG_TXT_ERROR 0x00008000
#define DBG_TXT_ALL 0x0000F000
#define DBG_ALL_INFO 0x11111110
#define DBG_ALL_WARN 0x22222220
#define DBG_ALL_PROFILE 0x44444440
#define DBG_ALL_ERROR 0x88888880
#define DBG_ALL 0xFFFFFFFF
#ifdef D3D_DEBUG
# define DPF(arg) DebugPrint arg
# define RIP(pH,msg,err) OutputDebugString(msg); \
OutputDebugString(err); \
OutputDebugString("\n"); \
FatalShutDown(pH)
#else
# define DPF(arg)
# define RIP(pH,msg,err) FatalShutDown(pH)
#endif
/*===========================================================================*/
/* Type defines. */
/*===========================================================================*/
/*===========================================================================*/
/* Function prototypes. */
/*===========================================================================*/
extern void ReadDBGEnv( void );
extern void _cdecl DebugPrint( int mask, char *pszFormat, ... );
extern void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf );
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
extern DWORD g_DBGMask;
#ifdef __cplusplus
}
#endif
#endif
/*===========================================================================*/
/* */
/* Mesa-3.0 DirectX 6 Driver */
/* */
/* By Leigh McRae */
/* */
/* http://www.altsoftware.com/ */
/* */
/* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
/*===========================================================================*/
#ifndef _DEBUG_H
#define _DEBUG_H
#ifdef __cplusplus
extern "C" {
#endif
/*===========================================================================*/
/* Includes. */
/*===========================================================================*/
#include <stdio.h>
#include <string.h>
#include <ddraw.h>
#include <d3d.h>
#include "D3DShared.h"
/*===========================================================================*/
/* Magic numbers. */
/*===========================================================================*/
/*===========================================================================*/
/* Macros defines. */
/*===========================================================================*/
#define DBG_FUNC 0x00000001
#define DBG_STATES 0x00000002
#define DBG_CNTX_INFO 0x00000010
#define DBG_CNTX_WARN 0x00000020
#define DBG_CNTX_PROFILE 0x00000040
#define DBG_CNTX_ERROR 0x00000080
#define DBG_CNTX_ALL 0x000000F0
#define DBG_PRIM_INFO 0x00000100
#define DBG_PRIM_WARN 0x00000200
#define DBG_PRIM_PROFILE 0x00000400
#define DBG_PRIM_ERROR 0x00000800
#define DBG_PRIM_ALL 0x00000F00
#define DBG_TXT_INFO 0x00001000
#define DBG_TXT_WARN 0x00002000
#define DBG_TXT_PROFILE 0x00004000
#define DBG_TXT_ERROR 0x00008000
#define DBG_TXT_ALL 0x0000F000
#define DBG_ALL_INFO 0x11111110
#define DBG_ALL_WARN 0x22222220
#define DBG_ALL_PROFILE 0x44444440
#define DBG_ALL_ERROR 0x88888880
#define DBG_ALL 0xFFFFFFFF
#ifdef D3D_DEBUG
# define DPF(arg) DebugPrint arg
# define RIP(pH,msg,err) OutputDebugString(msg); \
OutputDebugString(err); \
OutputDebugString("\n"); \
FatalShutDown(pH)
#else
# define DPF(arg)
# define RIP(pH,msg,err) FatalShutDown(pH)
#endif
/*===========================================================================*/
/* Type defines. */
/*===========================================================================*/
/*===========================================================================*/
/* Function prototypes. */
/*===========================================================================*/
extern void ReadDBGEnv( void );
extern void _cdecl DebugPrint( int mask, char *pszFormat, ... );
extern void DebugPixelFormat( char *pszSurfaceName, DDPIXELFORMAT *pddpf );
/*===========================================================================*/
/* Global variables. */
/*===========================================================================*/
extern DWORD g_DBGMask;
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,25 +1,25 @@
SET DBG_FUNC=FALSE
SET DBG_CNTX_INFO=TRUE
SET DBG_CNTX_WARN=TRUE
SET DBG_CNTX_PROFILE=FALSE
SET DBG_CNTX_ERROR=TRUE
SET DBG_CNTX_ALL=TRUE
SET DBG_PRIM_INFO=FALSE
SET DBG_PRIM_WARN=FALSE
SET DBG_PRIM_PROFILE=FALSE
SET DBG_PRIM_ERROR=TRUE
SET DBG_PRIM_ALL=FALSE
SET DBG_TXT_INFO=FALSE
SET DBG_TXT_WARN=TRUE
SET DBG_TXT_PROFILE=FALSE
SET DBG_TXT_ERROR=TRUE
SET DBG_TXT_ALL=FALSE
SET DBG_ALL_INFO=FALSE
SET DBG_ALL_WARN=TRUE
SET DBG_ALL_PROFILE=FALSE
SET DBG_ALL_ERROR=TRUE
SET DBG_ALL=FALSE
SET DBG_FUNC=FALSE
SET DBG_CNTX_INFO=TRUE
SET DBG_CNTX_WARN=TRUE
SET DBG_CNTX_PROFILE=FALSE
SET DBG_CNTX_ERROR=TRUE
SET DBG_CNTX_ALL=TRUE
SET DBG_PRIM_INFO=FALSE
SET DBG_PRIM_WARN=FALSE
SET DBG_PRIM_PROFILE=FALSE
SET DBG_PRIM_ERROR=TRUE
SET DBG_PRIM_ALL=FALSE
SET DBG_TXT_INFO=FALSE
SET DBG_TXT_WARN=TRUE
SET DBG_TXT_PROFILE=FALSE
SET DBG_TXT_ERROR=TRUE
SET DBG_TXT_ALL=FALSE
SET DBG_ALL_INFO=FALSE
SET DBG_ALL_WARN=TRUE
SET DBG_ALL_PROFILE=FALSE
SET DBG_ALL_ERROR=TRUE
SET DBG_ALL=FALSE

View File

@ -1,101 +1,101 @@
##############################################################################
#
# Mesa-3.0 Makefile for DirectX 6 Driver
#
# By Leigh McRae
#
# http://www.altsoftware.com/
#
# Copyright (c) 1999-1998 alt.software inc. All Rights Reserved
##############################################################################
NAME=
TARGET= WGL Driver (D3DHAL)
D3D_DIR=$(MAKEDIR)\D3D
TARGET_DIR=e:\WinNT\System32
TEMP_DIR=c:\Temp
SPACE=-
LINKER=link.exe
INCLUDE=$(SDKROOT)\include;$(INCLUDE)
LIB=$(SDKROOT)\lib;$(LIB)
##############################################################################
CFLAGS = /c /nologo /W1 /G5 /I..\ /I..\..\Include \
/D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "MESAD3D"
CPPFLAGS= /c /nologo /W1 /G5 /I..\ /I..\..\Include \
/D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "MESAD3D"
!IF "$(DEBUG)" == "1"
CFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CFLAGS)
CPPFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CPPFLAGS)
BUILD_TYPE=debug
!ELSE
CFLAGS = /MT /Ox /D "NDEBUG" $(CFLAGS)
CPPFLAGS = /MT /Ox /D "NDEBUG" $(CPPFLAGS)
BUILD_TYPE=release
!ENDIF
##############################################################################
SRCS_WGL = wgl.c D3Dvbrender.c DDrawPROCS.c NULLProcs.c Debug.c
SRCS_HAL = D3DInit.cpp D3DRaster.cpp D3DTextureMgr.cpp D3DUtils.cpp D3DCaps.cpp
OBJS_WGL = $(SRCS_WGL:.c=.obj)
OBJS_HAL = $(SRCS_HAL:.cpp=.obj)
WINLIBS = kernel32.lib user32.lib gdi32.lib oldnames.lib
DXLIBS =
LIBS = $(WINLIBS) $(DXLIBS)
###############################################################################
# Primary Targets #
###############################################################################
default: header WGL HAL footer
all: default
WGL : $(OBJS_WGL)
HAL : $(OBJS_HAL)
install : forceit
@echo $(SPACE)
@echo ========================================
@echo Install files created.
@echo ========================================
###############################################################################
# Secondary Targets #
###############################################################################
clean:
@echo ========================================
@echo Cleaning $(TARGET)
@del *.obj
@del *.dep
@del *.exp
@del *.ncb
@del *.plg
@del *.lib
@echo ========================================
header:
@echo ============================================================
@echo Building $(TARGET) ($(BUILD_TYPE) version)
@echo ============================================================
@echo $(SPACE)
footer:
@echo $(SPACE)
@echo ============================================================
@echo DONE building $(TARGET) ($(BUILD_TYPE) version)
@echo ============================================================
forceit:
##############################################################################
#
# Mesa-3.0 Makefile for DirectX 6 Driver
#
# By Leigh McRae
#
# http://www.altsoftware.com/
#
# Copyright (c) 1999-1998 alt.software inc. All Rights Reserved
##############################################################################
NAME=
TARGET= WGL Driver (D3DHAL)
D3D_DIR=$(MAKEDIR)\D3D
TARGET_DIR=e:\WinNT\System32
TEMP_DIR=c:\Temp
SPACE=-
LINKER=link.exe
INCLUDE=$(SDKROOT)\include;$(INCLUDE)
LIB=$(SDKROOT)\lib;$(LIB)
##############################################################################
CFLAGS = /c /nologo /W1 /G5 /I..\ /I..\..\Include \
/D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "MESAD3D"
CPPFLAGS= /c /nologo /W1 /G5 /I..\ /I..\..\Include \
/D "_WIN32" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "MESAD3D"
!IF "$(DEBUG)" == "1"
CFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CFLAGS)
CPPFLAGS = /MTd /Od /Z7 /Yd /D "_DEBUG" /D "D3D_DEBUG" $(CPPFLAGS)
BUILD_TYPE=debug
!ELSE
CFLAGS = /MT /Ox /D "NDEBUG" $(CFLAGS)
CPPFLAGS = /MT /Ox /D "NDEBUG" $(CPPFLAGS)
BUILD_TYPE=release
!ENDIF
##############################################################################
SRCS_WGL = wgl.c D3Dvbrender.c DDrawPROCS.c NULLProcs.c Debug.c
SRCS_HAL = D3DInit.cpp D3DRaster.cpp D3DTextureMgr.cpp D3DUtils.cpp D3DCaps.cpp
OBJS_WGL = $(SRCS_WGL:.c=.obj)
OBJS_HAL = $(SRCS_HAL:.cpp=.obj)
WINLIBS = kernel32.lib user32.lib gdi32.lib oldnames.lib
DXLIBS =
LIBS = $(WINLIBS) $(DXLIBS)
###############################################################################
# Primary Targets #
###############################################################################
default: header WGL HAL footer
all: default
WGL : $(OBJS_WGL)
HAL : $(OBJS_HAL)
install : forceit
@echo $(SPACE)
@echo ========================================
@echo Install files created.
@echo ========================================
###############################################################################
# Secondary Targets #
###############################################################################
clean:
@echo ========================================
@echo Cleaning $(TARGET)
@del *.obj
@del *.dep
@del *.exp
@del *.ncb
@del *.plg
@del *.lib
@echo ========================================
header:
@echo ============================================================
@echo Building $(TARGET) ($(BUILD_TYPE) version)
@echo ============================================================
@echo $(SPACE)
footer:
@echo $(SPACE)
@echo ============================================================
@echo DONE building $(TARGET) ($(BUILD_TYPE) version)
@echo ============================================================
forceit:

View File

@ -1,442 +1,442 @@
;===========================================================================
;
; Mesa-3.0 DirectX 6 Driver
;
; By Leigh McRae
;
; http://www.altsoftware.com/
;
; Copyright (c) 1999-1998 alt.software inc. All Rights Reserved
;===========================================================================
NAME OpenGL32.DLL
DESCRIPTION "Mesa-3.0 DX6 Driver Version 0.5"
EXPORTS
DllMain
glAccum
glAlphaFunc
glAreTexturesResident
glAreTexturesResidentEXT
glArrayElement
glArrayElementEXT
glBegin
glBindTexture
glBindTextureEXT
glBitmap
glBlendColorEXT
glBlendEquationEXT
glBlendFunc
glCallList
glCallLists
glClear
glClearAccum
glClearColor
glClearDepth
glClearIndex
glClearStencil
glClipPlane
glColor3b
glColor3bv
glColor3d
glColor3dv
glColor3f
glColor3fv
glColor3i
glColor3iv
glColor3s
glColor3sv
glColor3ub
glColor3ubv
glColor3ui
glColor3uiv
glColor3us
glColor3usv
glColor4b
glColor4bv
glColor4d
glColor4dv
glColor4f
glColor4fv
glColor4i
glColor4iv
glColor4s
glColor4sv
glColor4ub
glColor4ubv
glColor4ui
glColor4uiv
glColor4us
glColor4usv
glColorMask
glColorMaterial
glColorPointer
glColorPointerEXT
glColorSubTableEXT
glColorTableEXT
glCopyPixels
glCopyTexImage1D
glCopyTexImage2D
glCopyTexSubImage1D
glCopyTexSubImage2D
glCopyTexSubImage3DEXT
glCullFace
glDeleteLists
glDeleteTextures
glDeleteTexturesEXT
glDepthFunc
glDepthMask
glDepthRange
glDisable
glDisableClientState
glDrawArrays
glDrawArraysEXT
glDrawBuffer
glDrawElements
glDrawPixels
glEdgeFlag
glEdgeFlagPointer
glEdgeFlagPointerEXT
glEdgeFlagv
glEnable
glEnableClientState
glEnd
glEndList
glEvalCoord1d
glEvalCoord1dv
glEvalCoord1f
glEvalCoord1fv
glEvalCoord2d
glEvalCoord2dv
glEvalCoord2f
glEvalCoord2fv
glEvalMesh1
glEvalMesh2
glEvalPoint1
glEvalPoint2
glFeedbackBuffer
glFinish
glFlush
glFogf
glFogfv
glFogi
glFogiv
glFrontFace
glFrustum
glGenLists
glGenTextures
glGenTexturesEXT
glGetBooleanv
glGetClipPlane
glGetColorTableEXT
glGetColorTableParameterfvEXT
glGetColorTableParameterivEXT
glGetDoublev
glGetError
glGetFloatv
glGetIntegerv
glGetLightfv
glGetLightiv
glGetMapdv
glGetMapfv
glGetMapiv
glGetMaterialfv
glGetMaterialiv
glGetPixelMapfv
glGetPixelMapuiv
glGetPixelMapusv
glGetPointerv
glGetPointervEXT
glGetPolygonStipple
glGetString
glGetTexEnvfv
glGetTexEnviv
glGetTexGendv
glGetTexGenfv
glGetTexGeniv
glGetTexImage
glGetTexLevelParameterfv
glGetTexLevelParameteriv
glGetTexParameterfv
glGetTexParameteriv
glHint
glIndexd
glIndexdv
glIndexf
glIndexfv
glIndexi
glIndexiv
glIndexMask
glIndexPointer
glIndexPointerEXT
glIndexs
glIndexsv
glIndexub
glIndexubv
glInitNames
glInterleavedArrays
glIsEnabled
glIsList
glIsTexture
glIsTextureEXT
glLightf
glLightfv
glLighti
glLightiv
glLightModelf
glLightModelfv
glLightModeli
glLightModeliv
glLineStipple
glLineWidth
glListBase
glLoadIdentity
glLoadMatrixd
glLoadMatrixf
glLoadName
glLogicOp
glMap1d
glMap1f
glMap2d
glMap2f
glMapGrid1d
glMapGrid1f
glMapGrid2d
glMapGrid2f
glMaterialf
glMaterialfv
glMateriali
glMaterialiv
glMatrixMode
glMultMatrixd
glMultMatrixf
glNewList
glNormal3b
glNormal3bv
glNormal3d
glNormal3dv
glNormal3f
glNormal3fv
glNormal3i
glNormal3iv
glNormal3s
glNormal3sv
glNormalPointer
glNormalPointerEXT
glOrtho
glPassThrough
glPixelMapfv
glPixelMapuiv
glPixelMapusv
glPixelStoref
glPixelStorei
glPixelTransferf
glPixelTransferi
glPixelZoom
glPointParameterfEXT
glPointParameterfvEXT
glPointSize
glPolygonMode
glPolygonOffset
glPolygonOffsetEXT
glPolygonStipple
glPopAttrib
glPopClientAttrib
glPopMatrix
glPopName
glPrioritizeTextures
glPrioritizeTexturesEXT
glPushAttrib
glPushClientAttrib
glPushMatrix
glPushName
glRasterPos2d
glRasterPos2dv
glRasterPos2f
glRasterPos2fv
glRasterPos2i
glRasterPos2iv
glRasterPos2s
glRasterPos2sv
glRasterPos3d
glRasterPos3dv
glRasterPos3f
glRasterPos3fv
glRasterPos3i
glRasterPos3iv
glRasterPos3s
glRasterPos3sv
glRasterPos4d
glRasterPos4dv
glRasterPos4f
glRasterPos4fv
glRasterPos4i
glRasterPos4iv
glRasterPos4s
glRasterPos4sv
glReadBuffer
glReadPixels
glRectd
glRectdv
glRectf
glRectfv
glRecti
glRectiv
glRects
glRectsv
glRenderMode
glResizeBuffersMESA
glRotated
glRotatef
glScaled
glScalef
glScissor
glSelectBuffer
glShadeModel
glStencilFunc
glStencilMask
glStencilOp
glTexCoord1d
glTexCoord1dv
glTexCoord1f
glTexCoord1fv
glTexCoord1i
glTexCoord1iv
glTexCoord1s
glTexCoord1sv
glTexCoord2d
glTexCoord2dv
glTexCoord2f
glTexCoord2fv
glTexCoord2i
glTexCoord2iv
glTexCoord2s
glTexCoord2sv
glTexCoord3d
glTexCoord3dv
glTexCoord3f
glTexCoord3fv
glTexCoord3i
glTexCoord3iv
glTexCoord3s
glTexCoord3sv
glTexCoord4d
glTexCoord4dv
glTexCoord4f
glTexCoord4fv
glTexCoord4i
glTexCoord4iv
glTexCoord4s
glTexCoord4sv
glTexCoordPointer
glTexCoordPointerEXT
glTexEnvf
glTexEnvfv
glTexEnvi
glTexEnviv
glTexGend
glTexGendv
glTexGenf
glTexGenfv
glTexGeni
glTexGeniv
glTexImage1D
glTexImage2D
glTexImage3DEXT
glTexParameterf
glTexParameterfv
glTexParameteri
glTexParameteriv
glTexSubImage1D
glTexSubImage2D
glTexSubImage3DEXT
glTranslated
glTranslatef
glVertex2d
glVertex2dv
glVertex2f
glVertex2fv
glVertex2i
glVertex2iv
glVertex2s
glVertex2sv
glVertex3d
glVertex3dv
glVertex3f
glVertex3fv
glVertex3i
glVertex3iv
glVertex3s
glVertex3sv
glVertex4d
glVertex4dv
glVertex4f
glVertex4fv
glVertex4i
glVertex4iv
glVertex4s
glVertex4sv
glVertexPointer
glVertexPointerEXT
glViewport
glWindowPos2dMESA
glWindowPos2dvMESA
glWindowPos2fMESA
glWindowPos2fvMESA
glWindowPos2iMESA
glWindowPos2ivMESA
glWindowPos2sMESA
glWindowPos2svMESA
glWindowPos3dMESA
glWindowPos3dvMESA
glWindowPos3fMESA
glWindowPos3fvMESA
glWindowPos3iMESA
glWindowPos3ivMESA
glWindowPos3sMESA
glWindowPos3svMESA
glWindowPos4dMESA
glWindowPos4dvMESA
glWindowPos4fMESA
glWindowPos4fvMESA
glWindowPos4iMESA
glWindowPos4ivMESA
glWindowPos4sMESA
glWindowPos4svMESA
; WMesaCreateContext
; WMesaDestroyContext
; WMesaMakeCurrent
; WMesaPaletteChange
; WMesaSwapBuffers
; OSMesaCreateContext
; OSMesaDestroyContext
; OSMesaMakeCurrent
; OSMesaGetCurrentContext
; OSMesaPixelStore
; OSMesaGetIntegerv
; OSMesaGetDepthBuffer
wglCopyContext
wglCreateContext
wglCreateLayerContext
wglDeleteContext
; wglDescribeLayerPlane
wglGetCurrentContext
wglGetCurrentDC
; wglGetLayerPaletteEntries
wglGetProcAddress
wglMakeCurrent
; wglRealizeLayerPalette
; wglSetLayerPaletteEntries
wglShareLists
wglSwapLayerBuffers
wglUseFontBitmapsA
wglUseFontBitmapsW
wglUseFontOutlinesA
wglUseFontOutlinesW
wglChoosePixelFormat
wglDescribePixelFormat
wglGetPixelFormat
wglSetPixelFormat
wglSwapBuffers
;===========================================================================
;
; Mesa-3.0 DirectX 6 Driver
;
; By Leigh McRae
;
; http://www.altsoftware.com/
;
; Copyright (c) 1999-1998 alt.software inc. All Rights Reserved
;===========================================================================
NAME OpenGL32.DLL
DESCRIPTION "Mesa-3.0 DX6 Driver Version 0.5"
EXPORTS
DllMain
glAccum
glAlphaFunc
glAreTexturesResident
glAreTexturesResidentEXT
glArrayElement
glArrayElementEXT
glBegin
glBindTexture
glBindTextureEXT
glBitmap
glBlendColorEXT
glBlendEquationEXT
glBlendFunc
glCallList
glCallLists
glClear
glClearAccum
glClearColor
glClearDepth
glClearIndex
glClearStencil
glClipPlane
glColor3b
glColor3bv
glColor3d
glColor3dv
glColor3f
glColor3fv
glColor3i
glColor3iv
glColor3s
glColor3sv
glColor3ub
glColor3ubv
glColor3ui
glColor3uiv
glColor3us
glColor3usv
glColor4b
glColor4bv
glColor4d
glColor4dv
glColor4f
glColor4fv
glColor4i
glColor4iv
glColor4s
glColor4sv
glColor4ub
glColor4ubv
glColor4ui
glColor4uiv
glColor4us
glColor4usv
glColorMask
glColorMaterial
glColorPointer
glColorPointerEXT
glColorSubTableEXT
glColorTableEXT
glCopyPixels
glCopyTexImage1D
glCopyTexImage2D
glCopyTexSubImage1D
glCopyTexSubImage2D
glCopyTexSubImage3DEXT
glCullFace
glDeleteLists
glDeleteTextures
glDeleteTexturesEXT
glDepthFunc
glDepthMask
glDepthRange
glDisable
glDisableClientState
glDrawArrays
glDrawArraysEXT
glDrawBuffer
glDrawElements
glDrawPixels
glEdgeFlag
glEdgeFlagPointer
glEdgeFlagPointerEXT
glEdgeFlagv
glEnable
glEnableClientState
glEnd
glEndList
glEvalCoord1d
glEvalCoord1dv
glEvalCoord1f
glEvalCoord1fv
glEvalCoord2d
glEvalCoord2dv
glEvalCoord2f
glEvalCoord2fv
glEvalMesh1
glEvalMesh2
glEvalPoint1
glEvalPoint2
glFeedbackBuffer
glFinish
glFlush
glFogf
glFogfv
glFogi
glFogiv
glFrontFace
glFrustum
glGenLists
glGenTextures
glGenTexturesEXT
glGetBooleanv
glGetClipPlane
glGetColorTableEXT
glGetColorTableParameterfvEXT
glGetColorTableParameterivEXT
glGetDoublev
glGetError
glGetFloatv
glGetIntegerv
glGetLightfv
glGetLightiv
glGetMapdv
glGetMapfv
glGetMapiv
glGetMaterialfv
glGetMaterialiv
glGetPixelMapfv
glGetPixelMapuiv
glGetPixelMapusv
glGetPointerv
glGetPointervEXT
glGetPolygonStipple
glGetString
glGetTexEnvfv
glGetTexEnviv
glGetTexGendv
glGetTexGenfv
glGetTexGeniv
glGetTexImage
glGetTexLevelParameterfv
glGetTexLevelParameteriv
glGetTexParameterfv
glGetTexParameteriv
glHint
glIndexd
glIndexdv
glIndexf
glIndexfv
glIndexi
glIndexiv
glIndexMask
glIndexPointer
glIndexPointerEXT
glIndexs
glIndexsv
glIndexub
glIndexubv
glInitNames
glInterleavedArrays
glIsEnabled
glIsList
glIsTexture
glIsTextureEXT
glLightf
glLightfv
glLighti
glLightiv
glLightModelf
glLightModelfv
glLightModeli
glLightModeliv
glLineStipple
glLineWidth
glListBase
glLoadIdentity
glLoadMatrixd
glLoadMatrixf
glLoadName
glLogicOp
glMap1d
glMap1f
glMap2d
glMap2f
glMapGrid1d
glMapGrid1f
glMapGrid2d
glMapGrid2f
glMaterialf
glMaterialfv
glMateriali
glMaterialiv
glMatrixMode
glMultMatrixd
glMultMatrixf
glNewList
glNormal3b
glNormal3bv
glNormal3d
glNormal3dv
glNormal3f
glNormal3fv
glNormal3i
glNormal3iv
glNormal3s
glNormal3sv
glNormalPointer
glNormalPointerEXT
glOrtho
glPassThrough
glPixelMapfv
glPixelMapuiv
glPixelMapusv
glPixelStoref
glPixelStorei
glPixelTransferf
glPixelTransferi
glPixelZoom
glPointParameterfEXT
glPointParameterfvEXT
glPointSize
glPolygonMode
glPolygonOffset
glPolygonOffsetEXT
glPolygonStipple
glPopAttrib
glPopClientAttrib
glPopMatrix
glPopName
glPrioritizeTextures
glPrioritizeTexturesEXT
glPushAttrib
glPushClientAttrib
glPushMatrix
glPushName
glRasterPos2d
glRasterPos2dv
glRasterPos2f
glRasterPos2fv
glRasterPos2i
glRasterPos2iv
glRasterPos2s
glRasterPos2sv
glRasterPos3d
glRasterPos3dv
glRasterPos3f
glRasterPos3fv
glRasterPos3i
glRasterPos3iv
glRasterPos3s
glRasterPos3sv
glRasterPos4d
glRasterPos4dv
glRasterPos4f
glRasterPos4fv
glRasterPos4i
glRasterPos4iv
glRasterPos4s
glRasterPos4sv
glReadBuffer
glReadPixels
glRectd
glRectdv
glRectf
glRectfv
glRecti
glRectiv
glRects
glRectsv
glRenderMode
glResizeBuffersMESA
glRotated
glRotatef
glScaled
glScalef
glScissor
glSelectBuffer
glShadeModel
glStencilFunc
glStencilMask
glStencilOp
glTexCoord1d
glTexCoord1dv
glTexCoord1f
glTexCoord1fv
glTexCoord1i
glTexCoord1iv
glTexCoord1s
glTexCoord1sv
glTexCoord2d
glTexCoord2dv
glTexCoord2f
glTexCoord2fv
glTexCoord2i
glTexCoord2iv
glTexCoord2s
glTexCoord2sv
glTexCoord3d
glTexCoord3dv
glTexCoord3f
glTexCoord3fv
glTexCoord3i
glTexCoord3iv
glTexCoord3s
glTexCoord3sv
glTexCoord4d
glTexCoord4dv
glTexCoord4f
glTexCoord4fv
glTexCoord4i
glTexCoord4iv
glTexCoord4s
glTexCoord4sv
glTexCoordPointer
glTexCoordPointerEXT
glTexEnvf
glTexEnvfv
glTexEnvi
glTexEnviv
glTexGend
glTexGendv
glTexGenf
glTexGenfv
glTexGeni
glTexGeniv
glTexImage1D
glTexImage2D
glTexImage3DEXT
glTexParameterf
glTexParameterfv
glTexParameteri
glTexParameteriv
glTexSubImage1D
glTexSubImage2D
glTexSubImage3DEXT
glTranslated
glTranslatef
glVertex2d
glVertex2dv
glVertex2f
glVertex2fv
glVertex2i
glVertex2iv
glVertex2s
glVertex2sv
glVertex3d
glVertex3dv
glVertex3f
glVertex3fv
glVertex3i
glVertex3iv
glVertex3s
glVertex3sv
glVertex4d
glVertex4dv
glVertex4f
glVertex4fv
glVertex4i
glVertex4iv
glVertex4s
glVertex4sv
glVertexPointer
glVertexPointerEXT
glViewport
glWindowPos2dMESA
glWindowPos2dvMESA
glWindowPos2fMESA
glWindowPos2fvMESA
glWindowPos2iMESA
glWindowPos2ivMESA
glWindowPos2sMESA
glWindowPos2svMESA
glWindowPos3dMESA
glWindowPos3dvMESA
glWindowPos3fMESA
glWindowPos3fvMESA
glWindowPos3iMESA
glWindowPos3ivMESA
glWindowPos3sMESA
glWindowPos3svMESA
glWindowPos4dMESA
glWindowPos4dvMESA
glWindowPos4fMESA
glWindowPos4fvMESA
glWindowPos4iMESA
glWindowPos4ivMESA
glWindowPos4sMESA
glWindowPos4svMESA
; WMesaCreateContext
; WMesaDestroyContext
; WMesaMakeCurrent
; WMesaPaletteChange
; WMesaSwapBuffers
; OSMesaCreateContext
; OSMesaDestroyContext
; OSMesaMakeCurrent
; OSMesaGetCurrentContext
; OSMesaPixelStore
; OSMesaGetIntegerv
; OSMesaGetDepthBuffer
wglCopyContext
wglCreateContext
wglCreateLayerContext
wglDeleteContext
; wglDescribeLayerPlane
wglGetCurrentContext
wglGetCurrentDC
; wglGetLayerPaletteEntries
wglGetProcAddress
wglMakeCurrent
; wglRealizeLayerPalette
; wglSetLayerPaletteEntries
wglShareLists
wglSwapLayerBuffers
wglUseFontBitmapsA
wglUseFontBitmapsW
wglUseFontOutlinesA
wglUseFontOutlinesW
wglChoosePixelFormat
wglDescribePixelFormat
wglGetPixelFormat
wglSetPixelFormat
wglSwapBuffers

File diff suppressed because it is too large Load Diff