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.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/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/header_template 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
${FREEGLUT_HEADERS}
src/freeglut_callbacks.c
src/freeglut_cursor.c
src/freeglut_display.c
src/freeglut_ext.c
src/freeglut_font.c
src/freeglut_font_data.c
src/freeglut_gamemode.c
src/freeglut_geometry.c
src/freeglut_glutfont_definitions.c
src/freeglut_init.c
src/freeglut_input_devices.c
src/freeglut_joystick.c
src/freeglut_main.c
src/freeglut_menu.c
src/freeglut_misc.c
src/freeglut_overlay.c
src/freeglut_spaceball.c
src/freeglut_state.c
src/freeglut_stroke_mono_roman.c
src/freeglut_stroke_roman.c
src/freeglut_structure.c
src/freeglut_teapot.c
src/freeglut_videoresize.c
src/freeglut_window.c
src/freeglut_xinput.c
src/Common/freeglut_callbacks.c
src/Common/freeglut_cursor.c
src/Common/freeglut_display.c
src/Common/freeglut_ext.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_glutfont_definitions.c
src/Common/freeglut_init.c
src/Common/freeglut_input_devices.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_spaceball.c
src/Common/freeglut_state.c
src/Common/freeglut_stroke_mono_roman.c
src/Common/freeglut_stroke_roman.c
src/Common/freeglut_structure.c
src/Common/freeglut_teapot.c
src/Common/freeglut_videoresize.c
src/Common/freeglut_window.c
src/Common/freeglut_xinput.c
)
#IF(WIN32)
# LIST(APPEND FREEGLUT_SRCS src/freeglut_windows.c)
# LIST(APPEND FREEGLUT_SRCS src/Windows/freeglut_cursor_windows.c)
#ELSE()
# LIST(APPEND FREEGLUT_SRCS src/freeglut_x11.c)
# LIST(APPEND FREEGLUT_SRCS src/X11/freeglut_cursor_x11.c)
#ENDIF()
# 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(WIN32)
LIST(APPEND FREEGLUT_SRCS src/freeglutdll.def freeglut.rc)
LIST(APPEND FREEGLUT_SRCS src/Common/freeglutdll.def freeglut.rc)
ENDIF()
ADD_DEFINITIONS(-DFREEGLUT_EXPORTS)
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>
* 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:
#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)
objs=$(sources:.c=.o)

View File

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

View File

@ -22,7 +22,7 @@ DEBUG_STATIC_DIR = debug-static
DEBUG_DYNAMIC_DIR = debug-dynamic
INCLUDE_DIR = ..\include
SRC_DIR = ..\src
SRC_DIR = ..\src\Common
COMPILER = wcc386
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

View File

@ -67,7 +67,7 @@ Compilation
* Here Makefile which will make the deal:
#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)
objs=$ (sources: .c=.o)

View File

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

View File

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

View File

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

View File

@ -1,177 +1,177 @@
# 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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\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"\
".\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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\
".\src\freeglut_teapot_data.h"\
".\src\Common\freeglut_internal.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"
# Begin Source File
SOURCE=.\src\freeglut_callbacks.c
SOURCE=.\src\Common\freeglut_callbacks.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_cursor.c
SOURCE=.\src\Common\freeglut_cursor.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_display.c
SOURCE=.\src\Common\freeglut_display.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_ext.c
SOURCE=.\src\Common\freeglut_ext.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_font.c
SOURCE=.\src\Common\freeglut_font.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_font_data.c
SOURCE=.\src\Common\freeglut_font_data.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_gamemode.c
SOURCE=.\src\Common\freeglut_gamemode.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_geometry.c
SOURCE=.\src\Common\freeglut_geometry.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_glutfont_definitions.c
SOURCE=.\src\Common\freeglut_glutfont_definitions.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_init.c
SOURCE=.\src\Common\freeglut_init.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_input_devices.c
SOURCE=.\src\Common\freeglut_input_devices.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_joystick.c
SOURCE=.\src\Common\freeglut_joystick.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_main.c
SOURCE=.\src\Common\freeglut_main.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_menu.c
SOURCE=.\src\Common\freeglut_menu.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_misc.c
SOURCE=.\src\Common\freeglut_misc.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_overlay.c
SOURCE=.\src\Common\freeglut_overlay.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_spaceball.c
SOURCE=.\src\Common\freeglut_spaceball.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_state.c
SOURCE=.\src\Common\freeglut_state.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_stroke_mono_roman.c
SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_stroke_roman.c
SOURCE=.\src\Common\freeglut_stroke_roman.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_structure.c
SOURCE=.\src\Common\freeglut_structure.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_teapot.c
SOURCE=.\src\Common\freeglut_teapot.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_videoresize.c
SOURCE=.\src\Common\freeglut_videoresize.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_window.c
SOURCE=.\src\Common\freeglut_window.c
# End Source File
# End Group
# Begin Group "Header Files"
@ -199,7 +199,7 @@ SOURCE=.\include\GL\freeglut_ext.h
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_internal.h
SOURCE=.\src\Common\freeglut_internal.h
# End Source File
# Begin Source File
@ -207,7 +207,7 @@ SOURCE=.\include\GL\freeglut_std.h
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_teapot_data.h
SOURCE=.\src\Common\freeglut_teapot_data.h
# End Source File
# Begin Source File

View File

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

View File

@ -9,18 +9,18 @@ files=include/GL/freeglut.h,include/GL/freeglut_internal.h,
sub_dirs=
type=normal
[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_treeview=true
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
[COPYING]
install_location=
dist=true
install=false
type=DATA
[src/freeglut_videoresize.c]
[src/Common/freeglut_videoresize.c]
install_location=
dist=true
install=false
@ -36,7 +36,7 @@ cxxflags=-O0 -g3 -Wall
type=po
sub_dirs=
[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
sub_dirs=
[freeglut.kdevprj]
@ -49,12 +49,12 @@ install_location=
dist=true
install=false
type=DATA
[src/freeglut_gamemode.c]
[src/Common/freeglut_gamemode.c]
install_location=
dist=true
install=false
type=SOURCE
[src/freeglut_menu.c]
[src/Common/freeglut_menu.c]
install_location=
dist=true
install=false
@ -68,27 +68,27 @@ Headers=*.h,*.hxx,*.hpp,*.H,
[src/docs/en/Makefile.am]
type=normal
sub_dirs=
[src/freeglut_font.c]
[src/Common/freeglut_font.c]
install_location=
dist=true
install=false
type=SOURCE
[src/freeglut_window.c]
[src/Common/freeglut_window.c]
install_location=
dist=true
install=false
type=SOURCE
[src/freeglut_main.c]
[src/Common/freeglut_main.c]
install_location=
dist=true
install=false
type=SOURCE
[src/freeglut_state.c]
[src/Common/freeglut_state.c]
install_location=
dist=true
install=false
type=SOURCE
[src/freeglut_callbacks.c]
[src/Common/freeglut_callbacks.c]
install_location=
dist=true
install=false
@ -98,7 +98,7 @@ install_location=
dist=true
install=false
type=HEADER
[src/freeglut_structure.c]
[src/Common/freeglut_structure.c]
install_location=
dist=true
install=false
@ -108,7 +108,7 @@ install_location=
dist=true
install=false
type=DATA
[src/freeglut_geometry.c]
[src/Common/freeglut_geometry.c]
install_location=
dist=true
install=false
@ -135,17 +135,17 @@ install_location=
dist=true
install=false
type=DATA
[src/freeglut_init.c]
[src/Common/freeglut_init.c]
install_location=
dist=true
install=false
type=SOURCE
[src/freeglut_display.c]
[src/Common/freeglut_display.c]
install_location=
dist=true
install=false
type=SOURCE
[src/freeglut_overlay.c]
[src/Common/freeglut_overlay.c]
install_location=
dist=true
install=false
@ -155,7 +155,7 @@ install_location=
dist=true
install=false
type=DATA
[src/freeglut_misc.c]
[src/Common/freeglut_misc.c]
install_location=
dist=true
install=false
@ -164,7 +164,7 @@ type=SOURCE
files=freeglut.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,freeglut.lsm,
type=normal
sub_dirs=src,include,
[src/freeglut_cursor.c]
[src/Common/freeglut_cursor.c]
install_location=
dist=true
install=false

View File

@ -323,7 +323,7 @@ LINK32_OBJS= \
!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"
@ -341,7 +341,7 @@ SOURCE=.\src\freeglut_callbacks.c
!ENDIF
SOURCE=.\src\freeglut_cursor.c
SOURCE=.\src\Common\freeglut_cursor.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -359,7 +359,7 @@ SOURCE=.\src\freeglut_cursor.c
!ENDIF
SOURCE=.\src\freeglut_display.c
SOURCE=.\src\Common\freeglut_display.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -377,7 +377,7 @@ SOURCE=.\src\freeglut_display.c
!ENDIF
SOURCE=.\src\freeglut_ext.c
SOURCE=.\src\Common\freeglut_ext.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -395,7 +395,7 @@ SOURCE=.\src\freeglut_ext.c
!ENDIF
SOURCE=.\src\freeglut_font.c
SOURCE=.\src\Common\freeglut_font.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -413,7 +413,7 @@ SOURCE=.\src\freeglut_font.c
!ENDIF
SOURCE=.\src\freeglut_font_data.c
SOURCE=.\src\Common\freeglut_font_data.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -431,7 +431,7 @@ SOURCE=.\src\freeglut_font_data.c
!ENDIF
SOURCE=.\src\freeglut_gamemode.c
SOURCE=.\src\Common\freeglut_gamemode.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -449,7 +449,7 @@ SOURCE=.\src\freeglut_gamemode.c
!ENDIF
SOURCE=.\src\freeglut_geometry.c
SOURCE=.\src\Common\freeglut_geometry.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -467,7 +467,7 @@ SOURCE=.\src\freeglut_geometry.c
!ENDIF
SOURCE=.\src\freeglut_glutfont_definitions.c
SOURCE=.\src\Common\freeglut_glutfont_definitions.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -485,7 +485,7 @@ SOURCE=.\src\freeglut_glutfont_definitions.c
!ENDIF
SOURCE=.\src\freeglut_init.c
SOURCE=.\src\Common\freeglut_init.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -503,7 +503,7 @@ SOURCE=.\src\freeglut_init.c
!ENDIF
SOURCE=.\src\freeglut_input_devices.c
SOURCE=.\src\Common\freeglut_input_devices.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -521,7 +521,7 @@ SOURCE=.\src\freeglut_input_devices.c
!ENDIF
SOURCE=.\src\freeglut_joystick.c
SOURCE=.\src\Common\freeglut_joystick.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -539,7 +539,7 @@ SOURCE=.\src\freeglut_joystick.c
!ENDIF
SOURCE=.\src\freeglut_main.c
SOURCE=.\src\Common\freeglut_main.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -557,7 +557,7 @@ SOURCE=.\src\freeglut_main.c
!ENDIF
SOURCE=.\src\freeglut_menu.c
SOURCE=.\src\Common\freeglut_menu.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -575,7 +575,7 @@ SOURCE=.\src\freeglut_menu.c
!ENDIF
SOURCE=.\src\freeglut_misc.c
SOURCE=.\src\Common\freeglut_misc.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -593,7 +593,7 @@ SOURCE=.\src\freeglut_misc.c
!ENDIF
SOURCE=.\src\freeglut_overlay.c
SOURCE=.\src\Common\freeglut_overlay.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -611,7 +611,7 @@ SOURCE=.\src\freeglut_overlay.c
!ENDIF
SOURCE=.\src\freeglut_state.c
SOURCE=.\src\Common\freeglut_state.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -629,7 +629,7 @@ SOURCE=.\src\freeglut_state.c
!ENDIF
SOURCE=.\src\freeglut_stroke_mono_roman.c
SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -647,7 +647,7 @@ SOURCE=.\src\freeglut_stroke_mono_roman.c
!ENDIF
SOURCE=.\src\freeglut_stroke_roman.c
SOURCE=.\src\Common\freeglut_stroke_roman.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -665,7 +665,7 @@ SOURCE=.\src\freeglut_stroke_roman.c
!ENDIF
SOURCE=.\src\freeglut_structure.c
SOURCE=.\src\Common\freeglut_structure.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -683,7 +683,7 @@ SOURCE=.\src\freeglut_structure.c
!ENDIF
SOURCE=.\src\freeglut_teapot.c
SOURCE=.\src\Common\freeglut_teapot.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -701,7 +701,7 @@ SOURCE=.\src\freeglut_teapot.c
!ENDIF
SOURCE=.\src\freeglut_videoresize.c
SOURCE=.\src\Common\freeglut_videoresize.c
!IF "$(CFG)" == "freeglut - Win32 Release"
@ -719,7 +719,7 @@ SOURCE=.\src\freeglut_videoresize.c
!ENDIF
SOURCE=.\src\freeglut_window.c
SOURCE=.\src\Common\freeglut_window.c
!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"
# Begin Source File
SOURCE=.\src\freeglut_callbacks.c
SOURCE=.\src\Common\freeglut_callbacks.c
DEP_CPP_FREEG=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEG=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_cursor.c
SOURCE=.\src\Common\freeglut_cursor.c
DEP_CPP_FREEGL=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGL=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_display.c
SOURCE=.\src\Common\freeglut_display.c
DEP_CPP_FREEGLU=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLU=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_ext.c
SOURCE=.\src\Common\freeglut_ext.c
DEP_CPP_FREEGLUT=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_font.c
SOURCE=.\src\Common\freeglut_font.c
DEP_CPP_FREEGLUT_=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_font_data.c
SOURCE=.\src\Common\freeglut_font_data.c
DEP_CPP_FREEGLUT_F=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_F=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_gamemode.c
SOURCE=.\src\Common\freeglut_gamemode.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_geometry.c
SOURCE=.\src\Common\freeglut_geometry.c
DEP_CPP_FREEGLUT_G=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_G=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_glutfont_definitions.c
SOURCE=.\src\Common\freeglut_glutfont_definitions.c
DEP_CPP_FREEGLUT_GL=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_init.c
SOURCE=.\src\Common\freeglut_init.c
DEP_CPP_FREEGLUT_I=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_I=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_internal.h
SOURCE=.\src\Common\freeglut_internal.h
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_joystick.c
SOURCE=.\src\Common\freeglut_joystick.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_main.c
SOURCE=.\src\Common\freeglut_main.c
DEP_CPP_FREEGLUT_M=\
".\src\freeglut_internal.h"\
".\src\my_gx.h"\
".\src\Common\freeglut_internal.h"\
".\src\Common\my_gx.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
{$(INCLUDE)}"gx.h"\
NODEP_CPP_FREEGLUT_M=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_menu.c
SOURCE=.\src\Common\freeglut_menu.c
DEP_CPP_FREEGLUT_ME=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_ME=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_misc.c
SOURCE=.\src\Common\freeglut_misc.c
DEP_CPP_FREEGLUT_MI=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_MI=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_overlay.c
SOURCE=.\src\Common\freeglut_overlay.c
DEP_CPP_FREEGLUT_O=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_O=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_state.c
SOURCE=.\src\Common\freeglut_state.c
DEP_CPP_FREEGLUT_S=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_S=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_stroke_mono_roman.c
SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
DEP_CPP_FREEGLUT_ST=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_stroke_roman.c
SOURCE=.\src\Common\freeglut_stroke_roman.c
DEP_CPP_FREEGLUT_STR=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_structure.c
SOURCE=.\src\Common\freeglut_structure.c
DEP_CPP_FREEGLUT_STRU=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_STRU=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_teapot.c
SOURCE=.\src\Common\freeglut_teapot.c
DEP_CPP_FREEGLUT_T=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_T=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_videoresize.c
SOURCE=.\src\Common\freeglut_videoresize.c
DEP_CPP_FREEGLUT_V=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
NODEP_CPP_FREEGLUT_V=\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_window.c
SOURCE=.\src\Common\freeglut_window.c
DEP_CPP_FREEGLUT_W=\
".\src\freeglut_internal.h"\
".\src\Common\freeglut_internal.h"\
{$(INCLUDE)}"aygshell.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
@ -362,7 +362,7 @@ DEP_CPP_FREEGLUT_W=\
NODEP_CPP_FREEGLUT_W=\
"..\..\..\..\..\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\
".\src\config.h"\
".\src\Common\config.h"\
# End Source File
# End Group

View File

@ -1,177 +1,177 @@
# 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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\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"\
".\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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.h"\
".\include\GL\freeglut_std.h"\
".\src\freeglut_internal.h"\
".\src\freeglut_teapot_data.h"\
".\src\Common\freeglut_internal.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"\
".\include\GL\freeglut.h"\
".\include\GL\freeglut_ext.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"
# Begin Source File
SOURCE=.\src\freeglut_callbacks.c
SOURCE=.\src\Common\freeglut_callbacks.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_cursor.c
SOURCE=.\src\Common\freeglut_cursor.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_display.c
SOURCE=.\src\Common\freeglut_display.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_ext.c
SOURCE=.\src\Common\freeglut_ext.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_font.c
SOURCE=.\src\Common\freeglut_font.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_font_data.c
SOURCE=.\src\Common\freeglut_font_data.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_gamemode.c
SOURCE=.\src\Common\freeglut_gamemode.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_geometry.c
SOURCE=.\src\Common\freeglut_geometry.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_glutfont_definitions.c
SOURCE=.\src\Common\freeglut_glutfont_definitions.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_init.c
SOURCE=.\src\Common\freeglut_init.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_input_devices.c
SOURCE=.\src\Common\freeglut_input_devices.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_joystick.c
SOURCE=.\src\Common\freeglut_joystick.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_main.c
SOURCE=.\src\Common\freeglut_main.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_menu.c
SOURCE=.\src\Common\freeglut_menu.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_misc.c
SOURCE=.\src\Common\freeglut_misc.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_overlay.c
SOURCE=.\src\Common\freeglut_overlay.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_spaceball.c
SOURCE=.\src\Common\freeglut_spaceball.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_state.c
SOURCE=.\src\Common\freeglut_state.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_stroke_mono_roman.c
SOURCE=.\src\Common\freeglut_stroke_mono_roman.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_stroke_roman.c
SOURCE=.\src\Common\freeglut_stroke_roman.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_structure.c
SOURCE=.\src\Common\freeglut_structure.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_teapot.c
SOURCE=.\src\Common\freeglut_teapot.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_videoresize.c
SOURCE=.\src\Common\freeglut_videoresize.c
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_window.c
SOURCE=.\src\Common\freeglut_window.c
# End Source File
# End Group
# Begin Group "Header Files"
@ -193,7 +193,7 @@ SOURCE=.\include\GL\freeglut_ext.h
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_internal.h
SOURCE=.\src\Common\freeglut_internal.h
# End Source File
# Begin Source File
@ -201,7 +201,7 @@ SOURCE=.\include\GL\freeglut_std.h
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_teapot_data.h
SOURCE=.\src\Common\freeglut_teapot_data.h
# End Source File
# Begin Source File

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,108 +1,108 @@
/*
* freeglut_glutfont_definitions.c
*
* Bitmap and stroke fonts displaying.
*
* Copyright (c) 2003 Stephen J. Baker (whether he wants it or not).
* All Rights Reserved.
* Written by John F. Fay <fayjf@sourceforge.net>, who releases the
* copyright over to the "freeglut" project lead.
* Creation date: Mon July 21 2003
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* 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
* 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
* original GLUT defined its font variables in rather an unusual way.
* Publicly, in "glut.h", they were defined as "void *". Privately,
* in one of the source code files, they were defined as pointers to a
* structure. Most compilers and linkers are satisfied with the "void *"
* 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
* ".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
* structure to match GLUT.
*/
/*
* 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
* necessary machinery. But this poses another problem, caused by the ugly
* 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
* CPP HACK.
*/
#define glutStrokeRoman glutStrokeRomanIGNOREME
#define glutStrokeMonoRoman glutStrokeMonoRomanIGNOREME
#define glutBitmap9By15 glutBitmap9By15IGNOREME
#define glutBitmap8By13 glutBitmap8By13IGNOREME
#define glutBitmapTimesRoman10 glutBitmapTimesRoman10IGNOREME
#define glutBitmapTimesRoman24 glutBitmapTimesRoman24IGNOREME
#define glutBitmapHelvetica10 glutBitmapHelvetica10IGNOREME
#define glutBitmapHelvetica12 glutBitmapHelvetica12IGNOREME
#define glutBitmapHelvetica18 glutBitmapHelvetica18IGNOREME
#include <GL/freeglut_std.h>
#undef glutStrokeRoman
#undef glutStrokeMonoRoman
#undef glutBitmap9By15
#undef glutBitmap8By13
#undef glutBitmapTimesRoman10
#undef glutBitmapTimesRoman24
#undef glutBitmapHelvetica10
#undef glutBitmapHelvetica12
#undef glutBitmapHelvetica18
#include "freeglut_internal.h"
#if TARGET_HOST_POSIX_X11
struct freeglutStrokeFont
{
const char *name ;
int num_chars ;
void *ch ;
float top ;
float bottom ;
};
struct freeglutBitmapFont
{
const char *name ;
const int num_chars ;
const int first ;
const void *ch ;
};
struct freeglutStrokeFont glutStrokeRoman ;
struct freeglutStrokeFont glutStrokeMonoRoman ;
struct freeglutBitmapFont glutBitmap9By15 ;
struct freeglutBitmapFont glutBitmap8By13 ;
struct freeglutBitmapFont glutBitmapTimesRoman10 ;
struct freeglutBitmapFont glutBitmapTimesRoman24 ;
struct freeglutBitmapFont glutBitmapHelvetica10 ;
struct freeglutBitmapFont glutBitmapHelvetica12 ;
struct freeglutBitmapFont glutBitmapHelvetica18 ;
#endif
/*
* freeglut_glutfont_definitions.c
*
* Bitmap and stroke fonts displaying.
*
* Copyright (c) 2003 Stephen J. Baker (whether he wants it or not).
* All Rights Reserved.
* Written by John F. Fay <fayjf@sourceforge.net>, who releases the
* copyright over to the "freeglut" project lead.
* Creation date: Mon July 21 2003
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* 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
* 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
* original GLUT defined its font variables in rather an unusual way.
* Publicly, in "glut.h", they were defined as "void *". Privately,
* in one of the source code files, they were defined as pointers to a
* structure. Most compilers and linkers are satisfied with the "void *"
* 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
* ".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
* structure to match GLUT.
*/
/*
* 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
* necessary machinery. But this poses another problem, caused by the ugly
* 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
* CPP HACK.
*/
#define glutStrokeRoman glutStrokeRomanIGNOREME
#define glutStrokeMonoRoman glutStrokeMonoRomanIGNOREME
#define glutBitmap9By15 glutBitmap9By15IGNOREME
#define glutBitmap8By13 glutBitmap8By13IGNOREME
#define glutBitmapTimesRoman10 glutBitmapTimesRoman10IGNOREME
#define glutBitmapTimesRoman24 glutBitmapTimesRoman24IGNOREME
#define glutBitmapHelvetica10 glutBitmapHelvetica10IGNOREME
#define glutBitmapHelvetica12 glutBitmapHelvetica12IGNOREME
#define glutBitmapHelvetica18 glutBitmapHelvetica18IGNOREME
#include <GL/freeglut_std.h>
#undef glutStrokeRoman
#undef glutStrokeMonoRoman
#undef glutBitmap9By15
#undef glutBitmap8By13
#undef glutBitmapTimesRoman10
#undef glutBitmapTimesRoman24
#undef glutBitmapHelvetica10
#undef glutBitmapHelvetica12
#undef glutBitmapHelvetica18
#include "freeglut_internal.h"
#if TARGET_HOST_POSIX_X11
struct freeglutStrokeFont
{
const char *name ;
int num_chars ;
void *ch ;
float top ;
float bottom ;
};
struct freeglutBitmapFont
{
const char *name ;
const int num_chars ;
const int first ;
const void *ch ;
};
struct freeglutStrokeFont glutStrokeRoman ;
struct freeglutStrokeFont glutStrokeMonoRoman ;
struct freeglutBitmapFont glutBitmap9By15 ;
struct freeglutBitmapFont glutBitmap8By13 ;
struct freeglutBitmapFont glutBitmapTimesRoman10 ;
struct freeglutBitmapFont glutBitmapTimesRoman24 ;
struct freeglutBitmapFont glutBitmapHelvetica10 ;
struct freeglutBitmapFont glutBitmapHelvetica12 ;
struct freeglutBitmapFont glutBitmapHelvetica18 ;
#endif

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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