Moving the source code files from 'src' to 'src/Common' as a first step towards separating out the platform-specific code. This builds in MSVC 6.0 and I tried to catch all the other build systems, but I'm sure I broke *something*.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@976 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2012-01-10 03:49:12 +00:00
parent 2331ec9b19
commit 132f622a2a
48 changed files with 26361 additions and 26354 deletions

56
.gitattributes vendored
View File

@ -124,35 +124,35 @@ freeglut/freeglut/progs/demos/subwin/Makefile.am -text
freeglut/freeglut/progs/demos/subwin/subwin.c -text freeglut/freeglut/progs/demos/subwin/subwin.c -text
freeglut/freeglut/progs/demos/subwin/subwin.dsp -text freeglut/freeglut/progs/demos/subwin/subwin.dsp -text
freeglut/freeglut/progs/demos/subwin/subwinStatic.dsp -text freeglut/freeglut/progs/demos/subwin/subwinStatic.dsp -text
freeglut/freeglut/src/Common/freeglut_callbacks.c -text
freeglut/freeglut/src/Common/freeglut_cursor.c -text
freeglut/freeglut/src/Common/freeglut_display.c -text
freeglut/freeglut/src/Common/freeglut_ext.c -text
freeglut/freeglut/src/Common/freeglut_font.c -text
freeglut/freeglut/src/Common/freeglut_font_data.c -text
freeglut/freeglut/src/Common/freeglut_gamemode.c -text
freeglut/freeglut/src/Common/freeglut_geometry.c -text
freeglut/freeglut/src/Common/freeglut_glutfont_definitions.c -text
freeglut/freeglut/src/Common/freeglut_init.c -text
freeglut/freeglut/src/Common/freeglut_input_devices.c -text
freeglut/freeglut/src/Common/freeglut_internal.h -text
freeglut/freeglut/src/Common/freeglut_joystick.c -text
freeglut/freeglut/src/Common/freeglut_main.c -text
freeglut/freeglut/src/Common/freeglut_menu.c -text
freeglut/freeglut/src/Common/freeglut_misc.c -text
freeglut/freeglut/src/Common/freeglut_overlay.c -text
freeglut/freeglut/src/Common/freeglut_spaceball.c -text
freeglut/freeglut/src/Common/freeglut_state.c -text
freeglut/freeglut/src/Common/freeglut_stroke_mono_roman.c -text
freeglut/freeglut/src/Common/freeglut_stroke_roman.c -text
freeglut/freeglut/src/Common/freeglut_structure.c -text
freeglut/freeglut/src/Common/freeglut_teapot.c -text
freeglut/freeglut/src/Common/freeglut_teapot_data.h -text
freeglut/freeglut/src/Common/freeglut_videoresize.c -text
freeglut/freeglut/src/Common/freeglut_window.c -text
freeglut/freeglut/src/Common/freeglut_xinput.c -text
freeglut/freeglut/src/Common/freeglutdll.def -text
freeglut/freeglut/src/Makefile.am svn_keywords=Author+Date+Id+Revision freeglut/freeglut/src/Makefile.am svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_callbacks.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_cursor.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_display.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_ext.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_font.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_font_data.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_gamemode.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_geometry.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_glutfont_definitions.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_init.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_input_devices.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_internal.h svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_joystick.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_main.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_menu.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_misc.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_overlay.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_spaceball.c -text
freeglut/freeglut/src/freeglut_state.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_stroke_mono_roman.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_stroke_roman.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_structure.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_teapot.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_teapot_data.h svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_videoresize.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_window.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglut_xinput.c -text
freeglut/freeglut/src/freeglutdll.def svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/templates/cpp_template svn_keywords=Author+Date+Id+Revision freeglut/freeglut/src/templates/cpp_template svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/templates/header_template svn_keywords=Author+Date+Id+Revision freeglut/freeglut/src/templates/header_template svn_keywords=Author+Date+Id+Revision
freeglut/web-src/basic_page.php svn_keywords=Author+Date+Id+Revision freeglut/web-src/basic_page.php svn_keywords=Author+Date+Id+Revision

View File

@ -9,37 +9,37 @@ SET(FREEGLUT_HEADERS
) )
SET(FREEGLUT_SRCS SET(FREEGLUT_SRCS
${FREEGLUT_HEADERS} ${FREEGLUT_HEADERS}
src/freeglut_callbacks.c src/Common/freeglut_callbacks.c
src/freeglut_cursor.c src/Common/freeglut_cursor.c
src/freeglut_display.c src/Common/freeglut_display.c
src/freeglut_ext.c src/Common/freeglut_ext.c
src/freeglut_font.c src/Common/freeglut_font.c
src/freeglut_font_data.c src/Common/freeglut_font_data.c
src/freeglut_gamemode.c src/Common/freeglut_gamemode.c
src/freeglut_geometry.c src/Common/freeglut_geometry.c
src/freeglut_glutfont_definitions.c src/Common/freeglut_glutfont_definitions.c
src/freeglut_init.c src/Common/freeglut_init.c
src/freeglut_input_devices.c src/Common/freeglut_input_devices.c
src/freeglut_joystick.c src/Common/freeglut_joystick.c
src/freeglut_main.c src/Common/freeglut_main.c
src/freeglut_menu.c src/Common/freeglut_menu.c
src/freeglut_misc.c src/Common/freeglut_misc.c
src/freeglut_overlay.c src/Common/freeglut_overlay.c
src/freeglut_spaceball.c src/Common/freeglut_spaceball.c
src/freeglut_state.c src/Common/freeglut_state.c
src/freeglut_stroke_mono_roman.c src/Common/freeglut_stroke_mono_roman.c
src/freeglut_stroke_roman.c src/Common/freeglut_stroke_roman.c
src/freeglut_structure.c src/Common/freeglut_structure.c
src/freeglut_teapot.c src/Common/freeglut_teapot.c
src/freeglut_videoresize.c src/Common/freeglut_videoresize.c
src/freeglut_window.c src/Common/freeglut_window.c
src/freeglut_xinput.c src/Common/freeglut_xinput.c
) )
#IF(WIN32) #IF(WIN32)
# LIST(APPEND FREEGLUT_SRCS src/freeglut_windows.c) # LIST(APPEND FREEGLUT_SRCS src/Windows/freeglut_cursor_windows.c)
#ELSE() #ELSE()
# LIST(APPEND FREEGLUT_SRCS src/freeglut_x11.c) # LIST(APPEND FREEGLUT_SRCS src/X11/freeglut_cursor_x11.c)
#ENDIF() #ENDIF()
# Neatly organize all of the output files in the build directory # Neatly organize all of the output files in the build directory
@ -82,7 +82,7 @@ ADD_DEFINITIONS(-DHAVE_CONFIG_H)
IF(BUILD_SHARED_LIBS) IF(BUILD_SHARED_LIBS)
IF(WIN32) IF(WIN32)
LIST(APPEND FREEGLUT_SRCS src/freeglutdll.def freeglut.rc) LIST(APPEND FREEGLUT_SRCS src/Common/freeglutdll.def freeglut.rc)
ENDIF() ENDIF()
ADD_DEFINITIONS(-DFREEGLUT_EXPORTS) ADD_DEFINITIONS(-DFREEGLUT_EXPORTS)
ELSE() ELSE()

View File

@ -1,3 +1,10 @@
2012-01-09 John F. Fay <johnffay@cybertron.com>
* Released freeglut 2.8.0 a few days ago and am restarting the ChangeLog
* Added 'cmake' support
* Moved source files from 'src' directory to 'src/Common' directory with
an eye to moving platform-specific code to separate files in separate
directories
2009-08-10 Sven Panne <sven.panne@aedion.de> 2009-08-10 Sven Panne <sven.panne@aedion.de>
* include/GL/freeglut_ext.h,include/GL/freeglut_std.h,src/freeglut_ext.c, * include/GL/freeglut_ext.h,include/GL/freeglut_std.h,src/freeglut_ext.c,

View File

@ -69,7 +69,7 @@ Compilation
* Voici un Makefile qui fera l'affaire: * Voici un Makefile qui fera l'affaire:
#Makefile pour Freeglut 2.6.0-rc et Cygwin #Makefile pour Freeglut 2.6.0-rc et Cygwin
#A placer dans le répertoire "src" #A placer dans le répertoire "src/Common"
sources=$(wildcard *.c) sources=$(wildcard *.c)
objs=$(sources:.c=.o) objs=$(sources:.c=.o)

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
SUBDIRS = src include progs doc SUBDIRS = src Common include progs doc
AUTOMAKE_OPTIONS = gnu AUTOMAKE_OPTIONS = gnu
EXTRA_DIST = \ EXTRA_DIST = \

View File

@ -22,7 +22,7 @@ DEBUG_STATIC_DIR = debug-static
DEBUG_DYNAMIC_DIR = debug-dynamic DEBUG_DYNAMIC_DIR = debug-dynamic
INCLUDE_DIR = ..\include INCLUDE_DIR = ..\include
SRC_DIR = ..\src SRC_DIR = ..\src\Common
COMPILER = wcc386 COMPILER = wcc386
COMPILE_COMMON_OPTIONS = -i$(INCLUDE_DIR);$(%WATCOM)\h;$(%WATCOM)\h\nt -fp6 -w4 -e25 -wcd202 -bt=nt -mf -zq COMPILE_COMMON_OPTIONS = -i$(INCLUDE_DIR);$(%WATCOM)\h;$(%WATCOM)\h\nt -fp6 -w4 -e25 -wcd202 -bt=nt -mf -zq
COMPILE_DEBUG_OPTIONS = -d3 -od -DDEBUG -D_DEBUG COMPILE_DEBUG_OPTIONS = -d3 -od -DDEBUG -D_DEBUG

View File

@ -67,7 +67,7 @@ Compilation
* Here Makefile which will make the deal: * Here Makefile which will make the deal:
#Makefile for Freeglut 2.6.0-rc and Cygwin #Makefile for Freeglut 2.6.0-rc and Cygwin
#To place in the directory “src” #To place in the directory “src/Common
sources=$ (wildcard *.c) sources=$ (wildcard *.c)
objs=$ (sources: .c=.o) objs=$ (sources: .c=.o)

View File

@ -69,7 +69,7 @@
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)\$(ProjectName).dll" OutputFile="$(OutDir)\$(ProjectName).dll"
LinkIncremental="2" LinkIncremental="2"
ModuleDefinitionFile="..\..\src\freeglutdll.def" ModuleDefinitionFile="..\..\src\Common\freeglutdll.def"
GenerateDebugInformation="true" GenerateDebugInformation="true"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
ImportLibrary="$(OutDir)\$(ProjectName).lib" ImportLibrary="$(OutDir)\$(ProjectName).lib"
@ -361,7 +361,7 @@
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
OutputFile="$(OutDir)\$(ProjectName).dll" OutputFile="$(OutDir)\$(ProjectName).dll"
ModuleDefinitionFile="..\..\src\freeglutdll.def" ModuleDefinitionFile="..\..\src\Common\freeglutdll.def"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
ImportLibrary="$(OutDir)\$(ProjectName).lib" ImportLibrary="$(OutDir)\$(ProjectName).lib"
TargetMachine="1" TargetMachine="1"
@ -610,103 +610,103 @@
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
> >
<File <File
RelativePath="..\..\src\freeglut_callbacks.c" RelativePath="..\..\src\Common\freeglut_callbacks.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_cursor.c" RelativePath="..\..\src\Common\freeglut_cursor.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_display.c" RelativePath="..\..\src\Common\freeglut_display.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_ext.c" RelativePath="..\..\src\Common\freeglut_ext.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_font.c" RelativePath="..\..\src\Common\freeglut_font.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_font_data.c" RelativePath="..\..\src\Common\freeglut_font_data.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_gamemode.c" RelativePath="..\..\src\Common\freeglut_gamemode.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_geometry.c" RelativePath="..\..\src\Common\freeglut_geometry.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_glutfont_definitions.c" RelativePath="..\..\src\Common\freeglut_glutfont_definitions.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_init.c" RelativePath="..\..\src\Common\freeglut_init.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_input_devices.c" RelativePath="..\..\src\Common\freeglut_input_devices.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_joystick.c" RelativePath="..\..\src\Common\freeglut_joystick.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_main.c" RelativePath="..\..\src\Common\freeglut_main.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_menu.c" RelativePath="..\..\src\Common\freeglut_menu.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_misc.c" RelativePath="..\..\src\Common\freeglut_misc.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_overlay.c" RelativePath="..\..\src\Common\freeglut_overlay.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_spaceball.c" RelativePath="..\..\src\Common\freeglut_spaceball.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_state.c" RelativePath="..\..\src\Common\freeglut_state.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_stroke_mono_roman.c" RelativePath="..\..\src\Common\freeglut_stroke_mono_roman.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_stroke_roman.c" RelativePath="..\..\src\Common\freeglut_stroke_roman.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_structure.c" RelativePath="..\..\src\Common\freeglut_structure.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_teapot.c" RelativePath="..\..\src\Common\freeglut_teapot.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_videoresize.c" RelativePath="..\..\src\Common\freeglut_videoresize.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_window.c" RelativePath="..\..\src\Common\freeglut_window.c"
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglutdll.def" RelativePath="..\..\src\Common\freeglutdll.def"
> >
</File> </File>
</Filter> </Filter>
@ -723,7 +723,7 @@
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_internal.h" RelativePath="..\..\src\Common\freeglut_internal.h"
> >
</File> </File>
<File <File
@ -731,7 +731,7 @@
> >
</File> </File>
<File <File
RelativePath="..\..\src\freeglut_teapot_data.h" RelativePath="..\..\src\Common\freeglut_teapot_data.h"
> >
</File> </File>
<File <File

View File

@ -161,7 +161,7 @@
<DataExecutionPrevention> <DataExecutionPrevention>
</DataExecutionPrevention> </DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine> <TargetMachine>MachineX86</TargetMachine>
<ModuleDefinitionFile>..\..\src\freeglutdll.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\Common\freeglutdll.def</ModuleDefinitionFile>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -251,7 +251,7 @@
<DataExecutionPrevention> <DataExecutionPrevention>
</DataExecutionPrevention> </DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine> <TargetMachine>MachineX86</TargetMachine>
<ModuleDefinitionFile>..\..\src\freeglutdll.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\Common\freeglutdll.def</ModuleDefinitionFile>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -321,40 +321,40 @@
</Lib> </Lib>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\src\freeglut_callbacks.c" /> <ClCompile Include="..\..\src\Common\freeglut_callbacks.c" />
<ClCompile Include="..\..\src\freeglut_cursor.c" /> <ClCompile Include="..\..\src\Common\freeglut_cursor.c" />
<ClCompile Include="..\..\src\freeglut_display.c" /> <ClCompile Include="..\..\src\Common\freeglut_display.c" />
<ClCompile Include="..\..\src\freeglut_ext.c" /> <ClCompile Include="..\..\src\Common\freeglut_ext.c" />
<ClCompile Include="..\..\src\freeglut_font.c" /> <ClCompile Include="..\..\src\Common\freeglut_font.c" />
<ClCompile Include="..\..\src\freeglut_font_data.c" /> <ClCompile Include="..\..\src\Common\freeglut_font_data.c" />
<ClCompile Include="..\..\src\freeglut_gamemode.c" /> <ClCompile Include="..\..\src\Common\freeglut_gamemode.c" />
<ClCompile Include="..\..\src\freeglut_geometry.c" /> <ClCompile Include="..\..\src\Common\freeglut_geometry.c" />
<ClCompile Include="..\..\src\freeglut_glutfont_definitions.c" /> <ClCompile Include="..\..\src\Common\freeglut_glutfont_definitions.c" />
<ClCompile Include="..\..\src\freeglut_init.c" /> <ClCompile Include="..\..\src\Common\freeglut_init.c" />
<ClCompile Include="..\..\src\freeglut_input_devices.c" /> <ClCompile Include="..\..\src\Common\freeglut_input_devices.c" />
<ClCompile Include="..\..\src\freeglut_joystick.c" /> <ClCompile Include="..\..\src\Common\freeglut_joystick.c" />
<ClCompile Include="..\..\src\freeglut_main.c" /> <ClCompile Include="..\..\src\Common\freeglut_main.c" />
<ClCompile Include="..\..\src\freeglut_menu.c" /> <ClCompile Include="..\..\src\Common\freeglut_menu.c" />
<ClCompile Include="..\..\src\freeglut_misc.c" /> <ClCompile Include="..\..\src\Common\freeglut_misc.c" />
<ClCompile Include="..\..\src\freeglut_overlay.c" /> <ClCompile Include="..\..\src\Common\freeglut_overlay.c" />
<ClCompile Include="..\..\src\freeglut_spaceball.c" /> <ClCompile Include="..\..\src\Common\freeglut_spaceball.c" />
<ClCompile Include="..\..\src\freeglut_state.c" /> <ClCompile Include="..\..\src\Common\freeglut_state.c" />
<ClCompile Include="..\..\src\freeglut_stroke_mono_roman.c" /> <ClCompile Include="..\..\src\Common\freeglut_stroke_mono_roman.c" />
<ClCompile Include="..\..\src\freeglut_stroke_roman.c" /> <ClCompile Include="..\..\src\Common\freeglut_stroke_roman.c" />
<ClCompile Include="..\..\src\freeglut_structure.c" /> <ClCompile Include="..\..\src\Common\freeglut_structure.c" />
<ClCompile Include="..\..\src\freeglut_teapot.c" /> <ClCompile Include="..\..\src\Common\freeglut_teapot.c" />
<ClCompile Include="..\..\src\freeglut_videoresize.c" /> <ClCompile Include="..\..\src\Common\freeglut_videoresize.c" />
<ClCompile Include="..\..\src\freeglut_window.c" /> <ClCompile Include="..\..\src\Common\freeglut_window.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\src\freeglutdll.def" /> <None Include="..\..\src\Common\freeglutdll.def" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\include\GL\freeglut.h" /> <ClInclude Include="..\..\include\GL\freeglut.h" />
<ClInclude Include="..\..\include\GL\freeglut_ext.h" /> <ClInclude Include="..\..\include\GL\freeglut_ext.h" />
<ClInclude Include="..\..\src\freeglut_internal.h" /> <ClInclude Include="..\..\src\Common\freeglut_internal.h" />
<ClInclude Include="..\..\include\GL\freeglut_std.h" /> <ClInclude Include="..\..\include\GL\freeglut_std.h" />
<ClInclude Include="..\..\src\freeglut_teapot_data.h" /> <ClInclude Include="..\..\src\Common\freeglut_teapot_data.h" />
<ClInclude Include="..\..\include\GL\glut.h" /> <ClInclude Include="..\..\include\GL\glut.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -15,81 +15,81 @@
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\src\freeglut_callbacks.c"> <ClCompile Include="..\..\src\Common\freeglut_callbacks.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_cursor.c"> <ClCompile Include="..\..\src\Common\freeglut_cursor.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_display.c"> <ClCompile Include="..\..\src\Common\freeglut_display.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_ext.c"> <ClCompile Include="..\..\src\Common\freeglut_ext.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_font.c"> <ClCompile Include="..\..\src\Common\freeglut_font.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_font_data.c"> <ClCompile Include="..\..\src\Common\freeglut_font_data.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_gamemode.c"> <ClCompile Include="..\..\src\Common\freeglut_gamemode.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_geometry.c"> <ClCompile Include="..\..\src\Common\freeglut_geometry.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_glutfont_definitions.c"> <ClCompile Include="..\..\src\Common\freeglut_glutfont_definitions.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_init.c"> <ClCompile Include="..\..\src\Common\freeglut_init.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_input_devices.c"> <ClCompile Include="..\..\src\Common\freeglut_input_devices.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_joystick.c"> <ClCompile Include="..\..\src\Common\freeglut_joystick.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_main.c"> <ClCompile Include="..\..\src\Common\freeglut_main.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_menu.c"> <ClCompile Include="..\..\src\Common\freeglut_menu.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_misc.c"> <ClCompile Include="..\..\src\Common\freeglut_misc.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_overlay.c"> <ClCompile Include="..\..\src\Common\freeglut_overlay.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_spaceball.c"> <ClCompile Include="..\..\src\Common\freeglut_spaceball.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_state.c"> <ClCompile Include="..\..\src\Common\freeglut_state.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_stroke_mono_roman.c"> <ClCompile Include="..\..\src\Common\freeglut_stroke_mono_roman.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_stroke_roman.c"> <ClCompile Include="..\..\src\Common\freeglut_stroke_roman.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_structure.c"> <ClCompile Include="..\..\src\Common\freeglut_structure.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_teapot.c"> <ClCompile Include="..\..\src\Common\freeglut_teapot.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_videoresize.c"> <ClCompile Include="..\..\src\Common\freeglut_videoresize.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\freeglut_window.c"> <ClCompile Include="..\..\src\Common\freeglut_window.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\src\freeglutdll.def"> <None Include="..\..\src\Common\freeglutdll.def">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</None> </None>
</ItemGroup> </ItemGroup>
@ -100,13 +100,13 @@
<ClInclude Include="..\..\include\GL\freeglut_ext.h"> <ClInclude Include="..\..\include\GL\freeglut_ext.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\freeglut_internal.h"> <ClInclude Include="..\..\src\Common\freeglut_internal.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\include\GL\freeglut_std.h"> <ClInclude Include="..\..\include\GL\freeglut_std.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\freeglut_teapot_data.h"> <ClInclude Include="..\..\src\Common\freeglut_teapot_data.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\include\GL\glut.h"> <ClInclude Include="..\..\include\GL\glut.h">

View File

@ -1,177 +1,177 @@
# Microsoft Developer Studio Generated Dependency File, included by freeglut.mak # Microsoft Developer Studio Generated Dependency File, included by freeglut.mak
.\src\freeglut_callbacks.c : \ .\src\Common\freeglut_callbacks.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_cursor.c : \ .\src\Common\freeglut_cursor.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_display.c : \ .\src\Common\freeglut_display.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_ext.c : \ .\src\Common\freeglut_ext.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_font.c : \ .\src\Common\freeglut_font.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_font_data.c : \ .\src\Common\freeglut_font_data.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_gamemode.c : \ .\src\Common\freeglut_gamemode.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_geometry.c : \ .\src\Common\freeglut_geometry.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_glutfont_definitions.c : \ .\src\Common\freeglut_glutfont_definitions.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_init.c : \ .\src\Common\freeglut_init.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_input_devices.c : \ .\src\Common\freeglut_input_devices.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_joystick.c : \ .\src\Common\freeglut_joystick.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_main.c : \ .\src\Common\freeglut_main.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_menu.c : \ .\src\Common\freeglut_menu.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_misc.c : \ .\src\Common\freeglut_misc.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_overlay.c : \ .\src\Common\freeglut_overlay.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_state.c : \ .\src\Common\freeglut_state.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_stroke_mono_roman.c : \ .\src\Common\freeglut_stroke_mono_roman.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_stroke_roman.c : \ .\src\Common\freeglut_stroke_roman.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_structure.c : \ .\src\Common\freeglut_structure.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_teapot.c : \ .\src\Common\freeglut_teapot.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
".\src\freeglut_teapot_data.h"\ ".\src\Common\freeglut_teapot_data.h"\
.\src\freeglut_videoresize.c : \ .\src\Common\freeglut_videoresize.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_window.c : \ .\src\Common\freeglut_window.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\

View File

@ -91,99 +91,99 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_callbacks.c SOURCE=.\src\Common\freeglut_callbacks.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_cursor.c SOURCE=.\src\Common\freeglut_cursor.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_display.c SOURCE=.\src\Common\freeglut_display.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_ext.c SOURCE=.\src\Common\freeglut_ext.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_font.c SOURCE=.\src\Common\freeglut_font.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_font_data.c SOURCE=.\src\Common\freeglut_font_data.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_gamemode.c SOURCE=.\src\Common\freeglut_gamemode.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_geometry.c SOURCE=.\src\Common\freeglut_geometry.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_glutfont_definitions.c SOURCE=.\src\Common\freeglut_glutfont_definitions.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_init.c SOURCE=.\src\Common\freeglut_init.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_input_devices.c SOURCE=.\src\Common\freeglut_input_devices.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_joystick.c SOURCE=.\src\Common\freeglut_joystick.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_main.c SOURCE=.\src\Common\freeglut_main.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_menu.c SOURCE=.\src\Common\freeglut_menu.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_misc.c SOURCE=.\src\Common\freeglut_misc.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_overlay.c SOURCE=.\src\Common\freeglut_overlay.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_spaceball.c SOURCE=.\src\Common\freeglut_spaceball.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_state.c SOURCE=.\src\Common\freeglut_state.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_stroke_mono_roman.c SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_stroke_roman.c SOURCE=.\src\Common\freeglut_stroke_roman.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_structure.c SOURCE=.\src\Common\freeglut_structure.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_teapot.c SOURCE=.\src\Common\freeglut_teapot.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_videoresize.c SOURCE=.\src\Common\freeglut_videoresize.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_window.c SOURCE=.\src\Common\freeglut_window.c
# End Source File # End Source File
# End Group # End Group
# Begin Group "Header Files" # Begin Group "Header Files"
@ -199,7 +199,7 @@ SOURCE=.\include\GL\freeglut_ext.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_internal.h SOURCE=.\src\Common\freeglut_internal.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -207,7 +207,7 @@ SOURCE=.\include\GL\freeglut_std.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_teapot_data.h SOURCE=.\src\Common\freeglut_teapot_data.h
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -12,10 +12,10 @@
</general> </general>
<kdevautoproject> <kdevautoproject>
<general> <general>
<activetarget>src/freeglut</activetarget> <activetarget>src/Common/freeglut</activetarget>
</general> </general>
<run> <run>
<mainprogram>src/freeglut</mainprogram> <mainprogram>src/Common/freeglut</mainprogram>
</run> </run>
<make> <make>
<envvars> <envvars>

View File

@ -9,18 +9,18 @@ files=include/GL/freeglut.h,include/GL/freeglut_internal.h,
sub_dirs= sub_dirs=
type=normal type=normal
[Workspace_1] [Workspace_1]
openfiles=Nienazwany.h,Nienazwany.cpp,/home/olszta/freeglut/include/GL/freeglut_internal.h,/home/olszta/freeglut/src/freeglut_callbacks.c,/home/olszta/freeglut/src/freeglut_gamemode.c,/home/olszta/freeglut/src/freeglut_init.c,/home/olszta/freeglut/src/freeglut_main.c,/home/olszta/freeglut/src/freeglut_window.c,/home/olszta/freeglut/src/freeglut_misc.c,/home/olszta/freeglut/include/GL/freeglut.h,/home/olszta/freeglut/src/freeglut_cursor.c,/home/olszta/freeglut/src/freeglut_geometry.c,/home/olszta/freeglut/src/freeglut_font_data.c,/home/olszta/freeglut/src/freeglut_videoresize.c,/home/olszta/freeglut/src/freeglut_teapot.c,/home/olszta/freeglut/src/freeglut_structure.c,/home/olszta/freeglut/src/freeglut_state.c, openfiles=Nienazwany.h,Nienazwany.cpp,/home/olszta/freeglut/include/GL/freeglut_internal.h,/home/olszta/freeglut/src/Common/freeglut_callbacks.c,/home/olszta/freeglut/src/Common/freeglut_gamemode.c,/home/olszta/freeglut/src/Common/freeglut_init.c,/home/olszta/freeglut/src/Common/freeglut_main.c,/home/olszta/freeglut/src/Common/freeglut_window.c,/home/olszta/freeglut/src/Common/freeglut_misc.c,/home/olszta/freeglut/include/GL/freeglut.h,/home/olszta/freeglut/src/Common/freeglut_cursor.c,/home/olszta/freeglut/src/Common/freeglut_geometry.c,/home/olszta/freeglut/src/Common/freeglut_font_data.c,/home/olszta/freeglut/src/Common/freeglut_videoresize.c,/home/olszta/freeglut/src/Common/freeglut_teapot.c,/home/olszta/freeglut/src/Common/freeglut_structure.c,/home/olszta/freeglut/src/Common/freeglut_state.c,
show_outputview=true show_outputview=true
show_treeview=true show_treeview=true
header_file=/home/olszta/freeglut/include/GL/freeglut.h header_file=/home/olszta/freeglut/include/GL/freeglut.h
cpp_file=/home/olszta/freeglut/src/freeglut_state.c cpp_file=/home/olszta/freeglut/src/Common/freeglut_state.c
browser_file=file:/usr/doc/kde/HTML/default/kdevelop/welcome/index.html browser_file=file:/usr/doc/kde/HTML/default/kdevelop/welcome/index.html
[COPYING] [COPYING]
install_location= install_location=
dist=true dist=true
install=false install=false
type=DATA type=DATA
[src/freeglut_videoresize.c] [src/Common/freeglut_videoresize.c]
install_location= install_location=
dist=true dist=true
install=false install=false
@ -36,7 +36,7 @@ cxxflags=-O0 -g3 -Wall
type=po type=po
sub_dirs= sub_dirs=
[src/Makefile.am] [src/Makefile.am]
files=src/freeglut_callbacks.c,src/freeglut_cursor.c,src/freeglut_display.c,src/freeglut_font.c,src/freeglut_font_data.c,src/freeglut_gamemode.c,src/freeglut_geometry.c,src/freeglut_init.c,src/freeglut_joystick.c,src/freeglut_main.c,src/freeglut_menu.c,src/freeglut_misc.c,src/freeglut_overlay.c,src/freeglut_state.c,src/freeglut_structure.c,src/freeglut_teapot.c,src/freeglut_videoresize.c,src/freeglut_window.c, files=src/Common/freeglut_callbacks.c,src/Common/freeglut_cursor.c,src/Common/freeglut_display.c,src/Common/freeglut_font.c,src/Common/freeglut_font_data.c,src/Common/freeglut_gamemode.c,src/Common/freeglut_geometry.c,src/Common/freeglut_init.c,src/Common/freeglut_joystick.c,src/Common/freeglut_main.c,src/Common/freeglut_menu.c,src/Common/freeglut_misc.c,src/Common/freeglut_overlay.c,src/Common/freeglut_state.c,src/Common/freeglut_structure.c,src/Common/freeglut_teapot.c,src/Common/freeglut_videoresize.c,src/Common/freeglut_window.c,
type=prog_main type=prog_main
sub_dirs= sub_dirs=
[freeglut.kdevprj] [freeglut.kdevprj]
@ -49,12 +49,12 @@ install_location=
dist=true dist=true
install=false install=false
type=DATA type=DATA
[src/freeglut_gamemode.c] [src/Common/freeglut_gamemode.c]
install_location= install_location=
dist=true dist=true
install=false install=false
type=SOURCE type=SOURCE
[src/freeglut_menu.c] [src/Common/freeglut_menu.c]
install_location= install_location=
dist=true dist=true
install=false install=false
@ -68,27 +68,27 @@ Headers=*.h,*.hxx,*.hpp,*.H,
[src/docs/en/Makefile.am] [src/docs/en/Makefile.am]
type=normal type=normal
sub_dirs= sub_dirs=
[src/freeglut_font.c] [src/Common/freeglut_font.c]
install_location= install_location=
dist=true dist=true
install=false install=false
type=SOURCE type=SOURCE
[src/freeglut_window.c] [src/Common/freeglut_window.c]
install_location= install_location=
dist=true dist=true
install=false install=false
type=SOURCE type=SOURCE
[src/freeglut_main.c] [src/Common/freeglut_main.c]
install_location= install_location=
dist=true dist=true
install=false install=false
type=SOURCE type=SOURCE
[src/freeglut_state.c] [src/Common/freeglut_state.c]
install_location= install_location=
dist=true dist=true
install=false install=false
type=SOURCE type=SOURCE
[src/freeglut_callbacks.c] [src/Common/freeglut_callbacks.c]
install_location= install_location=
dist=true dist=true
install=false install=false
@ -98,7 +98,7 @@ install_location=
dist=true dist=true
install=false install=false
type=HEADER type=HEADER
[src/freeglut_structure.c] [src/Common/freeglut_structure.c]
install_location= install_location=
dist=true dist=true
install=false install=false
@ -108,7 +108,7 @@ install_location=
dist=true dist=true
install=false install=false
type=DATA type=DATA
[src/freeglut_geometry.c] [src/Common/freeglut_geometry.c]
install_location= install_location=
dist=true dist=true
install=false install=false
@ -135,17 +135,17 @@ install_location=
dist=true dist=true
install=false install=false
type=DATA type=DATA
[src/freeglut_init.c] [src/Common/freeglut_init.c]
install_location= install_location=
dist=true dist=true
install=false install=false
type=SOURCE type=SOURCE
[src/freeglut_display.c] [src/Common/freeglut_display.c]
install_location= install_location=
dist=true dist=true
install=false install=false
type=SOURCE type=SOURCE
[src/freeglut_overlay.c] [src/Common/freeglut_overlay.c]
install_location= install_location=
dist=true dist=true
install=false install=false
@ -155,7 +155,7 @@ install_location=
dist=true dist=true
install=false install=false
type=DATA type=DATA
[src/freeglut_misc.c] [src/Common/freeglut_misc.c]
install_location= install_location=
dist=true dist=true
install=false install=false
@ -164,7 +164,7 @@ type=SOURCE
files=freeglut.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,freeglut.lsm, files=freeglut.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,freeglut.lsm,
type=normal type=normal
sub_dirs=src,include, sub_dirs=src,include,
[src/freeglut_cursor.c] [src/Common/freeglut_cursor.c]
install_location= install_location=
dist=true dist=true
install=false install=false

View File

@ -323,7 +323,7 @@ LINK32_OBJS= \
!IF "$(CFG)" == "freeglut - Win32 Release" || "$(CFG)" == "freeglut - Win32 Debug" !IF "$(CFG)" == "freeglut - Win32 Release" || "$(CFG)" == "freeglut - Win32 Debug"
SOURCE=.\src\freeglut_callbacks.c SOURCE=.\src\Common\freeglut_callbacks.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -341,7 +341,7 @@ SOURCE=.\src\freeglut_callbacks.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_cursor.c SOURCE=.\src\Common\freeglut_cursor.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -359,7 +359,7 @@ SOURCE=.\src\freeglut_cursor.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_display.c SOURCE=.\src\Common\freeglut_display.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -377,7 +377,7 @@ SOURCE=.\src\freeglut_display.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_ext.c SOURCE=.\src\Common\freeglut_ext.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -395,7 +395,7 @@ SOURCE=.\src\freeglut_ext.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_font.c SOURCE=.\src\Common\freeglut_font.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -413,7 +413,7 @@ SOURCE=.\src\freeglut_font.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_font_data.c SOURCE=.\src\Common\freeglut_font_data.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -431,7 +431,7 @@ SOURCE=.\src\freeglut_font_data.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_gamemode.c SOURCE=.\src\Common\freeglut_gamemode.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -449,7 +449,7 @@ SOURCE=.\src\freeglut_gamemode.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_geometry.c SOURCE=.\src\Common\freeglut_geometry.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -467,7 +467,7 @@ SOURCE=.\src\freeglut_geometry.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_glutfont_definitions.c SOURCE=.\src\Common\freeglut_glutfont_definitions.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -485,7 +485,7 @@ SOURCE=.\src\freeglut_glutfont_definitions.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_init.c SOURCE=.\src\Common\freeglut_init.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -503,7 +503,7 @@ SOURCE=.\src\freeglut_init.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_input_devices.c SOURCE=.\src\Common\freeglut_input_devices.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -521,7 +521,7 @@ SOURCE=.\src\freeglut_input_devices.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_joystick.c SOURCE=.\src\Common\freeglut_joystick.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -539,7 +539,7 @@ SOURCE=.\src\freeglut_joystick.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_main.c SOURCE=.\src\Common\freeglut_main.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -557,7 +557,7 @@ SOURCE=.\src\freeglut_main.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_menu.c SOURCE=.\src\Common\freeglut_menu.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -575,7 +575,7 @@ SOURCE=.\src\freeglut_menu.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_misc.c SOURCE=.\src\Common\freeglut_misc.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -593,7 +593,7 @@ SOURCE=.\src\freeglut_misc.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_overlay.c SOURCE=.\src\Common\freeglut_overlay.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -611,7 +611,7 @@ SOURCE=.\src\freeglut_overlay.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_state.c SOURCE=.\src\Common\freeglut_state.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -629,7 +629,7 @@ SOURCE=.\src\freeglut_state.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_stroke_mono_roman.c SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -647,7 +647,7 @@ SOURCE=.\src\freeglut_stroke_mono_roman.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_stroke_roman.c SOURCE=.\src\Common\freeglut_stroke_roman.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -665,7 +665,7 @@ SOURCE=.\src\freeglut_stroke_roman.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_structure.c SOURCE=.\src\Common\freeglut_structure.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -683,7 +683,7 @@ SOURCE=.\src\freeglut_structure.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_teapot.c SOURCE=.\src\Common\freeglut_teapot.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -701,7 +701,7 @@ SOURCE=.\src\freeglut_teapot.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_videoresize.c SOURCE=.\src\Common\freeglut_videoresize.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"
@ -719,7 +719,7 @@ SOURCE=.\src\freeglut_videoresize.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_window.c SOURCE=.\src\Common\freeglut_window.c
!IF "$(CFG)" == "freeglut - Win32 Release" !IF "$(CFG)" == "freeglut - Win32 Release"

View File

@ -105,254 +105,254 @@ LINK32="C:\Program Files\Microsoft eMbedded C++ 4.0\EVC\WCE420\bin\xilinke42"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_callbacks.c SOURCE=.\src\Common\freeglut_callbacks.c
DEP_CPP_FREEG=\ DEP_CPP_FREEG=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEG=\ NODEP_CPP_FREEG=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_cursor.c SOURCE=.\src\Common\freeglut_cursor.c
DEP_CPP_FREEGL=\ DEP_CPP_FREEGL=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGL=\ NODEP_CPP_FREEGL=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_display.c SOURCE=.\src\Common\freeglut_display.c
DEP_CPP_FREEGLU=\ DEP_CPP_FREEGLU=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLU=\ NODEP_CPP_FREEGLU=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_ext.c SOURCE=.\src\Common\freeglut_ext.c
DEP_CPP_FREEGLUT=\ DEP_CPP_FREEGLUT=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT=\ NODEP_CPP_FREEGLUT=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_font.c SOURCE=.\src\Common\freeglut_font.c
DEP_CPP_FREEGLUT_=\ DEP_CPP_FREEGLUT_=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_=\ NODEP_CPP_FREEGLUT_=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_font_data.c SOURCE=.\src\Common\freeglut_font_data.c
DEP_CPP_FREEGLUT_F=\ DEP_CPP_FREEGLUT_F=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_F=\ NODEP_CPP_FREEGLUT_F=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_gamemode.c SOURCE=.\src\Common\freeglut_gamemode.c
# PROP Exclude_From_Build 1 # PROP Exclude_From_Build 1
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_geometry.c SOURCE=.\src\Common\freeglut_geometry.c
DEP_CPP_FREEGLUT_G=\ DEP_CPP_FREEGLUT_G=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_G=\ NODEP_CPP_FREEGLUT_G=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_glutfont_definitions.c SOURCE=.\src\Common\freeglut_glutfont_definitions.c
DEP_CPP_FREEGLUT_GL=\ DEP_CPP_FREEGLUT_GL=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_init.c SOURCE=.\src\Common\freeglut_init.c
DEP_CPP_FREEGLUT_I=\ DEP_CPP_FREEGLUT_I=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_I=\ NODEP_CPP_FREEGLUT_I=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_internal.h SOURCE=.\src\Common\freeglut_internal.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_joystick.c SOURCE=.\src\Common\freeglut_joystick.c
# PROP Exclude_From_Build 1 # PROP Exclude_From_Build 1
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_main.c SOURCE=.\src\Common\freeglut_main.c
DEP_CPP_FREEGLUT_M=\ DEP_CPP_FREEGLUT_M=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
".\src\my_gx.h"\ ".\src\Common\my_gx.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
{$(INCLUDE)}"gx.h"\ {$(INCLUDE)}"gx.h"\
NODEP_CPP_FREEGLUT_M=\ NODEP_CPP_FREEGLUT_M=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_menu.c SOURCE=.\src\Common\freeglut_menu.c
DEP_CPP_FREEGLUT_ME=\ DEP_CPP_FREEGLUT_ME=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_ME=\ NODEP_CPP_FREEGLUT_ME=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_misc.c SOURCE=.\src\Common\freeglut_misc.c
DEP_CPP_FREEGLUT_MI=\ DEP_CPP_FREEGLUT_MI=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_MI=\ NODEP_CPP_FREEGLUT_MI=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_overlay.c SOURCE=.\src\Common\freeglut_overlay.c
DEP_CPP_FREEGLUT_O=\ DEP_CPP_FREEGLUT_O=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_O=\ NODEP_CPP_FREEGLUT_O=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_state.c SOURCE=.\src\Common\freeglut_state.c
DEP_CPP_FREEGLUT_S=\ DEP_CPP_FREEGLUT_S=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_S=\ NODEP_CPP_FREEGLUT_S=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_stroke_mono_roman.c SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
DEP_CPP_FREEGLUT_ST=\ DEP_CPP_FREEGLUT_ST=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_stroke_roman.c SOURCE=.\src\Common\freeglut_stroke_roman.c
DEP_CPP_FREEGLUT_STR=\ DEP_CPP_FREEGLUT_STR=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_structure.c SOURCE=.\src\Common\freeglut_structure.c
DEP_CPP_FREEGLUT_STRU=\ DEP_CPP_FREEGLUT_STRU=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_STRU=\ NODEP_CPP_FREEGLUT_STRU=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_teapot.c SOURCE=.\src\Common\freeglut_teapot.c
DEP_CPP_FREEGLUT_T=\ DEP_CPP_FREEGLUT_T=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_T=\ NODEP_CPP_FREEGLUT_T=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_videoresize.c SOURCE=.\src\Common\freeglut_videoresize.c
DEP_CPP_FREEGLUT_V=\ DEP_CPP_FREEGLUT_V=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\ {$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_V=\ NODEP_CPP_FREEGLUT_V=\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_window.c SOURCE=.\src\Common\freeglut_window.c
DEP_CPP_FREEGLUT_W=\ DEP_CPP_FREEGLUT_W=\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"aygshell.h"\ {$(INCLUDE)}"aygshell.h"\
{$(INCLUDE)}"GL\freeglut.h"\ {$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\ {$(INCLUDE)}"GL\freeglut_ext.h"\
@ -362,7 +362,7 @@ DEP_CPP_FREEGLUT_W=\
NODEP_CPP_FREEGLUT_W=\ NODEP_CPP_FREEGLUT_W=\
"..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ "..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\
".\src\config.h"\ ".\src\Common\config.h"\
# End Source File # End Source File
# End Group # End Group

View File

@ -1,177 +1,177 @@
# Microsoft Developer Studio Generated Dependency File, included by freeglut_static.mak # Microsoft Developer Studio Generated Dependency File, included by freeglut_static.mak
.\src\freeglut_callbacks.c : \ .\src\Common\freeglut_callbacks.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_cursor.c : \ .\src\Common\freeglut_cursor.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_display.c : \ .\src\Common\freeglut_display.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_ext.c : \ .\src\Common\freeglut_ext.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_font.c : \ .\src\Common\freeglut_font.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_font_data.c : \ .\src\Common\freeglut_font_data.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_gamemode.c : \ .\src\Common\freeglut_gamemode.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_geometry.c : \ .\src\Common\freeglut_geometry.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_glutfont_definitions.c : \ .\src\Common\freeglut_glutfont_definitions.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_init.c : \ .\src\Common\freeglut_init.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_input_devices.c : \ .\src\Common\freeglut_input_devices.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_joystick.c : \ .\src\Common\freeglut_joystick.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_main.c : \ .\src\Common\freeglut_main.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_menu.c : \ .\src\Common\freeglut_menu.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_misc.c : \ .\src\Common\freeglut_misc.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_overlay.c : \ .\src\Common\freeglut_overlay.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_state.c : \ .\src\Common\freeglut_state.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_stroke_mono_roman.c : \ .\src\Common\freeglut_stroke_mono_roman.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_stroke_roman.c : \ .\src\Common\freeglut_stroke_roman.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_structure.c : \ .\src\Common\freeglut_structure.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_teapot.c : \ .\src\Common\freeglut_teapot.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
".\src\freeglut_teapot_data.h"\ ".\src\Common\freeglut_teapot_data.h"\
.\src\freeglut_videoresize.c : \ .\src\Common\freeglut_videoresize.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\
.\src\freeglut_window.c : \ .\src\Common\freeglut_window.c : \
"..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\ "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\include\GL\freeglut.h"\ ".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\ ".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\ ".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\ ".\src\Common\freeglut_internal.h"\

View File

@ -85,99 +85,99 @@ LIB32=link.exe -lib
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_callbacks.c SOURCE=.\src\Common\freeglut_callbacks.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_cursor.c SOURCE=.\src\Common\freeglut_cursor.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_display.c SOURCE=.\src\Common\freeglut_display.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_ext.c SOURCE=.\src\Common\freeglut_ext.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_font.c SOURCE=.\src\Common\freeglut_font.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_font_data.c SOURCE=.\src\Common\freeglut_font_data.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_gamemode.c SOURCE=.\src\Common\freeglut_gamemode.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_geometry.c SOURCE=.\src\Common\freeglut_geometry.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_glutfont_definitions.c SOURCE=.\src\Common\freeglut_glutfont_definitions.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_init.c SOURCE=.\src\Common\freeglut_init.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_input_devices.c SOURCE=.\src\Common\freeglut_input_devices.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_joystick.c SOURCE=.\src\Common\freeglut_joystick.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_main.c SOURCE=.\src\Common\freeglut_main.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_menu.c SOURCE=.\src\Common\freeglut_menu.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_misc.c SOURCE=.\src\Common\freeglut_misc.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_overlay.c SOURCE=.\src\Common\freeglut_overlay.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_spaceball.c SOURCE=.\src\Common\freeglut_spaceball.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_state.c SOURCE=.\src\Common\freeglut_state.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_stroke_mono_roman.c SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_stroke_roman.c SOURCE=.\src\Common\freeglut_stroke_roman.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_structure.c SOURCE=.\src\Common\freeglut_structure.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_teapot.c SOURCE=.\src\Common\freeglut_teapot.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_videoresize.c SOURCE=.\src\Common\freeglut_videoresize.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_window.c SOURCE=.\src\Common\freeglut_window.c
# End Source File # End Source File
# End Group # End Group
# Begin Group "Header Files" # Begin Group "Header Files"
@ -193,7 +193,7 @@ SOURCE=.\include\GL\freeglut_ext.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_internal.h SOURCE=.\src\Common\freeglut_internal.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -201,7 +201,7 @@ SOURCE=.\include\GL\freeglut_std.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\freeglut_teapot_data.h SOURCE=.\src\Common\freeglut_teapot_data.h
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@ -313,7 +313,7 @@ LIB32_OBJS= \
!IF "$(CFG)" == "freeglut_static - Win32 Release" || "$(CFG)" == "freeglut_static - Win32 Debug" !IF "$(CFG)" == "freeglut_static - Win32 Release" || "$(CFG)" == "freeglut_static - Win32 Debug"
SOURCE=.\src\freeglut_callbacks.c SOURCE=.\src\Common\freeglut_callbacks.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -331,7 +331,7 @@ SOURCE=.\src\freeglut_callbacks.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_cursor.c SOURCE=.\src\Common\freeglut_cursor.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -349,7 +349,7 @@ SOURCE=.\src\freeglut_cursor.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_display.c SOURCE=.\src\Common\freeglut_display.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -367,7 +367,7 @@ SOURCE=.\src\freeglut_display.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_ext.c SOURCE=.\src\Common\freeglut_ext.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -385,7 +385,7 @@ SOURCE=.\src\freeglut_ext.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_font.c SOURCE=.\src\Common\freeglut_font.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -403,7 +403,7 @@ SOURCE=.\src\freeglut_font.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_font_data.c SOURCE=.\src\Common\freeglut_font_data.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -421,7 +421,7 @@ SOURCE=.\src\freeglut_font_data.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_gamemode.c SOURCE=.\src\Common\freeglut_gamemode.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -439,7 +439,7 @@ SOURCE=.\src\freeglut_gamemode.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_geometry.c SOURCE=.\src\Common\freeglut_geometry.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -457,7 +457,7 @@ SOURCE=.\src\freeglut_geometry.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_glutfont_definitions.c SOURCE=.\src\Common\freeglut_glutfont_definitions.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -475,7 +475,7 @@ SOURCE=.\src\freeglut_glutfont_definitions.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_init.c SOURCE=.\src\Common\freeglut_init.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -493,7 +493,7 @@ SOURCE=.\src\freeglut_init.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_input_devices.c SOURCE=.\src\Common\freeglut_input_devices.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -511,7 +511,7 @@ SOURCE=.\src\freeglut_input_devices.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_joystick.c SOURCE=.\src\Common\freeglut_joystick.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -529,7 +529,7 @@ SOURCE=.\src\freeglut_joystick.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_main.c SOURCE=.\src\Common\freeglut_main.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -547,7 +547,7 @@ SOURCE=.\src\freeglut_main.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_menu.c SOURCE=.\src\Common\freeglut_menu.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -565,7 +565,7 @@ SOURCE=.\src\freeglut_menu.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_misc.c SOURCE=.\src\Common\freeglut_misc.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -583,7 +583,7 @@ SOURCE=.\src\freeglut_misc.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_overlay.c SOURCE=.\src\Common\freeglut_overlay.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -601,7 +601,7 @@ SOURCE=.\src\freeglut_overlay.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_state.c SOURCE=.\src\Common\freeglut_state.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -619,7 +619,7 @@ SOURCE=.\src\freeglut_state.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_stroke_mono_roman.c SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -637,7 +637,7 @@ SOURCE=.\src\freeglut_stroke_mono_roman.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_stroke_roman.c SOURCE=.\src\Common\freeglut_stroke_roman.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -655,7 +655,7 @@ SOURCE=.\src\freeglut_stroke_roman.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_structure.c SOURCE=.\src\Common\freeglut_structure.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -673,7 +673,7 @@ SOURCE=.\src\freeglut_structure.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_teapot.c SOURCE=.\src\Common\freeglut_teapot.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -691,7 +691,7 @@ SOURCE=.\src\freeglut_teapot.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_videoresize.c SOURCE=.\src\Common\freeglut_videoresize.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"
@ -709,7 +709,7 @@ SOURCE=.\src\freeglut_videoresize.c
!ENDIF !ENDIF
SOURCE=.\src\freeglut_window.c SOURCE=.\src\Common\freeglut_window.c
!IF "$(CFG)" == "freeglut_static - Win32 Release" !IF "$(CFG)" == "freeglut_static - Win32 Release"

View File

@ -1,412 +1,412 @@
/* /*
* freeglut_callbacks.c * freeglut_callbacks.c
* *
* The callbacks setting methods. * The callbacks setting methods.
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Fri Dec 3 1999 * Creation date: Fri Dec 3 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
/* /*
* All of the callbacks setting methods can be generalized to this: * All of the callbacks setting methods can be generalized to this:
*/ */
#define SET_CALLBACK(a) \ #define SET_CALLBACK(a) \
do \ do \
{ \ { \
if( fgStructure.CurrentWindow == NULL ) \ if( fgStructure.CurrentWindow == NULL ) \
return; \ return; \
SET_WCB( ( *( fgStructure.CurrentWindow ) ), a, callback ); \ SET_WCB( ( *( fgStructure.CurrentWindow ) ), a, callback ); \
} while( 0 ) } while( 0 )
/* /*
* Sets the Display callback for the current window * Sets the Display callback for the current window
*/ */
void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) ) void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDisplayFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDisplayFunc" );
if( !callback ) if( !callback )
fgError( "Fatal error in program. NULL display callback not " fgError( "Fatal error in program. NULL display callback not "
"permitted in GLUT 3.0+ or freeglut 2.0.1+" ); "permitted in GLUT 3.0+ or freeglut 2.0.1+" );
SET_CALLBACK( Display ); SET_CALLBACK( Display );
} }
/* /*
* Sets the Reshape callback for the current window * Sets the Reshape callback for the current window
*/ */
void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) ) void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutReshapeFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutReshapeFunc" );
SET_CALLBACK( Reshape ); SET_CALLBACK( Reshape );
} }
/* /*
* Sets the Keyboard callback for the current window * Sets the Keyboard callback for the current window
*/ */
void FGAPIENTRY glutKeyboardFunc( void (* callback) void FGAPIENTRY glutKeyboardFunc( void (* callback)
( unsigned char, int, int ) ) ( unsigned char, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutKeyboardFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutKeyboardFunc" );
SET_CALLBACK( Keyboard ); SET_CALLBACK( Keyboard );
} }
/* /*
* Sets the Special callback for the current window * Sets the Special callback for the current window
*/ */
void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) ) void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpecialFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpecialFunc" );
SET_CALLBACK( Special ); SET_CALLBACK( Special );
} }
/* /*
* Sets the global idle callback * Sets the global idle callback
*/ */
void FGAPIENTRY glutIdleFunc( void (* callback)( void ) ) void FGAPIENTRY glutIdleFunc( void (* callback)( void ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutIdleFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutIdleFunc" );
fgState.IdleCallback = callback; fgState.IdleCallback = callback;
} }
/* /*
* Sets the Timer callback for the current window * Sets the Timer callback for the current window
*/ */
void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ), void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ),
int timerID ) int timerID )
{ {
SFG_Timer *timer, *node; SFG_Timer *timer, *node;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutTimerFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutTimerFunc" );
if( (timer = fgState.FreeTimers.Last) ) if( (timer = fgState.FreeTimers.Last) )
{ {
fgListRemove( &fgState.FreeTimers, &timer->Node ); fgListRemove( &fgState.FreeTimers, &timer->Node );
} }
else else
{ {
if( ! (timer = malloc(sizeof(SFG_Timer))) ) if( ! (timer = malloc(sizeof(SFG_Timer))) )
fgError( "Fatal error: " fgError( "Fatal error: "
"Memory allocation failure in glutTimerFunc()" ); "Memory allocation failure in glutTimerFunc()" );
} }
timer->Callback = callback; timer->Callback = callback;
timer->ID = timerID; timer->ID = timerID;
timer->TriggerTime = fgElapsedTime() + timeOut; timer->TriggerTime = fgElapsedTime() + timeOut;
for( node = fgState.Timers.First; node; node = node->Node.Next ) for( node = fgState.Timers.First; node; node = node->Node.Next )
{ {
if( node->TriggerTime > timer->TriggerTime ) if( node->TriggerTime > timer->TriggerTime )
break; break;
} }
fgListInsert( &fgState.Timers, &node->Node, &timer->Node ); fgListInsert( &fgState.Timers, &node->Node, &timer->Node );
} }
/* /*
* Sets the Visibility callback for the current window. * Sets the Visibility callback for the current window.
*/ */
static void fghVisibility( int status ) static void fghVisibility( int status )
{ {
int glut_status = GLUT_VISIBLE; int glut_status = GLUT_VISIBLE;
FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED ( "Visibility Callback" ); FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED ( "Visibility Callback" );
freeglut_return_if_fail( fgStructure.CurrentWindow ); freeglut_return_if_fail( fgStructure.CurrentWindow );
if( ( GLUT_HIDDEN == status ) || ( GLUT_FULLY_COVERED == status ) ) if( ( GLUT_HIDDEN == status ) || ( GLUT_FULLY_COVERED == status ) )
glut_status = GLUT_NOT_VISIBLE; glut_status = GLUT_NOT_VISIBLE;
INVOKE_WCB( *( fgStructure.CurrentWindow ), Visibility, ( glut_status ) ); INVOKE_WCB( *( fgStructure.CurrentWindow ), Visibility, ( glut_status ) );
} }
void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) ) void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutVisibilityFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutVisibilityFunc" );
SET_CALLBACK( Visibility ); SET_CALLBACK( Visibility );
if( callback ) if( callback )
glutWindowStatusFunc( fghVisibility ); glutWindowStatusFunc( fghVisibility );
else else
glutWindowStatusFunc( NULL ); glutWindowStatusFunc( NULL );
} }
/* /*
* Sets the keyboard key release callback for the current window * Sets the keyboard key release callback for the current window
*/ */
void FGAPIENTRY glutKeyboardUpFunc( void (* callback) void FGAPIENTRY glutKeyboardUpFunc( void (* callback)
( unsigned char, int, int ) ) ( unsigned char, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutKeyboardUpFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutKeyboardUpFunc" );
SET_CALLBACK( KeyboardUp ); SET_CALLBACK( KeyboardUp );
} }
/* /*
* Sets the special key release callback for the current window * Sets the special key release callback for the current window
*/ */
void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) ) void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpecialUpFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpecialUpFunc" );
SET_CALLBACK( SpecialUp ); SET_CALLBACK( SpecialUp );
} }
/* /*
* Sets the joystick callback and polling rate for the current window * Sets the joystick callback and polling rate for the current window
*/ */
void FGAPIENTRY glutJoystickFunc( void (* callback) void FGAPIENTRY glutJoystickFunc( void (* callback)
( unsigned int, int, int, int ), ( unsigned int, int, int, int ),
int pollInterval ) int pollInterval )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickFunc" );
fgInitialiseJoysticks (); fgInitialiseJoysticks ();
if ( ( ( fgStructure.CurrentWindow->State.JoystickPollRate < 0 ) || if ( ( ( fgStructure.CurrentWindow->State.JoystickPollRate < 0 ) ||
!FETCH_WCB(*fgStructure.CurrentWindow,Joystick) ) && /* Joystick callback was disabled */ !FETCH_WCB(*fgStructure.CurrentWindow,Joystick) ) && /* Joystick callback was disabled */
( callback && ( pollInterval >= 0 ) ) ) /* but is now enabled */ ( callback && ( pollInterval >= 0 ) ) ) /* but is now enabled */
++fgState.NumActiveJoysticks; ++fgState.NumActiveJoysticks;
else if ( ( ( fgStructure.CurrentWindow->State.JoystickPollRate >= 0 ) && else if ( ( ( fgStructure.CurrentWindow->State.JoystickPollRate >= 0 ) &&
FETCH_WCB(*fgStructure.CurrentWindow,Joystick) ) && /* Joystick callback was enabled */ FETCH_WCB(*fgStructure.CurrentWindow,Joystick) ) && /* Joystick callback was enabled */
( !callback || ( pollInterval < 0 ) ) ) /* but is now disabled */ ( !callback || ( pollInterval < 0 ) ) ) /* but is now disabled */
--fgState.NumActiveJoysticks; --fgState.NumActiveJoysticks;
SET_CALLBACK( Joystick ); SET_CALLBACK( Joystick );
fgStructure.CurrentWindow->State.JoystickPollRate = pollInterval; fgStructure.CurrentWindow->State.JoystickPollRate = pollInterval;
fgStructure.CurrentWindow->State.JoystickLastPoll = fgStructure.CurrentWindow->State.JoystickLastPoll =
fgElapsedTime() - fgStructure.CurrentWindow->State.JoystickPollRate; fgElapsedTime() - fgStructure.CurrentWindow->State.JoystickPollRate;
if( fgStructure.CurrentWindow->State.JoystickLastPoll < 0 ) if( fgStructure.CurrentWindow->State.JoystickLastPoll < 0 )
fgStructure.CurrentWindow->State.JoystickLastPoll = 0; fgStructure.CurrentWindow->State.JoystickLastPoll = 0;
} }
/* /*
* Sets the mouse callback for the current window * Sets the mouse callback for the current window
*/ */
void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) ) void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMouseFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMouseFunc" );
SET_CALLBACK( Mouse ); SET_CALLBACK( Mouse );
} }
/* /*
* Sets the mouse wheel callback for the current window * Sets the mouse wheel callback for the current window
*/ */
void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) ) void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMouseWheelFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMouseWheelFunc" );
SET_CALLBACK( MouseWheel ); SET_CALLBACK( MouseWheel );
} }
/* /*
* Sets the mouse motion callback for the current window (one or more buttons * Sets the mouse motion callback for the current window (one or more buttons
* are pressed) * are pressed)
*/ */
void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) ) void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMotionFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMotionFunc" );
SET_CALLBACK( Motion ); SET_CALLBACK( Motion );
} }
/* /*
* Sets the passive mouse motion callback for the current window (no mouse * Sets the passive mouse motion callback for the current window (no mouse
* buttons are pressed) * buttons are pressed)
*/ */
void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) ) void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPassiveMotionFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPassiveMotionFunc" );
SET_CALLBACK( Passive ); SET_CALLBACK( Passive );
} }
/* /*
* Window mouse entry/leave callback * Window mouse entry/leave callback
*/ */
void FGAPIENTRY glutEntryFunc( void (* callback)( int ) ) void FGAPIENTRY glutEntryFunc( void (* callback)( int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutEntryFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutEntryFunc" );
SET_CALLBACK( Entry ); SET_CALLBACK( Entry );
} }
/* /*
* Window destruction callbacks * Window destruction callbacks
*/ */
void FGAPIENTRY glutCloseFunc( void (* callback)( void ) ) void FGAPIENTRY glutCloseFunc( void (* callback)( void ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCloseFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCloseFunc" );
SET_CALLBACK( Destroy ); SET_CALLBACK( Destroy );
} }
void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) ) void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWMCloseFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWMCloseFunc" );
glutCloseFunc( callback ); glutCloseFunc( callback );
} }
/* A. Donev: Destruction callback for menus */ /* A. Donev: Destruction callback for menus */
void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) ) void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuDestroyFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuDestroyFunc" );
if( fgStructure.CurrentMenu ) if( fgStructure.CurrentMenu )
fgStructure.CurrentMenu->Destroy = callback; fgStructure.CurrentMenu->Destroy = callback;
} }
/* /*
* Deprecated version of glutMenuStatusFunc callback setting method * Deprecated version of glutMenuStatusFunc callback setting method
*/ */
void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) ) void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStateFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStateFunc" );
fgState.MenuStateCallback = callback; fgState.MenuStateCallback = callback;
} }
/* /*
* Sets the global menu status callback for the current window * Sets the global menu status callback for the current window
*/ */
void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) ) void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStatusFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStatusFunc" );
fgState.MenuStatusCallback = callback; fgState.MenuStatusCallback = callback;
} }
/* /*
* Sets the overlay display callback for the current window * Sets the overlay display callback for the current window
*/ */
void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) ) void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutOverlayDisplayFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutOverlayDisplayFunc" );
SET_CALLBACK( OverlayDisplay ); SET_CALLBACK( OverlayDisplay );
} }
/* /*
* Sets the window status callback for the current window * Sets the window status callback for the current window
*/ */
void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) ) void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWindowStatusFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWindowStatusFunc" );
SET_CALLBACK( WindowStatus ); SET_CALLBACK( WindowStatus );
} }
/* /*
* Sets the spaceball motion callback for the current window * Sets the spaceball motion callback for the current window
*/ */
void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) ) void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpaceballMotionFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpaceballMotionFunc" );
fgInitialiseSpaceball(); fgInitialiseSpaceball();
SET_CALLBACK( SpaceMotion ); SET_CALLBACK( SpaceMotion );
} }
/* /*
* Sets the spaceball rotate callback for the current window * Sets the spaceball rotate callback for the current window
*/ */
void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) ) void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpaceballRotateFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpaceballRotateFunc" );
fgInitialiseSpaceball(); fgInitialiseSpaceball();
SET_CALLBACK( SpaceRotation ); SET_CALLBACK( SpaceRotation );
} }
/* /*
* Sets the spaceball button callback for the current window * Sets the spaceball button callback for the current window
*/ */
void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) ) void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpaceballButtonFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSpaceballButtonFunc" );
fgInitialiseSpaceball(); fgInitialiseSpaceball();
SET_CALLBACK( SpaceButton ); SET_CALLBACK( SpaceButton );
} }
/* /*
* Sets the button box callback for the current window * Sets the button box callback for the current window
*/ */
void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) ) void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutButtonBoxFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutButtonBoxFunc" );
SET_CALLBACK( ButtonBox ); SET_CALLBACK( ButtonBox );
} }
/* /*
* Sets the dials box callback for the current window * Sets the dials box callback for the current window
*/ */
void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) ) void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDialsFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutDialsFunc" );
SET_CALLBACK( Dials ); SET_CALLBACK( Dials );
} }
/* /*
* Sets the tablet motion callback for the current window * Sets the tablet motion callback for the current window
*/ */
void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) ) void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutTabletMotionFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutTabletMotionFunc" );
SET_CALLBACK( TabletMotion ); SET_CALLBACK( TabletMotion );
} }
/* /*
* Sets the tablet buttons callback for the current window * Sets the tablet buttons callback for the current window
*/ */
void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) ) void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutTabletButtonFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutTabletButtonFunc" );
SET_CALLBACK( TabletButton ); SET_CALLBACK( TabletButton );
} }
/* /*
* Sets the multi-pointer entry callback for the current window * Sets the multi-pointer entry callback for the current window
*/ */
void FGAPIENTRY glutMultiEntryFunc( void (* callback)(int, int ) ) void FGAPIENTRY glutMultiEntryFunc( void (* callback)(int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiEntryFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiEntryFunc" );
SET_CALLBACK( MultiEntry ); SET_CALLBACK( MultiEntry );
} }
/* /*
* Sets the multi-pointer button callback for the current window * Sets the multi-pointer button callback for the current window
*/ */
void FGAPIENTRY glutMultiButtonFunc( void (* callback)(int, int, int, int, int ) ) void FGAPIENTRY glutMultiButtonFunc( void (* callback)(int, int, int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiButtonFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiButtonFunc" );
SET_CALLBACK( MultiButton ); SET_CALLBACK( MultiButton );
} }
/* /*
* Sets the multi-pointer motion callback for the current window * Sets the multi-pointer motion callback for the current window
*/ */
void FGAPIENTRY glutMultiMotionFunc( void (* callback)(int, int, int ) ) void FGAPIENTRY glutMultiMotionFunc( void (* callback)(int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiMotionFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiMotionFunc" );
SET_CALLBACK( MultiMotion ); SET_CALLBACK( MultiMotion );
} }
/* /*
* Sets the multi-pointer passive motion callback for the current window * Sets the multi-pointer passive motion callback for the current window
*/ */
void FGAPIENTRY glutMultiPassiveFunc( void (* callback)(int, int, int ) ) void FGAPIENTRY glutMultiPassiveFunc( void (* callback)(int, int, int ) )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiPassiveFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMultiPassiveFunc" );
SET_CALLBACK( MultiPassive ); SET_CALLBACK( MultiPassive );
} }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,282 +1,282 @@
/* /*
* freeglut_cursor.c * freeglut_cursor.c
* *
* The mouse cursor related stuff. * The mouse cursor related stuff.
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Thu Dec 16 1999 * Creation date: Thu Dec 16 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
/* /*
* TODO BEFORE THE STABLE RELEASE: * TODO BEFORE THE STABLE RELEASE:
* glutSetCursor() -- Win32 mappings are incomplete. * glutSetCursor() -- Win32 mappings are incomplete.
* *
* It would be good to use custom mouse cursor shapes, and introduce * It would be good to use custom mouse cursor shapes, and introduce
* an option to display them using glBitmap() and/or texture mapping, * an option to display them using glBitmap() and/or texture mapping,
* apart from the windowing system version. * apart from the windowing system version.
*/ */
/* -- PRIVATE FUNCTIONS --------------------------------------------------- */ /* -- PRIVATE FUNCTIONS --------------------------------------------------- */
#if TARGET_HOST_POSIX_X11 || TARGET_HOST_MAC_OSX || TARGET_HOST_SOLARIS #if TARGET_HOST_POSIX_X11 || TARGET_HOST_MAC_OSX || TARGET_HOST_SOLARIS
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
/* /*
* A factory method for an empty cursor * A factory method for an empty cursor
*/ */
static Cursor getEmptyCursor( void ) static Cursor getEmptyCursor( void )
{ {
static Cursor cursorNone = None; static Cursor cursorNone = None;
if( cursorNone == None ) { if( cursorNone == None ) {
char cursorNoneBits[ 32 ]; char cursorNoneBits[ 32 ];
XColor dontCare; XColor dontCare;
Pixmap cursorNonePixmap; Pixmap cursorNonePixmap;
memset( cursorNoneBits, 0, sizeof( cursorNoneBits ) ); memset( cursorNoneBits, 0, sizeof( cursorNoneBits ) );
memset( &dontCare, 0, sizeof( dontCare ) ); memset( &dontCare, 0, sizeof( dontCare ) );
cursorNonePixmap = XCreateBitmapFromData ( fgDisplay.Display, cursorNonePixmap = XCreateBitmapFromData ( fgDisplay.Display,
fgDisplay.RootWindow, fgDisplay.RootWindow,
cursorNoneBits, 16, 16 ); cursorNoneBits, 16, 16 );
if( cursorNonePixmap != None ) { if( cursorNonePixmap != None ) {
cursorNone = XCreatePixmapCursor( fgDisplay.Display, cursorNone = XCreatePixmapCursor( fgDisplay.Display,
cursorNonePixmap, cursorNonePixmap, cursorNonePixmap, cursorNonePixmap,
&dontCare, &dontCare, 0, 0 ); &dontCare, &dontCare, 0, 0 );
XFreePixmap( fgDisplay.Display, cursorNonePixmap ); XFreePixmap( fgDisplay.Display, cursorNonePixmap );
} }
} }
return cursorNone; return cursorNone;
} }
typedef struct tag_cursorCacheEntry cursorCacheEntry; typedef struct tag_cursorCacheEntry cursorCacheEntry;
struct tag_cursorCacheEntry { struct tag_cursorCacheEntry {
unsigned int cursorShape; /* an XC_foo value */ unsigned int cursorShape; /* an XC_foo value */
Cursor cachedCursor; /* None if the corresponding cursor has Cursor cachedCursor; /* None if the corresponding cursor has
not been created yet */ not been created yet */
}; };
/* /*
* Note: The arrangement of the table below depends on the fact that * Note: The arrangement of the table below depends on the fact that
* the "normal" GLUT_CURSOR_* values start a 0 and are consecutive. * the "normal" GLUT_CURSOR_* values start a 0 and are consecutive.
*/ */
static cursorCacheEntry cursorCache[] = { static cursorCacheEntry cursorCache[] = {
{ XC_arrow, None }, /* GLUT_CURSOR_RIGHT_ARROW */ { XC_arrow, None }, /* GLUT_CURSOR_RIGHT_ARROW */
{ XC_top_left_arrow, None }, /* GLUT_CURSOR_LEFT_ARROW */ { XC_top_left_arrow, None }, /* GLUT_CURSOR_LEFT_ARROW */
{ XC_hand1, None }, /* GLUT_CURSOR_INFO */ { XC_hand1, None }, /* GLUT_CURSOR_INFO */
{ XC_pirate, None }, /* GLUT_CURSOR_DESTROY */ { XC_pirate, None }, /* GLUT_CURSOR_DESTROY */
{ XC_question_arrow, None }, /* GLUT_CURSOR_HELP */ { XC_question_arrow, None }, /* GLUT_CURSOR_HELP */
{ XC_exchange, None }, /* GLUT_CURSOR_CYCLE */ { XC_exchange, None }, /* GLUT_CURSOR_CYCLE */
{ XC_spraycan, None }, /* GLUT_CURSOR_SPRAY */ { XC_spraycan, None }, /* GLUT_CURSOR_SPRAY */
{ XC_watch, None }, /* GLUT_CURSOR_WAIT */ { XC_watch, None }, /* GLUT_CURSOR_WAIT */
{ XC_xterm, None }, /* GLUT_CURSOR_TEXT */ { XC_xterm, None }, /* GLUT_CURSOR_TEXT */
{ XC_crosshair, None }, /* GLUT_CURSOR_CROSSHAIR */ { XC_crosshair, None }, /* GLUT_CURSOR_CROSSHAIR */
{ XC_sb_v_double_arrow, None }, /* GLUT_CURSOR_UP_DOWN */ { XC_sb_v_double_arrow, None }, /* GLUT_CURSOR_UP_DOWN */
{ XC_sb_h_double_arrow, None }, /* GLUT_CURSOR_LEFT_RIGHT */ { XC_sb_h_double_arrow, None }, /* GLUT_CURSOR_LEFT_RIGHT */
{ XC_top_side, None }, /* GLUT_CURSOR_TOP_SIDE */ { XC_top_side, None }, /* GLUT_CURSOR_TOP_SIDE */
{ XC_bottom_side, None }, /* GLUT_CURSOR_BOTTOM_SIDE */ { XC_bottom_side, None }, /* GLUT_CURSOR_BOTTOM_SIDE */
{ XC_left_side, None }, /* GLUT_CURSOR_LEFT_SIDE */ { XC_left_side, None }, /* GLUT_CURSOR_LEFT_SIDE */
{ XC_right_side, None }, /* GLUT_CURSOR_RIGHT_SIDE */ { XC_right_side, None }, /* GLUT_CURSOR_RIGHT_SIDE */
{ XC_top_left_corner, None }, /* GLUT_CURSOR_TOP_LEFT_CORNER */ { XC_top_left_corner, None }, /* GLUT_CURSOR_TOP_LEFT_CORNER */
{ XC_top_right_corner, None }, /* GLUT_CURSOR_TOP_RIGHT_CORNER */ { XC_top_right_corner, None }, /* GLUT_CURSOR_TOP_RIGHT_CORNER */
{ XC_bottom_right_corner, None }, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */ { XC_bottom_right_corner, None }, /* GLUT_CURSOR_BOTTOM_RIGHT_CORNER */
{ XC_bottom_left_corner, None } /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */ { XC_bottom_left_corner, None } /* GLUT_CURSOR_BOTTOM_LEFT_CORNER */
}; };
static void fghSetCursor ( SFG_Window *window, int cursorID ) static void fghSetCursor ( SFG_Window *window, int cursorID )
{ {
Cursor cursor; Cursor cursor;
/* /*
* XXX FULL_CROSSHAIR demotes to plain CROSSHAIR. Old GLUT allows * XXX FULL_CROSSHAIR demotes to plain CROSSHAIR. Old GLUT allows
* for this, but if there is a system that easily supports a full- * for this, but if there is a system that easily supports a full-
* window (or full-screen) crosshair, we might consider it. * window (or full-screen) crosshair, we might consider it.
*/ */
int cursorIDToUse = int cursorIDToUse =
( cursorID == GLUT_CURSOR_FULL_CROSSHAIR ) ? GLUT_CURSOR_CROSSHAIR : cursorID; ( cursorID == GLUT_CURSOR_FULL_CROSSHAIR ) ? GLUT_CURSOR_CROSSHAIR : cursorID;
if( ( cursorIDToUse >= 0 ) && if( ( cursorIDToUse >= 0 ) &&
( cursorIDToUse < sizeof( cursorCache ) / sizeof( cursorCache[0] ) ) ) { ( cursorIDToUse < sizeof( cursorCache ) / sizeof( cursorCache[0] ) ) ) {
cursorCacheEntry *entry = &cursorCache[ cursorIDToUse ]; cursorCacheEntry *entry = &cursorCache[ cursorIDToUse ];
if( entry->cachedCursor == None ) { if( entry->cachedCursor == None ) {
entry->cachedCursor = entry->cachedCursor =
XCreateFontCursor( fgDisplay.Display, entry->cursorShape ); XCreateFontCursor( fgDisplay.Display, entry->cursorShape );
} }
cursor = entry->cachedCursor; cursor = entry->cachedCursor;
} else { } else {
switch( cursorIDToUse ) switch( cursorIDToUse )
{ {
case GLUT_CURSOR_NONE: case GLUT_CURSOR_NONE:
cursor = getEmptyCursor( ); cursor = getEmptyCursor( );
break; break;
case GLUT_CURSOR_INHERIT: case GLUT_CURSOR_INHERIT:
cursor = None; cursor = None;
break; break;
default: default:
fgError( "Unknown cursor type: %d", cursorIDToUse ); fgError( "Unknown cursor type: %d", cursorIDToUse );
return; return;
} }
} }
if ( cursorIDToUse == GLUT_CURSOR_INHERIT ) { if ( cursorIDToUse == GLUT_CURSOR_INHERIT ) {
XUndefineCursor( fgDisplay.Display, window->Window.Handle ); XUndefineCursor( fgDisplay.Display, window->Window.Handle );
} else if ( cursor != None ) { } else if ( cursor != None ) {
XDefineCursor( fgDisplay.Display, window->Window.Handle, cursor ); XDefineCursor( fgDisplay.Display, window->Window.Handle, cursor );
} else if ( cursorIDToUse != GLUT_CURSOR_NONE ) { } else if ( cursorIDToUse != GLUT_CURSOR_NONE ) {
fgError( "Failed to create cursor" ); fgError( "Failed to create cursor" );
} }
} }
static void fghWarpPointer ( int x, int y ) static void fghWarpPointer ( int x, int y )
{ {
XWarpPointer( XWarpPointer(
fgDisplay.Display, fgDisplay.Display,
None, None,
fgStructure.CurrentWindow->Window.Handle, fgStructure.CurrentWindow->Window.Handle,
0, 0, 0, 0, 0, 0, 0, 0,
x, y x, y
); );
/* Make the warp visible immediately. */ /* Make the warp visible immediately. */
XFlush( fgDisplay.Display ); XFlush( fgDisplay.Display );
} }
#endif #endif
#if TARGET_HOST_MS_WINDOWS #if TARGET_HOST_MS_WINDOWS
static void fghSetCursor ( SFG_Window *window, int cursorID ) static void fghSetCursor ( SFG_Window *window, int cursorID )
{ {
/* /*
* Joe Krahn is re-writing the following code. * Joe Krahn is re-writing the following code.
*/ */
/* Set the cursor AND change it for this window class. */ /* Set the cursor AND change it for this window class. */
#if !defined(__MINGW64__) && _MSC_VER <= 1200 #if !defined(__MINGW64__) && _MSC_VER <= 1200
# define MAP_CURSOR(a,b) \ # define MAP_CURSOR(a,b) \
case a: \ case a: \
SetCursor( LoadCursor( NULL, b ) ); \ SetCursor( LoadCursor( NULL, b ) ); \
SetClassLong( window->Window.Handle, \ SetClassLong( window->Window.Handle, \
GCL_HCURSOR, \ GCL_HCURSOR, \
( LONG )LoadCursor( NULL, b ) ); \ ( LONG )LoadCursor( NULL, b ) ); \
break; break;
/* Nuke the cursor AND change it for this window class. */ /* Nuke the cursor AND change it for this window class. */
# define ZAP_CURSOR(a,b) \ # define ZAP_CURSOR(a,b) \
case a: \ case a: \
SetCursor( NULL ); \ SetCursor( NULL ); \
SetClassLong( window->Window.Handle, \ SetClassLong( window->Window.Handle, \
GCL_HCURSOR, ( LONG )NULL ); \ GCL_HCURSOR, ( LONG )NULL ); \
break; break;
#else #else
# define MAP_CURSOR(a,b) \ # define MAP_CURSOR(a,b) \
case a: \ case a: \
SetCursor( LoadCursor( NULL, b ) ); \ SetCursor( LoadCursor( NULL, b ) ); \
SetClassLongPtr( window->Window.Handle, \ SetClassLongPtr( window->Window.Handle, \
GCLP_HCURSOR, \ GCLP_HCURSOR, \
( LONG )( LONG_PTR )LoadCursor( NULL, b ) ); \ ( LONG )( LONG_PTR )LoadCursor( NULL, b ) ); \
break; break;
/* Nuke the cursor AND change it for this window class. */ /* Nuke the cursor AND change it for this window class. */
# define ZAP_CURSOR(a,b) \ # define ZAP_CURSOR(a,b) \
case a: \ case a: \
SetCursor( NULL ); \ SetCursor( NULL ); \
SetClassLongPtr( window->Window.Handle, \ SetClassLongPtr( window->Window.Handle, \
GCLP_HCURSOR, ( LONG )( LONG_PTR )NULL ); \ GCLP_HCURSOR, ( LONG )( LONG_PTR )NULL ); \
break; break;
#endif #endif
switch( cursorID ) switch( cursorID )
{ {
MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW ); MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW );
MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW ); MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW );
MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP ); MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP );
MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS ); MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS );
MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP ); MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP );
MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL ); MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL );
MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS ); MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS );
MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT ); MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT );
MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_IBEAM ); MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_IBEAM );
MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS ); MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_SIZENS ); MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_SIZENS );
MAP_CURSOR( GLUT_CURSOR_LEFT_RIGHT, IDC_SIZEWE ); MAP_CURSOR( GLUT_CURSOR_LEFT_RIGHT, IDC_SIZEWE );
MAP_CURSOR( GLUT_CURSOR_TOP_SIDE, IDC_ARROW ); /* XXX ToDo */ MAP_CURSOR( GLUT_CURSOR_TOP_SIDE, IDC_ARROW ); /* XXX ToDo */
MAP_CURSOR( GLUT_CURSOR_BOTTOM_SIDE, IDC_ARROW ); /* XXX ToDo */ MAP_CURSOR( GLUT_CURSOR_BOTTOM_SIDE, IDC_ARROW ); /* XXX ToDo */
MAP_CURSOR( GLUT_CURSOR_LEFT_SIDE, IDC_ARROW ); /* XXX ToDo */ MAP_CURSOR( GLUT_CURSOR_LEFT_SIDE, IDC_ARROW ); /* XXX ToDo */
MAP_CURSOR( GLUT_CURSOR_RIGHT_SIDE, IDC_ARROW ); /* XXX ToDo */ MAP_CURSOR( GLUT_CURSOR_RIGHT_SIDE, IDC_ARROW ); /* XXX ToDo */
MAP_CURSOR( GLUT_CURSOR_TOP_LEFT_CORNER, IDC_SIZENWSE ); MAP_CURSOR( GLUT_CURSOR_TOP_LEFT_CORNER, IDC_SIZENWSE );
MAP_CURSOR( GLUT_CURSOR_TOP_RIGHT_CORNER, IDC_SIZENESW ); MAP_CURSOR( GLUT_CURSOR_TOP_RIGHT_CORNER, IDC_SIZENESW );
MAP_CURSOR( GLUT_CURSOR_BOTTOM_RIGHT_CORNER, IDC_SIZENWSE ); MAP_CURSOR( GLUT_CURSOR_BOTTOM_RIGHT_CORNER, IDC_SIZENWSE );
MAP_CURSOR( GLUT_CURSOR_BOTTOM_LEFT_CORNER, IDC_SIZENESW ); MAP_CURSOR( GLUT_CURSOR_BOTTOM_LEFT_CORNER, IDC_SIZENESW );
MAP_CURSOR( GLUT_CURSOR_INHERIT, IDC_ARROW ); /* XXX ToDo */ MAP_CURSOR( GLUT_CURSOR_INHERIT, IDC_ARROW ); /* XXX ToDo */
ZAP_CURSOR( GLUT_CURSOR_NONE, NULL ); ZAP_CURSOR( GLUT_CURSOR_NONE, NULL );
MAP_CURSOR( GLUT_CURSOR_FULL_CROSSHAIR, IDC_CROSS ); /* XXX ToDo */ MAP_CURSOR( GLUT_CURSOR_FULL_CROSSHAIR, IDC_CROSS ); /* XXX ToDo */
default: default:
fgError( "Unknown cursor type: %d", cursorID ); fgError( "Unknown cursor type: %d", cursorID );
break; break;
} }
} }
static void fghWarpPointer ( int x, int y ) static void fghWarpPointer ( int x, int y )
{ {
POINT coords; POINT coords;
coords.x = x; coords.x = x;
coords.y = y; coords.y = y;
/* ClientToScreen() translates {coords} for us. */ /* ClientToScreen() translates {coords} for us. */
ClientToScreen( fgStructure.CurrentWindow->Window.Handle, &coords ); ClientToScreen( fgStructure.CurrentWindow->Window.Handle, &coords );
SetCursorPos( coords.x, coords.y ); SetCursorPos( coords.x, coords.y );
} }
#endif #endif
/* -- INTERNAL FUNCTIONS ---------------------------------------------------- */ /* -- INTERNAL FUNCTIONS ---------------------------------------------------- */
void fgSetCursor ( SFG_Window *window, int cursorID ) void fgSetCursor ( SFG_Window *window, int cursorID )
{ {
fghSetCursor ( window, cursorID ); fghSetCursor ( window, cursorID );
} }
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
/* /*
* Set the cursor image to be used for the current window * Set the cursor image to be used for the current window
*/ */
void FGAPIENTRY glutSetCursor( int cursorID ) void FGAPIENTRY glutSetCursor( int cursorID )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetCursor" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetCursor" );
FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSetCursor" ); FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSetCursor" );
fghSetCursor ( fgStructure.CurrentWindow, cursorID ); fghSetCursor ( fgStructure.CurrentWindow, cursorID );
fgStructure.CurrentWindow->State.Cursor = cursorID; fgStructure.CurrentWindow->State.Cursor = cursorID;
} }
/* /*
* Moves the mouse pointer to given window coordinates * Moves the mouse pointer to given window coordinates
*/ */
void FGAPIENTRY glutWarpPointer( int x, int y ) void FGAPIENTRY glutWarpPointer( int x, int y )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWarpPointer" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWarpPointer" );
FREEGLUT_EXIT_IF_NO_WINDOW ( "glutWarpPointer" ); FREEGLUT_EXIT_IF_NO_WINDOW ( "glutWarpPointer" );
fghWarpPointer ( x, y ); fghWarpPointer ( x, y );
} }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,103 +1,103 @@
/* /*
* freeglut_display.c * freeglut_display.c
* *
* Display message posting, context buffer swapping. * Display message posting, context buffer swapping.
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Fri Dec 3 1999 * Creation date: Fri Dec 3 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
/* /*
* Marks the current window to have the redisplay performed when possible... * Marks the current window to have the redisplay performed when possible...
*/ */
void FGAPIENTRY glutPostRedisplay( void ) void FGAPIENTRY glutPostRedisplay( void )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPostRedisplay" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPostRedisplay" );
if ( ! fgStructure.CurrentWindow ) if ( ! fgStructure.CurrentWindow )
{ {
fgError ( " ERROR: Function <%s> called" fgError ( " ERROR: Function <%s> called"
" with no current window defined.", "glutPostRedisplay" ) ; " with no current window defined.", "glutPostRedisplay" ) ;
} }
fgStructure.CurrentWindow->State.Redisplay = GL_TRUE; fgStructure.CurrentWindow->State.Redisplay = GL_TRUE;
} }
/* /*
* Swaps the buffers for the current window (if any) * Swaps the buffers for the current window (if any)
*/ */
void FGAPIENTRY glutSwapBuffers( void ) void FGAPIENTRY glutSwapBuffers( void )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSwapBuffers" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSwapBuffers" );
FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSwapBuffers" ); FREEGLUT_EXIT_IF_NO_WINDOW ( "glutSwapBuffers" );
/* /*
* "glXSwapBuffers" already performs an implicit call to "glFlush". What * "glXSwapBuffers" already performs an implicit call to "glFlush". What
* about "SwapBuffers"? * about "SwapBuffers"?
*/ */
glFlush( ); glFlush( );
if( ! fgStructure.CurrentWindow->Window.DoubleBuffered ) if( ! fgStructure.CurrentWindow->Window.DoubleBuffered )
return; return;
#if TARGET_HOST_POSIX_X11 #if TARGET_HOST_POSIX_X11
glXSwapBuffers( fgDisplay.Display, fgStructure.CurrentWindow->Window.Handle ); glXSwapBuffers( fgDisplay.Display, fgStructure.CurrentWindow->Window.Handle );
#elif TARGET_HOST_MS_WINDOWS #elif TARGET_HOST_MS_WINDOWS
SwapBuffers( fgStructure.CurrentWindow->Window.Device ); SwapBuffers( fgStructure.CurrentWindow->Window.Device );
#endif #endif
/* GLUT_FPS env var support */ /* GLUT_FPS env var support */
if( fgState.FPSInterval ) if( fgState.FPSInterval )
{ {
GLint t = glutGet( GLUT_ELAPSED_TIME ); GLint t = glutGet( GLUT_ELAPSED_TIME );
fgState.SwapCount++; fgState.SwapCount++;
if( fgState.SwapTime == 0 ) if( fgState.SwapTime == 0 )
fgState.SwapTime = t; fgState.SwapTime = t;
else if( t - fgState.SwapTime > fgState.FPSInterval ) else if( t - fgState.SwapTime > fgState.FPSInterval )
{ {
float time = 0.001f * ( t - fgState.SwapTime ); float time = 0.001f * ( t - fgState.SwapTime );
float fps = ( float )fgState.SwapCount / time; float fps = ( float )fgState.SwapCount / time;
fprintf( stderr, fprintf( stderr,
"freeglut: %d frames in %.2f seconds = %.2f FPS\n", "freeglut: %d frames in %.2f seconds = %.2f FPS\n",
fgState.SwapCount, time, fps ); fgState.SwapCount, time, fps );
fgState.SwapTime = t; fgState.SwapTime = t;
fgState.SwapCount = 0; fgState.SwapCount = 0;
} }
} }
} }
/* /*
* Mark appropriate window to be displayed * Mark appropriate window to be displayed
*/ */
void FGAPIENTRY glutPostWindowRedisplay( int windowID ) void FGAPIENTRY glutPostWindowRedisplay( int windowID )
{ {
SFG_Window* window; SFG_Window* window;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPostWindowRedisplay" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutPostWindowRedisplay" );
window = fgWindowByID( windowID ); window = fgWindowByID( windowID );
freeglut_return_if_fail( window ); freeglut_return_if_fail( window );
window->State.Redisplay = GL_TRUE; window->State.Redisplay = GL_TRUE;
} }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,233 +1,233 @@
/* /*
* freeglut_ext.c * freeglut_ext.c
* *
* Functions related to OpenGL extensions. * Functions related to OpenGL extensions.
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Thu Dec 9 1999 * Creation date: Thu Dec 9 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#define GLX_GLXEXT_PROTOTYPES #define GLX_GLXEXT_PROTOTYPES
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
static GLUTproc fghGetGLUTProcAddress( const char* procName ) static GLUTproc fghGetGLUTProcAddress( const char* procName )
{ {
/* optimization: quick initial check */ /* optimization: quick initial check */
if( strncmp( procName, "glut", 4 ) != 0 ) if( strncmp( procName, "glut", 4 ) != 0 )
return NULL; return NULL;
#define CHECK_NAME(x) if( strcmp( procName, #x ) == 0) return (GLUTproc)x; #define CHECK_NAME(x) if( strcmp( procName, #x ) == 0) return (GLUTproc)x;
CHECK_NAME(glutInit); CHECK_NAME(glutInit);
CHECK_NAME(glutInitDisplayMode); CHECK_NAME(glutInitDisplayMode);
CHECK_NAME(glutInitDisplayString); CHECK_NAME(glutInitDisplayString);
CHECK_NAME(glutInitWindowPosition); CHECK_NAME(glutInitWindowPosition);
CHECK_NAME(glutInitWindowSize); CHECK_NAME(glutInitWindowSize);
CHECK_NAME(glutMainLoop); CHECK_NAME(glutMainLoop);
CHECK_NAME(glutExit); CHECK_NAME(glutExit);
CHECK_NAME(glutCreateWindow); CHECK_NAME(glutCreateWindow);
CHECK_NAME(glutCreateSubWindow); CHECK_NAME(glutCreateSubWindow);
CHECK_NAME(glutDestroyWindow); CHECK_NAME(glutDestroyWindow);
CHECK_NAME(glutPostRedisplay); CHECK_NAME(glutPostRedisplay);
CHECK_NAME(glutPostWindowRedisplay); CHECK_NAME(glutPostWindowRedisplay);
CHECK_NAME(glutSwapBuffers); CHECK_NAME(glutSwapBuffers);
CHECK_NAME(glutGetWindow); CHECK_NAME(glutGetWindow);
CHECK_NAME(glutSetWindow); CHECK_NAME(glutSetWindow);
CHECK_NAME(glutSetWindowTitle); CHECK_NAME(glutSetWindowTitle);
CHECK_NAME(glutSetIconTitle); CHECK_NAME(glutSetIconTitle);
CHECK_NAME(glutPositionWindow); CHECK_NAME(glutPositionWindow);
CHECK_NAME(glutReshapeWindow); CHECK_NAME(glutReshapeWindow);
CHECK_NAME(glutPopWindow); CHECK_NAME(glutPopWindow);
CHECK_NAME(glutPushWindow); CHECK_NAME(glutPushWindow);
CHECK_NAME(glutIconifyWindow); CHECK_NAME(glutIconifyWindow);
CHECK_NAME(glutShowWindow); CHECK_NAME(glutShowWindow);
CHECK_NAME(glutHideWindow); CHECK_NAME(glutHideWindow);
CHECK_NAME(glutFullScreen); CHECK_NAME(glutFullScreen);
CHECK_NAME(glutSetCursor); CHECK_NAME(glutSetCursor);
CHECK_NAME(glutWarpPointer); CHECK_NAME(glutWarpPointer);
CHECK_NAME(glutEstablishOverlay); CHECK_NAME(glutEstablishOverlay);
CHECK_NAME(glutRemoveOverlay); CHECK_NAME(glutRemoveOverlay);
CHECK_NAME(glutUseLayer); CHECK_NAME(glutUseLayer);
CHECK_NAME(glutPostOverlayRedisplay); CHECK_NAME(glutPostOverlayRedisplay);
CHECK_NAME(glutPostWindowOverlayRedisplay); CHECK_NAME(glutPostWindowOverlayRedisplay);
CHECK_NAME(glutShowOverlay); CHECK_NAME(glutShowOverlay);
CHECK_NAME(glutHideOverlay); CHECK_NAME(glutHideOverlay);
CHECK_NAME(glutCreateMenu); CHECK_NAME(glutCreateMenu);
CHECK_NAME(glutDestroyMenu); CHECK_NAME(glutDestroyMenu);
CHECK_NAME(glutGetMenu); CHECK_NAME(glutGetMenu);
CHECK_NAME(glutSetMenu); CHECK_NAME(glutSetMenu);
CHECK_NAME(glutAddMenuEntry); CHECK_NAME(glutAddMenuEntry);
CHECK_NAME(glutAddSubMenu); CHECK_NAME(glutAddSubMenu);
CHECK_NAME(glutChangeToMenuEntry); CHECK_NAME(glutChangeToMenuEntry);
CHECK_NAME(glutChangeToSubMenu); CHECK_NAME(glutChangeToSubMenu);
CHECK_NAME(glutRemoveMenuItem); CHECK_NAME(glutRemoveMenuItem);
CHECK_NAME(glutAttachMenu); CHECK_NAME(glutAttachMenu);
CHECK_NAME(glutDetachMenu); CHECK_NAME(glutDetachMenu);
CHECK_NAME(glutDisplayFunc); CHECK_NAME(glutDisplayFunc);
CHECK_NAME(glutReshapeFunc); CHECK_NAME(glutReshapeFunc);
CHECK_NAME(glutKeyboardFunc); CHECK_NAME(glutKeyboardFunc);
CHECK_NAME(glutMouseFunc); CHECK_NAME(glutMouseFunc);
CHECK_NAME(glutMultiEntryFunc); CHECK_NAME(glutMultiEntryFunc);
CHECK_NAME(glutMultiMotionFunc); CHECK_NAME(glutMultiMotionFunc);
CHECK_NAME(glutMultiButtonFunc); CHECK_NAME(glutMultiButtonFunc);
CHECK_NAME(glutMultiPassiveFunc); CHECK_NAME(glutMultiPassiveFunc);
CHECK_NAME(glutMotionFunc); CHECK_NAME(glutMotionFunc);
CHECK_NAME(glutPassiveMotionFunc); CHECK_NAME(glutPassiveMotionFunc);
CHECK_NAME(glutEntryFunc); CHECK_NAME(glutEntryFunc);
CHECK_NAME(glutVisibilityFunc); CHECK_NAME(glutVisibilityFunc);
CHECK_NAME(glutIdleFunc); CHECK_NAME(glutIdleFunc);
CHECK_NAME(glutTimerFunc); CHECK_NAME(glutTimerFunc);
CHECK_NAME(glutMenuStateFunc); CHECK_NAME(glutMenuStateFunc);
CHECK_NAME(glutSpecialFunc); CHECK_NAME(glutSpecialFunc);
CHECK_NAME(glutSpaceballMotionFunc); CHECK_NAME(glutSpaceballMotionFunc);
CHECK_NAME(glutSpaceballRotateFunc); CHECK_NAME(glutSpaceballRotateFunc);
CHECK_NAME(glutSpaceballButtonFunc); CHECK_NAME(glutSpaceballButtonFunc);
CHECK_NAME(glutButtonBoxFunc); CHECK_NAME(glutButtonBoxFunc);
CHECK_NAME(glutDialsFunc); CHECK_NAME(glutDialsFunc);
CHECK_NAME(glutTabletMotionFunc); CHECK_NAME(glutTabletMotionFunc);
CHECK_NAME(glutTabletButtonFunc); CHECK_NAME(glutTabletButtonFunc);
CHECK_NAME(glutMenuStatusFunc); CHECK_NAME(glutMenuStatusFunc);
CHECK_NAME(glutOverlayDisplayFunc); CHECK_NAME(glutOverlayDisplayFunc);
CHECK_NAME(glutWindowStatusFunc); CHECK_NAME(glutWindowStatusFunc);
CHECK_NAME(glutKeyboardUpFunc); CHECK_NAME(glutKeyboardUpFunc);
CHECK_NAME(glutSpecialUpFunc); CHECK_NAME(glutSpecialUpFunc);
#if !defined(_WIN32_WCE) #if !defined(_WIN32_WCE)
CHECK_NAME(glutJoystickFunc); CHECK_NAME(glutJoystickFunc);
#endif /* !defined(_WIN32_WCE) */ #endif /* !defined(_WIN32_WCE) */
CHECK_NAME(glutSetColor); CHECK_NAME(glutSetColor);
CHECK_NAME(glutGetColor); CHECK_NAME(glutGetColor);
CHECK_NAME(glutCopyColormap); CHECK_NAME(glutCopyColormap);
CHECK_NAME(glutGet); CHECK_NAME(glutGet);
CHECK_NAME(glutDeviceGet); CHECK_NAME(glutDeviceGet);
CHECK_NAME(glutExtensionSupported); CHECK_NAME(glutExtensionSupported);
CHECK_NAME(glutGetModifiers); CHECK_NAME(glutGetModifiers);
CHECK_NAME(glutLayerGet); CHECK_NAME(glutLayerGet);
CHECK_NAME(glutBitmapCharacter); CHECK_NAME(glutBitmapCharacter);
CHECK_NAME(glutBitmapWidth); CHECK_NAME(glutBitmapWidth);
CHECK_NAME(glutStrokeCharacter); CHECK_NAME(glutStrokeCharacter);
CHECK_NAME(glutStrokeWidth); CHECK_NAME(glutStrokeWidth);
CHECK_NAME(glutBitmapLength); CHECK_NAME(glutBitmapLength);
CHECK_NAME(glutStrokeLength); CHECK_NAME(glutStrokeLength);
CHECK_NAME(glutWireSphere); CHECK_NAME(glutWireSphere);
CHECK_NAME(glutSolidSphere); CHECK_NAME(glutSolidSphere);
CHECK_NAME(glutWireCone); CHECK_NAME(glutWireCone);
CHECK_NAME(glutSolidCone); CHECK_NAME(glutSolidCone);
CHECK_NAME(glutWireCube); CHECK_NAME(glutWireCube);
CHECK_NAME(glutSolidCube); CHECK_NAME(glutSolidCube);
CHECK_NAME(glutWireTorus); CHECK_NAME(glutWireTorus);
CHECK_NAME(glutSolidTorus); CHECK_NAME(glutSolidTorus);
CHECK_NAME(glutWireDodecahedron); CHECK_NAME(glutWireDodecahedron);
CHECK_NAME(glutSolidDodecahedron); CHECK_NAME(glutSolidDodecahedron);
CHECK_NAME(glutWireTeapot); CHECK_NAME(glutWireTeapot);
CHECK_NAME(glutSolidTeapot); CHECK_NAME(glutSolidTeapot);
CHECK_NAME(glutWireOctahedron); CHECK_NAME(glutWireOctahedron);
CHECK_NAME(glutSolidOctahedron); CHECK_NAME(glutSolidOctahedron);
CHECK_NAME(glutWireTetrahedron); CHECK_NAME(glutWireTetrahedron);
CHECK_NAME(glutSolidTetrahedron); CHECK_NAME(glutSolidTetrahedron);
CHECK_NAME(glutWireIcosahedron); CHECK_NAME(glutWireIcosahedron);
CHECK_NAME(glutSolidIcosahedron); CHECK_NAME(glutSolidIcosahedron);
CHECK_NAME(glutVideoResizeGet); CHECK_NAME(glutVideoResizeGet);
CHECK_NAME(glutSetupVideoResizing); CHECK_NAME(glutSetupVideoResizing);
CHECK_NAME(glutStopVideoResizing); CHECK_NAME(glutStopVideoResizing);
CHECK_NAME(glutVideoResize); CHECK_NAME(glutVideoResize);
CHECK_NAME(glutVideoPan); CHECK_NAME(glutVideoPan);
CHECK_NAME(glutReportErrors); CHECK_NAME(glutReportErrors);
CHECK_NAME(glutIgnoreKeyRepeat); CHECK_NAME(glutIgnoreKeyRepeat);
CHECK_NAME(glutSetKeyRepeat); CHECK_NAME(glutSetKeyRepeat);
#if !defined(_WIN32_WCE) #if !defined(_WIN32_WCE)
CHECK_NAME(glutForceJoystickFunc); CHECK_NAME(glutForceJoystickFunc);
CHECK_NAME(glutGameModeString); CHECK_NAME(glutGameModeString);
CHECK_NAME(glutEnterGameMode); CHECK_NAME(glutEnterGameMode);
CHECK_NAME(glutLeaveGameMode); CHECK_NAME(glutLeaveGameMode);
CHECK_NAME(glutGameModeGet); CHECK_NAME(glutGameModeGet);
#endif /* !defined(_WIN32_WCE) */ #endif /* !defined(_WIN32_WCE) */
/* freeglut extensions */ /* freeglut extensions */
CHECK_NAME(glutMainLoopEvent); CHECK_NAME(glutMainLoopEvent);
CHECK_NAME(glutLeaveMainLoop); CHECK_NAME(glutLeaveMainLoop);
CHECK_NAME(glutCloseFunc); CHECK_NAME(glutCloseFunc);
CHECK_NAME(glutWMCloseFunc); CHECK_NAME(glutWMCloseFunc);
CHECK_NAME(glutMenuDestroyFunc); CHECK_NAME(glutMenuDestroyFunc);
CHECK_NAME(glutFullScreenToggle); CHECK_NAME(glutFullScreenToggle);
CHECK_NAME(glutLeaveFullScreen); CHECK_NAME(glutLeaveFullScreen);
CHECK_NAME(glutSetOption); CHECK_NAME(glutSetOption);
CHECK_NAME(glutGetModeValues); CHECK_NAME(glutGetModeValues);
CHECK_NAME(glutSetWindowData); CHECK_NAME(glutSetWindowData);
CHECK_NAME(glutGetWindowData); CHECK_NAME(glutGetWindowData);
CHECK_NAME(glutSetMenuData); CHECK_NAME(glutSetMenuData);
CHECK_NAME(glutGetMenuData); CHECK_NAME(glutGetMenuData);
CHECK_NAME(glutBitmapHeight); CHECK_NAME(glutBitmapHeight);
CHECK_NAME(glutStrokeHeight); CHECK_NAME(glutStrokeHeight);
CHECK_NAME(glutBitmapString); CHECK_NAME(glutBitmapString);
CHECK_NAME(glutStrokeString); CHECK_NAME(glutStrokeString);
CHECK_NAME(glutWireRhombicDodecahedron); CHECK_NAME(glutWireRhombicDodecahedron);
CHECK_NAME(glutSolidRhombicDodecahedron); CHECK_NAME(glutSolidRhombicDodecahedron);
CHECK_NAME(glutWireSierpinskiSponge); CHECK_NAME(glutWireSierpinskiSponge);
CHECK_NAME(glutSolidSierpinskiSponge); CHECK_NAME(glutSolidSierpinskiSponge);
CHECK_NAME(glutWireCylinder); CHECK_NAME(glutWireCylinder);
CHECK_NAME(glutSolidCylinder); CHECK_NAME(glutSolidCylinder);
CHECK_NAME(glutGetProcAddress); CHECK_NAME(glutGetProcAddress);
CHECK_NAME(glutMouseWheelFunc); CHECK_NAME(glutMouseWheelFunc);
CHECK_NAME(glutJoystickGetNumAxes); CHECK_NAME(glutJoystickGetNumAxes);
CHECK_NAME(glutJoystickGetNumButtons); CHECK_NAME(glutJoystickGetNumButtons);
CHECK_NAME(glutJoystickNotWorking); CHECK_NAME(glutJoystickNotWorking);
CHECK_NAME(glutJoystickGetDeadBand); CHECK_NAME(glutJoystickGetDeadBand);
CHECK_NAME(glutJoystickSetDeadBand); CHECK_NAME(glutJoystickSetDeadBand);
CHECK_NAME(glutJoystickGetSaturation); CHECK_NAME(glutJoystickGetSaturation);
CHECK_NAME(glutJoystickSetSaturation); CHECK_NAME(glutJoystickSetSaturation);
CHECK_NAME(glutJoystickSetMinRange); CHECK_NAME(glutJoystickSetMinRange);
CHECK_NAME(glutJoystickSetMaxRange); CHECK_NAME(glutJoystickSetMaxRange);
CHECK_NAME(glutJoystickSetCenter); CHECK_NAME(glutJoystickSetCenter);
CHECK_NAME(glutJoystickGetMinRange); CHECK_NAME(glutJoystickGetMinRange);
CHECK_NAME(glutJoystickGetMaxRange); CHECK_NAME(glutJoystickGetMaxRange);
CHECK_NAME(glutJoystickGetCenter); CHECK_NAME(glutJoystickGetCenter);
CHECK_NAME(glutInitContextVersion); CHECK_NAME(glutInitContextVersion);
CHECK_NAME(glutInitContextFlags); CHECK_NAME(glutInitContextFlags);
CHECK_NAME(glutInitContextProfile); CHECK_NAME(glutInitContextProfile);
CHECK_NAME(glutInitErrorFunc); CHECK_NAME(glutInitErrorFunc);
CHECK_NAME(glutInitWarningFunc); CHECK_NAME(glutInitWarningFunc);
#undef CHECK_NAME #undef CHECK_NAME
return NULL; return NULL;
} }
SFG_Proc fghGetProcAddress( const char *procName ) SFG_Proc fghGetProcAddress( const char *procName )
{ {
#if TARGET_HOST_MS_WINDOWS #if TARGET_HOST_MS_WINDOWS
return (SFG_Proc)wglGetProcAddress( ( LPCSTR )procName ); return (SFG_Proc)wglGetProcAddress( ( LPCSTR )procName );
#elif TARGET_HOST_POSIX_X11 && defined( GLX_ARB_get_proc_address ) #elif TARGET_HOST_POSIX_X11 && defined( GLX_ARB_get_proc_address )
return (SFG_Proc)glXGetProcAddressARB( ( const GLubyte * )procName ); return (SFG_Proc)glXGetProcAddressARB( ( const GLubyte * )procName );
#else #else
return NULL; return NULL;
#endif #endif
} }
GLUTproc FGAPIENTRY GLUTproc FGAPIENTRY
glutGetProcAddress( const char *procName ) glutGetProcAddress( const char *procName )
{ {
GLUTproc p; GLUTproc p;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGetProcAddress" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGetProcAddress" );
/* Try GLUT functions first, then core GL functions */ /* Try GLUT functions first, then core GL functions */
p = fghGetGLUTProcAddress( procName ); p = fghGetGLUTProcAddress( procName );
return ( p != NULL ) ? p : fghGetProcAddress( procName ); return ( p != NULL ) ? p : fghGetProcAddress( procName );
} }

View File

@ -1,384 +1,384 @@
/* /*
* freeglut_font.c * freeglut_font.c
* *
* Bitmap and stroke fonts displaying. * Bitmap and stroke fonts displaying.
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Thu Dec 16 1999 * Creation date: Thu Dec 16 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
/* /*
* TODO BEFORE THE STABLE RELEASE: * TODO BEFORE THE STABLE RELEASE:
* *
* Test things out ... * Test things out ...
*/ */
/* -- IMPORT DECLARATIONS -------------------------------------------------- */ /* -- IMPORT DECLARATIONS -------------------------------------------------- */
/* /*
* These are the font faces defined in freeglut_font_data.c file: * These are the font faces defined in freeglut_font_data.c file:
*/ */
extern SFG_Font fgFontFixed8x13; extern SFG_Font fgFontFixed8x13;
extern SFG_Font fgFontFixed9x15; extern SFG_Font fgFontFixed9x15;
extern SFG_Font fgFontHelvetica10; extern SFG_Font fgFontHelvetica10;
extern SFG_Font fgFontHelvetica12; extern SFG_Font fgFontHelvetica12;
extern SFG_Font fgFontHelvetica18; extern SFG_Font fgFontHelvetica18;
extern SFG_Font fgFontTimesRoman10; extern SFG_Font fgFontTimesRoman10;
extern SFG_Font fgFontTimesRoman24; extern SFG_Font fgFontTimesRoman24;
extern SFG_StrokeFont fgStrokeRoman; extern SFG_StrokeFont fgStrokeRoman;
extern SFG_StrokeFont fgStrokeMonoRoman; extern SFG_StrokeFont fgStrokeMonoRoman;
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
/* /*
* Matches a font ID with a SFG_Font structure pointer. * Matches a font ID with a SFG_Font structure pointer.
* This was changed to match the GLUT header style. * This was changed to match the GLUT header style.
*/ */
static SFG_Font* fghFontByID( void* font ) static SFG_Font* fghFontByID( void* font )
{ {
if( font == GLUT_BITMAP_8_BY_13 ) if( font == GLUT_BITMAP_8_BY_13 )
return &fgFontFixed8x13; return &fgFontFixed8x13;
if( font == GLUT_BITMAP_9_BY_15 ) if( font == GLUT_BITMAP_9_BY_15 )
return &fgFontFixed9x15; return &fgFontFixed9x15;
if( font == GLUT_BITMAP_HELVETICA_10 ) if( font == GLUT_BITMAP_HELVETICA_10 )
return &fgFontHelvetica10; return &fgFontHelvetica10;
if( font == GLUT_BITMAP_HELVETICA_12 ) if( font == GLUT_BITMAP_HELVETICA_12 )
return &fgFontHelvetica12; return &fgFontHelvetica12;
if( font == GLUT_BITMAP_HELVETICA_18 ) if( font == GLUT_BITMAP_HELVETICA_18 )
return &fgFontHelvetica18; return &fgFontHelvetica18;
if( font == GLUT_BITMAP_TIMES_ROMAN_10 ) if( font == GLUT_BITMAP_TIMES_ROMAN_10 )
return &fgFontTimesRoman10; return &fgFontTimesRoman10;
if( font == GLUT_BITMAP_TIMES_ROMAN_24 ) if( font == GLUT_BITMAP_TIMES_ROMAN_24 )
return &fgFontTimesRoman24; return &fgFontTimesRoman24;
fgWarning( "font 0x%08x not found", font ); fgWarning( "font 0x%08x not found", font );
return 0; return 0;
} }
/* /*
* Matches a font ID with a SFG_StrokeFont structure pointer. * Matches a font ID with a SFG_StrokeFont structure pointer.
* This was changed to match the GLUT header style. * This was changed to match the GLUT header style.
*/ */
static SFG_StrokeFont* fghStrokeByID( void* font ) static SFG_StrokeFont* fghStrokeByID( void* font )
{ {
if( font == GLUT_STROKE_ROMAN ) if( font == GLUT_STROKE_ROMAN )
return &fgStrokeRoman; return &fgStrokeRoman;
if( font == GLUT_STROKE_MONO_ROMAN ) if( font == GLUT_STROKE_MONO_ROMAN )
return &fgStrokeMonoRoman; return &fgStrokeMonoRoman;
fgWarning( "stroke font 0x%08x not found", font ); fgWarning( "stroke font 0x%08x not found", font );
return 0; return 0;
} }
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
/* /*
* Draw a bitmap character * Draw a bitmap character
*/ */
void FGAPIENTRY glutBitmapCharacter( void* fontID, int character ) void FGAPIENTRY glutBitmapCharacter( void* fontID, int character )
{ {
const GLubyte* face; const GLubyte* face;
SFG_Font* font; SFG_Font* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapCharacter" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapCharacter" );
font = fghFontByID( fontID ); font = fghFontByID( fontID );
freeglut_return_if_fail( ( character >= 1 )&&( character < 256 ) ); freeglut_return_if_fail( ( character >= 1 )&&( character < 256 ) );
freeglut_return_if_fail( font ); freeglut_return_if_fail( font );
/* /*
* Find the character we want to draw (???) * Find the character we want to draw (???)
*/ */
face = font->Characters[ character ]; face = font->Characters[ character ];
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT ); glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_FALSE ); glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_FALSE );
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE ); glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE );
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
glPixelStorei( GL_UNPACK_SKIP_ROWS, 0 ); glPixelStorei( GL_UNPACK_SKIP_ROWS, 0 );
glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0 ); glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0 );
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
glBitmap( glBitmap(
face[ 0 ], font->Height, /* The bitmap's width and height */ face[ 0 ], font->Height, /* The bitmap's width and height */
font->xorig, font->yorig, /* The origin in the font glyph */ font->xorig, font->yorig, /* The origin in the font glyph */
( float )( face[ 0 ] ), 0.0, /* The raster advance -- inc. x,y */ ( float )( face[ 0 ] ), 0.0, /* The raster advance -- inc. x,y */
( face + 1 ) /* The packed bitmap data... */ ( face + 1 ) /* The packed bitmap data... */
); );
glPopClientAttrib( ); glPopClientAttrib( );
} }
void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string ) void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string )
{ {
unsigned char c; unsigned char c;
float x = 0.0f ; float x = 0.0f ;
SFG_Font* font; SFG_Font* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapString" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapString" );
font = fghFontByID( fontID ); font = fghFontByID( fontID );
freeglut_return_if_fail( font ); freeglut_return_if_fail( font );
if ( !string || ! *string ) if ( !string || ! *string )
return; return;
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT ); glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_FALSE ); glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_FALSE );
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE ); glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE );
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
glPixelStorei( GL_UNPACK_SKIP_ROWS, 0 ); glPixelStorei( GL_UNPACK_SKIP_ROWS, 0 );
glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0 ); glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0 );
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
/* /*
* Step through the string, drawing each character. * Step through the string, drawing each character.
* A newline will simply translate the next character's insertion * A newline will simply translate the next character's insertion
* point back to the start of the line and down one line. * point back to the start of the line and down one line.
*/ */
while( ( c = *string++) ) while( ( c = *string++) )
if( c == '\n' ) if( c == '\n' )
{ {
glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL ); glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL );
x = 0.0f; x = 0.0f;
} }
else /* Not an EOL, draw the bitmap character */ else /* Not an EOL, draw the bitmap character */
{ {
const GLubyte* face = font->Characters[ c ]; const GLubyte* face = font->Characters[ c ];
glBitmap( glBitmap(
face[ 0 ], font->Height, /* Bitmap's width and height */ face[ 0 ], font->Height, /* Bitmap's width and height */
font->xorig, font->yorig, /* The origin in the font glyph */ font->xorig, font->yorig, /* The origin in the font glyph */
( float )( face[ 0 ] ), 0.0, /* The raster advance; inc. x,y */ ( float )( face[ 0 ] ), 0.0, /* The raster advance; inc. x,y */
( face + 1 ) /* The packed bitmap data... */ ( face + 1 ) /* The packed bitmap data... */
); );
x += ( float )( face[ 0 ] ); x += ( float )( face[ 0 ] );
} }
glPopClientAttrib( ); glPopClientAttrib( );
} }
/* /*
* Returns the width in pixels of a font's character * Returns the width in pixels of a font's character
*/ */
int FGAPIENTRY glutBitmapWidth( void* fontID, int character ) int FGAPIENTRY glutBitmapWidth( void* fontID, int character )
{ {
SFG_Font* font; SFG_Font* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapWidth" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapWidth" );
font = fghFontByID( fontID ); font = fghFontByID( fontID );
freeglut_return_val_if_fail( character > 0 && character < 256, 0 ); freeglut_return_val_if_fail( character > 0 && character < 256, 0 );
freeglut_return_val_if_fail( font, 0 ); freeglut_return_val_if_fail( font, 0 );
return *( font->Characters[ character ] ); return *( font->Characters[ character ] );
} }
/* /*
* Return the width of a string drawn using a bitmap font * Return the width of a string drawn using a bitmap font
*/ */
int FGAPIENTRY glutBitmapLength( void* fontID, const unsigned char* string ) int FGAPIENTRY glutBitmapLength( void* fontID, const unsigned char* string )
{ {
unsigned char c; unsigned char c;
int length = 0, this_line_length = 0; int length = 0, this_line_length = 0;
SFG_Font* font; SFG_Font* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapLength" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapLength" );
font = fghFontByID( fontID ); font = fghFontByID( fontID );
freeglut_return_val_if_fail( font, 0 ); freeglut_return_val_if_fail( font, 0 );
if ( !string || ! *string ) if ( !string || ! *string )
return 0; return 0;
while( ( c = *string++) ) while( ( c = *string++) )
{ {
if( c != '\n' )/* Not an EOL, increment length of line */ if( c != '\n' )/* Not an EOL, increment length of line */
this_line_length += *( font->Characters[ c ]); this_line_length += *( font->Characters[ c ]);
else /* EOL; reset the length of this line */ else /* EOL; reset the length of this line */
{ {
if( length < this_line_length ) if( length < this_line_length )
length = this_line_length; length = this_line_length;
this_line_length = 0; this_line_length = 0;
} }
} }
if ( length < this_line_length ) if ( length < this_line_length )
length = this_line_length; length = this_line_length;
return length; return length;
} }
/* /*
* Returns the height of a bitmap font * Returns the height of a bitmap font
*/ */
int FGAPIENTRY glutBitmapHeight( void* fontID ) int FGAPIENTRY glutBitmapHeight( void* fontID )
{ {
SFG_Font* font; SFG_Font* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapHeight" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutBitmapHeight" );
font = fghFontByID( fontID ); font = fghFontByID( fontID );
freeglut_return_val_if_fail( font, 0 ); freeglut_return_val_if_fail( font, 0 );
return font->Height; return font->Height;
} }
/* /*
* Draw a stroke character * Draw a stroke character
*/ */
void FGAPIENTRY glutStrokeCharacter( void* fontID, int character ) void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
{ {
const SFG_StrokeChar *schar; const SFG_StrokeChar *schar;
const SFG_StrokeStrip *strip; const SFG_StrokeStrip *strip;
int i, j; int i, j;
SFG_StrokeFont* font; SFG_StrokeFont* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeCharacter" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeCharacter" );
font = fghStrokeByID( fontID ); font = fghStrokeByID( fontID );
freeglut_return_if_fail( character >= 0 ); freeglut_return_if_fail( character >= 0 );
freeglut_return_if_fail( character < font->Quantity ); freeglut_return_if_fail( character < font->Quantity );
freeglut_return_if_fail( font ); freeglut_return_if_fail( font );
schar = font->Characters[ character ]; schar = font->Characters[ character ];
freeglut_return_if_fail( schar ); freeglut_return_if_fail( schar );
strip = schar->Strips; strip = schar->Strips;
for( i = 0; i < schar->Number; i++, strip++ ) for( i = 0; i < schar->Number; i++, strip++ )
{ {
glBegin( GL_LINE_STRIP ); glBegin( GL_LINE_STRIP );
for( j = 0; j < strip->Number; j++ ) for( j = 0; j < strip->Number; j++ )
glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y ); glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
glEnd( ); glEnd( );
glBegin( GL_POINTS ); glBegin( GL_POINTS );
for( j = 0; j < strip->Number; j++ ) for( j = 0; j < strip->Number; j++ )
glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y ); glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
glEnd( ); glEnd( );
} }
glTranslatef( schar->Right, 0.0, 0.0 ); glTranslatef( schar->Right, 0.0, 0.0 );
} }
void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string ) void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string )
{ {
unsigned char c; unsigned char c;
int i, j; int i, j;
float length = 0.0; float length = 0.0;
SFG_StrokeFont* font; SFG_StrokeFont* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeString" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeString" );
font = fghStrokeByID( fontID ); font = fghStrokeByID( fontID );
freeglut_return_if_fail( font ); freeglut_return_if_fail( font );
if ( !string || ! *string ) if ( !string || ! *string )
return; return;
/* /*
* Step through the string, drawing each character. * Step through the string, drawing each character.
* A newline will simply translate the next character's insertion * A newline will simply translate the next character's insertion
* point back to the start of the line and down one line. * point back to the start of the line and down one line.
*/ */
while( ( c = *string++) ) while( ( c = *string++) )
if( c < font->Quantity ) if( c < font->Quantity )
{ {
if( c == '\n' ) if( c == '\n' )
{ {
glTranslatef ( -length, -( float )( font->Height ), 0.0 ); glTranslatef ( -length, -( float )( font->Height ), 0.0 );
length = 0.0; length = 0.0;
} }
else /* Not an EOL, draw the bitmap character */ else /* Not an EOL, draw the bitmap character */
{ {
const SFG_StrokeChar *schar = font->Characters[ c ]; const SFG_StrokeChar *schar = font->Characters[ c ];
if( schar ) if( schar )
{ {
const SFG_StrokeStrip *strip = schar->Strips; const SFG_StrokeStrip *strip = schar->Strips;
for( i = 0; i < schar->Number; i++, strip++ ) for( i = 0; i < schar->Number; i++, strip++ )
{ {
glBegin( GL_LINE_STRIP ); glBegin( GL_LINE_STRIP );
for( j = 0; j < strip->Number; j++ ) for( j = 0; j < strip->Number; j++ )
glVertex2f( strip->Vertices[ j ].X, glVertex2f( strip->Vertices[ j ].X,
strip->Vertices[ j ].Y); strip->Vertices[ j ].Y);
glEnd( ); glEnd( );
} }
length += schar->Right; length += schar->Right;
glTranslatef( schar->Right, 0.0, 0.0 ); glTranslatef( schar->Right, 0.0, 0.0 );
} }
} }
} }
} }
/* /*
* Return the width in pixels of a stroke character * Return the width in pixels of a stroke character
*/ */
int FGAPIENTRY glutStrokeWidth( void* fontID, int character ) int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
{ {
const SFG_StrokeChar *schar; const SFG_StrokeChar *schar;
SFG_StrokeFont* font; SFG_StrokeFont* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeWidth" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeWidth" );
font = fghStrokeByID( fontID ); font = fghStrokeByID( fontID );
freeglut_return_val_if_fail( ( character >= 0 ) && freeglut_return_val_if_fail( ( character >= 0 ) &&
( character < font->Quantity ), ( character < font->Quantity ),
0 0
); );
freeglut_return_val_if_fail( font, 0 ); freeglut_return_val_if_fail( font, 0 );
schar = font->Characters[ character ]; schar = font->Characters[ character ];
freeglut_return_val_if_fail( schar, 0 ); freeglut_return_val_if_fail( schar, 0 );
return ( int )( schar->Right + 0.5 ); return ( int )( schar->Right + 0.5 );
} }
/* /*
* Return the width of a string drawn using a stroke font * Return the width of a string drawn using a stroke font
*/ */
int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string ) int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string )
{ {
unsigned char c; unsigned char c;
float length = 0.0; float length = 0.0;
float this_line_length = 0.0; float this_line_length = 0.0;
SFG_StrokeFont* font; SFG_StrokeFont* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeLength" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeLength" );
font = fghStrokeByID( fontID ); font = fghStrokeByID( fontID );
freeglut_return_val_if_fail( font, 0 ); freeglut_return_val_if_fail( font, 0 );
if ( !string || ! *string ) if ( !string || ! *string )
return 0; return 0;
while( ( c = *string++) ) while( ( c = *string++) )
if( c < font->Quantity ) if( c < font->Quantity )
{ {
if( c == '\n' ) /* EOL; reset the length of this line */ if( c == '\n' ) /* EOL; reset the length of this line */
{ {
if( length < this_line_length ) if( length < this_line_length )
length = this_line_length; length = this_line_length;
this_line_length = 0.0; this_line_length = 0.0;
} }
else /* Not an EOL, increment the length of this line */ else /* Not an EOL, increment the length of this line */
{ {
const SFG_StrokeChar *schar = font->Characters[ c ]; const SFG_StrokeChar *schar = font->Characters[ c ];
if( schar ) if( schar )
this_line_length += schar->Right; this_line_length += schar->Right;
} }
} }
if( length < this_line_length ) if( length < this_line_length )
length = this_line_length; length = this_line_length;
return( int )( length + 0.5 ); return( int )( length + 0.5 );
} }
/* /*
* Returns the height of a stroke font * Returns the height of a stroke font
*/ */
GLfloat FGAPIENTRY glutStrokeHeight( void* fontID ) GLfloat FGAPIENTRY glutStrokeHeight( void* fontID )
{ {
SFG_StrokeFont* font; SFG_StrokeFont* font;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeHeight" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutStrokeHeight" );
font = fghStrokeByID( fontID ); font = fghStrokeByID( fontID );
freeglut_return_val_if_fail( font, 0.0 ); freeglut_return_val_if_fail( font, 0.0 );
return font->Height; return font->Height;
} }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,108 +1,108 @@
/* /*
* freeglut_glutfont_definitions.c * freeglut_glutfont_definitions.c
* *
* Bitmap and stroke fonts displaying. * Bitmap and stroke fonts displaying.
* *
* Copyright (c) 2003 Stephen J. Baker (whether he wants it or not). * Copyright (c) 2003 Stephen J. Baker (whether he wants it or not).
* All Rights Reserved. * All Rights Reserved.
* Written by John F. Fay <fayjf@sourceforge.net>, who releases the * Written by John F. Fay <fayjf@sourceforge.net>, who releases the
* copyright over to the "freeglut" project lead. * copyright over to the "freeglut" project lead.
* Creation date: Mon July 21 2003 * Creation date: Mon July 21 2003
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
/* /*
* This file is necessary for the *nix version of "freeglut" because the * This file is necessary for the *nix version of "freeglut" because the
* original GLUT defined its font variables in rather an unusual way. * original GLUT defined its font variables in rather an unusual way.
* Publicly, in "glut.h", they were defined as "void *". Privately, * Publicly, in "glut.h", they were defined as "void *". Privately,
* in one of the source code files, they were defined as pointers to a * in one of the source code files, they were defined as pointers to a
* structure. Most compilers and linkers are satisfied with the "void *" * structure. Most compilers and linkers are satisfied with the "void *"
* and don't go any farther, but some of them balked. In particular, * and don't go any farther, but some of them balked. In particular,
* when compiling with "freeglut" and then trying to run using the GLUT * when compiling with "freeglut" and then trying to run using the GLUT
* ".so" library, some of them would give an error. So we are having to * ".so" library, some of them would give an error. So we are having to
* create this file to define the variables as pointers to an unusual * create this file to define the variables as pointers to an unusual
* structure to match GLUT. * structure to match GLUT.
*/ */
/* /*
* freeglut_internal.h uses some GL types, but including the GL header portably * freeglut_internal.h uses some GL types, but including the GL header portably
* is a bit tricky, so we include freeglut_std.h here, which contains the * is a bit tricky, so we include freeglut_std.h here, which contains the
* necessary machinery. But this poses another problem, caused by the ugly * necessary machinery. But this poses another problem, caused by the ugly
* original defintion of the font constants in "classic" GLUT: They are defined * original defintion of the font constants in "classic" GLUT: They are defined
* as void* externally, so we move them temporarily out of the way by AN EXTREME * as void* externally, so we move them temporarily out of the way by AN EXTREME
* CPP HACK. * CPP HACK.
*/ */
#define glutStrokeRoman glutStrokeRomanIGNOREME #define glutStrokeRoman glutStrokeRomanIGNOREME
#define glutStrokeMonoRoman glutStrokeMonoRomanIGNOREME #define glutStrokeMonoRoman glutStrokeMonoRomanIGNOREME
#define glutBitmap9By15 glutBitmap9By15IGNOREME #define glutBitmap9By15 glutBitmap9By15IGNOREME
#define glutBitmap8By13 glutBitmap8By13IGNOREME #define glutBitmap8By13 glutBitmap8By13IGNOREME
#define glutBitmapTimesRoman10 glutBitmapTimesRoman10IGNOREME #define glutBitmapTimesRoman10 glutBitmapTimesRoman10IGNOREME
#define glutBitmapTimesRoman24 glutBitmapTimesRoman24IGNOREME #define glutBitmapTimesRoman24 glutBitmapTimesRoman24IGNOREME
#define glutBitmapHelvetica10 glutBitmapHelvetica10IGNOREME #define glutBitmapHelvetica10 glutBitmapHelvetica10IGNOREME
#define glutBitmapHelvetica12 glutBitmapHelvetica12IGNOREME #define glutBitmapHelvetica12 glutBitmapHelvetica12IGNOREME
#define glutBitmapHelvetica18 glutBitmapHelvetica18IGNOREME #define glutBitmapHelvetica18 glutBitmapHelvetica18IGNOREME
#include <GL/freeglut_std.h> #include <GL/freeglut_std.h>
#undef glutStrokeRoman #undef glutStrokeRoman
#undef glutStrokeMonoRoman #undef glutStrokeMonoRoman
#undef glutBitmap9By15 #undef glutBitmap9By15
#undef glutBitmap8By13 #undef glutBitmap8By13
#undef glutBitmapTimesRoman10 #undef glutBitmapTimesRoman10
#undef glutBitmapTimesRoman24 #undef glutBitmapTimesRoman24
#undef glutBitmapHelvetica10 #undef glutBitmapHelvetica10
#undef glutBitmapHelvetica12 #undef glutBitmapHelvetica12
#undef glutBitmapHelvetica18 #undef glutBitmapHelvetica18
#include "freeglut_internal.h" #include "freeglut_internal.h"
#if TARGET_HOST_POSIX_X11 #if TARGET_HOST_POSIX_X11
struct freeglutStrokeFont struct freeglutStrokeFont
{ {
const char *name ; const char *name ;
int num_chars ; int num_chars ;
void *ch ; void *ch ;
float top ; float top ;
float bottom ; float bottom ;
}; };
struct freeglutBitmapFont struct freeglutBitmapFont
{ {
const char *name ; const char *name ;
const int num_chars ; const int num_chars ;
const int first ; const int first ;
const void *ch ; const void *ch ;
}; };
struct freeglutStrokeFont glutStrokeRoman ; struct freeglutStrokeFont glutStrokeRoman ;
struct freeglutStrokeFont glutStrokeMonoRoman ; struct freeglutStrokeFont glutStrokeMonoRoman ;
struct freeglutBitmapFont glutBitmap9By15 ; struct freeglutBitmapFont glutBitmap9By15 ;
struct freeglutBitmapFont glutBitmap8By13 ; struct freeglutBitmapFont glutBitmap8By13 ;
struct freeglutBitmapFont glutBitmapTimesRoman10 ; struct freeglutBitmapFont glutBitmapTimesRoman10 ;
struct freeglutBitmapFont glutBitmapTimesRoman24 ; struct freeglutBitmapFont glutBitmapTimesRoman24 ;
struct freeglutBitmapFont glutBitmapHelvetica10 ; struct freeglutBitmapFont glutBitmapHelvetica10 ;
struct freeglutBitmapFont glutBitmapHelvetica12 ; struct freeglutBitmapFont glutBitmapHelvetica12 ;
struct freeglutBitmapFont glutBitmapHelvetica18 ; struct freeglutBitmapFont glutBitmapHelvetica18 ;
#endif #endif

View File

@ -1,378 +1,378 @@
/* /*
* freeglut_input_devices.c * freeglut_input_devices.c
* *
* Handles miscellaneous input devices via direct serial-port access. * Handles miscellaneous input devices via direct serial-port access.
* Proper X11 XInput device support is not yet supported. * Proper X11 XInput device support is not yet supported.
* Also lacks Mac support. * Also lacks Mac support.
* *
* Written by Joe Krahn <krahn@niehs.nih.gov> 2005 * Written by Joe Krahn <krahn@niehs.nih.gov> 2005
* *
* Copyright (c) 2005 Stephen J. Baker. All Rights Reserved. * Copyright (c) 2005 Stephen J. Baker. All Rights Reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA OR STEPHEN J. BAKER BE LIABLE FOR ANY CLAIM, DAMAGES OR * PAWEL W. OLSZTA OR STEPHEN J. BAKER BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
#if TARGET_HOST_POSIX_X11 #if TARGET_HOST_POSIX_X11
#ifdef HAVE_ERRNO_H #ifdef HAVE_ERRNO_H
#include <errno.h> #include <errno.h>
#endif #endif
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <termios.h> #include <termios.h>
#include <fcntl.h> #include <fcntl.h>
typedef struct { typedef struct {
int fd; int fd;
struct termios termio, termio_save; struct termios termio, termio_save;
} SERIALPORT; } SERIALPORT;
#elif TARGET_HOST_MS_WINDOWS #elif TARGET_HOST_MS_WINDOWS
#include <sys/types.h> #include <sys/types.h>
#include <winbase.h> #include <winbase.h>
typedef struct { typedef struct {
HANDLE fh; HANDLE fh;
COMMTIMEOUTS timeouts_save; COMMTIMEOUTS timeouts_save;
DCB dcb_save; DCB dcb_save;
} SERIALPORT; } SERIALPORT;
#endif #endif
/********************* Dialbox definitions ***********************/ /********************* Dialbox definitions ***********************/
#define DIAL_NUM_VALUATORS 8 #define DIAL_NUM_VALUATORS 8
/* dial parser state machine states */ /* dial parser state machine states */
#define DIAL_NEW (-1) #define DIAL_NEW (-1)
#define DIAL_WHICH_DEVICE 0 #define DIAL_WHICH_DEVICE 0
#define DIAL_VALUE_HIGH 1 #define DIAL_VALUE_HIGH 1
#define DIAL_VALUE_LOW 2 #define DIAL_VALUE_LOW 2
/* dial/button box commands */ /* dial/button box commands */
#define DIAL_INITIALIZE 0x20 #define DIAL_INITIALIZE 0x20
#define DIAL_SET_LEDS 0x75 #define DIAL_SET_LEDS 0x75
#define DIAL_SET_TEXT 0x61 #define DIAL_SET_TEXT 0x61
#define DIAL_SET_AUTO_DIALS 0x50 #define DIAL_SET_AUTO_DIALS 0x50
#define DIAL_SET_AUTO_DELTA_DIALS 0x51 #define DIAL_SET_AUTO_DELTA_DIALS 0x51
#define DIAL_SET_FILTER 0x53 #define DIAL_SET_FILTER 0x53
#define DIAL_SET_BUTTONS_MOM_TYPE 0x71 #define DIAL_SET_BUTTONS_MOM_TYPE 0x71
#define DIAL_SET_AUTO_MOM_BUTTONS 0x73 #define DIAL_SET_AUTO_MOM_BUTTONS 0x73
#define DIAL_SET_ALL_LEDS 0x4b #define DIAL_SET_ALL_LEDS 0x4b
#define DIAL_CLEAR_ALL_LEDS 0x4c #define DIAL_CLEAR_ALL_LEDS 0x4c
/* dial/button box replies and events */ /* dial/button box replies and events */
#define DIAL_INITIALIZED 0x20 #define DIAL_INITIALIZED 0x20
#define DIAL_BASE 0x30 #define DIAL_BASE 0x30
#define DIAL_DELTA_BASE 0x40 #define DIAL_DELTA_BASE 0x40
#define DIAL_PRESS_BASE 0xc0 #define DIAL_PRESS_BASE 0xc0
#define DIAL_RELEASE_BASE 0xe0 #define DIAL_RELEASE_BASE 0xe0
/* macros to determine reply type */ /* macros to determine reply type */
#define IS_DIAL_EVENT(ch) (((ch)>=DIAL_BASE)&&((ch)<DIAL_BASE+DIAL_NUM_VALUATORS)) #define IS_DIAL_EVENT(ch) (((ch)>=DIAL_BASE)&&((ch)<DIAL_BASE+DIAL_NUM_VALUATORS))
#define IS_KEY_PRESS(ch) (((ch)>=DIAL_PRESS_BASE)&&((ch)<DIAL_PRESS_BASE+DIAL_NUM_BUTTONS)) #define IS_KEY_PRESS(ch) (((ch)>=DIAL_PRESS_BASE)&&((ch)<DIAL_PRESS_BASE+DIAL_NUM_BUTTONS))
#define IS_KEY_RELEASE(ch) (((ch)>=DIAL_RELEASE_BASE)&&((ch)<DIAL_RELEASE_BASE+DIAL_NUM_BUTTONS)) #define IS_KEY_RELEASE(ch) (((ch)>=DIAL_RELEASE_BASE)&&((ch)<DIAL_RELEASE_BASE+DIAL_NUM_BUTTONS))
#define IS_INIT_EVENT(ch) ((ch)==DIAL_INITIALIZED) #define IS_INIT_EVENT(ch) ((ch)==DIAL_INITIALIZED)
/*****************************************************************/ /*****************************************************************/
static SERIALPORT *serial_open ( const char *device ); static SERIALPORT *serial_open ( const char *device );
static void serial_close ( SERIALPORT *port ); static void serial_close ( SERIALPORT *port );
static int serial_getchar ( SERIALPORT *port ); static int serial_getchar ( SERIALPORT *port );
static int serial_putchar ( SERIALPORT *port, unsigned char ch ); static int serial_putchar ( SERIALPORT *port, unsigned char ch );
static void serial_flush ( SERIALPORT *port ); static void serial_flush ( SERIALPORT *port );
static void send_dial_event(int dial, int value); static void send_dial_event(int dial, int value);
static void poll_dials(int id); static void poll_dials(int id);
/* local variables */ /* local variables */
static SERIALPORT *dialbox_port=NULL; static SERIALPORT *dialbox_port=NULL;
/*****************************************************************/ /*****************************************************************/
/* /*
* Implementation for glutDeviceGet(GLUT_HAS_DIAL_AND_BUTTON_BOX) * Implementation for glutDeviceGet(GLUT_HAS_DIAL_AND_BUTTON_BOX)
*/ */
int fgInputDeviceDetect( void ) int fgInputDeviceDetect( void )
{ {
fgInitialiseInputDevices (); fgInitialiseInputDevices ();
if ( !dialbox_port ) if ( !dialbox_port )
return 0; return 0;
if ( !fgState.InputDevsInitialised ) if ( !fgState.InputDevsInitialised )
return 0; return 0;
return 1; return 1;
} }
/* /*
* Try initializing the input device(s) * Try initializing the input device(s)
*/ */
void fgInitialiseInputDevices ( void ) void fgInitialiseInputDevices ( void )
{ {
if( !fgState.InputDevsInitialised ) if( !fgState.InputDevsInitialised )
{ {
const char *dial_device=NULL; const char *dial_device=NULL;
dial_device = getenv ( "GLUT_DIALS_SERIAL" ); dial_device = getenv ( "GLUT_DIALS_SERIAL" );
#if TARGET_HOST_MS_WINDOWS #if TARGET_HOST_MS_WINDOWS
if (!dial_device){ if (!dial_device){
static char devname[256]; static char devname[256];
DWORD size=sizeof(devname); DWORD size=sizeof(devname);
DWORD type = REG_SZ; DWORD type = REG_SZ;
HKEY key; HKEY key;
if (RegOpenKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\FreeGLUT",&key)==ERROR_SUCCESS) { if (RegOpenKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\FreeGLUT",&key)==ERROR_SUCCESS) {
if (RegQueryValueExA(key,"DialboxSerialPort",NULL,&type,(LPBYTE)devname,&size)==ERROR_SUCCESS){ if (RegQueryValueExA(key,"DialboxSerialPort",NULL,&type,(LPBYTE)devname,&size)==ERROR_SUCCESS){
dial_device=devname; dial_device=devname;
} }
RegCloseKey(key); RegCloseKey(key);
} }
} }
#endif #endif
if ( !dial_device ) return; if ( !dial_device ) return;
if ( !( dialbox_port = serial_open ( dial_device ) ) ) return; if ( !( dialbox_port = serial_open ( dial_device ) ) ) return;
serial_putchar(dialbox_port,DIAL_INITIALIZE); serial_putchar(dialbox_port,DIAL_INITIALIZE);
glutTimerFunc ( 10, poll_dials, 0 ); glutTimerFunc ( 10, poll_dials, 0 );
fgState.InputDevsInitialised = GL_TRUE; fgState.InputDevsInitialised = GL_TRUE;
} }
} }
/* /*
* *
*/ */
void fgInputDeviceClose( void ) void fgInputDeviceClose( void )
{ {
if ( fgState.InputDevsInitialised ) if ( fgState.InputDevsInitialised )
{ {
serial_close ( dialbox_port ); serial_close ( dialbox_port );
dialbox_port = NULL; dialbox_port = NULL;
fgState.InputDevsInitialised = GL_FALSE; fgState.InputDevsInitialised = GL_FALSE;
} }
} }
/********************************************************************/ /********************************************************************/
/* Check all windows for dialbox callbacks */ /* Check all windows for dialbox callbacks */
static void fghcbEnumDialCallbacks ( SFG_Window *window, SFG_Enumerator *enumerator ) static void fghcbEnumDialCallbacks ( SFG_Window *window, SFG_Enumerator *enumerator )
{ {
/* Built-in to INVOKE_WCB(): if window->Callbacks[CB_Dials] */ /* Built-in to INVOKE_WCB(): if window->Callbacks[CB_Dials] */
INVOKE_WCB ( *window,Dials, ( ((int*)enumerator->data)[0], ((int*)enumerator->data)[1]) ); INVOKE_WCB ( *window,Dials, ( ((int*)enumerator->data)[0], ((int*)enumerator->data)[1]) );
fgEnumSubWindows ( window, fghcbEnumDialCallbacks, enumerator ); fgEnumSubWindows ( window, fghcbEnumDialCallbacks, enumerator );
} }
static void send_dial_event ( int num, int value ) static void send_dial_event ( int num, int value )
{ {
SFG_Enumerator enumerator; SFG_Enumerator enumerator;
int data[2]; int data[2];
data[0] = num; data[0] = num;
data[1] = value; data[1] = value;
enumerator.found = GL_FALSE; enumerator.found = GL_FALSE;
enumerator.data = data; enumerator.data = data;
fgEnumWindows ( fghcbEnumDialCallbacks, &enumerator ); fgEnumWindows ( fghcbEnumDialCallbacks, &enumerator );
} }
/********************************************************************/ /********************************************************************/
static void poll_dials ( int id ) static void poll_dials ( int id )
{ {
int data; int data;
static int dial_state = DIAL_NEW; static int dial_state = DIAL_NEW;
static int dial_which; static int dial_which;
static int dial_value; static int dial_value;
static int dials[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; static int dials[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
if ( !dialbox_port ) return; if ( !dialbox_port ) return;
while ( (data=serial_getchar(dialbox_port)) != EOF ) while ( (data=serial_getchar(dialbox_port)) != EOF )
{ {
if ( ( dial_state > DIAL_WHICH_DEVICE ) || IS_DIAL_EVENT ( data ) ) if ( ( dial_state > DIAL_WHICH_DEVICE ) || IS_DIAL_EVENT ( data ) )
{ {
switch ( dial_state ) switch ( dial_state )
{ {
case DIAL_WHICH_DEVICE: case DIAL_WHICH_DEVICE:
dial_which = data - DIAL_BASE; dial_which = data - DIAL_BASE;
dial_state++; dial_state++;
break; break;
case DIAL_VALUE_HIGH: case DIAL_VALUE_HIGH:
dial_value = ( data << 8 ); dial_value = ( data << 8 );
dial_state++; dial_state++;
break; break;
case DIAL_VALUE_LOW: case DIAL_VALUE_LOW:
dial_value |= data; dial_value |= data;
if ( dial_value & 0x8000 ) dial_value -= 0x10000; if ( dial_value & 0x8000 ) dial_value -= 0x10000;
dials[dial_which] = dial_value; dials[dial_which] = dial_value;
send_dial_event ( dial_which + 1, dial_value * 360 / 256 ); send_dial_event ( dial_which + 1, dial_value * 360 / 256 );
dial_state = DIAL_WHICH_DEVICE; dial_state = DIAL_WHICH_DEVICE;
break; break;
default: default:
/* error: Impossible state value! */ /* error: Impossible state value! */
break; break;
} }
} }
else if ( data == DIAL_INITIALIZED ) else if ( data == DIAL_INITIALIZED )
{ {
fgState.InputDevsInitialised = GL_TRUE; fgState.InputDevsInitialised = GL_TRUE;
dial_state = DIAL_WHICH_DEVICE; dial_state = DIAL_WHICH_DEVICE;
serial_putchar(dialbox_port,DIAL_SET_AUTO_DIALS); serial_putchar(dialbox_port,DIAL_SET_AUTO_DIALS);
serial_putchar(dialbox_port,0xff); serial_putchar(dialbox_port,0xff);
serial_putchar(dialbox_port,0xff); serial_putchar(dialbox_port,0xff);
} }
else /* Unknown data; try flushing. */ else /* Unknown data; try flushing. */
serial_flush(dialbox_port); serial_flush(dialbox_port);
} }
glutTimerFunc ( 2, poll_dials, 0 ); glutTimerFunc ( 2, poll_dials, 0 );
} }
/******** OS Specific Serial I/O routines *******/ /******** OS Specific Serial I/O routines *******/
#if TARGET_HOST_POSIX_X11 /* ==> Linux/BSD/UNIX POSIX serial I/O */ #if TARGET_HOST_POSIX_X11 /* ==> Linux/BSD/UNIX POSIX serial I/O */
static SERIALPORT *serial_open ( const char *device ) static SERIALPORT *serial_open ( const char *device )
{ {
int fd; int fd;
struct termios termio; struct termios termio;
SERIALPORT *port; SERIALPORT *port;
fd = open(device, O_RDWR | O_NONBLOCK ); fd = open(device, O_RDWR | O_NONBLOCK );
if (fd <0) { if (fd <0) {
perror(device); perror(device);
return NULL; return NULL;
} }
port = malloc(sizeof(SERIALPORT)); port = malloc(sizeof(SERIALPORT));
memset(port, 0, sizeof(SERIALPORT)); memset(port, 0, sizeof(SERIALPORT));
port->fd = fd; port->fd = fd;
/* save current port settings */ /* save current port settings */
tcgetattr(fd,&port->termio_save); tcgetattr(fd,&port->termio_save);
memset(&termio, 0, sizeof(termio)); memset(&termio, 0, sizeof(termio));
termio.c_cflag = CS8 | CREAD | HUPCL ; termio.c_cflag = CS8 | CREAD | HUPCL ;
termio.c_iflag = IGNPAR | IGNBRK ; termio.c_iflag = IGNPAR | IGNBRK ;
termio.c_cc[VTIME] = 0; /* inter-character timer */ termio.c_cc[VTIME] = 0; /* inter-character timer */
termio.c_cc[VMIN] = 1; /* block read until 1 chars received, when blocking I/O */ termio.c_cc[VMIN] = 1; /* block read until 1 chars received, when blocking I/O */
cfsetispeed(&termio, B9600); cfsetispeed(&termio, B9600);
cfsetospeed(&termio, B9600); cfsetospeed(&termio, B9600);
tcsetattr(fd,TCSANOW,&termio); tcsetattr(fd,TCSANOW,&termio);
serial_flush(port); serial_flush(port);
return port; return port;
} }
static void serial_close(SERIALPORT *port) static void serial_close(SERIALPORT *port)
{ {
if (port) if (port)
{ {
/* restore old port settings */ /* restore old port settings */
tcsetattr(port->fd,TCSANOW,&port->termio_save); tcsetattr(port->fd,TCSANOW,&port->termio_save);
close(port->fd); close(port->fd);
free(port); free(port);
} }
} }
static int serial_getchar(SERIALPORT *port) static int serial_getchar(SERIALPORT *port)
{ {
unsigned char ch; unsigned char ch;
if (!port) return EOF; if (!port) return EOF;
if (read(port->fd,&ch,1)) return ch; if (read(port->fd,&ch,1)) return ch;
return EOF; return EOF;
} }
static int serial_putchar(SERIALPORT *port, unsigned char ch){ static int serial_putchar(SERIALPORT *port, unsigned char ch){
if (!port) return 0; if (!port) return 0;
return write(port->fd,&ch,1); return write(port->fd,&ch,1);
} }
static void serial_flush ( SERIALPORT *port ) static void serial_flush ( SERIALPORT *port )
{ {
tcflush ( port->fd, TCIOFLUSH ); tcflush ( port->fd, TCIOFLUSH );
} }
#elif TARGET_HOST_MS_WINDOWS #elif TARGET_HOST_MS_WINDOWS
static SERIALPORT *serial_open(const char *device){ static SERIALPORT *serial_open(const char *device){
HANDLE fh; HANDLE fh;
DCB dcb={sizeof(DCB)}; DCB dcb={sizeof(DCB)};
COMMTIMEOUTS timeouts; COMMTIMEOUTS timeouts;
SERIALPORT *port; SERIALPORT *port;
fh = CreateFile(device,GENERIC_READ|GENERIC_WRITE,0,NULL, fh = CreateFile(device,GENERIC_READ|GENERIC_WRITE,0,NULL,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
if (!fh) return NULL; if (!fh) return NULL;
port = malloc(sizeof(SERIALPORT)); port = malloc(sizeof(SERIALPORT));
ZeroMemory(port, sizeof(SERIALPORT)); ZeroMemory(port, sizeof(SERIALPORT));
port->fh = fh; port->fh = fh;
/* save current port settings */ /* save current port settings */
GetCommState(fh,&port->dcb_save); GetCommState(fh,&port->dcb_save);
GetCommTimeouts(fh,&port->timeouts_save); GetCommTimeouts(fh,&port->timeouts_save);
dcb.DCBlength=sizeof(DCB); dcb.DCBlength=sizeof(DCB);
BuildCommDCB("96,n,8,1",&dcb); BuildCommDCB("96,n,8,1",&dcb);
SetCommState(fh,&dcb); SetCommState(fh,&dcb);
ZeroMemory(&timeouts,sizeof(timeouts)); ZeroMemory(&timeouts,sizeof(timeouts));
timeouts.ReadTotalTimeoutConstant=1; timeouts.ReadTotalTimeoutConstant=1;
timeouts.WriteTotalTimeoutConstant=1; timeouts.WriteTotalTimeoutConstant=1;
SetCommTimeouts(fh,&timeouts); SetCommTimeouts(fh,&timeouts);
serial_flush(port); serial_flush(port);
return port; return port;
} }
static void serial_close(SERIALPORT *port){ static void serial_close(SERIALPORT *port){
if (port){ if (port){
/* restore old port settings */ /* restore old port settings */
SetCommState(port->fh,&port->dcb_save); SetCommState(port->fh,&port->dcb_save);
SetCommTimeouts(port->fh,&port->timeouts_save); SetCommTimeouts(port->fh,&port->timeouts_save);
CloseHandle(port->fh); CloseHandle(port->fh);
free(port); free(port);
} }
} }
static int serial_getchar(SERIALPORT *port){ static int serial_getchar(SERIALPORT *port){
DWORD n; DWORD n;
unsigned char ch; unsigned char ch;
if (!port) return EOF; if (!port) return EOF;
if (!ReadFile(port->fh,&ch,1,&n,NULL)) return EOF; if (!ReadFile(port->fh,&ch,1,&n,NULL)) return EOF;
if (n==1) return ch; if (n==1) return ch;
return EOF; return EOF;
} }
static int serial_putchar(SERIALPORT *port, unsigned char ch){ static int serial_putchar(SERIALPORT *port, unsigned char ch){
DWORD n; DWORD n;
if (!port) return 0; if (!port) return 0;
return WriteFile(port->fh,&ch,1,&n,NULL); return WriteFile(port->fh,&ch,1,&n,NULL);
} }
static void serial_flush ( SERIALPORT *port ) static void serial_flush ( SERIALPORT *port )
{ {
FlushFileBuffers(port->fh); FlushFileBuffers(port->fh);
} }
#endif #endif

View File

@ -1,214 +1,214 @@
/* /*
* freeglut_misc.c * freeglut_misc.c
* *
* Functions that didn't fit anywhere else... * Functions that didn't fit anywhere else...
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Thu Dec 9 1999 * Creation date: Thu Dec 9 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
/* /*
* TODO BEFORE THE STABLE RELEASE: * TODO BEFORE THE STABLE RELEASE:
* *
* glutSetColor() -- * glutSetColor() --
* glutGetColor() -- * glutGetColor() --
* glutCopyColormap() -- * glutCopyColormap() --
* glutSetKeyRepeat() -- this is evil and should be removed from API * glutSetKeyRepeat() -- this is evil and should be removed from API
*/ */
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
/* /*
* This functions checks if an OpenGL extension is supported or not * This functions checks if an OpenGL extension is supported or not
* *
* XXX Wouldn't this be simpler and clearer if we used strtok()? * XXX Wouldn't this be simpler and clearer if we used strtok()?
*/ */
int FGAPIENTRY glutExtensionSupported( const char* extension ) int FGAPIENTRY glutExtensionSupported( const char* extension )
{ {
const char *extensions, *start; const char *extensions, *start;
const size_t len = strlen( extension ); const size_t len = strlen( extension );
/* Make sure there is a current window, and thus a current context available */ /* Make sure there is a current window, and thus a current context available */
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutExtensionSupported" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutExtensionSupported" );
freeglut_return_val_if_fail( fgStructure.CurrentWindow != NULL, 0 ); freeglut_return_val_if_fail( fgStructure.CurrentWindow != NULL, 0 );
if (strchr(extension, ' ')) if (strchr(extension, ' '))
return 0; return 0;
start = extensions = (const char *) glGetString(GL_EXTENSIONS); start = extensions = (const char *) glGetString(GL_EXTENSIONS);
/* XXX consider printing a warning to stderr that there's no current /* XXX consider printing a warning to stderr that there's no current
* rendering context. * rendering context.
*/ */
freeglut_return_val_if_fail( extensions != NULL, 0 ); freeglut_return_val_if_fail( extensions != NULL, 0 );
while (1) { while (1) {
const char *p = strstr(extensions, extension); const char *p = strstr(extensions, extension);
if (!p) if (!p)
return 0; /* not found */ return 0; /* not found */
/* check that the match isn't a super string */ /* check that the match isn't a super string */
if ((p == start || p[-1] == ' ') && (p[len] == ' ' || p[len] == 0)) if ((p == start || p[-1] == ' ') && (p[len] == ' ' || p[len] == 0))
return 1; return 1;
/* skip the false match and continue */ /* skip the false match and continue */
extensions = p + len; extensions = p + len;
} }
return 0 ; return 0 ;
} }
#ifndef GL_INVALID_FRAMEBUFFER_OPERATION #ifndef GL_INVALID_FRAMEBUFFER_OPERATION
#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT #ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT
#define GL_INVALID_FRAMEBUFFER_OPERATION GL_INVALID_FRAMEBUFFER_OPERATION_EXT #define GL_INVALID_FRAMEBUFFER_OPERATION GL_INVALID_FRAMEBUFFER_OPERATION_EXT
#else #else
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
#endif #endif
#endif #endif
#ifndef GL_TABLE_TOO_LARGE #ifndef GL_TABLE_TOO_LARGE
#ifdef GL_TABLE_TOO_LARGE_EXT #ifdef GL_TABLE_TOO_LARGE_EXT
#define GL_TABLE_TOO_LARGE GL_TABLE_TOO_LARGE_EXT #define GL_TABLE_TOO_LARGE GL_TABLE_TOO_LARGE_EXT
#else #else
#define GL_TABLE_TOO_LARGE 0x8031 #define GL_TABLE_TOO_LARGE 0x8031
#endif #endif
#endif #endif
#ifndef GL_TEXTURE_TOO_LARGE #ifndef GL_TEXTURE_TOO_LARGE
#ifdef GL_TEXTURE_TOO_LARGE_EXT #ifdef GL_TEXTURE_TOO_LARGE_EXT
#define GL_TEXTURE_TOO_LARGE GL_TEXTURE_TOO_LARGE_EXT #define GL_TEXTURE_TOO_LARGE GL_TEXTURE_TOO_LARGE_EXT
#else #else
#define GL_TEXTURE_TOO_LARGE 0x8065 #define GL_TEXTURE_TOO_LARGE 0x8065
#endif #endif
#endif #endif
/* /*
* A cut-down local version of gluErrorString to avoid depending on GLU. * A cut-down local version of gluErrorString to avoid depending on GLU.
*/ */
static const char* fghErrorString( GLenum error ) static const char* fghErrorString( GLenum error )
{ {
switch ( error ) { switch ( error ) {
case GL_INVALID_ENUM: return "invalid enumerant"; case GL_INVALID_ENUM: return "invalid enumerant";
case GL_INVALID_VALUE: return "invalid value"; case GL_INVALID_VALUE: return "invalid value";
case GL_INVALID_OPERATION: return "invalid operation"; case GL_INVALID_OPERATION: return "invalid operation";
case GL_STACK_OVERFLOW: return "stack overflow"; case GL_STACK_OVERFLOW: return "stack overflow";
case GL_STACK_UNDERFLOW: return "stack underflow"; case GL_STACK_UNDERFLOW: return "stack underflow";
case GL_OUT_OF_MEMORY: return "out of memory"; case GL_OUT_OF_MEMORY: return "out of memory";
case GL_TABLE_TOO_LARGE: return "table too large"; case GL_TABLE_TOO_LARGE: return "table too large";
case GL_INVALID_FRAMEBUFFER_OPERATION: return "invalid framebuffer operation"; case GL_INVALID_FRAMEBUFFER_OPERATION: return "invalid framebuffer operation";
case GL_TEXTURE_TOO_LARGE: return "texture too large"; case GL_TEXTURE_TOO_LARGE: return "texture too large";
default: return "unknown GL error"; default: return "unknown GL error";
} }
} }
/* /*
* This function reports all the OpenGL errors that happened till now * This function reports all the OpenGL errors that happened till now
*/ */
void FGAPIENTRY glutReportErrors( void ) void FGAPIENTRY glutReportErrors( void )
{ {
GLenum error; GLenum error;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutReportErrors" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutReportErrors" );
while( ( error = glGetError() ) != GL_NO_ERROR ) while( ( error = glGetError() ) != GL_NO_ERROR )
fgWarning( "GL error: %s", fghErrorString( error ) ); fgWarning( "GL error: %s", fghErrorString( error ) );
} }
/* /*
* Control the auto-repeat of keystrokes to the current window * Control the auto-repeat of keystrokes to the current window
*/ */
void FGAPIENTRY glutIgnoreKeyRepeat( int ignore ) void FGAPIENTRY glutIgnoreKeyRepeat( int ignore )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutIgnoreKeyRepeat" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutIgnoreKeyRepeat" );
FREEGLUT_EXIT_IF_NO_WINDOW ( "glutIgnoreKeyRepeat" ); FREEGLUT_EXIT_IF_NO_WINDOW ( "glutIgnoreKeyRepeat" );
fgStructure.CurrentWindow->State.IgnoreKeyRepeat = ignore ? GL_TRUE : GL_FALSE; fgStructure.CurrentWindow->State.IgnoreKeyRepeat = ignore ? GL_TRUE : GL_FALSE;
} }
/* /*
* Set global auto-repeat of keystrokes * Set global auto-repeat of keystrokes
* *
* RepeatMode should be either: * RepeatMode should be either:
* GLUT_KEY_REPEAT_OFF * GLUT_KEY_REPEAT_OFF
* GLUT_KEY_REPEAT_ON * GLUT_KEY_REPEAT_ON
* GLUT_KEY_REPEAT_DEFAULT * GLUT_KEY_REPEAT_DEFAULT
*/ */
void FGAPIENTRY glutSetKeyRepeat( int repeatMode ) void FGAPIENTRY glutSetKeyRepeat( int repeatMode )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetKeyRepeat" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetKeyRepeat" );
switch( repeatMode ) switch( repeatMode )
{ {
case GLUT_KEY_REPEAT_OFF: case GLUT_KEY_REPEAT_OFF:
case GLUT_KEY_REPEAT_ON: case GLUT_KEY_REPEAT_ON:
fgState.KeyRepeat = repeatMode; fgState.KeyRepeat = repeatMode;
break; break;
case GLUT_KEY_REPEAT_DEFAULT: case GLUT_KEY_REPEAT_DEFAULT:
fgState.KeyRepeat = GLUT_KEY_REPEAT_ON; fgState.KeyRepeat = GLUT_KEY_REPEAT_ON;
break; break;
default: default:
fgError ("Invalid glutSetKeyRepeat mode: %d", repeatMode); fgError ("Invalid glutSetKeyRepeat mode: %d", repeatMode);
break; break;
} }
} }
/* /*
* Forces the joystick callback to be executed * Forces the joystick callback to be executed
*/ */
void FGAPIENTRY glutForceJoystickFunc( void ) void FGAPIENTRY glutForceJoystickFunc( void )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutForceJoystickFunc" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutForceJoystickFunc" );
#if !defined(_WIN32_WCE) #if !defined(_WIN32_WCE)
freeglut_return_if_fail( fgStructure.CurrentWindow != NULL ); freeglut_return_if_fail( fgStructure.CurrentWindow != NULL );
freeglut_return_if_fail( FETCH_WCB( *( fgStructure.CurrentWindow ), Joystick ) ); freeglut_return_if_fail( FETCH_WCB( *( fgStructure.CurrentWindow ), Joystick ) );
fgJoystickPollWindow( fgStructure.CurrentWindow ); fgJoystickPollWindow( fgStructure.CurrentWindow );
#endif /* !defined(_WIN32_WCE) */ #endif /* !defined(_WIN32_WCE) */
} }
/* /*
* *
*/ */
void FGAPIENTRY glutSetColor( int nColor, GLfloat red, GLfloat green, GLfloat blue ) void FGAPIENTRY glutSetColor( int nColor, GLfloat red, GLfloat green, GLfloat blue )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetColor" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetColor" );
/* We really need to do something here. */ /* We really need to do something here. */
} }
/* /*
* *
*/ */
GLfloat FGAPIENTRY glutGetColor( int color, int component ) GLfloat FGAPIENTRY glutGetColor( int color, int component )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGetColor" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGetColor" );
/* We really need to do something here. */ /* We really need to do something here. */
return( 0.0f ); return( 0.0f );
} }
/* /*
* *
*/ */
void FGAPIENTRY glutCopyColormap( int window ) void FGAPIENTRY glutCopyColormap( int window )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCopyColormap" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCopyColormap" );
/* We really need to do something here. */ /* We really need to do something here. */
} }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,45 +1,45 @@
/* /*
* freeglut_overlay.c * freeglut_overlay.c
* *
* Overlay management functions (as defined by GLUT API) * Overlay management functions (as defined by GLUT API)
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Thu Dec 16 1999 * Creation date: Thu Dec 16 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
/* /*
* NOTE: functions declared in this file probably will not be implemented. * NOTE: functions declared in this file probably will not be implemented.
*/ */
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
void FGAPIENTRY glutEstablishOverlay( void ) { /* Not implemented */ } void FGAPIENTRY glutEstablishOverlay( void ) { /* Not implemented */ }
void FGAPIENTRY glutRemoveOverlay( void ) { /* Not implemented */ } void FGAPIENTRY glutRemoveOverlay( void ) { /* Not implemented */ }
void FGAPIENTRY glutUseLayer( GLenum layer ) { /* Not implemented */ } void FGAPIENTRY glutUseLayer( GLenum layer ) { /* Not implemented */ }
void FGAPIENTRY glutPostOverlayRedisplay( void ) { /* Not implemented */ } void FGAPIENTRY glutPostOverlayRedisplay( void ) { /* Not implemented */ }
void FGAPIENTRY glutPostWindowOverlayRedisplay( int ID ) { /* Not implemented */ } void FGAPIENTRY glutPostWindowOverlayRedisplay( int ID ) { /* Not implemented */ }
void FGAPIENTRY glutShowOverlay( void ) { /* Not implemented */ } void FGAPIENTRY glutShowOverlay( void ) { /* Not implemented */ }
void FGAPIENTRY glutHideOverlay( void ) { /* Not implemented */ } void FGAPIENTRY glutHideOverlay( void ) { /* Not implemented */ }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,200 +1,200 @@
/* /*
* freeglut_teapot.c * freeglut_teapot.c
* *
* Teapot(tm) rendering code. * Teapot(tm) rendering code.
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Fri Dec 24 1999 * Creation date: Fri Dec 24 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
/* /*
* Original teapot code copyright follows: * Original teapot code copyright follows:
*/ */
/* /*
* (c) Copyright 1993, Silicon Graphics, Inc. * (c) Copyright 1993, Silicon Graphics, Inc.
* *
* ALL RIGHTS RESERVED * ALL RIGHTS RESERVED
* *
* Permission to use, copy, modify, and distribute this software * Permission to use, copy, modify, and distribute this software
* for any purpose and without fee is hereby granted, provided * for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that * that the above copyright notice appear in all copies and that
* both the copyright notice and this permission notice appear in * both the copyright notice and this permission notice appear in
* supporting documentation, and that the name of Silicon * supporting documentation, and that the name of Silicon
* Graphics, Inc. not be used in advertising or publicity * Graphics, Inc. not be used in advertising or publicity
* pertaining to distribution of the software without specific, * pertaining to distribution of the software without specific,
* written prior permission. * written prior permission.
* *
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
* "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR * "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
* OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF * OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO
* EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE * EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE
* ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR * ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, * CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
* INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, * INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
* SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR * SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
* NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY * NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
* OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR * ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
* *
* US Government Users Restricted Rights * US Government Users Restricted Rights
* *
* Use, duplication, or disclosure by the Government is subject to * Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer * (c)(1)(ii) of the Rights in Technical Data and Computer
* Software clause at DFARS 252.227-7013 and/or in similar or * Software clause at DFARS 252.227-7013 and/or in similar or
* successor clauses in the FAR or the DOD or NASA FAR * successor clauses in the FAR or the DOD or NASA FAR
* Supplement. Unpublished-- rights reserved under the copyright * Supplement. Unpublished-- rights reserved under the copyright
* laws of the United States. Contractor/manufacturer is Silicon * laws of the United States. Contractor/manufacturer is Silicon
* Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA * Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA
* 94039-7311. * 94039-7311.
* *
* OpenGL(TM) is a trademark of Silicon Graphics, Inc. * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
#include "freeglut_teapot_data.h" #include "freeglut_teapot_data.h"
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
static void fghTeapot( GLint grid, GLdouble scale, GLenum type ) static void fghTeapot( GLint grid, GLdouble scale, GLenum type )
{ {
#if defined(_WIN32_WCE) #if defined(_WIN32_WCE)
int i, numV=sizeof(strip_vertices)/4, numI=sizeof(strip_normals)/4; int i, numV=sizeof(strip_vertices)/4, numI=sizeof(strip_normals)/4;
#else #else
double p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3]; double p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];
long i, j, k, l; long i, j, k, l;
#endif #endif
glPushAttrib( GL_ENABLE_BIT | GL_EVAL_BIT ); glPushAttrib( GL_ENABLE_BIT | GL_EVAL_BIT );
glEnable( GL_AUTO_NORMAL ); glEnable( GL_AUTO_NORMAL );
glEnable( GL_NORMALIZE ); glEnable( GL_NORMALIZE );
glEnable( GL_MAP2_VERTEX_3 ); glEnable( GL_MAP2_VERTEX_3 );
glEnable( GL_MAP2_TEXTURE_COORD_2 ); glEnable( GL_MAP2_TEXTURE_COORD_2 );
glPushMatrix(); glPushMatrix();
glRotated( 270.0, 1.0, 0.0, 0.0 ); glRotated( 270.0, 1.0, 0.0, 0.0 );
glScaled( 0.5 * scale, 0.5 * scale, 0.5 * scale ); glScaled( 0.5 * scale, 0.5 * scale, 0.5 * scale );
glTranslated( 0.0, 0.0, -1.5 ); glTranslated( 0.0, 0.0, -1.5 );
#if defined(_WIN32_WCE) #if defined(_WIN32_WCE)
glRotated( 90.0, 1.0, 0.0, 0.0 ); glRotated( 90.0, 1.0, 0.0, 0.0 );
glBegin( GL_TRIANGLE_STRIP ); glBegin( GL_TRIANGLE_STRIP );
for( i = 0; i < numV-1; i++ ) for( i = 0; i < numV-1; i++ )
{ {
int vidx = strip_vertices[i], int vidx = strip_vertices[i],
nidx = strip_normals[i]; nidx = strip_normals[i];
if( vidx != -1 ) if( vidx != -1 )
{ {
glNormal3fv( normals[nidx] ); glNormal3fv( normals[nidx] );
glVertex3fv( vertices[vidx] ); glVertex3fv( vertices[vidx] );
} }
else else
{ {
glEnd(); glEnd();
glBegin( GL_TRIANGLE_STRIP ); glBegin( GL_TRIANGLE_STRIP );
} }
} }
glEnd(); glEnd();
#else #else
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
for (j = 0; j < 4; j++) { for (j = 0; j < 4; j++) {
for (k = 0; k < 4; k++) { for (k = 0; k < 4; k++) {
for (l = 0; l < 3; l++) { for (l = 0; l < 3; l++) {
p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l]; q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l];
if (l == 1) if (l == 1)
q[j][k][l] *= -1.0; q[j][k][l] *= -1.0;
if (i < 6) { if (i < 6) {
r[j][k][l] = r[j][k][l] =
cpdata[patchdata[i][j * 4 + (3 - k)]][l]; cpdata[patchdata[i][j * 4 + (3 - k)]][l];
if (l == 0) if (l == 0)
r[j][k][l] *= -1.0; r[j][k][l] *= -1.0;
s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l]; s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
if (l == 0) if (l == 0)
s[j][k][l] *= -1.0; s[j][k][l] *= -1.0;
if (l == 1) if (l == 1)
s[j][k][l] *= -1.0; s[j][k][l] *= -1.0;
} }
} }
} }
} }
glMap2d(GL_MAP2_TEXTURE_COORD_2, 0.0, 1.0, 2, 2, 0.0, 1.0, 4, 2, glMap2d(GL_MAP2_TEXTURE_COORD_2, 0.0, 1.0, 2, 2, 0.0, 1.0, 4, 2,
&tex[0][0][0]); &tex[0][0][0]);
glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4, glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
&p[0][0][0]); &p[0][0][0]);
glMapGrid2d(grid, 0.0, 1.0, grid, 0.0, 1.0); glMapGrid2d(grid, 0.0, 1.0, grid, 0.0, 1.0);
glEvalMesh2(type, 0, grid, 0, grid); glEvalMesh2(type, 0, grid, 0, grid);
glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4, glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
&q[0][0][0]); &q[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid); glEvalMesh2(type, 0, grid, 0, grid);
if (i < 6) { if (i < 6) {
glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4, glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
&r[0][0][0]); &r[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid); glEvalMesh2(type, 0, grid, 0, grid);
glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4, glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, 3, 4, 0.0, 1.0, 12, 4,
&s[0][0][0]); &s[0][0][0]);
glEvalMesh2(type, 0, grid, 0, grid); glEvalMesh2(type, 0, grid, 0, grid);
} }
} }
#endif /* defined(_WIN32_WCE) */ #endif /* defined(_WIN32_WCE) */
glPopMatrix(); glPopMatrix();
glPopAttrib(); glPopAttrib();
} }
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
/* /*
* Renders a beautiful wired teapot... * Renders a beautiful wired teapot...
*/ */
void FGAPIENTRY glutWireTeapot( GLdouble size ) void FGAPIENTRY glutWireTeapot( GLdouble size )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireTeapot" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWireTeapot" );
/* We will use the general teapot rendering code */ /* We will use the general teapot rendering code */
fghTeapot( 10, size, GL_LINE ); fghTeapot( 10, size, GL_LINE );
} }
/* /*
* Renders a beautiful filled teapot... * Renders a beautiful filled teapot...
*/ */
void FGAPIENTRY glutSolidTeapot( GLdouble size ) void FGAPIENTRY glutSolidTeapot( GLdouble size )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidTeapot" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidTeapot" );
/* We will use the general teapot rendering code */ /* We will use the general teapot rendering code */
fghTeapot( 7, size, GL_FILL ); fghTeapot( 7, size, GL_FILL );
} }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,50 +1,50 @@
/* /*
* freeglut_videoresize.c * freeglut_videoresize.c
* *
* Video resize functions (as defined by GLUT API) * Video resize functions (as defined by GLUT API)
* *
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net> * Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Thu Dec 16 1999 * Creation date: Thu Dec 16 1999
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included * The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software. * in all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include "freeglut_internal.h" #include "freeglut_internal.h"
/* /*
* NOTE: functions declared in this file probably will not be implemented. * NOTE: functions declared in this file probably will not be implemented.
*/ */
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */ /* -- INTERFACE FUNCTIONS -------------------------------------------------- */
int FGAPIENTRY glutVideoResizeGet( GLenum eWhat ) { return( 0x00 ); } int FGAPIENTRY glutVideoResizeGet( GLenum eWhat ) { return( 0x00 ); }
void FGAPIENTRY glutSetupVideoResizing( void ) { /* Not implemented */ } void FGAPIENTRY glutSetupVideoResizing( void ) { /* Not implemented */ }
void FGAPIENTRY glutStopVideoResizing( void ) { /* Not implemented */ } void FGAPIENTRY glutStopVideoResizing( void ) { /* Not implemented */ }
void FGAPIENTRY glutVideoResize( int x, int y, int w, int h ) { /* Not implemented */ } void FGAPIENTRY glutVideoResize( int x, int y, int w, int h ) { /* Not implemented */ }
void FGAPIENTRY glutVideoPan( int x, int y, int w, int h ) { /* Not implemented */ } void FGAPIENTRY glutVideoPan( int x, int y, int w, int h ) { /* Not implemented */ }
/*** END OF FILE ***/ /*** END OF FILE ***/

View File

@ -1,155 +1,155 @@
LIBRARY freeglut LIBRARY freeglut
VERSION 2.6 VERSION 2.6
EXPORTS EXPORTS
glutInit glutInit
glutInitWindowPosition glutInitWindowPosition
glutInitWindowSize glutInitWindowSize
glutInitDisplayMode glutInitDisplayMode
glutInitDisplayString glutInitDisplayString
glutMainLoop glutMainLoop
glutMainLoopEvent glutMainLoopEvent
glutLeaveMainLoop glutLeaveMainLoop
glutCreateWindow glutCreateWindow
glutCreateSubWindow glutCreateSubWindow
glutDestroyWindow glutDestroyWindow
glutSetWindow glutSetWindow
glutGetWindow glutGetWindow
glutSetWindowData glutSetWindowData
glutGetWindowData glutGetWindowData
glutSetWindowTitle glutSetWindowTitle
glutSetIconTitle glutSetIconTitle
glutReshapeWindow glutReshapeWindow
glutPositionWindow glutPositionWindow
glutShowWindow glutShowWindow
glutHideWindow glutHideWindow
glutIconifyWindow glutIconifyWindow
glutPushWindow glutPushWindow
glutPopWindow glutPopWindow
glutFullScreen glutFullScreen
glutPostWindowRedisplay glutPostWindowRedisplay
glutPostRedisplay glutPostRedisplay
glutSwapBuffers glutSwapBuffers
glutWarpPointer glutWarpPointer
glutSetCursor glutSetCursor
glutEstablishOverlay glutEstablishOverlay
glutRemoveOverlay glutRemoveOverlay
glutUseLayer glutUseLayer
glutPostOverlayRedisplay glutPostOverlayRedisplay
glutPostWindowOverlayRedisplay glutPostWindowOverlayRedisplay
glutShowOverlay glutShowOverlay
glutHideOverlay glutHideOverlay
glutCreateMenu glutCreateMenu
glutDestroyMenu glutDestroyMenu
glutGetMenu glutGetMenu
glutSetMenu glutSetMenu
glutGetMenuData glutGetMenuData
glutSetMenuData glutSetMenuData
glutAddMenuEntry glutAddMenuEntry
glutAddSubMenu glutAddSubMenu
glutChangeToMenuEntry glutChangeToMenuEntry
glutChangeToSubMenu glutChangeToSubMenu
glutRemoveMenuItem glutRemoveMenuItem
glutAttachMenu glutAttachMenu
glutDetachMenu glutDetachMenu
glutTimerFunc glutTimerFunc
glutIdleFunc glutIdleFunc
glutKeyboardFunc glutKeyboardFunc
glutSpecialFunc glutSpecialFunc
glutReshapeFunc glutReshapeFunc
glutVisibilityFunc glutVisibilityFunc
glutDisplayFunc glutDisplayFunc
glutMouseFunc glutMouseFunc
glutMouseWheelFunc glutMouseWheelFunc
glutMotionFunc glutMotionFunc
glutPassiveMotionFunc glutPassiveMotionFunc
glutEntryFunc glutEntryFunc
glutCloseFunc glutCloseFunc
glutWMCloseFunc glutWMCloseFunc
glutKeyboardUpFunc glutKeyboardUpFunc
glutSpecialUpFunc glutSpecialUpFunc
glutJoystickFunc glutJoystickFunc
glutMenuStateFunc glutMenuStateFunc
glutMenuStatusFunc glutMenuStatusFunc
glutMenuDestroyFunc glutMenuDestroyFunc
glutOverlayDisplayFunc glutOverlayDisplayFunc
glutWindowStatusFunc glutWindowStatusFunc
glutSpaceballMotionFunc glutSpaceballMotionFunc
glutSpaceballRotateFunc glutSpaceballRotateFunc
glutSpaceballButtonFunc glutSpaceballButtonFunc
glutButtonBoxFunc glutButtonBoxFunc
glutDialsFunc glutDialsFunc
glutTabletMotionFunc glutTabletMotionFunc
glutTabletButtonFunc glutTabletButtonFunc
glutSetOption glutSetOption
glutGet glutGet
glutDeviceGet glutDeviceGet
glutGetModifiers glutGetModifiers
glutLayerGet glutLayerGet
glutBitmapCharacter glutBitmapCharacter
glutBitmapWidth glutBitmapWidth
glutStrokeCharacter glutStrokeCharacter
glutStrokeWidth glutStrokeWidth
glutBitmapLength glutBitmapLength
glutStrokeLength glutStrokeLength
glutBitmapHeight glutBitmapHeight
glutStrokeHeight glutStrokeHeight
glutBitmapString glutBitmapString
glutStrokeString glutStrokeString
glutWireCube glutWireCube
glutSolidCube glutSolidCube
glutWireSphere glutWireSphere
glutSolidSphere glutSolidSphere
glutWireCone glutWireCone
glutSolidCone glutSolidCone
glutWireTorus glutWireTorus
glutSolidTorus glutSolidTorus
glutWireDodecahedron glutWireDodecahedron
glutSolidDodecahedron glutSolidDodecahedron
glutWireOctahedron glutWireOctahedron
glutSolidOctahedron glutSolidOctahedron
glutWireTetrahedron glutWireTetrahedron
glutSolidTetrahedron glutSolidTetrahedron
glutWireIcosahedron glutWireIcosahedron
glutSolidIcosahedron glutSolidIcosahedron
glutWireRhombicDodecahedron glutWireRhombicDodecahedron
glutSolidRhombicDodecahedron glutSolidRhombicDodecahedron
glutWireSierpinskiSponge glutWireSierpinskiSponge
glutSolidSierpinskiSponge glutSolidSierpinskiSponge
glutWireTeapot glutWireTeapot
glutSolidTeapot glutSolidTeapot
glutWireCylinder glutWireCylinder
glutSolidCylinder glutSolidCylinder
glutGameModeString glutGameModeString
glutEnterGameMode glutEnterGameMode
glutLeaveGameMode glutLeaveGameMode
glutGameModeGet glutGameModeGet
glutVideoResizeGet glutVideoResizeGet
glutSetupVideoResizing glutSetupVideoResizing
glutStopVideoResizing glutStopVideoResizing
glutVideoResize glutVideoResize
glutVideoPan glutVideoPan
glutSetColor glutSetColor
glutGetColor glutGetColor
glutCopyColormap glutCopyColormap
glutIgnoreKeyRepeat glutIgnoreKeyRepeat
glutSetKeyRepeat glutSetKeyRepeat
glutForceJoystickFunc glutForceJoystickFunc
glutExtensionSupported glutExtensionSupported
glutReportErrors glutReportErrors
glutGetProcAddress glutGetProcAddress
glutExit glutExit
glutFullScreenToggle glutFullScreenToggle
glutLeaveFullScreen glutLeaveFullScreen
glutGetModeValues glutGetModeValues
glutInitContextFlags glutInitContextFlags
glutInitContextVersion glutInitContextVersion
glutInitContextProfile glutInitContextProfile
glutInitErrorFunc glutInitErrorFunc
glutInitWarningFunc glutInitWarningFunc
__glutInitWithExit __glutInitWithExit
__glutCreateWindowWithExit __glutCreateWindowWithExit
__glutCreateMenuWithExit __glutCreateMenuWithExit
glutMultiButtonFunc glutMultiButtonFunc
glutMultiEntryFunc glutMultiEntryFunc
glutMultiMotionFunc glutMultiMotionFunc
glutMultiPassiveFunc glutMultiPassiveFunc

View File

@ -15,31 +15,31 @@ EXTRA_DIST = freeglutdll.def
# #
# Those source files build the freeglut library # Those source files build the freeglut library
# #
lib@LIBRARY@_la_SOURCES = freeglut_callbacks.c \ lib@LIBRARY@_la_SOURCES = Common/freeglut_callbacks.c \
freeglut_cursor.c \ Common/freeglut_cursor.c \
freeglut_display.c \ Common/freeglut_display.c \
freeglut_ext.c \ Common/freeglut_ext.c \
freeglut_font.c \ Common/freeglut_font.c \
freeglut_glutfont_definitions.c \ Common/freeglut_glutfont_definitions.c \
freeglut_font_data.c \ Common/freeglut_font_data.c \
freeglut_stroke_roman.c \ Common/freeglut_stroke_roman.c \
freeglut_stroke_mono_roman.c \ Common/freeglut_stroke_mono_roman.c \
freeglut_gamemode.c \ Common/freeglut_gamemode.c \
freeglut_geometry.c \ Common/freeglut_geometry.c \
freeglut_init.c \ Common/freeglut_init.c \
freeglut_input_devices.c \ Common/freeglut_input_devices.c \
freeglut_spaceball.c \ Common/freeglut_spaceball.c \
freeglut_joystick.c \ Common/freeglut_joystick.c \
freeglut_main.c \ Common/freeglut_main.c \
freeglut_menu.c \ Common/freeglut_menu.c \
freeglut_misc.c \ Common/freeglut_misc.c \
freeglut_overlay.c \ Common/freeglut_overlay.c \
freeglut_state.c \ Common/freeglut_state.c \
freeglut_structure.c \ Common/freeglut_structure.c \
freeglut_teapot.c \ Common/freeglut_teapot.c \
freeglut_videoresize.c \ Common/freeglut_videoresize.c \
freeglut_window.c \ Common/freeglut_window.c \
freeglut_xinput.c Common/freeglut_xinput.c
# #
# Additional linker flags # Additional linker flags