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,349 @@
|
|
1
|
+
//========================================================================
|
2
|
+
// GLFW - An OpenGL framework
|
3
|
+
// File: glfw.d
|
4
|
+
// API version: 2.5
|
5
|
+
// WWW: http://glfw.sourceforge.net
|
6
|
+
//------------------------------------------------------------------------
|
7
|
+
// Copyright (c) 2002-2005 Camilla Berglund
|
8
|
+
//
|
9
|
+
// This software is provided 'as-is', without any express or implied
|
10
|
+
// warranty. In no event will the authors be held liable for any damages
|
11
|
+
// arising from the use of this software.
|
12
|
+
//
|
13
|
+
// Permission is granted to anyone to use this software for any purpose,
|
14
|
+
// including commercial applications, and to alter it and redistribute it
|
15
|
+
// freely, subject to the following restrictions:
|
16
|
+
//
|
17
|
+
// 1. The origin of this software must not be misrepresented; you must not
|
18
|
+
// claim that you wrote the original software. If you use this software
|
19
|
+
// in a product, an acknowledgment in the product documentation would
|
20
|
+
// be appreciated but is not required.
|
21
|
+
//
|
22
|
+
// 2. Altered source versions must be plainly marked as such, and must not
|
23
|
+
// be misrepresented as being the original software.
|
24
|
+
//
|
25
|
+
// 3. This notice may not be removed or altered from any source
|
26
|
+
// distribution.
|
27
|
+
//
|
28
|
+
//========================================================================
|
29
|
+
|
30
|
+
public import gl, glu;
|
31
|
+
|
32
|
+
|
33
|
+
version(Win32)
|
34
|
+
extern(Windows):
|
35
|
+
else
|
36
|
+
extern(C):
|
37
|
+
|
38
|
+
|
39
|
+
//========================================================================
|
40
|
+
// GLFW version
|
41
|
+
//========================================================================
|
42
|
+
|
43
|
+
const int GLFW_VERSION_MAJOR = 2;
|
44
|
+
const int GLFW_VERSION_MINOR = 5;
|
45
|
+
const int GLFW_VERSION_REVISION = 0;
|
46
|
+
|
47
|
+
|
48
|
+
//========================================================================
|
49
|
+
// Input handling definitions
|
50
|
+
//========================================================================
|
51
|
+
|
52
|
+
// Key and button state/action definitions
|
53
|
+
const int GLFW_RELEASE = 0;
|
54
|
+
const int GLFW_PRESS = 1;
|
55
|
+
|
56
|
+
// Keyboard key definitions: 8-bit ISO-8859-1 (Latin 1) encoding is used
|
57
|
+
// for printable keys (such as A-Z, 0-9 etc), and values above 256
|
58
|
+
// represent special (non-printable) keys (e.g. F1, Page Up etc).
|
59
|
+
const int GLFW_KEY_UNKNOWN = -1;
|
60
|
+
const int GLFW_KEY_SPACE = 32;
|
61
|
+
const int GLFW_KEY_SPECIAL = 256;
|
62
|
+
const int GLFW_KEY_ESC = (GLFW_KEY_SPECIAL+1);
|
63
|
+
const int GLFW_KEY_F1 = (GLFW_KEY_SPECIAL+2);
|
64
|
+
const int GLFW_KEY_F2 = (GLFW_KEY_SPECIAL+3);
|
65
|
+
const int GLFW_KEY_F3 = (GLFW_KEY_SPECIAL+4);
|
66
|
+
const int GLFW_KEY_F4 = (GLFW_KEY_SPECIAL+5);
|
67
|
+
const int GLFW_KEY_F5 = (GLFW_KEY_SPECIAL+6);
|
68
|
+
const int GLFW_KEY_F6 = (GLFW_KEY_SPECIAL+7);
|
69
|
+
const int GLFW_KEY_F7 = (GLFW_KEY_SPECIAL+8);
|
70
|
+
const int GLFW_KEY_F8 = (GLFW_KEY_SPECIAL+9);
|
71
|
+
const int GLFW_KEY_F9 = (GLFW_KEY_SPECIAL+10);
|
72
|
+
const int GLFW_KEY_F10 = (GLFW_KEY_SPECIAL+11);
|
73
|
+
const int GLFW_KEY_F11 = (GLFW_KEY_SPECIAL+12);
|
74
|
+
const int GLFW_KEY_F12 = (GLFW_KEY_SPECIAL+13);
|
75
|
+
const int GLFW_KEY_F13 = (GLFW_KEY_SPECIAL+14);
|
76
|
+
const int GLFW_KEY_F14 = (GLFW_KEY_SPECIAL+15);
|
77
|
+
const int GLFW_KEY_F15 = (GLFW_KEY_SPECIAL+16);
|
78
|
+
const int GLFW_KEY_F16 = (GLFW_KEY_SPECIAL+17);
|
79
|
+
const int GLFW_KEY_F17 = (GLFW_KEY_SPECIAL+18);
|
80
|
+
const int GLFW_KEY_F18 = (GLFW_KEY_SPECIAL+19);
|
81
|
+
const int GLFW_KEY_F19 = (GLFW_KEY_SPECIAL+20);
|
82
|
+
const int GLFW_KEY_F20 = (GLFW_KEY_SPECIAL+21);
|
83
|
+
const int GLFW_KEY_F21 = (GLFW_KEY_SPECIAL+22);
|
84
|
+
const int GLFW_KEY_F22 = (GLFW_KEY_SPECIAL+23);
|
85
|
+
const int GLFW_KEY_F23 = (GLFW_KEY_SPECIAL+24);
|
86
|
+
const int GLFW_KEY_F24 = (GLFW_KEY_SPECIAL+25);
|
87
|
+
const int GLFW_KEY_F25 = (GLFW_KEY_SPECIAL+26);
|
88
|
+
const int GLFW_KEY_UP = (GLFW_KEY_SPECIAL+27);
|
89
|
+
const int GLFW_KEY_DOWN = (GLFW_KEY_SPECIAL+28);
|
90
|
+
const int GLFW_KEY_LEFT = (GLFW_KEY_SPECIAL+29);
|
91
|
+
const int GLFW_KEY_RIGHT = (GLFW_KEY_SPECIAL+30);
|
92
|
+
const int GLFW_KEY_LSHIFT = (GLFW_KEY_SPECIAL+31);
|
93
|
+
const int GLFW_KEY_RSHIFT = (GLFW_KEY_SPECIAL+32);
|
94
|
+
const int GLFW_KEY_LCTRL = (GLFW_KEY_SPECIAL+33);
|
95
|
+
const int GLFW_KEY_RCTRL = (GLFW_KEY_SPECIAL+34);
|
96
|
+
const int GLFW_KEY_LALT = (GLFW_KEY_SPECIAL+35);
|
97
|
+
const int GLFW_KEY_RALT = (GLFW_KEY_SPECIAL+36);
|
98
|
+
const int GLFW_KEY_TAB = (GLFW_KEY_SPECIAL+37);
|
99
|
+
const int GLFW_KEY_ENTER = (GLFW_KEY_SPECIAL+38);
|
100
|
+
const int GLFW_KEY_BACKSPACE = (GLFW_KEY_SPECIAL+39);
|
101
|
+
const int GLFW_KEY_INSERT = (GLFW_KEY_SPECIAL+40);
|
102
|
+
const int GLFW_KEY_DEL = (GLFW_KEY_SPECIAL+41);
|
103
|
+
const int GLFW_KEY_PAGEUP = (GLFW_KEY_SPECIAL+42);
|
104
|
+
const int GLFW_KEY_PAGEDOWN = (GLFW_KEY_SPECIAL+43);
|
105
|
+
const int GLFW_KEY_HOME = (GLFW_KEY_SPECIAL+44);
|
106
|
+
const int GLFW_KEY_END = (GLFW_KEY_SPECIAL+45);
|
107
|
+
const int GLFW_KEY_KP_0 = (GLFW_KEY_SPECIAL+46);
|
108
|
+
const int GLFW_KEY_KP_1 = (GLFW_KEY_SPECIAL+47);
|
109
|
+
const int GLFW_KEY_KP_2 = (GLFW_KEY_SPECIAL+48);
|
110
|
+
const int GLFW_KEY_KP_3 = (GLFW_KEY_SPECIAL+49);
|
111
|
+
const int GLFW_KEY_KP_4 = (GLFW_KEY_SPECIAL+50);
|
112
|
+
const int GLFW_KEY_KP_5 = (GLFW_KEY_SPECIAL+51);
|
113
|
+
const int GLFW_KEY_KP_6 = (GLFW_KEY_SPECIAL+52);
|
114
|
+
const int GLFW_KEY_KP_7 = (GLFW_KEY_SPECIAL+53);
|
115
|
+
const int GLFW_KEY_KP_8 = (GLFW_KEY_SPECIAL+54);
|
116
|
+
const int GLFW_KEY_KP_9 = (GLFW_KEY_SPECIAL+55);
|
117
|
+
const int GLFW_KEY_KP_DIVIDE = (GLFW_KEY_SPECIAL+56);
|
118
|
+
const int GLFW_KEY_KP_MULTIPLY = (GLFW_KEY_SPECIAL+57);
|
119
|
+
const int GLFW_KEY_KP_SUBTRACT = (GLFW_KEY_SPECIAL+58);
|
120
|
+
const int GLFW_KEY_KP_ADD = (GLFW_KEY_SPECIAL+59);
|
121
|
+
const int GLFW_KEY_KP_DECIMAL = (GLFW_KEY_SPECIAL+60);
|
122
|
+
const int GLFW_KEY_KP_EQUAL = (GLFW_KEY_SPECIAL+61);
|
123
|
+
const int GLFW_KEY_KP_ENTER = (GLFW_KEY_SPECIAL+62);
|
124
|
+
const int GLFW_KEY_LAST = GLFW_KEY_KP_ENTER;
|
125
|
+
|
126
|
+
// Mouse button definitions
|
127
|
+
const int GLFW_MOUSE_BUTTON_1 = 0;
|
128
|
+
const int GLFW_MOUSE_BUTTON_2 = 1;
|
129
|
+
const int GLFW_MOUSE_BUTTON_3 = 2;
|
130
|
+
const int GLFW_MOUSE_BUTTON_4 = 3;
|
131
|
+
const int GLFW_MOUSE_BUTTON_5 = 4;
|
132
|
+
const int GLFW_MOUSE_BUTTON_6 = 5;
|
133
|
+
const int GLFW_MOUSE_BUTTON_7 = 6;
|
134
|
+
const int GLFW_MOUSE_BUTTON_8 = 7;
|
135
|
+
const int GLFW_MOUSE_BUTTON_LAST = GLFW_MOUSE_BUTTON_8;
|
136
|
+
|
137
|
+
// Mouse button aliases
|
138
|
+
const int GLFW_MOUSE_BUTTON_LEFT = GLFW_MOUSE_BUTTON_1;
|
139
|
+
const int GLFW_MOUSE_BUTTON_RIGHT = GLFW_MOUSE_BUTTON_2;
|
140
|
+
const int GLFW_MOUSE_BUTTON_MIDDLE = GLFW_MOUSE_BUTTON_3;
|
141
|
+
|
142
|
+
// Joystick identifiers
|
143
|
+
const int GLFW_JOYSTICK_1 = 0;
|
144
|
+
const int GLFW_JOYSTICK_2 = 1;
|
145
|
+
const int GLFW_JOYSTICK_3 = 2;
|
146
|
+
const int GLFW_JOYSTICK_4 = 3;
|
147
|
+
const int GLFW_JOYSTICK_5 = 4;
|
148
|
+
const int GLFW_JOYSTICK_6 = 5;
|
149
|
+
const int GLFW_JOYSTICK_7 = 6;
|
150
|
+
const int GLFW_JOYSTICK_8 = 7;
|
151
|
+
const int GLFW_JOYSTICK_9 = 8;
|
152
|
+
const int GLFW_JOYSTICK_10 = 9;
|
153
|
+
const int GLFW_JOYSTICK_11 = 10;
|
154
|
+
const int GLFW_JOYSTICK_12 = 11;
|
155
|
+
const int GLFW_JOYSTICK_13 = 12;
|
156
|
+
const int GLFW_JOYSTICK_14 = 13;
|
157
|
+
const int GLFW_JOYSTICK_15 = 14;
|
158
|
+
const int GLFW_JOYSTICK_16 = 15;
|
159
|
+
const int GLFW_JOYSTICK_LAST = GLFW_JOYSTICK_16;
|
160
|
+
|
161
|
+
|
162
|
+
//========================================================================
|
163
|
+
// Other definitions
|
164
|
+
//========================================================================
|
165
|
+
|
166
|
+
// glfwOpenWindow modes
|
167
|
+
const int GLFW_WINDOW = 0x00010001;
|
168
|
+
const int GLFW_FULLSCREEN = 0x00010002;
|
169
|
+
|
170
|
+
// glfwGetWindowParam tokens
|
171
|
+
const int GLFW_OPENED = 0x00020001;
|
172
|
+
const int GLFW_ACTIVE = 0x00020002;
|
173
|
+
const int GLFW_ICONIFIED = 0x00020003;
|
174
|
+
const int GLFW_ACCELERATED = 0x00020004;
|
175
|
+
const int GLFW_RED_BITS = 0x00020005;
|
176
|
+
const int GLFW_GREEN_BITS = 0x00020006;
|
177
|
+
const int GLFW_BLUE_BITS = 0x00020007;
|
178
|
+
const int GLFW_ALPHA_BITS = 0x00020008;
|
179
|
+
const int GLFW_DEPTH_BITS = 0x00020009;
|
180
|
+
const int GLFW_STENCIL_BITS = 0x0002000A;
|
181
|
+
|
182
|
+
// The following constants are used for both glfwGetWindowParam
|
183
|
+
// and glfwOpenWindowHint
|
184
|
+
const int GLFW_REFRESH_RATE = 0x0002000B;
|
185
|
+
const int GLFW_ACCUM_RED_BITS = 0x0002000C;
|
186
|
+
const int GLFW_ACCUM_GREEN_BITS = 0x0002000D;
|
187
|
+
const int GLFW_ACCUM_BLUE_BITS = 0x0002000E;
|
188
|
+
const int GLFW_ACCUM_ALPHA_BITS = 0x0002000F;
|
189
|
+
const int GLFW_AUX_BUFFERS = 0x00020010;
|
190
|
+
const int GLFW_STEREO = 0x00020011;
|
191
|
+
const int GLFW_WINDOW_NO_RESIZE = 0x00020012;
|
192
|
+
const int GLFW_FSAA_SAMPLES = 0x00020013;
|
193
|
+
|
194
|
+
// glfwEnable/glfwDisable tokens
|
195
|
+
const int GLFW_MOUSE_CURSOR = 0x00030001;
|
196
|
+
const int GLFW_STICKY_KEYS = 0x00030002;
|
197
|
+
const int GLFW_STICKY_MOUSE_BUTTONS = 0x00030003;
|
198
|
+
const int GLFW_SYSTEM_KEYS = 0x00030004;
|
199
|
+
const int GLFW_KEY_REPEAT = 0x00030005;
|
200
|
+
const int GLFW_AUTO_POLL_EVENTS = 0x00030006;
|
201
|
+
|
202
|
+
// glfwWaitThread wait modes
|
203
|
+
const int GLFW_WAIT = 0x00040001;
|
204
|
+
const int GLFW_NOWAIT = 0x00040002;
|
205
|
+
|
206
|
+
// glfwGetJoystickParam tokens
|
207
|
+
const int GLFW_PRESENT = 0x00050001;
|
208
|
+
const int GLFW_AXES = 0x00050002;
|
209
|
+
const int GLFW_BUTTONS = 0x00050003;
|
210
|
+
|
211
|
+
// glfwReadImage/glfwLoadTexture2D flags
|
212
|
+
const int GLFW_NO_RESCALE_BIT = 0x00000001; // Only for glfwReadImage
|
213
|
+
const int GLFW_ORIGIN_UL_BIT = 0x00000002;
|
214
|
+
const int GLFW_BUILD_MIPMAPS_BIT = 0x00000004; // Only for glfwLoadTexture2D
|
215
|
+
const int GLFW_ALPHA_MAP_BIT = 0x00000008;
|
216
|
+
|
217
|
+
// Time spans longer than this (seconds) are considered to be infinity
|
218
|
+
const double GLFW_INFINITY = 100000.0;
|
219
|
+
|
220
|
+
|
221
|
+
//========================================================================
|
222
|
+
// Typedefs
|
223
|
+
//========================================================================
|
224
|
+
|
225
|
+
// The video mode structure used by glfwGetVideoModes()
|
226
|
+
struct GLFWvidmode
|
227
|
+
{
|
228
|
+
int Width, Height;
|
229
|
+
int RedBits, BlueBits, GreenBits;
|
230
|
+
}
|
231
|
+
|
232
|
+
// Image/texture information
|
233
|
+
struct GLFWimage
|
234
|
+
{
|
235
|
+
int Width, Height;
|
236
|
+
int Format;
|
237
|
+
int BytesPerPixel;
|
238
|
+
char *Data;
|
239
|
+
}
|
240
|
+
|
241
|
+
// Thread ID
|
242
|
+
alias int GLFWthread;
|
243
|
+
|
244
|
+
// Mutex object
|
245
|
+
alias void* GLFWmutex;
|
246
|
+
|
247
|
+
// Condition variable object
|
248
|
+
alias void* GLFWcond;
|
249
|
+
|
250
|
+
// Function pointer types
|
251
|
+
typedef void (* GLFWwindowsizefun)(int, int);
|
252
|
+
typedef int (* GLFWwindowclosefun)();
|
253
|
+
typedef void (* GLFWwindowrefreshfun)();
|
254
|
+
typedef void (* GLFWmousebuttonfun)(int, int);
|
255
|
+
typedef void (* GLFWmouseposfun)(int, int);
|
256
|
+
typedef void (* GLFWmousewheelfun)(int);
|
257
|
+
typedef void (* GLFWkeyfun)(int, int);
|
258
|
+
typedef void (* GLFWcharfun)(int, int);
|
259
|
+
typedef void (* GLFWthreadfun)(void *);
|
260
|
+
|
261
|
+
|
262
|
+
//========================================================================
|
263
|
+
// Prototypes
|
264
|
+
//========================================================================
|
265
|
+
|
266
|
+
// GLFW initialization, termination and version querying
|
267
|
+
int glfwInit();
|
268
|
+
void glfwTerminate();
|
269
|
+
void glfwGetVersion( int *major, int *minor, int *rev );
|
270
|
+
|
271
|
+
// Window handling
|
272
|
+
int glfwOpenWindow( int width, int height, int redbits, int greenbits, int bluebits, int alphabits, int depthbits, int stencilbits, int mode );
|
273
|
+
void glfwOpenWindowHint( int target, int hint );
|
274
|
+
void glfwCloseWindow();
|
275
|
+
void glfwSetWindowTitle( char *title );
|
276
|
+
void glfwGetWindowSize( int *width, int *height );
|
277
|
+
void glfwSetWindowSize( int width, int height );
|
278
|
+
void glfwSetWindowPos( int x, int y );
|
279
|
+
void glfwIconifyWindow();
|
280
|
+
void glfwRestoreWindow();
|
281
|
+
void glfwSwapBuffers();
|
282
|
+
void glfwSwapInterval( int interval );
|
283
|
+
int glfwGetWindowParam( int param );
|
284
|
+
void glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun );
|
285
|
+
void glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun );
|
286
|
+
void glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun );
|
287
|
+
|
288
|
+
// Video mode functions
|
289
|
+
int glfwGetVideoModes( GLFWvidmode *list, int maxcount );
|
290
|
+
void glfwGetDesktopMode( GLFWvidmode *mode );
|
291
|
+
|
292
|
+
// Input handling
|
293
|
+
void glfwPollEvents();
|
294
|
+
void glfwWaitEvents();
|
295
|
+
int glfwGetKey( int key );
|
296
|
+
int glfwGetMouseButton( int button );
|
297
|
+
void glfwGetMousePos( int *xpos, int *ypos );
|
298
|
+
void glfwSetMousePos( int xpos, int ypos );
|
299
|
+
int glfwGetMouseWheel();
|
300
|
+
void glfwSetMouseWheel( int pos );
|
301
|
+
void glfwSetKeyCallback( GLFWkeyfun cbfun );
|
302
|
+
void glfwSetCharCallback( GLFWcharfun cbfun );
|
303
|
+
void glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun );
|
304
|
+
void glfwSetMousePosCallback( GLFWmouseposfun cbfun );
|
305
|
+
void glfwSetMouseWheelCallback( GLFWmousewheelfun cbfun );
|
306
|
+
|
307
|
+
// Joystick input
|
308
|
+
int glfwGetJoystickParam( int joy, int param );
|
309
|
+
int glfwGetJoystickPos( int joy, float *pos, int numaxes );
|
310
|
+
int glfwGetJoystickButtons( int joy, char *buttons, int numbuttons );
|
311
|
+
|
312
|
+
// Time
|
313
|
+
double glfwGetTime();
|
314
|
+
void glfwSetTime( double time );
|
315
|
+
void glfwSleep( double time );
|
316
|
+
|
317
|
+
// Extension support
|
318
|
+
int glfwExtensionSupported( char *extension );
|
319
|
+
void* glfwGetProcAddress( char *procname );
|
320
|
+
void glfwGetGLVersion( int *major, int *minor, int *rev );
|
321
|
+
|
322
|
+
// Threading support
|
323
|
+
GLFWthread glfwCreateThread( GLFWthreadfun fun, void *arg );
|
324
|
+
void glfwDestroyThread( GLFWthread ID );
|
325
|
+
int glfwWaitThread( GLFWthread ID, int waitmode );
|
326
|
+
GLFWthread glfwGetThreadID();
|
327
|
+
GLFWmutex glfwCreateMutex();
|
328
|
+
void glfwDestroyMutex( GLFWmutex mutex );
|
329
|
+
void glfwLockMutex( GLFWmutex mutex );
|
330
|
+
void glfwUnlockMutex( GLFWmutex mutex );
|
331
|
+
GLFWcond glfwCreateCond();
|
332
|
+
void glfwDestroyCond( GLFWcond cond );
|
333
|
+
void glfwWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout );
|
334
|
+
void glfwSignalCond( GLFWcond cond );
|
335
|
+
void glfwBroadcastCond( GLFWcond cond );
|
336
|
+
int glfwGetNumberOfProcessors();
|
337
|
+
|
338
|
+
// Enable/disable functions
|
339
|
+
void glfwEnable( int token );
|
340
|
+
void glfwDisable( int token );
|
341
|
+
|
342
|
+
// Image/texture I/O support
|
343
|
+
int glfwReadImage( char *name, GLFWimage *img, int flags );
|
344
|
+
int glfwReadMemoryImage( const void *data, long size, GLFWimage *img, int flags );
|
345
|
+
void glfwFreeImage( GLFWimage *img );
|
346
|
+
int glfwLoadTexture2D( char *name, int flags );
|
347
|
+
int glfwLoadMemoryTexture2D( const void *data, long size, int flags );
|
348
|
+
int glfwLoadTextureImage2D( GLFWimage *img, int flags );
|
349
|
+
|
@@ -0,0 +1,328 @@
|
|
1
|
+
/************************************************************************
|
2
|
+
*
|
3
|
+
* GLU 1.0 - 1.3 module for the D programming language
|
4
|
+
* (http://www.digitalmars.com/d/)
|
5
|
+
*
|
6
|
+
* Conversion by Marcus Geelnard
|
7
|
+
*
|
8
|
+
* Originally based on glu.h from the SGI Open Source Sample
|
9
|
+
* Implementation.
|
10
|
+
*
|
11
|
+
************************************************************************/
|
12
|
+
|
13
|
+
import gl;
|
14
|
+
|
15
|
+
|
16
|
+
version (Win32) {
|
17
|
+
extern (Windows):
|
18
|
+
}
|
19
|
+
version (linux) {
|
20
|
+
extern (C):
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
/************************************************************************
|
25
|
+
*
|
26
|
+
* GLU versions supported by this module (1.0 is assumed, and requires
|
27
|
+
* no further introduction)
|
28
|
+
*
|
29
|
+
************************************************************************/
|
30
|
+
|
31
|
+
const uint GLU_VERSION_1_1 = 1;
|
32
|
+
const uint GLU_VERSION_1_2 = 1;
|
33
|
+
const uint GLU_VERSION_1_3 = 1;
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
/************************************************************************
|
38
|
+
*
|
39
|
+
* Datatypes
|
40
|
+
*
|
41
|
+
************************************************************************/
|
42
|
+
|
43
|
+
alias void GLUnurbs;
|
44
|
+
alias void GLUquadric;
|
45
|
+
alias void GLUtesselator;
|
46
|
+
|
47
|
+
alias GLUnurbs GLUnurbsObj;
|
48
|
+
alias GLUquadric GLUquadricObj;
|
49
|
+
alias GLUtesselator GLUtesselatorObj;
|
50
|
+
alias GLUtesselator GLUtriangulatorObj;
|
51
|
+
|
52
|
+
/* Internal convenience typedef */
|
53
|
+
typedef void (* _GLUfuncptr)();
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
/************************************************************************
|
58
|
+
*
|
59
|
+
* Constants
|
60
|
+
*
|
61
|
+
************************************************************************/
|
62
|
+
|
63
|
+
/* Boolean */
|
64
|
+
const uint GLU_FALSE = 0;
|
65
|
+
const uint GLU_TRUE = 1;
|
66
|
+
|
67
|
+
|
68
|
+
/* StringName */
|
69
|
+
const uint GLU_VERSION = 100800;
|
70
|
+
const uint GLU_EXTENSIONS = 100801;
|
71
|
+
|
72
|
+
/* ErrorCode */
|
73
|
+
const uint GLU_INVALID_ENUM = 100900;
|
74
|
+
const uint GLU_INVALID_VALUE = 100901;
|
75
|
+
const uint GLU_OUT_OF_MEMORY = 100902;
|
76
|
+
const uint GLU_INVALID_OPERATION = 100904;
|
77
|
+
|
78
|
+
/* NurbsDisplay */
|
79
|
+
/* GLU_FILL */
|
80
|
+
const uint GLU_OUTLINE_POLYGON = 100240;
|
81
|
+
const uint GLU_OUTLINE_PATCH = 100241;
|
82
|
+
|
83
|
+
/* NurbsCallback */
|
84
|
+
const uint GLU_NURBS_ERROR = 100103;
|
85
|
+
const uint GLU_ERROR = 100103;
|
86
|
+
const uint GLU_NURBS_BEGIN = 100164;
|
87
|
+
const uint GLU_NURBS_BEGIN_EXT = 100164;
|
88
|
+
const uint GLU_NURBS_VERTEX = 100165;
|
89
|
+
const uint GLU_NURBS_VERTEX_EXT = 100165;
|
90
|
+
const uint GLU_NURBS_NORMAL = 100166;
|
91
|
+
const uint GLU_NURBS_NORMAL_EXT = 100166;
|
92
|
+
const uint GLU_NURBS_COLOR = 100167;
|
93
|
+
const uint GLU_NURBS_COLOR_EXT = 100167;
|
94
|
+
const uint GLU_NURBS_TEXTURE_COORD = 100168;
|
95
|
+
const uint GLU_NURBS_TEX_COORD_EXT = 100168;
|
96
|
+
const uint GLU_NURBS_END = 100169;
|
97
|
+
const uint GLU_NURBS_END_EXT = 100169;
|
98
|
+
const uint GLU_NURBS_BEGIN_DATA = 100170;
|
99
|
+
const uint GLU_NURBS_BEGIN_DATA_EXT = 100170;
|
100
|
+
const uint GLU_NURBS_VERTEX_DATA = 100171;
|
101
|
+
const uint GLU_NURBS_VERTEX_DATA_EXT = 100171;
|
102
|
+
const uint GLU_NURBS_NORMAL_DATA = 100172;
|
103
|
+
const uint GLU_NURBS_NORMAL_DATA_EXT = 100172;
|
104
|
+
const uint GLU_NURBS_COLOR_DATA = 100173;
|
105
|
+
const uint GLU_NURBS_COLOR_DATA_EXT = 100173;
|
106
|
+
const uint GLU_NURBS_TEXTURE_COORD_DATA = 100174;
|
107
|
+
const uint GLU_NURBS_TEX_COORD_DATA_EXT = 100174;
|
108
|
+
const uint GLU_NURBS_END_DATA = 100175;
|
109
|
+
const uint GLU_NURBS_END_DATA_EXT = 100175;
|
110
|
+
|
111
|
+
/* NurbsError */
|
112
|
+
const uint GLU_NURBS_ERROR1 = 100251;
|
113
|
+
const uint GLU_NURBS_ERROR2 = 100252;
|
114
|
+
const uint GLU_NURBS_ERROR3 = 100253;
|
115
|
+
const uint GLU_NURBS_ERROR4 = 100254;
|
116
|
+
const uint GLU_NURBS_ERROR5 = 100255;
|
117
|
+
const uint GLU_NURBS_ERROR6 = 100256;
|
118
|
+
const uint GLU_NURBS_ERROR7 = 100257;
|
119
|
+
const uint GLU_NURBS_ERROR8 = 100258;
|
120
|
+
const uint GLU_NURBS_ERROR9 = 100259;
|
121
|
+
const uint GLU_NURBS_ERROR10 = 100260;
|
122
|
+
const uint GLU_NURBS_ERROR11 = 100261;
|
123
|
+
const uint GLU_NURBS_ERROR12 = 100262;
|
124
|
+
const uint GLU_NURBS_ERROR13 = 100263;
|
125
|
+
const uint GLU_NURBS_ERROR14 = 100264;
|
126
|
+
const uint GLU_NURBS_ERROR15 = 100265;
|
127
|
+
const uint GLU_NURBS_ERROR16 = 100266;
|
128
|
+
const uint GLU_NURBS_ERROR17 = 100267;
|
129
|
+
const uint GLU_NURBS_ERROR18 = 100268;
|
130
|
+
const uint GLU_NURBS_ERROR19 = 100269;
|
131
|
+
const uint GLU_NURBS_ERROR20 = 100270;
|
132
|
+
const uint GLU_NURBS_ERROR21 = 100271;
|
133
|
+
const uint GLU_NURBS_ERROR22 = 100272;
|
134
|
+
const uint GLU_NURBS_ERROR23 = 100273;
|
135
|
+
const uint GLU_NURBS_ERROR24 = 100274;
|
136
|
+
const uint GLU_NURBS_ERROR25 = 100275;
|
137
|
+
const uint GLU_NURBS_ERROR26 = 100276;
|
138
|
+
const uint GLU_NURBS_ERROR27 = 100277;
|
139
|
+
const uint GLU_NURBS_ERROR28 = 100278;
|
140
|
+
const uint GLU_NURBS_ERROR29 = 100279;
|
141
|
+
const uint GLU_NURBS_ERROR30 = 100280;
|
142
|
+
const uint GLU_NURBS_ERROR31 = 100281;
|
143
|
+
const uint GLU_NURBS_ERROR32 = 100282;
|
144
|
+
const uint GLU_NURBS_ERROR33 = 100283;
|
145
|
+
const uint GLU_NURBS_ERROR34 = 100284;
|
146
|
+
const uint GLU_NURBS_ERROR35 = 100285;
|
147
|
+
const uint GLU_NURBS_ERROR36 = 100286;
|
148
|
+
const uint GLU_NURBS_ERROR37 = 100287;
|
149
|
+
|
150
|
+
/* NurbsProperty */
|
151
|
+
const uint GLU_AUTO_LOAD_MATRIX = 100200;
|
152
|
+
const uint GLU_CULLING = 100201;
|
153
|
+
const uint GLU_SAMPLING_TOLERANCE = 100203;
|
154
|
+
const uint GLU_DISPLAY_MODE = 100204;
|
155
|
+
const uint GLU_PARAMETRIC_TOLERANCE = 100202;
|
156
|
+
const uint GLU_SAMPLING_METHOD = 100205;
|
157
|
+
const uint GLU_U_STEP = 100206;
|
158
|
+
const uint GLU_V_STEP = 100207;
|
159
|
+
const uint GLU_NURBS_MODE = 100160;
|
160
|
+
const uint GLU_NURBS_MODE_EXT = 100160;
|
161
|
+
const uint GLU_NURBS_TESSELLATOR = 100161;
|
162
|
+
const uint GLU_NURBS_TESSELLATOR_EXT = 100161;
|
163
|
+
const uint GLU_NURBS_RENDERER = 100162;
|
164
|
+
const uint GLU_NURBS_RENDERER_EXT = 100162;
|
165
|
+
|
166
|
+
/* NurbsSampling */
|
167
|
+
const uint GLU_OBJECT_PARAMETRIC_ERROR = 100208;
|
168
|
+
const uint GLU_OBJECT_PARAMETRIC_ERROR_EXT = 100208;
|
169
|
+
const uint GLU_OBJECT_PATH_LENGTH = 100209;
|
170
|
+
const uint GLU_OBJECT_PATH_LENGTH_EXT = 100209;
|
171
|
+
const uint GLU_PATH_LENGTH = 100215;
|
172
|
+
const uint GLU_PARAMETRIC_ERROR = 100216;
|
173
|
+
const uint GLU_DOMAIN_DISTANCE = 100217;
|
174
|
+
|
175
|
+
/* NurbsTrim */
|
176
|
+
const uint GLU_MAP1_TRIM_2 = 100210;
|
177
|
+
const uint GLU_MAP1_TRIM_3 = 100211;
|
178
|
+
|
179
|
+
/* QuadricDrawStyle */
|
180
|
+
const uint GLU_POINT = 100010;
|
181
|
+
const uint GLU_LINE = 100011;
|
182
|
+
const uint GLU_FILL = 100012;
|
183
|
+
const uint GLU_SILHOUETTE = 100013;
|
184
|
+
|
185
|
+
/* QuadricCallback */
|
186
|
+
/* GLU_ERROR */
|
187
|
+
|
188
|
+
/* QuadricNormal */
|
189
|
+
const uint GLU_SMOOTH = 100000;
|
190
|
+
const uint GLU_FLAT = 100001;
|
191
|
+
const uint GLU_NONE = 100002;
|
192
|
+
|
193
|
+
/* QuadricOrientation */
|
194
|
+
const uint GLU_OUTSIDE = 100020;
|
195
|
+
const uint GLU_INSIDE = 100021;
|
196
|
+
|
197
|
+
/* TessCallback */
|
198
|
+
const uint GLU_TESS_BEGIN = 100100;
|
199
|
+
const uint GLU_BEGIN = 100100;
|
200
|
+
const uint GLU_TESS_VERTEX = 100101;
|
201
|
+
const uint GLU_VERTEX = 100101;
|
202
|
+
const uint GLU_TESS_END = 100102;
|
203
|
+
const uint GLU_END = 100102;
|
204
|
+
const uint GLU_TESS_ERROR = 100103;
|
205
|
+
const uint GLU_TESS_EDGE_FLAG = 100104;
|
206
|
+
const uint GLU_EDGE_FLAG = 100104;
|
207
|
+
const uint GLU_TESS_COMBINE = 100105;
|
208
|
+
const uint GLU_TESS_BEGIN_DATA = 100106;
|
209
|
+
const uint GLU_TESS_VERTEX_DATA = 100107;
|
210
|
+
const uint GLU_TESS_END_DATA = 100108;
|
211
|
+
const uint GLU_TESS_ERROR_DATA = 100109;
|
212
|
+
const uint GLU_TESS_EDGE_FLAG_DATA = 100110;
|
213
|
+
const uint GLU_TESS_COMBINE_DATA = 100111;
|
214
|
+
|
215
|
+
/* TessContour */
|
216
|
+
const uint GLU_CW = 100120;
|
217
|
+
const uint GLU_CCW = 100121;
|
218
|
+
const uint GLU_INTERIOR = 100122;
|
219
|
+
const uint GLU_EXTERIOR = 100123;
|
220
|
+
const uint GLU_UNKNOWN = 100124;
|
221
|
+
|
222
|
+
/* TessProperty */
|
223
|
+
const uint GLU_TESS_WINDING_RULE = 100140;
|
224
|
+
const uint GLU_TESS_BOUNDARY_ONLY = 100141;
|
225
|
+
const uint GLU_TESS_TOLERANCE = 100142;
|
226
|
+
|
227
|
+
/* TessError */
|
228
|
+
const uint GLU_TESS_ERROR1 = 100151;
|
229
|
+
const uint GLU_TESS_ERROR2 = 100152;
|
230
|
+
const uint GLU_TESS_ERROR3 = 100153;
|
231
|
+
const uint GLU_TESS_ERROR4 = 100154;
|
232
|
+
const uint GLU_TESS_ERROR5 = 100155;
|
233
|
+
const uint GLU_TESS_ERROR6 = 100156;
|
234
|
+
const uint GLU_TESS_ERROR7 = 100157;
|
235
|
+
const uint GLU_TESS_ERROR8 = 100158;
|
236
|
+
const uint GLU_TESS_MISSING_BEGIN_POLYGON = 100151;
|
237
|
+
const uint GLU_TESS_MISSING_BEGIN_CONTOUR = 100152;
|
238
|
+
const uint GLU_TESS_MISSING_END_POLYGON = 100153;
|
239
|
+
const uint GLU_TESS_MISSING_END_CONTOUR = 100154;
|
240
|
+
const uint GLU_TESS_COORD_TOO_LARGE = 100155;
|
241
|
+
const uint GLU_TESS_NEED_COMBINE_CALLBACK = 100156;
|
242
|
+
|
243
|
+
/* TessWinding */
|
244
|
+
const uint GLU_TESS_WINDING_ODD = 100130;
|
245
|
+
const uint GLU_TESS_WINDING_NONZERO = 100131;
|
246
|
+
const uint GLU_TESS_WINDING_POSITIVE = 100132;
|
247
|
+
const uint GLU_TESS_WINDING_NEGATIVE = 100133;
|
248
|
+
const uint GLU_TESS_WINDING_ABS_GEQ_TWO = 100134;
|
249
|
+
|
250
|
+
|
251
|
+
/************************************************************************
|
252
|
+
*
|
253
|
+
* Extensions
|
254
|
+
*
|
255
|
+
************************************************************************/
|
256
|
+
|
257
|
+
const uint GLU_EXT_object_space_tess = 1;
|
258
|
+
const uint GLU_EXT_nurbs_tessellator = 1;
|
259
|
+
|
260
|
+
const double GLU_TESS_MAX_COORD = 1.0e150;
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
/************************************************************************
|
265
|
+
*
|
266
|
+
* Function prototypes
|
267
|
+
*
|
268
|
+
************************************************************************/
|
269
|
+
|
270
|
+
void gluBeginCurve (GLUnurbs* nurb);
|
271
|
+
void gluBeginPolygon (GLUtesselator* tess);
|
272
|
+
void gluBeginSurface (GLUnurbs* nurb);
|
273
|
+
void gluBeginTrim (GLUnurbs* nurb);
|
274
|
+
GLint gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data);
|
275
|
+
GLint gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, void *data);
|
276
|
+
GLint gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data);
|
277
|
+
GLint gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, void *data);
|
278
|
+
GLint gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data);
|
279
|
+
GLint gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *data);
|
280
|
+
GLboolean gluCheckExtension (GLubyte *extName, GLubyte *extString);
|
281
|
+
void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
|
282
|
+
void gluDeleteNurbsRenderer (GLUnurbs* nurb);
|
283
|
+
void gluDeleteQuadric (GLUquadric* quad);
|
284
|
+
void gluDeleteTess (GLUtesselator* tess);
|
285
|
+
void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
|
286
|
+
void gluEndCurve (GLUnurbs* nurb);
|
287
|
+
void gluEndPolygon (GLUtesselator* tess);
|
288
|
+
void gluEndSurface (GLUnurbs* nurb);
|
289
|
+
void gluEndTrim (GLUnurbs* nurb);
|
290
|
+
GLubyte * gluErrorString (GLenum error);
|
291
|
+
void gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
|
292
|
+
GLubyte * gluGetString (GLenum name);
|
293
|
+
void gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
|
294
|
+
void gluLoadSamplingMatrices (GLUnurbs* nurb, GLfloat *model, GLfloat *perspective, GLint *view);
|
295
|
+
void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
|
296
|
+
GLUnurbs* gluNewNurbsRenderer ();
|
297
|
+
GLUquadric* gluNewQuadric ();
|
298
|
+
GLUtesselator* gluNewTess ();
|
299
|
+
void gluNextContour (GLUtesselator* tess, GLenum type);
|
300
|
+
void gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
|
301
|
+
void gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
|
302
|
+
void gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
|
303
|
+
void gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
|
304
|
+
void gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
|
305
|
+
void gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
|
306
|
+
void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
|
307
|
+
void gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
|
308
|
+
void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
|
309
|
+
void gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
|
310
|
+
GLint gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, GLdouble *model, GLdouble *proj, GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
|
311
|
+
void gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
|
312
|
+
void gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
|
313
|
+
void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
|
314
|
+
void gluQuadricNormals (GLUquadric* quad, GLenum normal);
|
315
|
+
void gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
|
316
|
+
void gluQuadricTexture (GLUquadric* quad, GLboolean texture);
|
317
|
+
GLint gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
|
318
|
+
void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
|
319
|
+
void gluTessBeginContour (GLUtesselator* tess);
|
320
|
+
void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
|
321
|
+
void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
|
322
|
+
void gluTessEndContour (GLUtesselator* tess);
|
323
|
+
void gluTessEndPolygon (GLUtesselator* tess);
|
324
|
+
void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
|
325
|
+
void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
|
326
|
+
void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
|
327
|
+
GLint gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble *model, GLdouble *proj, GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
|
328
|
+
GLint gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, GLdouble *model, GLdouble *proj, GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
|