-rw-r--r-- | r/connect.R | 2 | ||||
-rw-r--r-- | src/GLee5_4/GLee.c | 18170 | ||||
-rw-r--r-- | src/GLee5_4/GLee.h | 17652 | ||||
-rw-r--r-- | src/GLee5_4/GLee.lib | bin | 0 -> 1460208 bytes | |||
-rw-r--r-- | src/GLee5_4/extensionList.txt | 410 | ||||
-rw-r--r-- | src/GLee5_4/readme.txt | 380 | ||||
-rw-r--r-- | src/controller/actions/clear_selection.sqc | 2 | ||||
-rw-r--r-- | src/controller/actions/process_hits.c | 1 | ||||
-rw-r--r-- | src/controller/actions/process_hits.h | 2 | ||||
-rw-r--r-- | src/controller/callbacks/mouse.c | 2 | ||||
-rw-r--r-- | src/util/check_error.c | 8 |
11 files changed, 36621 insertions, 8 deletions
diff --git a/src/GLee5_4/readme.txt b/src/GLee5_4/readme.txt new file mode 100644 index 0000000..72dd82f --- a/dev/null +++ b/src/GLee5_4/readme.txt | |||
@@ -0,0 +1,380 @@ | |||
1 | GLee | ||
2 | GL Easy Extension Library | ||
3 | Version 5.4 | ||
4 | |||
5 | By Ben Woodhouse | ||
6 | http://elf-stone.com | ||
7 | |||
8 | |||
9 | LICENSE | ||
10 | |||
11 | Copyright (c)2009 Ben Woodhouse All rights reserved. | ||
12 | |||
13 | Redistribution and use in source and binary forms, with or without | ||
14 | modification, are permitted provided that the following conditions are | ||
15 | met: | ||
16 | 1. Redistributions of source code must retain the above copyright | ||
17 | notice, this list of conditions and the following disclaimer as | ||
18 | the first lines of this file unmodified. | ||
19 | 2. Redistributions in binary form must reproduce the above copyright | ||
20 | notice, this list of conditions and the following disclaimer in the | ||
21 | documentation and/or other materials provided with the distribution. | ||
22 | |||
23 | THIS SOFTWARE IS PROVIDED BY BEN WOODHOUSE ``AS IS'' AND ANY EXPRESS OR | ||
24 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
25 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
26 | IN NO EVENT SHALL BEN WOODHOUSE BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
27 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
32 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | |||
34 | |||
35 | |||
36 | CONTACT | ||
37 | |||
38 | Send any general questions, bug reports etc to me (Ben Woodhouse): | ||
39 | bw [at] elf-stone.com | ||
40 | |||
41 | Questions about the D port for GLee should go to Joel Anderson: | ||
42 | anderson [at] badmama.com.au | ||
43 | |||
44 | Questions about GLee on OS X should go to Tristam MacDonald | ||
45 | swiftcoder [at] gmail.com | ||
46 | |||
47 | |||
48 | |||
49 | INTRODUCTION | ||
50 | |||
51 | GLee provides a simple interface for using extensions and core OpenGL | ||
52 | functionality beyond OpenGL version 1.1, and automates the otherwise tedious | ||
53 | process of linking function pointers. GLee works with both C and C++ | ||
54 | compilers. | ||
55 | |||
56 | Because the code is automatically generated, the latest extensions can | ||
57 | be included rapidly in new versions. Currently there is support | ||
58 | for OpenGL up to 3.0 and almost all registered extensions. For a complete | ||
59 | list of extensions, please see the accompanying extensionList.txt file. | ||
60 | |||
61 | For extension specifications, please visit: | ||
62 | |||
63 | http://www.opengl.org/registry/ | ||
64 | |||
65 | |||
66 | CREDITS | ||
67 | |||
68 | Tristam MacDonald for adding OS-X compatibility. | ||
69 | |||
70 | Martin Büchler (LousyPhreak on the GameDev.net forums) for | ||
71 | a huge amount of testing, tweaking, suggestions and advice to get GLee to | ||
72 | work properly with Linux. | ||
73 | |||
74 | Daniel Jo (Ostsol on the OpenGL.org forums) for helping to get | ||
75 | GLEE 2.1 working with the OGLSL extensions (ARB_shader_objects, | ||
76 | ARB_vertex_shader and ARB_fragment_shader). | ||
77 | |||
78 | Joel Anderson for his for his D port of GLee 3.0 | ||
79 | |||
80 | Jacques Beaurain for pointing out a potential access violation in | ||
81 | __GLeeGetExtensions. | ||
82 | |||
83 | |||
84 | WHAT'S NEW IN GLEE 5.0 | ||
85 | |||
86 | GLeeGen, the program that generates the code for the GLee library, has been | ||
87 | rewritten to support parsing of extension specifications. As a result, GLee 5.0 and upwards support | ||
88 | all extensions for which there is a specification, regardless of that | ||
89 | extension's inclusion in glext.h, wglext.h or glxext.h. | ||
90 | |||
91 | GLee 5.0 adds support for forced extension loading through the | ||
92 | GLeeForceLink function. This makes it possible to force the linking of | ||
93 | extension functions (or core functions) which are not reported by the video driver. | ||
94 | |||
95 | GLee now supports lazy loading of extensions, meaning it is no longer | ||
96 | necessary to call GLeeInit() at initialisation time. | ||
97 | |||
98 | |||
99 | |||
100 | HOW TO INSTALL | ||
101 | |||
102 | MSVC 2003 binary version | ||
103 | |||
104 | 1. Copy GLee.lib to your visual C++ lib directory | ||
105 | (eg C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib) | ||
106 | |||
107 | 2. Copy GLee.h to your visual C++ include\GL directory | ||
108 | (eg C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\include\gl) | ||
109 | |||
110 | |||
111 | Linux binary version (GLee-*-bin.tar.gz) | ||
112 | (Installation has to be done as root) | ||
113 | |||
114 | 1. unpack GLee-*-bin.tar.gz | ||
115 | (tar -xzf GLee-2.0-bin.tar.gz) | ||
116 | |||
117 | 2. Install with the inst script | ||
118 | (cd glee && ./inst) | ||
119 | |||
120 | Linux source version (GLee-*-src.tar.gz) | ||
121 | 1. unpack GLee-*-src.tar.gz | ||
122 | (tar -xzf GLee-2.0-src.tar.gz) | ||
123 | |||
124 | 2. cd to "glee" and run the gnu build chain | ||
125 | (cd glee && ./configure && make) | ||
126 | |||
127 | 3. Become root (password needed) | ||
128 | (su) | ||
129 | |||
130 | 4. Install the lib | ||
131 | (make install) | ||
132 | |||
133 | |||
134 | |||
135 | HOW TO USE | ||
136 | |||
137 | If you're using the binary version then you'll need to link to | ||
138 | glee.lib and #include <gl\glee.h> in your project. Otherwise, | ||
139 | just add glee.h and glee.c in your project and #include "glee.h". | ||
140 | You can also build the library yourself using glee.c and glee.h. | ||
141 | |||
142 | From this point onwards, you should have access to all OpenGL | ||
143 | extensions and core functionality. | ||
144 | |||
145 | You can query the availability of an extension like this: | ||
146 | |||
147 | if (GLEE_ARB_point_parameters) | ||
148 | { | ||
149 | //GL_ARB_point_parameters is supported | ||
150 | glPointParameterfARB(...); | ||
151 | } | ||
152 | |||
153 | WGL extensions have a GLEE_WGL_ prefix. For example, | ||
154 | GLEE_WGL_ARB_pbuffer. GLX extensions work in a similar way. | ||
155 | |||
156 | You can also query the OpenGL version: | ||
157 | if (GLEE_VERSION_1_3) | ||
158 | { | ||
159 | //OpenGL 1.3 is supported | ||
160 | glLoadTransposeMatrixf(...) ; | ||
161 | ... | ||
162 | } | ||
163 | |||
164 | |||
165 | |||
166 | ERROR CHECKING | ||
167 | |||
168 | Optionally, you can add a call to GLeeInit() after your OpenGL | ||
169 | initialisation code, however this is no longer required as of | ||
170 | GLee 5.0. GLeeInit returns a boolean value to indicate success | ||
171 | or failure. | ||
172 | |||
173 | If GLeeInit returns false you can get more detailed error | ||
174 | information by calling GLeeGetErrorString(). This returns a pointer | ||
175 | to a string which contains error description(s). | ||
176 | |||
177 | At any time you can call GLeeGetExtStrGL() or GLeeGetExtStrWGL() | ||
178 | (win32) or GLeeGetExtStrGLX() (linux) to retrieve a pointer to the | ||
179 | corresponding extension list string. | ||
180 | |||
181 | |||
182 | |||
183 | FORCED EXTENSION SUPPORT | ||
184 | |||
185 | By default, only those extensions reported by OpenGL's | ||
186 | glGetString(GL_EXTENSIONS) are loaded by GLeeInit(). Likewise, | ||
187 | only core functions whose version doesn't exceed the version number | ||
188 | returned by glGetString(GL_VERSION) are loaded. | ||
189 | |||
190 | However, GLee 5.0 and above can load additional extension and core | ||
191 | functions using the GLeeForceLink function: | ||
192 | |||
193 | GLint GLeeForceLink(const char * extensionName) | ||
194 | |||
195 | For example, GLeeForceLink("GL_ARB_point_parameters") will attempt to | ||
196 | load the ARB_point_parameters function. | ||
197 | |||
198 | For core functions, you can use the GL version string for the version | ||
199 | you wish to initialise. For example, GLeeForceLink( "GL_VERSION_2_0" ) | ||
200 | will attempt to initialise OpenGL 2.0 core functions. | ||
201 | |||
202 | Return Value: | ||
203 | GLEE_LINK_COMPLETE is returned if all functions were | ||
204 | successfully linked. | ||
205 | |||
206 | GLEE_LINK_PARTIAL is returned if only some functions were | ||
207 | linked successfully. | ||
208 | |||
209 | GLEE_LINK_FAIL is returned if no functions could be linked | ||
210 | successfully. | ||
211 | |||
212 | Functions which could not be linked will be set to NULL. | ||
213 | |||
214 | A successful link does not guarantee that a function will work | ||
215 | correctly. If you want to be safe, only use extensions which are | ||
216 | reported by the driver. | ||
217 | |||
218 | |||
219 | |||
220 | LINUX NOTES - by LousyPhreak | ||
221 | |||
222 | The binary version was compiled with gcc 3.3 and was also tested | ||
223 | with gcc 3.2, but if you still have gcc 2.x you need the source | ||
224 | version. If you don't know which version you have on your system just | ||
225 | look at the output of 'gcc --version'. | ||
226 | |||
227 | You should be using the NVIDIA headers if you have the NVIDIA drivers | ||
228 | installed, and the MESA headers otherwise. | ||
229 | |||
230 | One more note: | ||
231 | The binary version might complain about missing glXGetProcAddressARB | ||
232 | on the linker stage, but if you get this error, use the source | ||
233 | version and email me (lousyphreak [at] gmx.at). | ||
234 | |||
235 | Compiling on linux: | ||
236 | You just need to replace the linking of libGL by libGLee: | ||
237 | gcc main.cpp whatever.cpp -lGLee -o myproject | ||
238 | |||
239 | Everything else should be the same as on windows. | ||
240 | |||
241 | |||
242 | |||
243 | NOTES ON THE GLEE 3.0 D PORT FOR WIN32 - by Joel Anderson | ||
244 | |||
245 | 1) Put the GLee.lib in the lib folder (ie C:\dmd\lib) | ||
246 | 2) Put glee.d and glConstants.d in the include folder (ie create c:\glee | ||
247 | and use the -IC:\glee on the compiler.) | ||
248 | 3) The D code is pretty much the same as the C code but you need to specify: | ||
249 | |||
250 | import glee; //Instead of #include "glee.h" | ||
251 | |||
252 | Notes | ||
253 | - The GLee.lib was built using dmc. I did try the one that comes with the | ||
254 | C version, but that doesn't work with D. You can compile the lib yourself | ||
255 | using cbuild\go.bat | ||
256 | - I haven't tested everything. | ||
257 | |||
258 | You can contact me (Joel Anderson) at anderson@badmama.com.au | ||
259 | |||
260 | (21/01/2004) - AU | ||
261 | |||
262 | |||
263 | CHANGES | ||
264 | |||
265 | 5.4 : Added 5 new extensions : | ||
266 | GL_EXT_texture_swizzle | ||
267 | GL_NV_explicit_multisample | ||
268 | GL_NV_transform_feedback2 | ||
269 | WGL_NV_gpu_affinity | ||
270 | GLX_ARB_create_context | ||
271 | |||
272 | Removed some duplicate extensions: | ||
273 | GL_NV_geometry_program4 (use GL_NV_gpu_program4) | ||
274 | GL_NV_vertex_program4 (use GL_NV_gpu_program4) | ||
275 | GL_NV_fragment_program4 (use GL_NV_gpu_program4) | ||
276 | WGL_NV_video_out (use WGL_NV_video_output) | ||
277 | |||
278 | Fixed GL_NV_gpu_program4 by merging with GL_NV_geometry_program4, | ||
279 | GL_NV_vertex_program4 and GL_NV_fragment_program4. | ||
280 | |||
281 | Added support for multiple extensions including the same functions, so | ||
282 | GL_EXT_geometry_shader4 and GL_NV_geometry_program4 can coexist without | ||
283 | compile errors. | ||
284 | |||
285 | Fixed GL_EXT_geometry_shader4 so it no longer has missing functions and constants. | ||
286 | These were excluded previously to avoid clashes with GL_NV_vertex_program4, which | ||
287 | included a bunch of functions with the same names. | ||
288 | |||
289 | Various GLeeGen/GLeeXMLGen fixes, mainly to fix issues with NVidia extensions, most | ||
290 | notably: | ||
291 | Added support for overriding extension spec files so we can manually fix | ||
292 | buggy specs which don't follow the standard (like GL_NV_gpu_program4). | ||
293 | |||
294 | |||
295 | Reworked GLeeGen and GLeeXMLGen to allow overriding of | ||
296 | |||
297 | 5.33 : Fixed some GCC warnings | ||
298 | Fixed some OS-X warnings | ||
299 | Fixed an issue in __GLeeGetExtensions which could cause two | ||
300 | extensions to go missing on some platforms | ||
301 | |||
302 | 5.32 : Fixed a potential access violation in __GLeeGetExtensions | ||
303 | |||
304 | 5.31 : Fixed GLX compile error | ||
305 | |||
306 | 5.3 : OpenGL 3.0 support | ||
307 | |||
308 | 5.21 : Nvidia geometry shader extensions | ||
309 | |||
310 | 5.2 : OS-X support | ||
311 | |||
312 | 5.1 : Fixed some ansi-C compatibility issues. | ||
313 | New GLeeGen version | ||
314 | Added 5 new GL extensions and 1 new WGL extension. | ||
315 | |||
316 | 5.04 : Added the latest extensions | ||
317 | |||
318 | 5.03 : Some minor compatibility fixes. | ||
319 | |||
320 | Malloc.h no longer used. | ||
321 | |||
322 | GLee no longer fails if platform-specific (GLX or WGL) extensions | ||
323 | could not be loaded (a problem with some cards apparently). | ||
324 | |||
325 | 5.02 : Changed extension querying variable system. Removed GLEE_ENABLED() | ||
326 | extension checking macro introduced in 5.00, since it is no longer | ||
327 | needed | ||
328 | |||
329 | 5.01 : Fixed GLX_SGIX_HYPERPIPE bug | ||
330 | |||
331 | 5.00 : Rewrote GLeeGen to parse extension specs | ||
332 | |||
333 | Added lazy loading for extensions | ||
334 | |||
335 | Added experimental support | ||
336 | |||
337 | 4.00 : Updated using extensions from glext.h version 26, wglext.h version 6, | ||
338 | and glxext.h version 10. OpenGL 2.0 is now supported. | ||
339 | |||
340 | 3.05 : Updated with glExt.h version 23 extensions. | ||
341 | |||
342 | 3.04 : Updated with glExt.h version 22 extensions. | ||
343 | |||
344 | 3.03 : Another linux compatibility bug fixed | ||
345 | |||
346 | 3.02 : GLX typedef bug fixed | ||
347 | |||
348 | 3.01 : Minor linux compatibility bugs fixed | ||
349 | |||
350 | 3.0 : Removed STL and other C++ specific features to make GLee | ||
351 | compatible with C compilers | ||
352 | |||
353 | Added a number of WGL extensions that had previously been | ||
354 | excluded due to a bug with GLeeGen (now fixed) | ||
355 | |||
356 | 2.21 : Fixed VC6 compilation bug | ||
357 | |||
358 | 2.2 : Added full OpenGL 1.5 support | ||
359 | |||
360 | 2.1 : Added the OpenGL shading language extensions: | ||
361 | ARB_shader_objects, ARB_vertex_shader and ARB_fragment_shader. | ||
362 | |||
363 | 2.01 : Fixed missing description comment in header | ||
364 | Fixed include guard | ||
365 | |||
366 | 2.0 : Removed dependency on glext.h and wglext.h | ||
367 | Added cross-platform code for support with linux | ||
368 | Fixed potential stability problems | ||
369 | |||
370 | 1.2 : Made library compatible with VC7 and VC7.1 | ||
371 | |||
372 | 1.12 : Cleaned up some commenting errors in GLeeGen | ||
373 | |||
374 | 1.11 : Added functions to get WGL and GL extension strings. | ||
375 | Fixed minor formatting errors caused by a bug in GLeeGen (now fixed) | ||
376 | |||
377 | 1.1 : Added detailed error checking. | ||
378 | Fixed possible buffer overrun issue | ||
379 | |||
380 | 1.01 : GLeeInit no longer requires a device context handle. \ No newline at end of file | ||