ruby-glfw 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +1 -0
- data/README.API +73 -0
- data/Rakefile +120 -0
- data/examples/boing.rb +519 -0
- data/examples/gears.rb +327 -0
- data/examples/keytest.rb +117 -0
- data/examples/listmodes.rb +20 -0
- data/examples/mipmaps.rb +104 -0
- data/examples/mipmaps.tga +0 -0
- data/examples/particles.rb +837 -0
- data/examples/pong3d.rb +741 -0
- data/examples/pong3d_field.tga +0 -0
- data/examples/pong3d_instr.tga +0 -0
- data/examples/pong3d_menu.tga +0 -0
- data/examples/pong3d_title.tga +0 -0
- data/examples/pong3d_winner1.tga +0 -0
- data/examples/pong3d_winner2.tga +0 -0
- data/examples/splitview.rb +432 -0
- data/examples/triangle.rb +89 -0
- data/examples/wave.rb +294 -0
- data/ext/glfw/glfw.c +1094 -0
- data/ext/glfw/mkrf_conf.rb +70 -0
- data/glfw-src/Makefile +220 -0
- data/glfw-src/compile.ami +61 -0
- data/glfw-src/compile.bat +217 -0
- data/glfw-src/compile.sh +607 -0
- data/glfw-src/docs/Makefile +57 -0
- data/glfw-src/docs/Reference.pdf +0 -0
- data/glfw-src/docs/UsersGuide.pdf +0 -0
- data/glfw-src/docs/cleanup.bat +22 -0
- data/glfw-src/docs/glfwdoc.sty +80 -0
- data/glfw-src/docs/glfwrm.tex +3034 -0
- data/glfw-src/docs/glfwug.tex +2024 -0
- data/glfw-src/docs/readme.txt +80 -0
- data/glfw-src/examples/Makefile.amigaos.gcc +70 -0
- data/glfw-src/examples/Makefile.amigaos.vbcc +70 -0
- data/glfw-src/examples/Makefile.dos.djgpp +71 -0
- data/glfw-src/examples/Makefile.macosx.gcc +96 -0
- data/glfw-src/examples/Makefile.win32.bcc +75 -0
- data/glfw-src/examples/Makefile.win32.cross-mgw +79 -0
- data/glfw-src/examples/Makefile.win32.cygwin +79 -0
- data/glfw-src/examples/Makefile.win32.lcc +74 -0
- data/glfw-src/examples/Makefile.win32.mgw +75 -0
- data/glfw-src/examples/Makefile.win32.msvc +74 -0
- data/glfw-src/examples/Makefile.win32.ow +74 -0
- data/glfw-src/examples/Makefile.win32.pellesc +74 -0
- data/glfw-src/examples/Makefile.x11.in +54 -0
- data/glfw-src/examples/boing.c +606 -0
- data/glfw-src/examples/bundle.sh +46 -0
- data/glfw-src/examples/gears.c +382 -0
- data/glfw-src/examples/keytest.c +264 -0
- data/glfw-src/examples/listmodes.c +48 -0
- data/glfw-src/examples/mipmaps.c +126 -0
- data/glfw-src/examples/mipmaps.tga +0 -0
- data/glfw-src/examples/mtbench.c +301 -0
- data/glfw-src/examples/mthello.c +48 -0
- data/glfw-src/examples/particles.c +1148 -0
- data/glfw-src/examples/pong3d.c +839 -0
- data/glfw-src/examples/pong3d_field.tga +0 -0
- data/glfw-src/examples/pong3d_instr.tga +0 -0
- data/glfw-src/examples/pong3d_menu.tga +0 -0
- data/glfw-src/examples/pong3d_title.tga +0 -0
- data/glfw-src/examples/pong3d_winner1.tga +0 -0
- data/glfw-src/examples/pong3d_winner2.tga +0 -0
- data/glfw-src/examples/splitview.c +506 -0
- data/glfw-src/examples/triangle.c +108 -0
- data/glfw-src/examples/wave.c +397 -0
- data/glfw-src/images/opengl.gif +0 -0
- data/glfw-src/images/osicert.gif +0 -0
- data/glfw-src/include/GL/glfw.h +486 -0
- data/glfw-src/lib/amigaos/Makefile.amigaos.gcc +128 -0
- data/glfw-src/lib/amigaos/Makefile.amigaos.vbcc +128 -0
- data/glfw-src/lib/amigaos/SDI_compiler.h +94 -0
- data/glfw-src/lib/amigaos/amigaos_enable.c +51 -0
- data/glfw-src/lib/amigaos/amigaos_fullscreen.c +319 -0
- data/glfw-src/lib/amigaos/amigaos_glext.c +61 -0
- data/glfw-src/lib/amigaos/amigaos_init.c +284 -0
- data/glfw-src/lib/amigaos/amigaos_joystick.c +359 -0
- data/glfw-src/lib/amigaos/amigaos_thread.c +494 -0
- data/glfw-src/lib/amigaos/amigaos_time.c +206 -0
- data/glfw-src/lib/amigaos/amigaos_window.c +830 -0
- data/glfw-src/lib/amigaos/platform.h +337 -0
- data/glfw-src/lib/dos/Makefile.dos.djgpp +146 -0
- data/glfw-src/lib/dos/dos_enable.c +51 -0
- data/glfw-src/lib/dos/dos_events.c +173 -0
- data/glfw-src/lib/dos/dos_fullscreen.c +101 -0
- data/glfw-src/lib/dos/dos_glext.c +59 -0
- data/glfw-src/lib/dos/dos_init.c +105 -0
- data/glfw-src/lib/dos/dos_irq.s +246 -0
- data/glfw-src/lib/dos/dos_joystick.c +94 -0
- data/glfw-src/lib/dos/dos_keyboard.c +694 -0
- data/glfw-src/lib/dos/dos_mouse.c +337 -0
- data/glfw-src/lib/dos/dos_thread.c +267 -0
- data/glfw-src/lib/dos/dos_time.c +309 -0
- data/glfw-src/lib/dos/dos_window.c +563 -0
- data/glfw-src/lib/dos/platform.h +341 -0
- data/glfw-src/lib/enable.c +295 -0
- data/glfw-src/lib/fullscreen.c +95 -0
- data/glfw-src/lib/glext.c +201 -0
- data/glfw-src/lib/image.c +629 -0
- data/glfw-src/lib/init.c +108 -0
- data/glfw-src/lib/input.c +280 -0
- data/glfw-src/lib/internal.h +210 -0
- data/glfw-src/lib/joystick.c +101 -0
- data/glfw-src/lib/macosx/Makefile.macosx.gcc +172 -0
- data/glfw-src/lib/macosx/Makefile.macosx.gcc.universal +166 -0
- data/glfw-src/lib/macosx/libglfw.pc.in +11 -0
- data/glfw-src/lib/macosx/macosx_enable.c +42 -0
- data/glfw-src/lib/macosx/macosx_fullscreen.c +126 -0
- data/glfw-src/lib/macosx/macosx_glext.c +52 -0
- data/glfw-src/lib/macosx/macosx_init.c +194 -0
- data/glfw-src/lib/macosx/macosx_joystick.c +50 -0
- data/glfw-src/lib/macosx/macosx_thread.c +414 -0
- data/glfw-src/lib/macosx/macosx_time.c +112 -0
- data/glfw-src/lib/macosx/macosx_window.c +1279 -0
- data/glfw-src/lib/macosx/platform.h +349 -0
- data/glfw-src/lib/stream.c +194 -0
- data/glfw-src/lib/tga.c +405 -0
- data/glfw-src/lib/thread.c +340 -0
- data/glfw-src/lib/time.c +83 -0
- data/glfw-src/lib/win32/Makefile.win32.bcc +265 -0
- data/glfw-src/lib/win32/Makefile.win32.cross-mgw +274 -0
- data/glfw-src/lib/win32/Makefile.win32.cygwin +279 -0
- data/glfw-src/lib/win32/Makefile.win32.lcc +246 -0
- data/glfw-src/lib/win32/Makefile.win32.mgw +243 -0
- data/glfw-src/lib/win32/Makefile.win32.msvc +242 -0
- data/glfw-src/lib/win32/Makefile.win32.ow +242 -0
- data/glfw-src/lib/win32/Makefile.win32.pellesc +242 -0
- data/glfw-src/lib/win32/glfwdll.def +67 -0
- data/glfw-src/lib/win32/glfwdll_mgw1.def +67 -0
- data/glfw-src/lib/win32/glfwdll_mgw2.def +67 -0
- data/glfw-src/lib/win32/glfwdll_pellesc.def +65 -0
- data/glfw-src/lib/win32/libglfw.pc.in +11 -0
- data/glfw-src/lib/win32/platform.h +474 -0
- data/glfw-src/lib/win32/win32_dllmain.c +60 -0
- data/glfw-src/lib/win32/win32_enable.c +155 -0
- data/glfw-src/lib/win32/win32_fullscreen.c +317 -0
- data/glfw-src/lib/win32/win32_glext.c +85 -0
- data/glfw-src/lib/win32/win32_init.c +356 -0
- data/glfw-src/lib/win32/win32_joystick.c +234 -0
- data/glfw-src/lib/win32/win32_thread.c +511 -0
- data/glfw-src/lib/win32/win32_time.c +146 -0
- data/glfw-src/lib/win32/win32_window.c +1714 -0
- data/glfw-src/lib/window.c +727 -0
- data/glfw-src/lib/x11/Makefile.x11.in +243 -0
- data/glfw-src/lib/x11/platform.h +415 -0
- data/glfw-src/lib/x11/x11_enable.c +51 -0
- data/glfw-src/lib/x11/x11_fullscreen.c +524 -0
- data/glfw-src/lib/x11/x11_glext.c +69 -0
- data/glfw-src/lib/x11/x11_init.c +275 -0
- data/glfw-src/lib/x11/x11_joystick.c +371 -0
- data/glfw-src/lib/x11/x11_keysym2unicode.c +902 -0
- data/glfw-src/lib/x11/x11_thread.c +507 -0
- data/glfw-src/lib/x11/x11_time.c +154 -0
- data/glfw-src/lib/x11/x11_window.c +1746 -0
- data/glfw-src/license.txt +21 -0
- data/glfw-src/readme.html +927 -0
- data/glfw-src/support/d/examples/Makefile +59 -0
- data/glfw-src/support/d/examples/boing.d +610 -0
- data/glfw-src/support/d/examples/gears.d +379 -0
- data/glfw-src/support/d/examples/keytest.d +272 -0
- data/glfw-src/support/d/examples/listmodes.d +48 -0
- data/glfw-src/support/d/examples/mipmaps.d +126 -0
- data/glfw-src/support/d/examples/mtbench.d +304 -0
- data/glfw-src/support/d/examples/mthello.d +54 -0
- data/glfw-src/support/d/examples/particles.d +1150 -0
- data/glfw-src/support/d/examples/pong3d.d +840 -0
- data/glfw-src/support/d/examples/splitview.d +486 -0
- data/glfw-src/support/d/examples/triangle.d +108 -0
- data/glfw-src/support/d/examples/wave.d +400 -0
- data/glfw-src/support/d/imports/gl.d +4539 -0
- data/glfw-src/support/d/imports/glfw.d +349 -0
- data/glfw-src/support/d/imports/glu.d +328 -0
- data/glfw-src/support/d/lib/glfwdll.def +64 -0
- data/glfw-src/support/d/lib/glu32.def +56 -0
- data/glfw-src/support/d/lib/makefile +12 -0
- data/glfw-src/support/d/lib/opengl32.def +372 -0
- data/glfw-src/support/d/readme.html +83 -0
- data/glfw-src/support/delphi/examples/Triangle.dpr +105 -0
- data/glfw-src/support/delphi/lib/glfw.pas +437 -0
- data/glfw-src/support/delphi/readme.html +97 -0
- data/glfw-src/support/lua/examples/gears.lua +383 -0
- data/glfw-src/support/lua/examples/test1.lua +68 -0
- data/glfw-src/support/lua/readme.html +128 -0
- data/glfw-src/support/lua/src/luaglfw.c +1179 -0
- data/glfw-src/support/lua/src/luaglfw.h +48 -0
- data/glfw-src/support/lua/src/runlua.c +82 -0
- data/glfw-src/support/masm/examples/fpc.mac +47 -0
- data/glfw-src/support/masm/examples/makeit.bat +66 -0
- data/glfw-src/support/masm/examples/triangle.asm +232 -0
- data/glfw-src/support/masm/include/glfw.inc +326 -0
- data/glfw-src/support/masm/include/glu32.inc +55 -0
- data/glfw-src/support/masm/include/opengl32.inc +372 -0
- data/glfw-src/support/masm/lib/glfwdll.lib +0 -0
- data/glfw-src/support/masm/readme.html +170 -0
- data/glfw-src/support/msvc80/GLFW.sln +26 -0
- data/glfw-src/support/msvc80/GLFW.vcproj +257 -0
- data/glfw-src/support/msvc80/GLFWDLL.vcproj +287 -0
- data/glfw-src/support/visualbasic/bindings/glfw.bas +320 -0
- data/glfw-src/support/visualbasic/bindings/glu32.bas +284 -0
- data/glfw-src/support/visualbasic/bindings/opengl32.bas +999 -0
- data/glfw-src/support/visualbasic/examples/Triangle.bas +101 -0
- data/glfw-src/support/visualbasic/readme.html +164 -0
- data/website/index.html +84 -0
- data/website/style.css +110 -0
- metadata +301 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
##########################################################################
|
|
2
|
+
# Makefile for GLFW on AmigaOS using GCC.
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
# To compile GLFW using this makefile, run:
|
|
5
|
+
# make -f Makefile.amigaos.gcc
|
|
6
|
+
##########################################################################
|
|
7
|
+
|
|
8
|
+
##########################################################################
|
|
9
|
+
# Default: Build static library version of GLFW
|
|
10
|
+
##########################################################################
|
|
11
|
+
default: libglfw.a
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
##########################################################################
|
|
15
|
+
# GLFW version
|
|
16
|
+
##########################################################################
|
|
17
|
+
VERMAJOR = 2
|
|
18
|
+
VERMINOR = 4
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
##########################################################################
|
|
22
|
+
# Compiler settings
|
|
23
|
+
##########################################################################
|
|
24
|
+
CC = gcc
|
|
25
|
+
CFLAGS = -c -I. -I.. -Wall -Os -m68020 -m68881
|
|
26
|
+
|
|
27
|
+
# Some modules should be optimized for speed (e.g. image decoding)
|
|
28
|
+
CFLAGS_SPEED = -c -I. -I.. -Wall -O3 -ffast-math -m68020 -m68881
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
##########################################################################
|
|
32
|
+
# Library builder settings
|
|
33
|
+
##########################################################################
|
|
34
|
+
MKLIB = ar
|
|
35
|
+
LIBFLAGS = -rcs
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
##########################################################################
|
|
39
|
+
# Object files which are part of the GLFW library
|
|
40
|
+
##########################################################################
|
|
41
|
+
OBJS = \
|
|
42
|
+
enable.o \
|
|
43
|
+
fullscreen.o \
|
|
44
|
+
glext.o \
|
|
45
|
+
image.o \
|
|
46
|
+
init.o \
|
|
47
|
+
input.o \
|
|
48
|
+
joystick.o \
|
|
49
|
+
tga.o \
|
|
50
|
+
thread.o \
|
|
51
|
+
time.o \
|
|
52
|
+
window.o \
|
|
53
|
+
amigaos_enable.o \
|
|
54
|
+
amigaos_fullscreen.o \
|
|
55
|
+
amigaos_glext.o \
|
|
56
|
+
amigaos_init.o \
|
|
57
|
+
amigaos_joystick.o \
|
|
58
|
+
amigaos_thread.o \
|
|
59
|
+
amigaos_time.o \
|
|
60
|
+
amigaos_window.o
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
##########################################################################
|
|
64
|
+
# Rule for building library
|
|
65
|
+
##########################################################################
|
|
66
|
+
libglfw.a: $(OBJS)
|
|
67
|
+
$(MKLIB) $(LIBFLAGS) $@ $(OBJS)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
##########################################################################
|
|
71
|
+
# Rules for building library object files
|
|
72
|
+
##########################################################################
|
|
73
|
+
enable.o: ../enable.c ../internal.h platform.h
|
|
74
|
+
$(CC) $(CFLAGS) -o $@ ../enable.c
|
|
75
|
+
|
|
76
|
+
fullscreen.o: ../fullscreen.c ../internal.h platform.h
|
|
77
|
+
$(CC) $(CFLAGS) -o $@ ../fullscreen.c
|
|
78
|
+
|
|
79
|
+
glext.o: ../glext.c ../internal.h platform.h
|
|
80
|
+
$(CC) $(CFLAGS) -o $@ ../glext.c
|
|
81
|
+
|
|
82
|
+
image.o: ../image.c ../internal.h platform.h
|
|
83
|
+
$(CC) $(CFLAGS_SPEED) -o $@ ../image.c
|
|
84
|
+
|
|
85
|
+
init.o: ../init.c ../internal.h platform.h
|
|
86
|
+
$(CC) $(CFLAGS) -o $@ ../init.c
|
|
87
|
+
|
|
88
|
+
input.o: ../input.c ../internal.h platform.h
|
|
89
|
+
$(CC) $(CFLAGS) -o $@ ../input.c
|
|
90
|
+
|
|
91
|
+
joystick.o: ../joystick.c ../internal.h platform.h
|
|
92
|
+
$(CC) $(CFLAGS) -o $@ ../joystick.c
|
|
93
|
+
|
|
94
|
+
tga.o: ../tga.c ../internal.h platform.h
|
|
95
|
+
$(CC) $(CFLAGS_SPEED) -o $@ ../tga.c
|
|
96
|
+
|
|
97
|
+
thread.o: ../thread.c ../internal.h platform.h
|
|
98
|
+
$(CC) $(CFLAGS) -o $@ ../thread.c
|
|
99
|
+
|
|
100
|
+
time.o: ../time.c ../internal.h platform.h
|
|
101
|
+
$(CC) $(CFLAGS) -o $@ ../time.c
|
|
102
|
+
|
|
103
|
+
window.o: ../window.c ../internal.h platform.h
|
|
104
|
+
$(CC) $(CFLAGS) -o $@ ../window.c
|
|
105
|
+
|
|
106
|
+
amigaos_enable.o: amigaos_enable.c ../internal.h platform.h
|
|
107
|
+
$(CC) $(CFLAGS) -o $@ amigaos_enable.c
|
|
108
|
+
|
|
109
|
+
amigaos_fullscreen.o: amigaos_fullscreen.c ../internal.h platform.h
|
|
110
|
+
$(CC) $(CFLAGS) -o $@ amigaos_fullscreen.c
|
|
111
|
+
|
|
112
|
+
amigaos_glext.o: amigaos_glext.c ../internal.h platform.h
|
|
113
|
+
$(CC) $(CFLAGS) -o $@ amigaos_glext.c
|
|
114
|
+
|
|
115
|
+
amigaos_init.o: amigaos_init.c ../internal.h platform.h
|
|
116
|
+
$(CC) $(CFLAGS) -o $@ amigaos_init.c
|
|
117
|
+
|
|
118
|
+
amigaos_joystick.o: amigaos_joystick.c ../internal.h platform.h
|
|
119
|
+
$(CC) $(CFLAGS) -o $@ amigaos_joystick.c
|
|
120
|
+
|
|
121
|
+
amigaos_thread.o: amigaos_thread.c ../internal.h platform.h
|
|
122
|
+
$(CC) $(CFLAGS) -o $@ amigaos_thread.c
|
|
123
|
+
|
|
124
|
+
amigaos_time.o: amigaos_time.c ../internal.h platform.h
|
|
125
|
+
$(CC) $(CFLAGS) -o $@ amigaos_time.c
|
|
126
|
+
|
|
127
|
+
amigaos_window.o: amigaos_window.c ../internal.h platform.h
|
|
128
|
+
$(CC) $(CFLAGS) -o $@ amigaos_window.c
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
##########################################################################
|
|
2
|
+
# Makefile for GLFW on AmigaOS using VBCC.
|
|
3
|
+
#-------------------------------------------------------------------------
|
|
4
|
+
# To compile GLFW using this makefile, run:
|
|
5
|
+
# make -f Makefile.amigaos.vbcc
|
|
6
|
+
##########################################################################
|
|
7
|
+
|
|
8
|
+
##########################################################################
|
|
9
|
+
# Default: Build static library version of GLFW
|
|
10
|
+
##########################################################################
|
|
11
|
+
default: glfw.lib
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
##########################################################################
|
|
15
|
+
# GLFW version
|
|
16
|
+
##########################################################################
|
|
17
|
+
VERMAJOR = 2
|
|
18
|
+
VERMINOR = 4
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
##########################################################################
|
|
22
|
+
# Compiler settings
|
|
23
|
+
##########################################################################
|
|
24
|
+
CC = vc
|
|
25
|
+
CFLAGS = -c -I. -I/ -c99 -cpu=68020 -fpu=68881 -O1
|
|
26
|
+
|
|
27
|
+
# Some modules should be optimized for speed (e.g. image decoding)
|
|
28
|
+
CFLAGS_SPEED = -c -I. -I/ -c99 -cpu=68020 -fpu=68881 -O1
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
##########################################################################
|
|
32
|
+
# Library builder settings
|
|
33
|
+
##########################################################################
|
|
34
|
+
MKLIB = join
|
|
35
|
+
LIBFLAGS = as
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
##########################################################################
|
|
39
|
+
# Object files which are part of the GLFW library
|
|
40
|
+
##########################################################################
|
|
41
|
+
OBJS = \
|
|
42
|
+
enable.o \
|
|
43
|
+
fullscreen.o \
|
|
44
|
+
glext.o \
|
|
45
|
+
image.o \
|
|
46
|
+
init.o \
|
|
47
|
+
input.o \
|
|
48
|
+
joystick.o \
|
|
49
|
+
tga.o \
|
|
50
|
+
thread.o \
|
|
51
|
+
time.o \
|
|
52
|
+
window.o \
|
|
53
|
+
amigaos_enable.o \
|
|
54
|
+
amigaos_fullscreen.o \
|
|
55
|
+
amigaos_glext.o \
|
|
56
|
+
amigaos_init.o \
|
|
57
|
+
amigaos_joystick.o \
|
|
58
|
+
amigaos_thread.o \
|
|
59
|
+
amigaos_time.o \
|
|
60
|
+
amigaos_window.o
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
##########################################################################
|
|
64
|
+
# Rule for building library
|
|
65
|
+
##########################################################################
|
|
66
|
+
glfw.lib: $(OBJS)
|
|
67
|
+
$(MKLIB) $(OBJS) $(LIBFLAGS) $@
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
##########################################################################
|
|
71
|
+
# Rules for building library object files
|
|
72
|
+
##########################################################################
|
|
73
|
+
enable.o: /enable.c /internal.h platform.h
|
|
74
|
+
$(CC) $(CFLAGS) -o $@ /enable.c
|
|
75
|
+
|
|
76
|
+
fullscreen.o: /fullscreen.c /internal.h platform.h
|
|
77
|
+
$(CC) $(CFLAGS) -o $@ /fullscreen.c
|
|
78
|
+
|
|
79
|
+
glext.o: /glext.c /internal.h platform.h
|
|
80
|
+
$(CC) $(CFLAGS) -o $@ /glext.c
|
|
81
|
+
|
|
82
|
+
image.o: /image.c /internal.h platform.h
|
|
83
|
+
$(CC) $(CFLAGS_SPEED) -o $@ /image.c
|
|
84
|
+
|
|
85
|
+
init.o: /init.c /internal.h platform.h
|
|
86
|
+
$(CC) $(CFLAGS) -o $@ /init.c
|
|
87
|
+
|
|
88
|
+
input.o: /input.c /internal.h platform.h
|
|
89
|
+
$(CC) $(CFLAGS) -o $@ /input.c
|
|
90
|
+
|
|
91
|
+
joystick.o: /joystick.c /internal.h platform.h
|
|
92
|
+
$(CC) $(CFLAGS) -o $@ /joystick.c
|
|
93
|
+
|
|
94
|
+
tga.o: /tga.c /internal.h platform.h
|
|
95
|
+
$(CC) $(CFLAGS_SPEED) -o $@ /tga.c
|
|
96
|
+
|
|
97
|
+
thread.o: /thread.c /internal.h platform.h
|
|
98
|
+
$(CC) $(CFLAGS) -o $@ /thread.c
|
|
99
|
+
|
|
100
|
+
time.o: /time.c /internal.h platform.h
|
|
101
|
+
$(CC) $(CFLAGS) -o $@ /time.c
|
|
102
|
+
|
|
103
|
+
window.o: /window.c /internal.h platform.h
|
|
104
|
+
$(CC) $(CFLAGS) -o $@ /window.c
|
|
105
|
+
|
|
106
|
+
amigaos_enable.o: amigaos_enable.c /internal.h platform.h
|
|
107
|
+
$(CC) $(CFLAGS) -o $@ amigaos_enable.c
|
|
108
|
+
|
|
109
|
+
amigaos_fullscreen.o: amigaos_fullscreen.c /internal.h platform.h
|
|
110
|
+
$(CC) $(CFLAGS) -o $@ amigaos_fullscreen.c
|
|
111
|
+
|
|
112
|
+
amigaos_glext.o: amigaos_glext.c /internal.h platform.h
|
|
113
|
+
$(CC) $(CFLAGS) -o $@ amigaos_glext.c
|
|
114
|
+
|
|
115
|
+
amigaos_init.o: amigaos_init.c /internal.h platform.h
|
|
116
|
+
$(CC) $(CFLAGS) -o $@ amigaos_init.c
|
|
117
|
+
|
|
118
|
+
amigaos_joystick.o: amigaos_joystick.c /internal.h platform.h
|
|
119
|
+
$(CC) $(CFLAGS) -o $@ amigaos_joystick.c
|
|
120
|
+
|
|
121
|
+
amigaos_thread.o: amigaos_thread.c /internal.h platform.h
|
|
122
|
+
$(CC) $(CFLAGS) -o $@ amigaos_thread.c
|
|
123
|
+
|
|
124
|
+
amigaos_time.o: amigaos_time.c /internal.h platform.h
|
|
125
|
+
$(CC) $(CFLAGS) -o $@ amigaos_time.c
|
|
126
|
+
|
|
127
|
+
amigaos_window.o: amigaos_window.c /internal.h platform.h
|
|
128
|
+
$(CC) $(CFLAGS) -o $@ amigaos_window.c
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#ifndef SDI_COMPILER_H
|
|
2
|
+
#define SDI_COMPILER_H
|
|
3
|
+
|
|
4
|
+
/* Includeheader
|
|
5
|
+
|
|
6
|
+
Name: SDI_compiler.h
|
|
7
|
+
Versionstring: $VER: SDI_compiler.h 1.5 (29.07.2000)
|
|
8
|
+
Author: SDI
|
|
9
|
+
Distribution: PD
|
|
10
|
+
Description: defines to hide compiler stuff
|
|
11
|
+
|
|
12
|
+
1.1 25.06.98 : created from data made by Gunter Nikl
|
|
13
|
+
1.2 17.11.99 : added VBCC
|
|
14
|
+
1.3 29.02.00 : fixed VBCC REG define
|
|
15
|
+
1.4 30.03.00 : fixed SAVEDS for VBCC
|
|
16
|
+
1.5 29.07.00 : added #undef statements (needed e.g. for AmiTCP together with vbcc)
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
#ifdef ASM
|
|
20
|
+
#undef ASM
|
|
21
|
+
#endif
|
|
22
|
+
#ifdef REG
|
|
23
|
+
#undef REG
|
|
24
|
+
#endif
|
|
25
|
+
#ifdef LREG
|
|
26
|
+
#undef LREG
|
|
27
|
+
#endif
|
|
28
|
+
#ifdef CONST
|
|
29
|
+
#undef CONST
|
|
30
|
+
#endif
|
|
31
|
+
#ifdef SAVEDS
|
|
32
|
+
#undef SAVEDS
|
|
33
|
+
#endif
|
|
34
|
+
#ifdef INLINE
|
|
35
|
+
#undef INLINE
|
|
36
|
+
#endif
|
|
37
|
+
#ifdef REGARGS
|
|
38
|
+
#undef REGARGS
|
|
39
|
+
#endif
|
|
40
|
+
#ifdef STDARGS
|
|
41
|
+
#undef STDARGS
|
|
42
|
+
#endif
|
|
43
|
+
|
|
44
|
+
/* first "exceptions" */
|
|
45
|
+
|
|
46
|
+
#if defined(__MAXON__)
|
|
47
|
+
#define STDARGS
|
|
48
|
+
#define REGARGS
|
|
49
|
+
#define SAVEDS
|
|
50
|
+
#define INLINE inline
|
|
51
|
+
#elif defined(__VBCC__)
|
|
52
|
+
#define STDARGS
|
|
53
|
+
#define REGARGS
|
|
54
|
+
#define INLINE
|
|
55
|
+
#define REG(reg,arg) __reg(#reg) arg
|
|
56
|
+
#elif defined(__STORM__)
|
|
57
|
+
#define STDARGS
|
|
58
|
+
#define REGARGS
|
|
59
|
+
#define INLINE inline
|
|
60
|
+
#elif defined(__SASC)
|
|
61
|
+
#define ASM(arg) arg __asm
|
|
62
|
+
#elif defined(__GNUC__)
|
|
63
|
+
#define REG(reg,arg) arg __asm(#reg)
|
|
64
|
+
#define LREG(reg,arg) register REG(reg,arg)
|
|
65
|
+
#endif
|
|
66
|
+
|
|
67
|
+
/* then "common" ones */
|
|
68
|
+
|
|
69
|
+
#if !defined(ASM)
|
|
70
|
+
#define ASM(arg) arg
|
|
71
|
+
#endif
|
|
72
|
+
#if !defined(REG)
|
|
73
|
+
#define REG(reg,arg) register __##reg arg
|
|
74
|
+
#endif
|
|
75
|
+
#if !defined(LREG)
|
|
76
|
+
#define LREG(reg,arg) register arg
|
|
77
|
+
#endif
|
|
78
|
+
#if !defined(CONST)
|
|
79
|
+
#define CONST const
|
|
80
|
+
#endif
|
|
81
|
+
#if !defined(SAVEDS)
|
|
82
|
+
#define SAVEDS __saveds
|
|
83
|
+
#endif
|
|
84
|
+
#if !defined(INLINE)
|
|
85
|
+
#define INLINE __inline
|
|
86
|
+
#endif
|
|
87
|
+
#if !defined(REGARGS)
|
|
88
|
+
#define REGARGS __regargs
|
|
89
|
+
#endif
|
|
90
|
+
#if !defined(STDARGS)
|
|
91
|
+
#define STDARGS __stdargs
|
|
92
|
+
#endif
|
|
93
|
+
|
|
94
|
+
#endif /* SDI_COMPILER_H */
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//========================================================================
|
|
2
|
+
// GLFW - An OpenGL framework
|
|
3
|
+
// File: amigaos_enable.c
|
|
4
|
+
// Platforms: AmigaOS, MorphOS
|
|
5
|
+
// API version: 2.6
|
|
6
|
+
// WWW: http://glfw.sourceforge.net
|
|
7
|
+
//------------------------------------------------------------------------
|
|
8
|
+
// Copyright (c) 2002-2006 Camilla Berglund
|
|
9
|
+
//
|
|
10
|
+
// This software is provided 'as-is', without any express or implied
|
|
11
|
+
// warranty. In no event will the authors be held liable for any damages
|
|
12
|
+
// arising from the use of this software.
|
|
13
|
+
//
|
|
14
|
+
// Permission is granted to anyone to use this software for any purpose,
|
|
15
|
+
// including commercial applications, and to alter it and redistribute it
|
|
16
|
+
// freely, subject to the following restrictions:
|
|
17
|
+
//
|
|
18
|
+
// 1. The origin of this software must not be misrepresented; you must not
|
|
19
|
+
// claim that you wrote the original software. If you use this software
|
|
20
|
+
// in a product, an acknowledgment in the product documentation would
|
|
21
|
+
// be appreciated but is not required.
|
|
22
|
+
//
|
|
23
|
+
// 2. Altered source versions must be plainly marked as such, and must not
|
|
24
|
+
// be misrepresented as being the original software.
|
|
25
|
+
//
|
|
26
|
+
// 3. This notice may not be removed or altered from any source
|
|
27
|
+
// distribution.
|
|
28
|
+
//
|
|
29
|
+
//========================================================================
|
|
30
|
+
|
|
31
|
+
#include "internal.h"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
//************************************************************************
|
|
35
|
+
//**** Platform implementation functions ****
|
|
36
|
+
//************************************************************************
|
|
37
|
+
|
|
38
|
+
//========================================================================
|
|
39
|
+
// _glfwPlatformEnableSystemKeys() - Enable system keys
|
|
40
|
+
// _glfwPlatformDisableSystemKeys() - Disable system keys
|
|
41
|
+
//========================================================================
|
|
42
|
+
|
|
43
|
+
void _glfwPlatformEnableSystemKeys( void )
|
|
44
|
+
{
|
|
45
|
+
// Not supported under AmigaOS (yet)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
void _glfwPlatformDisableSystemKeys( void )
|
|
49
|
+
{
|
|
50
|
+
// Not supported under AmigaOS (yet)
|
|
51
|
+
}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
//========================================================================
|
|
2
|
+
// GLFW - An OpenGL framework
|
|
3
|
+
// File: amigaos_fullscreen.c
|
|
4
|
+
// Platforms: AmigaOS, MorphOS
|
|
5
|
+
// API version: 2.6
|
|
6
|
+
// WWW: http://glfw.sourceforge.net
|
|
7
|
+
//------------------------------------------------------------------------
|
|
8
|
+
// Copyright (c) 2002-2006 Camilla Berglund
|
|
9
|
+
//
|
|
10
|
+
// This software is provided 'as-is', without any express or implied
|
|
11
|
+
// warranty. In no event will the authors be held liable for any damages
|
|
12
|
+
// arising from the use of this software.
|
|
13
|
+
//
|
|
14
|
+
// Permission is granted to anyone to use this software for any purpose,
|
|
15
|
+
// including commercial applications, and to alter it and redistribute it
|
|
16
|
+
// freely, subject to the following restrictions:
|
|
17
|
+
//
|
|
18
|
+
// 1. The origin of this software must not be misrepresented; you must not
|
|
19
|
+
// claim that you wrote the original software. If you use this software
|
|
20
|
+
// in a product, an acknowledgment in the product documentation would
|
|
21
|
+
// be appreciated but is not required.
|
|
22
|
+
//
|
|
23
|
+
// 2. Altered source versions must be plainly marked as such, and must not
|
|
24
|
+
// be misrepresented as being the original software.
|
|
25
|
+
//
|
|
26
|
+
// 3. This notice may not be removed or altered from any source
|
|
27
|
+
// distribution.
|
|
28
|
+
//
|
|
29
|
+
//========================================================================
|
|
30
|
+
|
|
31
|
+
#include "internal.h"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
//************************************************************************
|
|
35
|
+
//**** GLFW internal functions ****
|
|
36
|
+
//************************************************************************
|
|
37
|
+
|
|
38
|
+
//========================================================================
|
|
39
|
+
// _glfwBPP2RGB() - Convert BPP to RGB bits (based on "best guess")
|
|
40
|
+
//========================================================================
|
|
41
|
+
|
|
42
|
+
static void _glfwBPP2RGB( int bpp, int *r, int *g, int *b )
|
|
43
|
+
{
|
|
44
|
+
int delta;
|
|
45
|
+
|
|
46
|
+
// Special case: bpp = 32
|
|
47
|
+
if( bpp == 32 ) bpp = 24;
|
|
48
|
+
|
|
49
|
+
// Convert "bits per pixel" to red, green & blue sizes
|
|
50
|
+
*r = *g = *b = bpp / 3;
|
|
51
|
+
delta = bpp - (*r * 3);
|
|
52
|
+
if( delta >= 1 )
|
|
53
|
+
{
|
|
54
|
+
*g = *g + 1;
|
|
55
|
+
}
|
|
56
|
+
if( delta == 2 )
|
|
57
|
+
{
|
|
58
|
+
*r = *r + 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
//========================================================================
|
|
64
|
+
// _glfwGetModeIDInfo() - Return video mode information about a ModeID
|
|
65
|
+
//========================================================================
|
|
66
|
+
|
|
67
|
+
void _glfwGetModeIDInfo( ULONG ModeID, int *w, int *h, int *r, int *g,
|
|
68
|
+
int *b, int *refresh )
|
|
69
|
+
{
|
|
70
|
+
struct DimensionInfo dimsInfo;
|
|
71
|
+
struct DisplayInfo dispInfo;
|
|
72
|
+
struct MonitorInfo monInfo;
|
|
73
|
+
|
|
74
|
+
// Get various display info
|
|
75
|
+
(void) GetDisplayInfoData( NULL,
|
|
76
|
+
(BYTE*) &dimsInfo,
|
|
77
|
+
sizeof(struct DimensionInfo),
|
|
78
|
+
DTAG_DIMS,
|
|
79
|
+
ModeID );
|
|
80
|
+
(void) GetDisplayInfoData( NULL,
|
|
81
|
+
(BYTE*) &dispInfo,
|
|
82
|
+
sizeof(struct DisplayInfo),
|
|
83
|
+
DTAG_DISP,
|
|
84
|
+
ModeID );
|
|
85
|
+
(void) GetDisplayInfoData( NULL,
|
|
86
|
+
(BYTE*) &monInfo,
|
|
87
|
+
sizeof(struct MonitorInfo),
|
|
88
|
+
DTAG_MNTR,
|
|
89
|
+
ModeID );
|
|
90
|
+
|
|
91
|
+
// Extract nominal width & height
|
|
92
|
+
if( w != NULL && h != NULL )
|
|
93
|
+
{
|
|
94
|
+
*w = (int) (dimsInfo.Nominal.MaxX - dimsInfo.Nominal.MinX) + 1;
|
|
95
|
+
*h = (int) (dimsInfo.Nominal.MaxY - dimsInfo.Nominal.MinY) + 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Extract color bits
|
|
99
|
+
if( r != NULL && g != NULL && g != NULL )
|
|
100
|
+
{
|
|
101
|
+
*r = (int) dispInfo.RedBits;
|
|
102
|
+
*g = (int) dispInfo.GreenBits;
|
|
103
|
+
*b = (int) dispInfo.BlueBits;
|
|
104
|
+
|
|
105
|
+
// If depth < sum of RGB bits, we're probably not true color,
|
|
106
|
+
// which means that DisplayInfo red/green/blue bits do not refer
|
|
107
|
+
// to actual pixel color depth => use pixel depth info instead
|
|
108
|
+
if( dimsInfo.MaxDepth < (*r + *g + *b) )
|
|
109
|
+
{
|
|
110
|
+
_glfwBPP2RGB( dimsInfo.MaxDepth, r, g, b );
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Extract refresh rate
|
|
115
|
+
if( refresh != NULL )
|
|
116
|
+
{
|
|
117
|
+
*refresh = (int) (1.0 / ((double) monInfo.TotalRows *
|
|
118
|
+
(double) monInfo.TotalColorClocks *
|
|
119
|
+
280.0e-9) + 0.5 );
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
//========================================================================
|
|
125
|
+
// _glfwGetClosestVideoMode()
|
|
126
|
+
//========================================================================
|
|
127
|
+
|
|
128
|
+
int _glfwGetClosestVideoMode( int *w, int *h, int *r, int *g, int *b,
|
|
129
|
+
int refresh )
|
|
130
|
+
{
|
|
131
|
+
int modeID;
|
|
132
|
+
|
|
133
|
+
// Find best mode
|
|
134
|
+
modeID = BestModeID(
|
|
135
|
+
BIDTAG_NominalWidth, *w,
|
|
136
|
+
BIDTAG_NominalHeight, *h,
|
|
137
|
+
BIDTAG_Depth, *r + *g + *b,
|
|
138
|
+
BIDTAG_RedBits, *r,
|
|
139
|
+
BIDTAG_GreenBits, *g,
|
|
140
|
+
BIDTAG_BlueBits, *b,
|
|
141
|
+
TAG_DONE, 0
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
// Did we get a proper mode?
|
|
145
|
+
if( !modeID )
|
|
146
|
+
{
|
|
147
|
+
return 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Get actual display info
|
|
151
|
+
_glfwGetModeIDInfo( modeID, w, h, r, g, b, NULL );
|
|
152
|
+
|
|
153
|
+
return modeID;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
//========================================================================
|
|
158
|
+
// _glfwOpenScreen() - Open an AmigaOS screen
|
|
159
|
+
//========================================================================
|
|
160
|
+
|
|
161
|
+
int _glfwOpenScreen( int *width, int *height, int *r, int *g, int *b,
|
|
162
|
+
int refresh )
|
|
163
|
+
{
|
|
164
|
+
int bpp, modeID;
|
|
165
|
+
|
|
166
|
+
// Calculate BPP
|
|
167
|
+
bpp = *r + *g + *b;
|
|
168
|
+
|
|
169
|
+
// If colorbits < 8 (e.g. 0) or >= 24, default to 24 bpp
|
|
170
|
+
if( bpp < 8 || bpp >= 24 )
|
|
171
|
+
{
|
|
172
|
+
*r = *g = *b = 8;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Find best matching video mode
|
|
176
|
+
modeID = _glfwGetClosestVideoMode( width, height, r, g, b, refresh );
|
|
177
|
+
|
|
178
|
+
// Open screen
|
|
179
|
+
_glfwWin.Screen = OpenScreenTags(
|
|
180
|
+
NULL,
|
|
181
|
+
SA_Width, *width,
|
|
182
|
+
SA_Height, *height,
|
|
183
|
+
SA_DisplayID, modeID,
|
|
184
|
+
SA_Type, CUSTOMSCREEN,
|
|
185
|
+
SA_SysFont, 1,
|
|
186
|
+
SA_ShowTitle, FALSE,
|
|
187
|
+
TAG_DONE, 0
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
// Did we succeed?
|
|
191
|
+
if( !_glfwWin.Screen )
|
|
192
|
+
{
|
|
193
|
+
printf( "Failed to open Amiga screen\n" );
|
|
194
|
+
return GL_FALSE;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Remember Mode ID
|
|
198
|
+
_glfwWin.ModeID = modeID;
|
|
199
|
+
|
|
200
|
+
/*
|
|
201
|
+
// Debugging information
|
|
202
|
+
printf( "Amiga Screen opened:\n" );
|
|
203
|
+
printf( " ModeID: 0x%08X\n", modeID );
|
|
204
|
+
printf( " Dimensions: %d x %d\n", *width, *height );
|
|
205
|
+
printf( " Color bits: %d : %d : %d\n", *r, *g, *b );
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
return GL_TRUE;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
//************************************************************************
|
|
214
|
+
//**** Platform implementation functions ****
|
|
215
|
+
//************************************************************************
|
|
216
|
+
|
|
217
|
+
//========================================================================
|
|
218
|
+
// _glfwPlatformGetVideoModes() - List available video modes
|
|
219
|
+
//========================================================================
|
|
220
|
+
|
|
221
|
+
int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount )
|
|
222
|
+
{
|
|
223
|
+
ULONG modeID;
|
|
224
|
+
int w, h, r, g, b, bpp, m1, m2, i, j, count;
|
|
225
|
+
|
|
226
|
+
count = 0;
|
|
227
|
+
modeID = INVALID_ID;
|
|
228
|
+
do
|
|
229
|
+
{
|
|
230
|
+
// Enumarate all ModeIDs with NextDisplayInfo
|
|
231
|
+
modeID = NextDisplayInfo( modeID );
|
|
232
|
+
if( modeID != INVALID_ID )
|
|
233
|
+
{
|
|
234
|
+
// Get related video mode information
|
|
235
|
+
_glfwGetModeIDInfo( modeID, &w, &h, &r, &g, &b, NULL );
|
|
236
|
+
|
|
237
|
+
// Convert RGB to BPP
|
|
238
|
+
bpp = r + g + b;
|
|
239
|
+
|
|
240
|
+
// We only support true-color modes, which means at least 15
|
|
241
|
+
// bits per pixel (reasonable?) - Sorry, AGA users!
|
|
242
|
+
if( bpp >= 15 )
|
|
243
|
+
{
|
|
244
|
+
// Mode "code" for this mode
|
|
245
|
+
m1 = (bpp << 25) | (w*h);
|
|
246
|
+
|
|
247
|
+
// Insert mode in list (sorted), and avoid duplicates
|
|
248
|
+
for( i = 0; i < count; i ++ )
|
|
249
|
+
{
|
|
250
|
+
// Mode "code" for already listed mode
|
|
251
|
+
bpp = list[i].RedBits + list[i].GreenBits +
|
|
252
|
+
list[i].BlueBits;
|
|
253
|
+
m2 = (bpp << 25) | (list[i].Width * list[i].Height);
|
|
254
|
+
if( m1 <= m2 )
|
|
255
|
+
{
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// New entry at the end of the list?
|
|
261
|
+
if( i >= count )
|
|
262
|
+
{
|
|
263
|
+
list[count].Width = w;
|
|
264
|
+
list[count].Height = h;
|
|
265
|
+
list[count].RedBits = r;
|
|
266
|
+
list[count].GreenBits = g;
|
|
267
|
+
list[count].BlueBits = b;
|
|
268
|
+
count ++;
|
|
269
|
+
}
|
|
270
|
+
// Insert new entry in the list?
|
|
271
|
+
else if( m1 < m2 )
|
|
272
|
+
{
|
|
273
|
+
for( j = count; j > i; j -- )
|
|
274
|
+
{
|
|
275
|
+
list[j] = list[j-1];
|
|
276
|
+
}
|
|
277
|
+
list[i].Width = w;
|
|
278
|
+
list[i].Height = h;
|
|
279
|
+
list[i].RedBits = r;
|
|
280
|
+
list[i].GreenBits = g;
|
|
281
|
+
list[i].BlueBits = b;
|
|
282
|
+
count ++;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
while( modeID != INVALID_ID && count < maxcount );
|
|
288
|
+
|
|
289
|
+
return count;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
//========================================================================
|
|
294
|
+
// _glfwPlatformGetDesktopMode() - Get the desktop video mode
|
|
295
|
+
//========================================================================
|
|
296
|
+
|
|
297
|
+
void _glfwPlatformGetDesktopMode( GLFWvidmode *mode )
|
|
298
|
+
{
|
|
299
|
+
struct Screen *pubscreen;
|
|
300
|
+
ULONG modeID;
|
|
301
|
+
|
|
302
|
+
// Get default public screen screen handle
|
|
303
|
+
pubscreen = LockPubScreen( NULL );
|
|
304
|
+
|
|
305
|
+
// Get screen width and height (use actual screen size rather than
|
|
306
|
+
// ModeID nominal size)
|
|
307
|
+
mode->Width = (int) pubscreen->Width;
|
|
308
|
+
mode->Height = (int) pubscreen->Height;
|
|
309
|
+
|
|
310
|
+
// Get ModeID for public screen
|
|
311
|
+
modeID = GetVPModeID( &pubscreen->ViewPort );
|
|
312
|
+
|
|
313
|
+
// Release workbench screen
|
|
314
|
+
UnlockPubScreen( NULL, pubscreen );
|
|
315
|
+
|
|
316
|
+
// Get color bits information
|
|
317
|
+
_glfwGetModeIDInfo( modeID, NULL, NULL, &mode->RedBits,
|
|
318
|
+
&mode->GreenBits, &mode->BlueBits, NULL );
|
|
319
|
+
}
|