glfw-2.7.2/0000755000175000017500000000000011621215252013450 5ustar elmindredaelmindredaglfw-2.7.2/readme.html0000644000175000017500000015432411614047545015616 0ustar elmindredaelmindreda GLFW Readme File

GLFW 2.7.2 source distribution

  1. Introduction
  2. Compiling GLFW and the example programs
  3. Installing GLFW
  4. Using GLFW
  5. Version history
  6. Directory structure of the GLFW distribution
  7. Contacting the project
  8. Acknowledgements

1. Introduction

Welcome to version 2.7.2 of the GLFW library. GLFW is a free, Open Source, multi-platform library for OpenGL application development that provides a powerful API for handling operating system specific tasks such as opening an OpenGL window, reading keyboard, mouse, joystick and time input, creating threads, and more.

GLFW 2.7 is expected to be the last major release of the 2.x series, with most development now being done on what will become version 3.0.

This release brings support for OpenGL 3.2 on OS X Lion and adds a number of bug fixes for minor issues in 2.7.1.

2. Compiling GLFW and the example programs

A top level makefile can be found in the root directory of the GLFW distribution that has been designed to work with several compilers. If you simply enter the GLFW root directory in a shell and type make (or nmake or gmake, depending on the name of your make tool), and a list should appear with the currently supported options for systems and compilers.

For example, one of the options is to compile GLFW for Windows with the LCC-Win32 C compiler, i.e.:

make win32-lcc

That will compile the GLFW static link library and the supplied example programs. For Windows compilers, a Win32 DLL will also be compiled.

Currently supported compilers and systems are:

There are also project files available for Microsoft Visual C++ 2008 and 2010 in the support/msvc90 and support/msvc100 directories.

If your compiler/system is not in the list, you may have to create new makefiles in the lib\win32, lib/x11 or lib/cocoa directory, and in the examples directory. If you have any problems, please use our support forum and bug tracker on SourceForge.net. We would like to support as many systems as possible, so if you had to make any modifications or additions to the source and/or makefiles in order to make GLFW compile successfully, we would very much like to know what you had to do.

2.1 Microsoft Windows

When building GLFW as a DLL (dynamic link library), all compilation units need to have the GLFW_BUILD_DLL macro defined. All build methods listed below already does this, but you need to do it yourself if you are making a custom build. Without this macro, the GLFW DLL will not export functions correctly and code calling the DLL will be incorrectly generated.

2.1.1 Microsoft Visual C++ 2008 and later

Project files for both the static and dynamic versions of the GLFW library are provided in the support/msvc90 and support/msvc100 directories.

2.1.2 MSYS or Cygwin on Windows

GLFW can be cross-compiled to native Win32 code using the Cygwin environment. The Cygwin build path will also work on MinGW with MSYS.

Open a Cygwin or MSYS shell, enter the GLFW root directory and run make with the win32-cygwin target.

2.1.3 Bare MinGW on Windows

GLFW can be compiled using only bare bone MinGW, using the Windows command-line environment for file management. Open a regular command prompt, enter the GLFW root directory and run the MinGW make program mingw32-make with the win32-mingw target.

2.1.4 OpenWatcom on Windows

GLFW can be compiled using OpenWatcom for Windows by running the following in the GLFW root directory:

nmake MAKE=nmake win32-ow

Also make sure that you have all your environment variables set up correctly. It is the default option when installing OpenWatcom to permanently set up all the required environment variables. If nmake is unavailable, you probably have to run WATCOM\setvars.bat from the command prompt first, where WATCOM is the directory in which you installed OpenWatcom (e.g. C:\Watcom).

2.1.5 MinGW cross-compilation for Unix or Unix-like systems

Some Unix-like systems have a MinGW cross-compilation package for compiling native Win32 binaries, for example the mingw32 package on Debian GNU/Linux and its derivatives. You can use this to build Win32 binaries of GLFW and all examples without having to run Microsoft Windows. Use the regular make program with the cross-mgw target. These binaries are also regularly tested with Wine.

2.2 X11 on Unix-like systems

Compiler and link library capabilities are auto-detected with a script called compile.sh. Note that you don't need to run this script yourself, as it is run automatically when necessary. It has been tested under Ubuntu Linux, Slackware Linux, Debian GNU/Linux and others and should hopefully run on the majority of available Unix-like systems and generate functional Makefiles. You do not have to run the script manually, since it is called from the top-level makefile.

If you wish to customize the compilation or link flags for GLFW, set the CFLAGS or LFLAGS environment variables as needed before building the library. These flags will be picked up and added to the generated Makefile.x11 files.

If you wish to use a certain compiler, set the CC environment variable before building the library. This will also be stored in the generated Makefile.x11 files.

If you have already configured your source tree, you can reset it to an un-configured state by running make with the x11-dist-clean target.

If you are making your own build setup for GLFW, you need to be aware of the various preprocessor symbols that the bundled makefiles use to enable various features and code paths. They need to be defined either on the command-line or at the very beginning for each GLFW source file with an x11_ prefix.

Note that the X11 port of GLFW compiles on Mac OS X, but is currently unable to open a window when running against X11.app, due to Apple's incomplete implementation of GLXFBConfigs.

_GLFW_USE_LINUX_JOYSTICKS Use the Linux joystick API. This is the only supported API for the X11 port. Without it, joystick input will be unavailable.
_GLFW_HAS_XRANDR Use the X Resize and Rotate extension for display mode changes. This is the preferred method.
_GLFW_HAS_XF86VIDMODE Use the Xf86VidMode extension for display mode changes. This is a fall-back method.
_GLFW_HAS_PTHREAD Use the POSIX Threads API for threading. This is the only supported API for the X11 port. Without it, threading will be disabled.
_GLFW_HAS_SCHED_YIELD Call the sched_yield function inside glfwPlatformSleep.
_GLFW_HAS_GLXGETPROCADDRESS Use the glXGetProcAddress function to retrieve OpenGL entry point addresses.
_GLFW_HAS_GLXGETPROCADDRESSARB Use the glXGetProcAddressARB function to retrieve OpenGL entry point addresses.
_GLFW_HAS_GLXGETPROCADDRESSEXT Use the glXGetProcAddressEXT function to retrieve OpenGL entry point addresses.
_GLFW_HAS_DLOPEN Use dlopen on the OpenGL shared library to retrieve OpenGL entry point addresses. This is a fall-back method.
_GLFW_HAS_SYSCONF Use the sysconf API to find the number of processors.
_GLFW_HAS_SYSCTL Use the sysctl API to find the number of processors.

2.3 Apple GCC or Clang on Mac OS X

To compile GLFW for Mac OS X, you will need to have installed the Developer Tools. A version of these tools can be found on your Mac OS X disc, with newer versions available from the Apple Developer Connection site. When they are installed, simply open Terminal and go to the root GLFW directory. From there, you can build the library and all the examples by running make with the appropriate target, i.e.:

make cocoa

The default compiler for the Cocoa port of GLFW is cc, which as of Mac OS X 10.6 still defaults to GCC, but you can override this using the CC environment variable. For example, to build GLFW using Clang, use:

env CC=clang make cocoa

There is also a deprecated Carbon port of GLFW, which is limited to 32-bit code and only runs well on Mac OS X 10.3 and 10.4. However, if you need to build applications for those systems, it is a better choice than the Cocoa port, which uses APIs unavailable on systems older than 10.5.

3. Installing GLFW

3.1 Windows

After compiling GLFW with MinGW or Cygwin, three files of interest should have appeared in the lib\win32 directory. They are: libglfw.a (the static link version of GLFW), glfw.dll (the DLL version of GLFW) and libglfwdll.a (the DLL import library).

To install GLFW on Cygwin (and possibly MinGW), run make with the cygwin-install target. This will generate the pkg-config file and copy it, the header file and the library to the correct locations of your Cygwin installation. If you wish to change the installation location from its default, set the desired prefix path with the environment variable PREFIX.

If you used Borland C++ Builder, LCC-Win32, Microsoft Visual C++ or OpenWatcom, the files are named glfw.lib (the static link version of GLFW), glfw.dll (the DLL version of GLFW) and glfwdll.lib (the DLL import library).

The static link library and the DLL import library should be copied to your compiler's LIB directory (where all other link libraries are located). The DLL can be copied either to your Windows system directory (where opengl32.dll is located), or to the project directory of your GLFW-based projects (where you place your executable files).

You should also copy the GLFW include file, include\GL\glfw.h, to the GL directory of your compiler's include directory (i.e. where gl.h, glu.h etc. are located).

3.2 Unix

After compiling GLFW, three files named libglfw.pc.in, libglfw.a and libglfw.so should have appeared in the lib/x11 directory. This is the pkg-config template file, the GLFW static link library and the GLFW shared library, respectively.

To install GLFW onto your system, run make as root with the x11-install make target. This will install the pkg-config file, the static library and the header. By default, the files will be installed under /usr/local. If you wish to install to a different location, set the PREFIX environment variable appropriately when running make.

Note that the shared library is not installed by default, as you really should think twice before using it. GLFW is very small and shared library distribution on Unix outside of packaging systems is quite tricky. The GLFW license also allows static linking without requiring you to share your code.

However, if you're a *nix distribution packager, use a language binding or for some other reason wish to install the shared library along with the rest, run make with the x11-distro-install target.

3.4 Mac OS X

After compiling GLFW, three files named libglfw.pc.in, libglfw.a and libglfw.dylib should appear in the lib/cocoa directory. This is the pkg-config template file, the GLFW static link library and the GLFW dynamic library, respectively.

To install GLFW onto your system, run make with sudo and the cocoa-install build target, i.e.:

sudo make cocoa-install

This will install the pkg-config file, the static library and the header. By default, the files will be installed under /usr/local. If you wish to install to a different location, set the environment variable PREFIX appropriately when running make.

Note that the shared library is not installed by default, as you really should think twice before using it. GLFW is very small and very suitable for static linking. The GLFW license also allows static linking without requiring your to share your code.

4. Using GLFW

There are two aspects to using GLFW:

  1. How does the GLFW API work
  2. How to compile programs that use GLFW

The first point is covered in the GLFW Users Guide and the GLFW Reference Manual, and we suggest that you read at least the Users Guide, since it's a good introduction to the GLFW API.

Designing and compiling programs that use GLFW is not very difficult. A few rules for successfully designing GLFW-based programs are presented in the following sections.

4.1 Include the GLFW header file

In the files of your program where you use OpenGL or GLFW, you should include the GL/glfw.h header file, i.e.:

#include <GL/glfw.h>

This defines all the constants, types and function prototypes of the GLFW API. It also includes the gl.h and GL/glu.h header files, and - this is very important - it defines all the necessary constants and types that are necessary for the OpenGL headers to work on different platforms.

For example, under Microsoft Windows you are normally required to include windows.h before you include GL/gl.h. This would however make your code dependent on the Windows platform, or at least require your program to check which platform it is being compiled on. The GLFW header file takes care of this for you, not by including windows.h, but rather by itself duplicating the necessary parts of it. This way, the namespace won't be cluttered by the entire Windows API.

In other words:

Also note that if you are using an OpenGL extension loading library such as GLEW, you should include the GLEW header before the GLFW one. The GLEW header defines macros that disable any gl.h that the GLFW header includes and GLEW will work as expected.

4.2 Link with the right libraries

4.2.1 Windows static library

If you link with the static version of GLFW, it is also necessary to link with some system libraries that GLFW uses.

When linking a program under Windows that uses the static version of GLFW, you must also link with the following libraries: opengl32, user32 and kernel32. Some of these libraries may be linked with by default by your compiler. In the table below you can see the minimum required link options for each supported Windows compiler (you may want to add other libraries as well, such as glu32):

Compiler Link options
Borland C++ Builder glfw.lib opengl32.lib
Cygwin See Unix static library below
LCC-Win32 glfw.lib opengl32.lib
Microsoft Visual C++ glfw.lib opengl32.lib user32.lib
MinGW32 -lglfw -lopengl32
OpenWatcom glfw.lib opengl32.lib user32.lib

4.2.2 Windows DLL

To compile a program that uses the DLL version of GLFW, you need to define the GLFW_DLL constant. This can either be done with a compiler switch, typically by adding -DGLFW_DLL to the list of compiler options. You can also do it by adding the following line to all your source files before including the GLFW header file:

#define GLFW_DLL

When linking a program under Windows that uses the DLL version of GLFW, the only library you need to link with for GLFW to work is glfwdll. In the table below you can see the minimum required link options for each supported Windows compiler (you may want to add other libraries as well, such as opengl32 and glu32):

Compiler Link options
Borland C++ Builder glfwdll.lib
Cygwin -lglfwdll
LCC-Win32 glfwdll.lib
Microsoft Visual C++ glfwdll.lib
MinGW32 -lglfwdll
OpenWatcom glfwdll.lib

4.2.3 Unix static library

GLFW supports pkg-config, and a libglfw.pc file is generated and installed when you install the library. For systems that do not provide pkg-config, you should look in this file for the proper compile and link flags for your system, as determined by compile.sh at compile time.

A typical compile and link command-line may look like this:

cc `pkg-config --cflags libglfw` -o myprog myprog.c `pkg-config --libs libglfw`

If you use GLU functions in your program you should also add -lGLU to your link flags.

4.2.5 Mac OS X static library

When compiling and linking a program under Mac OS X that uses GLFW, you must also link with Cocoa and OpenGL frameworks.

If you are using Xcode, you simply add the GLFW library libglfw.a and these frameworks to your project. If, however, you are building your program from the command-line, there are two methods for correctly linking your GLFW program.

GLFW supports pkg-config, and a libglfw.pc file is generated and installed when you install the library. You can find pkg-config in most packaging systems, such as Fink and MacPorts, so if you have one of them installed, simply install pkg-config. Once you have pkg-config available, the command-line for compiling and linking your program is:

cc `pkg-config --cflags libglfw` -o myprog myprog.c `pkg-config --libs libglfw`

If you do not wish to use pkg-config, you will need to add the required frameworks and libraries to your command-line using the -l and -framework switches, i.e.:

cc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL

Note that you do not add the .framework extension to a framework when adding it from the command-line.

These frameworks contain all OpenGL and GLU functions, so there is no need to add additional libraries or frameworks when using GLU functionality. Also note that even though your machine may have Unix-style OpenGL libraries, they are for use with the X Window System, and will not work with the Mac OS X native version of GLFW.

5. Version history

v2.7.2

v2.7.1

v2.7

v2.6

v2.5

v2.4.2

v2.4.1

v2.4

v2.3.2

v2.3.1

v2.3

v2.2.3

v2.2.2

v2.2.1

v2.2

v2.1

v2.0.3

v2.0.2

v2.0.1

v2.0

v1.0.2

v1.0.1

v1.0.0

6. Directory structure of the GLFW distribution

Here is an overview of the directory structure of the GLFW distribution:

docs GLFW manuals in PDF format
examples Several example programs in C
include  
   GL Here is the GLFW C/C++ include file
lib The source code for GLFW
   cocoa Mac OS X/Cocoa specific implementation
   win32 Windows specific implementation
   x11 Unix/X11 specific implementation
support  
   d D support
   msvc90 Project files for Visual C++ 2008
   msvc100 Project files for Visual C++ 2010
   pascal Pascal support
tests Several test programs in C

7. Contacting the project

The official website for GLFW is glfw.org. It contains the latest version of GLFW, news and other information that is useful for OpenGL development.

If you have questions related to the use of GLFW, we have a user's web forum, and a user's mailing list on SF.net, and the registered IRC channel #glfw on Freenode.

If you have a bug to report, a patch to submit or a feature you'd like to request, please file it in one of the GLFW trackers on SF.net.

Finally, if you're interested in helping out with the development of GLFW or porting it to your favorite platform, we have a developer's mailing list, or you could join us on #glfw.

8. Acknowledgements

GLFW exists because people around the world donated their time and lent their skills. Special thanks go out to:

glfw-2.7.2/COPYING.txt0000644000175000017500000000164611427543034015336 0ustar elmindredaelmindredaCopyright (c) 2002-2006 Marcus Geelnard Copyright (c) 2006-2010 Camilla Berglund This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. glfw-2.7.2/tests/0000755000175000017500000000000011621215251014611 5ustar elmindredaelmindredaglfw-2.7.2/tests/Makefile.x11.in0000644000175000017500000000217611602236502017275 0ustar elmindredaelmindredaBINARIES = accuracy defaults dynamic events fsaa fsinput \ iconify joysticks peter reopen tearing version HEADER = ../include/GL/glfw.h all: $(BINARIES) accuracy: accuracy.c $(LIB) $(HEADER) $(CC) $(CFLAGS) accuracy.c $(LFLAGS) -o $@ defaults: defaults.c $(LIB) $(HEADER) $(CC) $(CFLAGS) defaults.c $(LFLAGS) -o $@ dynamic: dynamic.c $(SOLIB) $(HEADER) $(CC) $(CFLAGS) dynamic.c $(SO_LFLAGS) -o $@ events: events.c $(LIB) $(HEADER) $(CC) $(CFLAGS) events.c $(LFLAGS) -o $@ fsaa: fsaa.c $(LIB) $(HEADER) $(CC) $(CFLAGS) fsaa.c $(LFLAGS) -o $@ fsinput: fsinput.c $(LIB) $(HEADER) $(CC) $(CFLAGS) fsinput.c $(LFLAGS) -o $@ iconify: iconify.c $(LIB) $(HEADER) $(CC) $(CFLAGS) iconify.c $(LFLAGS) -o $@ joysticks: joysticks.c $(LIB) $(HEADER) $(CC) $(CFLAGS) joysticks.c $(LFLAGS) -o $@ peter: peter.c $(LIB) $(HEADER) $(CC) $(CFLAGS) peter.c $(LFLAGS) -o $@ reopen: reopen.c $(LIB) $(HEADER) $(CC) $(CFLAGS) reopen.c $(LFLAGS) -o $@ tearing: tearing.c $(LIB) $(HEADER) $(CC) $(CFLAGS) tearing.c $(LFLAGS) -o $@ version: version.c $(LIB) $(HEADER) $(CC) $(CFLAGS) version.c $(LFLAGS) -o $@ clean: rm -f $(BINARIES) glfw-2.7.2/tests/version.c0000644000175000017500000001564011450144552016455 0ustar elmindredaelmindreda//======================================================================== // Version information dumper // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test is a pale imitation of glxinfo(1), except not really // // It dumps GLFW and OpenGL version information // //======================================================================== #include #ifndef GL_VERSION_3_2 #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 #define GL_CONTEXT_PROFILE_MASK 0x9126 #define GL_NUM_EXTENSIONS 0x821D #define GL_CONTEXT_FLAGS 0x821E #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 #endif typedef const GLubyte * (APIENTRY *PFNGLGETSTRINGI) (GLenum, GLuint); #ifndef GL_VERSION_2_0 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C #endif #ifdef _MSC_VER #define strcasecmp(x, y) _stricmp(x, y) #endif #include #include #include #include "getopt.h" static void usage(void) { printf("version [-h] [-m MAJOR] [-n MINOR] [-d] [-l] [-f] [-p PROFILE]\n"); printf("available profiles: core compat\n"); } static const char* get_profile_name(GLint mask) { if (mask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) return "compatibility"; if (mask & GL_CONTEXT_CORE_PROFILE_BIT) return "core"; return "unknown"; } static void list_extensions(int major, int minor) { int i; GLint count; const GLubyte* extensions; printf("OpenGL context supported extensions:\n"); if (major > 2) { PFNGLGETSTRINGI glGetStringi = (PFNGLGETSTRINGI) glfwGetProcAddress("glGetStringi"); if (!glGetStringi) { fprintf(stderr, "Failed to retrieve glGetStringi entry point"); exit(EXIT_FAILURE); } glGetIntegerv(GL_NUM_EXTENSIONS, &count); for (i = 0; i < count; i++) puts((const char*) glGetStringi(GL_EXTENSIONS, i)); } else { extensions = glGetString(GL_EXTENSIONS); while (*extensions != '\0') { if (*extensions == ' ') putchar('\n'); else putchar(*extensions); extensions++; } } putchar('\n'); } int main(int argc, char** argv) { int ch, profile = 0, major = 1, minor = 0, revision; GLboolean debug = GL_FALSE, forward = GL_FALSE, list = GL_FALSE; GLint flags, mask; while ((ch = getopt(argc, argv, "dfhlm:n:p:")) != -1) { switch (ch) { case 'd': debug = GL_TRUE; break; case 'f': forward = GL_TRUE; break; case 'h': usage(); exit(0); case 'l': list = GL_TRUE; break; case 'm': major = atoi(optarg); break; case 'n': minor = atoi(optarg); break; case 'p': if (strcasecmp(optarg, "core") == 0) profile = GLFW_OPENGL_CORE_PROFILE; else if (strcasecmp(optarg, "compat") == 0) profile = GLFW_OPENGL_COMPAT_PROFILE; else { usage(); exit(EXIT_FAILURE); } break; default: usage(); exit(EXIT_FAILURE); } } argc -= optind; argv += optind; if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(EXIT_FAILURE); } if (major != 1 || minor != 1) { glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, major); glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, minor); } if (debug) glfwOpenWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); if (forward) glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); if (profile != 0) glfwOpenWindowHint(GLFW_OPENGL_PROFILE, profile); // We assume here that we stand a better chance of success by leaving all // possible details of pixel format selection to GLFW if (!glfwOpenWindow(0, 0, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW window\n"); exit(EXIT_FAILURE); } // Report GLFW version glfwGetVersion(&major, &minor, &revision); printf("GLFW header version: %u.%u.%u\n", GLFW_VERSION_MAJOR, GLFW_VERSION_MINOR, GLFW_VERSION_REVISION); printf("GLFW library version: %u.%u.%u\n", major, minor, revision); if (major != GLFW_VERSION_MAJOR || minor != GLFW_VERSION_MINOR || revision != GLFW_VERSION_REVISION) printf("*** WARNING: GLFW version mismatch! ***\n"); // Report OpenGL version printf("OpenGL context version string: \"%s\"\n", glGetString(GL_VERSION)); glfwGetGLVersion(&major, &minor, &revision); printf("OpenGL context version parsed by GLFW: %u.%u.%u\n", major, minor, revision); // Report OpenGL context properties if (major >= 3) { glGetIntegerv(GL_CONTEXT_FLAGS, &flags); printf("OpenGL context flags:"); if (flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) puts(" forward-compatible"); else puts(" none"); } if (major > 3 || (major == 3 && minor >= 2)) { glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask); printf("OpenGL profile mask: 0x%08x (%s)\n", mask, get_profile_name(mask)); } printf("OpenGL context renderer string: \"%s\"\n", glGetString(GL_RENDERER)); printf("OpenGL context vendor string: \"%s\"\n", glGetString(GL_VENDOR)); if (major > 1) { printf("OpenGL context shading language version: \"%s\"\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); } // Report OpenGL extensions if (list) list_extensions(major, minor); glfwTerminate(); exit(EXIT_SUCCESS); } glfw-2.7.2/tests/tearing.c0000644000175000017500000000461611427543034016424 0ustar elmindredaelmindreda//======================================================================== // Vsync enabling test // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test renders a high contrast, horizontally moving bar, allowing for // visual verification of whether the set swap interval is indeed obeyed // //======================================================================== #include #include #include #include static void GLFWCALL window_size_callback(int width, int height) { glViewport(0, 0, width, height); } int main(void) { float position; if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(1); } if (!glfwOpenWindow(0, 0, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW window\n"); exit(1); } glfwSetWindowTitle("Tearing Detector"); glfwSetWindowSizeCallback(window_size_callback); glfwSwapInterval(1); glClearColor(0.f, 0.f, 0.f, 0.f); glColor3f(1.f, 1.f, 1.f); glMatrixMode(GL_PROJECTION); glOrtho(-1.f, 1.f, -1.f, 1.f, 1.f, -1.f); glMatrixMode(GL_MODELVIEW); while (glfwGetWindowParam(GLFW_OPENED) == GL_TRUE) { glClear(GL_COLOR_BUFFER_BIT); position = cosf(glfwGetTime() * 4.f) * 0.75f; glRectf(position - 0.25f, -1.f, position + 0.25f, 1.f); glfwSwapBuffers(); } glfwTerminate(); exit(0); } glfw-2.7.2/tests/peter.c0000644000175000017500000000643011436475554016121 0ustar elmindredaelmindreda//======================================================================== // Mouse cursor bug test // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test came about as the result of bugs #1262764, #1726540 and // #1726592, all reported by the user peterpp, hence the name // // The utility of this test outside of these bugs is uncertain // //======================================================================== #include #include #include static GLboolean cursor_enabled = GL_TRUE; static GLboolean open_window(void); static void toggle_mouse_cursor(void) { if (cursor_enabled) glfwDisable(GLFW_MOUSE_CURSOR); else glfwEnable(GLFW_MOUSE_CURSOR); cursor_enabled = !cursor_enabled; } static void GLFWCALL mouse_position_callback(int x, int y) { printf("Mouse moved to: %i %i\n", x, y); } static void GLFWCALL key_callback(int key, int action) { switch (key) { case GLFW_KEY_SPACE: { if (action == GLFW_PRESS) toggle_mouse_cursor(); break; } case 'R': { if (action == GLFW_PRESS) { glfwCloseWindow(); open_window(); } break; } } } static void GLFWCALL window_size_callback(int width, int height) { glViewport(0, 0, width, height); } static GLboolean open_window(void) { int x, y; if (!glfwOpenWindow(0, 0, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) return GL_FALSE; glfwSetWindowTitle("Peter Detector"); glfwGetMousePos(&x, &y); printf("Mouse position: %i %i\n", x, y); glfwDisable(GLFW_AUTO_POLL_EVENTS); glfwSetWindowSizeCallback(window_size_callback); glfwSetMousePosCallback(mouse_position_callback); glfwSetKeyCallback(key_callback); glfwSwapInterval(1); return GL_TRUE; } int main(void) { if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(1); } if (!open_window()) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW window\n"); exit(1); } glClearColor(0.f, 0.f, 0.f, 0.f); while (glfwGetWindowParam(GLFW_OPENED)) { glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(); glfwWaitEvents(); } glfwTerminate(); exit(0); } glfw-2.7.2/tests/Makefile.cocoa0000644000175000017500000000572711614002633017347 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Mac OS X on Cocoa using Apple GCC #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.cocoa ########################################################################## # Compiler settings CC ?= cc CFLAGS ?= -O2 -g CFLAGS += -I../include # Linker settings LIB = ../lib/cocoa/libglfw.a SOLIB = ../lib/cocoa/libglfw.dylib LFLAGS = $(LIB) -framework Cocoa -framework OpenGL SO_LFLAGS = $(SOLIB) -framework OpenGL HEADER = ../include/GL/glfw.h # Default: Build all tests all: Accuracy.app/Contents/MacOS/Accuracy \ defaults \ Dynamic.app/Contents/MacOS/Dynamic \ Events.app/Contents/MacOS/Events \ FSAA.app/Contents/MacOS/FSAA \ FSInput.app/Contents/MacOS/FSInput \ Iconify.app/Contents/MacOS/Iconify \ joysticks \ Peter.app/Contents/MacOS/Peter \ ReOpen.app/Contents/MacOS/ReOpen \ Tearing.app/Contents/MacOS/Tearing \ version Accuracy.app/Contents/MacOS/Accuracy: accuracy.c $(LIB) $(HEADER) /bin/sh bundle.sh Accuracy $(CC) $(CFLAGS) accuracy.c $(LFLAGS) -o Accuracy.app/Contents/MacOS/Accuracy defaults: defaults.c $(LIB) $(HEADER) $(CC) $(CFLAGS) defaults.c $(LFLAGS) -o defaults Dynamic.app/Contents/MacOS/Dynamic: dynamic.c $(SOLIB) $(HEADER) /bin/sh bundle.sh Dynamic cp $(SOLIB) Dynamic.app/Contents/MacOS/ $(CC) $(CFLAGS) dynamic.c $(SO_LFLAGS) -o Dynamic.app/Contents/MacOS/Dynamic Events.app/Contents/MacOS/Events: events.c $(LIB) $(HEADER) /bin/sh bundle.sh Events $(CC) $(CFLAGS) events.c $(LFLAGS) -o Events.app/Contents/MacOS/Events FSAA.app/Contents/MacOS/FSAA: fsaa.c $(LIB) $(HEADER) /bin/sh bundle.sh FSAA $(CC) $(CFLAGS) fsaa.c $(LFLAGS) -o FSAA.app/Contents/MacOS/FSAA FSInput.app/Contents/MacOS/FSInput: fsinput.c $(LIB) $(HEADER) /bin/sh bundle.sh FSInput $(CC) $(CFLAGS) fsinput.c $(LFLAGS) -o FSInput.app/Contents/MacOS/FSInput Iconify.app/Contents/MacOS/Iconify: iconify.c $(LIB) $(HEADER) /bin/sh bundle.sh Iconify $(CC) $(CFLAGS) iconify.c $(LFLAGS) -o Iconify.app/Contents/MacOS/Iconify joysticks: joysticks.c $(LIB) $(HEADER) $(CC) $(CFLAGS) joysticks.c $(LFLAGS) -o joysticks Peter.app/Contents/MacOS/Peter: peter.c $(LIB) $(HEADER) /bin/sh bundle.sh Peter $(CC) $(CFLAGS) peter.c $(LFLAGS) -o Peter.app/Contents/MacOS/Peter ReOpen.app/Contents/MacOS/ReOpen: reopen.c $(LIB) $(HEADER) /bin/sh bundle.sh ReOpen $(CC) $(CFLAGS) reopen.c $(LFLAGS) -o ReOpen.app/Contents/MacOS/ReOpen Tearing.app/Contents/MacOS/Tearing: tearing.c $(LIB) $(HEADER) /bin/sh bundle.sh Tearing $(CC) $(CFLAGS) tearing.c $(LFLAGS) -o Tearing.app/Contents/MacOS/Tearing version: version.c $(LIB) $(HEADER) $(CC) $(CFLAGS) version.c $(LFLAGS) -o version clean: rm -rf Accuracy.app defaults Dynamic.app Events.app FSAA.app FSInput.app \ Iconify.app joysticks Peter.app ReOpen.app Tearing.app version glfw-2.7.2/tests/reopen.c0000644000175000017500000001034311427543034016255 0ustar elmindredaelmindreda//======================================================================== // Window re-opener (open/close stress test) // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test came about as the result of bug #1262773 // // It closes and re-opens the GLFW window every five seconds, alternating // between windowed and fullscreen mode // // It also times and logs opening and closing actions and attempts to separate // user initiated window closing from its own // //======================================================================== #include #include #include static GLboolean closed = GL_FALSE; static const char* get_mode_name(int mode) { switch (mode) { case GLFW_WINDOW: return "windowed"; case GLFW_FULLSCREEN: return "fullscreen"; default: return "unknown"; } } static void GLFWCALL window_size_callback(int width, int height) { glViewport(0, 0, width, height); } static int GLFWCALL window_close_callback(void) { printf("Close callback triggered\n"); closed = GL_TRUE; return 0; } static void GLFWCALL key_callback(int key, int action) { if (action != GLFW_PRESS) return; switch (key) { case 'Q': case GLFW_KEY_ESC: closed = GL_TRUE; break; } } static int open_window(int width, int height, int mode) { double base = glfwGetTime(); if (!glfwOpenWindow(width, height, 0, 0, 0, 0, 16, 0, mode)) { fprintf(stderr, "Failed to create %s mode GLFW window\n", get_mode_name(mode)); return 0; } glfwSetWindowTitle("Window Re-opener"); glfwSetWindowSizeCallback(window_size_callback); glfwSetWindowCloseCallback(window_close_callback); glfwSetKeyCallback(key_callback); glfwSwapInterval(1); printf("Opening %s mode window took %0.3f seconds\n", get_mode_name(mode), glfwGetTime() - base); return 1; } static void close_window(void) { double base = glfwGetTime(); glfwCloseWindow(); printf("Closing window took %0.3f seconds\n", glfwGetTime() - base); } int main(int argc, char** argv) { int count = 0; if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(1); } for (;;) { if (!open_window(640, 480, (count & 1) ? GLFW_FULLSCREEN : GLFW_WINDOW)) { glfwTerminate(); exit(1); } glMatrixMode(GL_PROJECTION); glOrtho(-1.f, 1.f, -1.f, 1.f, 1.f, -1.f); glMatrixMode(GL_MODELVIEW); glClearColor(0.f, 0.f, 0.f, 0.f); glColor3f(1.f, 1.f, 1.f); glfwSetTime(0.0); while (glfwGetTime() < 5.0) { glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glRotatef((GLfloat) glfwGetTime() * 100.f, 0.f, 0.f, 1.f); glRectf(-0.5f, -0.5f, 1.f, 1.f); glPopMatrix(); glfwSwapBuffers(); if (closed) close_window(); if (!glfwGetWindowParam(GLFW_OPENED)) { printf("User closed window\n"); glfwTerminate(); exit(0); } } printf("Closing window\n"); close_window(); count++; } } glfw-2.7.2/tests/bundle.sh0000644000175000017500000000234111266567065016440 0ustar elmindredaelmindreda#!/bin/sh # Creates application bundles for use on Mac OS X. if [ -z "$1" ]; then echo "usage: `basename $0` BUNDLE-NAME" exit 1 fi bundle_name="$1" if [ ! -d "${bundle_name}.app/Contents/MacOS" ]; then mkdir -p "${bundle_name}.app/Contents/MacOS" fi if [ ! -d "${bundle_name}.app/Contents/Resources" ]; then mkdir -p "${bundle_name}.app/Contents/Resources" fi if [ ! -f "${bundle_name}.app/Contents/PkgInfo" ]; then echo -n "APPL????" > "${bundle_name}.app/Contents/PkgInfo" fi if [ ! -f "${bundle_name}.app/Contents/Info.plist" ]; then cat > "${bundle_name}.app/Contents/Info.plist" < CFBundleDevelopmentRegion English CFBundleExecutable ${bundle_name} CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL CFBundleSignature ???? CFBundleVersion 0.1 EOF fi glfw-2.7.2/tests/Makefile.carbon.universal0000644000175000017500000000571111613120630021524 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Mac OS X using Apple GCC. #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.carbon.universal ########################################################################## # Compiler settings CC = gcc FATFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ -mmacosx-version-min=10.4 -arch ppc -arch i386 CFLAGS = -I../include $(FATFLAGS) # Linker settings LIB = ../lib/carbon/libglfw.a SOLIB = ../lib/carbon/libglfw.dylib LFLAGS = $(LIB) -framework AGL -framework OpenGL -framework Carbon -m32 SO_LFLAGS = $(SOLIB) -framework OpenGL -m32 # Default: Build all tests all: Accuracy.app/Contents/MacOS/Accuracy \ defaults \ Dynamic.app/Contents/MacOS/Dynamic \ Events.app/Contents/MacOS/Events \ FSAA.app/Contents/MacOS/FSAA \ FSInput.app/Contents/MacOS/FSInput \ Iconify.app/Contents/MacOS/Iconify \ joysticks \ Peter.app/Contents/MacOS/Peter \ ReOpen.app/Contents/MacOS/ReOpen \ Tearing.app/Contents/MacOS/Tearing \ version Accuracy.app/Contents/MacOS/Accuracy: accuracy.c $(LIB) /bin/sh bundle.sh Accuracy $(CC) $(CFLAGS) accuracy.c $(LFLAGS) -o Accuracy.app/Contents/MacOS/Accuracy defaults: defaults.c $(LIB) $(CC) $(CFLAGS) defaults.c $(LFLAGS) -o defaults Dynamic.app/Contents/MacOS/Dynamic: dynamic.c $(SOLIB) /bin/sh bundle.sh Dynamic cp $(SOLIB) Dynamics.app/Contents/MacOS/ $(CC) $(CFLAGS) dynamic.c $(SO_LFLAGS) -o Dynamic.app/Contents/MacOS/Dynamic Events.app/Contents/MacOS/Events: events.c $(LIB) /bin/sh bundle.sh Events $(CC) $(CFLAGS) events.c $(LFLAGS) -o Events.app/Contents/MacOS/Events FSAA.app/Contents/MacOS/FSAA: fsaa.c $(LIB) /bin/sh bundle.sh FSAA $(CC) $(CFLAGS) fsaa.c $(LFLAGS) -o FSAA.app/Contents/MacOS/FSAA FSInput.app/Contents/MacOS/FSInput: fsinput.c $(LIB) /bin/sh bundle.sh FSInput $(CC) $(CFLAGS) fsinput.c $(LFLAGS) -o FSInput.app/Contents/MacOS/FSInput Iconify.app/Contents/MacOS/Iconify: iconify.c $(LIB) /bin/sh bundle.sh Iconify $(CC) $(CFLAGS) iconify.c $(LFLAGS) -o Iconify.app/Contents/MacOS/Iconify joysticks: joysticks.c $(LIB) $(CC) $(CFLAGS) joysticks.c $(LFLAGS) -o joysticks Peter.app/Contents/MacOS/Peter: peter.c $(LIB) /bin/sh bundle.sh Peter $(CC) $(CFLAGS) peter.c $(LFLAGS) -o Peter.app/Contents/MacOS/Peter ReOpen.app/Contents/MacOS/ReOpen: reopen.c $(LIB) /bin/sh bundle.sh ReOpen $(CC) $(CFLAGS) reopen.c $(LFLAGS) -o ReOpen.app/Contents/MacOS/ReOpen Tearing.app/Contents/MacOS/Tearing: tearing.c $(LIB) /bin/sh bundle.sh Tearing $(CC) $(CFLAGS) tearing.c $(LFLAGS) -o Tearing.app/Contents/MacOS/Tearing version: version.c $(LIB) $(CC) $(CFLAGS) version.c $(LFLAGS) -o version clean: rm -rf Accuracy.app defaults Dynamic.app Events.app FSAA.app FSInput.app \ Iconify.app joysticks Peter.app ReOpen.app Tearing.app version glfw-2.7.2/tests/joysticks.c0000644000175000017500000000720111267174452017014 0ustar elmindredaelmindreda/*======================================================================== * This is a small test application for GLFW. * joystick input test. *========================================================================*/ #include #include #include #define MAX_AXES 10 #define MAX_BUTTONS 30 struct JoystickState { int present; int num_axes; int num_buttons; float axes[MAX_AXES]; unsigned char buttons[MAX_BUTTONS]; }; static struct JoystickState states[GLFW_JOYSTICK_LAST + 1]; int running; int keyrepeat = 0; int systemkeys = 1; /*======================================================================== * Retrieve joystick states *========================================================================*/ static void updateJoysticksState(void) { int joy; for (joy = GLFW_JOYSTICK_1; joy < GLFW_JOYSTICK_LAST + 1; joy++) { printf("Updating information for joystick %d\n", joy); states[joy].present = glfwGetJoystickParam(joy, GLFW_PRESENT); if (states[joy].present == GL_TRUE) { states[joy].num_axes = glfwGetJoystickPos(joy, states[joy].axes, MAX_AXES); states[joy].num_buttons = glfwGetJoystickButtons(joy, states[joy].buttons, MAX_BUTTONS); } } } /*======================================================================== * Print out the state of all joysticks on the standard output *========================================================================*/ static void displayJoysticksState(void) { int joy; int i; for (joy = GLFW_JOYSTICK_1; joy < GLFW_JOYSTICK_LAST + 1; joy++) { printf("Joystick %d: %s\n", joy, (states[joy].present == GL_TRUE ? "present" : "not connected")); if (states[joy].present == GL_TRUE) { if (states[joy].num_axes > 0) { printf(" axes: %.3f", states[joy].axes[0]); for (i = 1; i < states[joy].num_axes; i++) printf(", %.3f", states[joy].axes[i]); printf("\n"); } else printf(" axes: none\n"); if (states[joy].num_buttons > 0) { printf(" buttons: 00 => %c", ((states[joy].buttons[0] == GLFW_PRESS) ? 'P' : 'R')); for (i = 1; i < states[joy].num_buttons; i++) printf(", %02d => %c", i, ((states[joy].buttons[i] == GLFW_PRESS) ? 'P' : 'R')); printf("\n"); } else printf(" buttons: none\n"); } } } int main(void) { double start; double t; double update; /* Initialise GLFW */ glfwInit(); printf("The program will work for 20 seconds and display every seconds the state of the joysticks\n"); printf("Your computer is going to be very slow as the program is doing an active loop .....\n"); start = glfwGetTime(); update = start; /* print the initial state of all joysticks */ updateJoysticksState(); printf("\n"); displayJoysticksState(); running = GL_TRUE; /* Main loop */ while (running) { /* Get time */ t = glfwGetTime(); /* Display the state of all connected joysticks every secons */ if ((t - update) > 1.0) { update = t; printf("\n"); updateJoysticksState(); printf("\n"); displayJoysticksState(); } /* Check if the window was closed */ if ((t - start) > 20.0) running = GL_FALSE; } /* Close OpenGL window and terminate GLFW */ glfwTerminate(); return 0; } glfw-2.7.2/tests/defaults.c0000644000175000017500000000602611427543034016577 0ustar elmindredaelmindreda//======================================================================== // Default window/context test // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test creates a windowed mode window with all parameters set to // default values and then reports the actual parameters of the created // window and context // //======================================================================== #include #include #include typedef struct { int param; char* name; } Param; static Param parameters[] = { { GLFW_ACCELERATED, "accelerated" }, { GLFW_RED_BITS, "red bits" }, { GLFW_GREEN_BITS, "green bits" }, { GLFW_BLUE_BITS, "blue bits" }, { GLFW_ALPHA_BITS, "alpha bits" }, { GLFW_DEPTH_BITS, "depth bits" }, { GLFW_STENCIL_BITS, "stencil bits" }, { GLFW_REFRESH_RATE, "refresh rate" }, { GLFW_ACCUM_RED_BITS, "accum red bits" }, { GLFW_ACCUM_GREEN_BITS, "accum green bits" }, { GLFW_ACCUM_BLUE_BITS, "accum blue bits" }, { GLFW_ACCUM_ALPHA_BITS, "accum alpha bits" }, { GLFW_AUX_BUFFERS, "aux buffers" }, { GLFW_STEREO, "stereo" }, { GLFW_FSAA_SAMPLES, "FSAA samples" }, { GLFW_OPENGL_VERSION_MAJOR, "OpenGL major" }, { GLFW_OPENGL_VERSION_MINOR, "OpenGL minor" }, { GLFW_OPENGL_FORWARD_COMPAT, "OpenGL forward compatible" }, { GLFW_OPENGL_DEBUG_CONTEXT, "OpenGL debug context" }, { GLFW_OPENGL_PROFILE, "OpenGL profile" }, }; int main(void) { int i, width, height; if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(1); } if (!glfwOpenWindow(0, 0, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW default window\n"); exit(1); } glfwGetWindowSize(&width, &height); printf("window size: %ix%i\n", width, height); for (i = 0; (size_t) i < sizeof(parameters) / sizeof(parameters[0]); i++) { printf("%s: %i\n", parameters[i].name, glfwGetWindowParam(parameters[i].param)); } glfwCloseWindow(); glfwTerminate(); exit(0); } glfw-2.7.2/tests/fsaa.c0000644000175000017500000000637211601076546015711 0ustar elmindredaelmindreda//======================================================================== // Fullscreen multisampling anti-aliasing test // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test renders two high contrast, slowly rotating quads, one aliased // and one (hopefully) anti-aliased, thus allowing for visual verification // of whether FSAA is indeed enabled // //======================================================================== #include #include #include #ifndef GL_ARB_multisample #define GL_MULTISAMPLE_ARB 0x809D #endif static void GLFWCALL window_size_callback(int width, int height) { glViewport(0, 0, width, height); } int main(void) { int samples; if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(EXIT_FAILURE); } glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4); if (!glfwOpenWindow(400, 400, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW window\n"); exit(EXIT_FAILURE); } if (!glfwExtensionSupported("GL_ARB_multisample")) { glfwTerminate(); fprintf(stderr, "Context reports GL_ARB_multisample is not supported\n"); exit(EXIT_FAILURE); } glfwSetWindowTitle("Aliasing Detector"); glfwSetWindowSizeCallback(window_size_callback); glfwSwapInterval(1); samples = glfwGetWindowParam(GLFW_FSAA_SAMPLES); if (samples) printf("Context reports FSAA is supported with %i samples\n", samples); else printf("Context reports FSAA is unsupported\n"); glMatrixMode(GL_PROJECTION); gluOrtho2D(0.f, 1.f, 0.f, 1.f); while (glfwGetWindowParam(GLFW_OPENED)) { GLfloat time = (GLfloat) glfwGetTime(); glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); glTranslatef(0.5f, 0.f, 0.f); glRotatef(time, 0.f, 0.f, 1.f); glEnable(GL_MULTISAMPLE_ARB); glColor3f(1.f, 1.f, 1.f); glRectf(-0.25f, -0.25f, 0.25f, 0.25f); glLoadIdentity(); glTranslatef(-0.5f, 0.f, 0.f); glRotatef(time, 0.f, 0.f, 1.f); glDisable(GL_MULTISAMPLE_ARB); glColor3f(1.f, 1.f, 1.f); glRectf(-0.25f, -0.25f, 0.25f, 0.25f); glfwSwapBuffers(); } glfwTerminate(); exit(EXIT_SUCCESS); } glfw-2.7.2/tests/accuracy.c0000644000175000017500000000563011427543034016562 0ustar elmindredaelmindreda//======================================================================== // Mouse cursor accuracy test // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test came about as the result of bug #1867804 // // No sign of said bug has so far been detected // //======================================================================== #include #include #include static int cursor_x = 0, cursor_y = 0; static int window_width = 640, window_height = 480; static void GLFWCALL window_size_callback(int width, int height) { window_width = width; window_height = height; glViewport(0, 0, window_width, window_height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.f, window_width, 0.f, window_height); } static void GLFWCALL mouse_position_callback(int x, int y) { cursor_x = x; cursor_y = y; } int main(void) { if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(EXIT_FAILURE); } if (!glfwOpenWindow(window_width, window_height, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW window\n"); exit(EXIT_FAILURE); } glfwSetWindowTitle("Cursor Inaccuracy Detector"); glfwSetMousePosCallback(mouse_position_callback); glfwSetWindowSizeCallback(window_size_callback); glfwSwapInterval(1); glClearColor(0, 0, 0, 0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); while (glfwGetWindowParam(GLFW_OPENED)) { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.f, 1.f, 1.f); glBegin(GL_LINES); glVertex2f(0.f, (GLfloat) window_height - cursor_y); glVertex2f((GLfloat) window_width, (GLfloat) window_height - cursor_y); glVertex2f((GLfloat) cursor_x, 0.f); glVertex2f((GLfloat) cursor_x, (GLfloat) window_height); glEnd(); glfwSwapBuffers(); } glfwTerminate(); exit(EXIT_SUCCESS); } glfw-2.7.2/tests/events.c0000644000175000017500000002346711601076546016307 0ustar elmindredaelmindreda//======================================================================== // Event linter (event spewer) // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test hooks every available callback and outputs their arguments // // Log messages go to stdout, error messages to stderr // // Every event also gets a (sequential) number to aid discussion of logs // //======================================================================== #include #define _CRT_SECURE_NO_WARNINGS #include #include #include #include static GLboolean keyrepeat = 0; static GLboolean systemkeys = 1; static unsigned int counter = 0; static const char* get_key_name(int key) { switch (key) { case GLFW_KEY_UNKNOWN: return "unknown"; case GLFW_KEY_SPACE: return "space"; case GLFW_KEY_ESC: return "escape"; case GLFW_KEY_F1: return "F1"; case GLFW_KEY_F2: return "F2"; case GLFW_KEY_F3: return "F3"; case GLFW_KEY_F4: return "F4"; case GLFW_KEY_F5: return "F5"; case GLFW_KEY_F6: return "F6"; case GLFW_KEY_F7: return "F7"; case GLFW_KEY_F8: return "F8"; case GLFW_KEY_F9: return "F9"; case GLFW_KEY_F10: return "F10"; case GLFW_KEY_F11: return "F11"; case GLFW_KEY_F12: return "F12"; case GLFW_KEY_F13: return "F13"; case GLFW_KEY_F14: return "F14"; case GLFW_KEY_F15: return "F15"; case GLFW_KEY_F16: return "F16"; case GLFW_KEY_F17: return "F17"; case GLFW_KEY_F18: return "F18"; case GLFW_KEY_F19: return "F19"; case GLFW_KEY_F20: return "F20"; case GLFW_KEY_F21: return "F21"; case GLFW_KEY_F22: return "F22"; case GLFW_KEY_F23: return "F23"; case GLFW_KEY_F24: return "F24"; case GLFW_KEY_F25: return "F25"; case GLFW_KEY_UP: return "up"; case GLFW_KEY_DOWN: return "down"; case GLFW_KEY_LEFT: return "left"; case GLFW_KEY_RIGHT: return "right"; case GLFW_KEY_LSHIFT: return "left shift"; case GLFW_KEY_RSHIFT: return "right shift"; case GLFW_KEY_LCTRL: return "left control"; case GLFW_KEY_RCTRL: return "right control"; case GLFW_KEY_LALT: return "left alt"; case GLFW_KEY_RALT: return "right alt"; case GLFW_KEY_TAB: return "tab"; case GLFW_KEY_ENTER: return "enter"; case GLFW_KEY_BACKSPACE: return "backspace"; case GLFW_KEY_INSERT: return "insert"; case GLFW_KEY_DEL: return "delete"; case GLFW_KEY_PAGEUP: return "page up"; case GLFW_KEY_PAGEDOWN: return "page down"; case GLFW_KEY_HOME: return "home"; case GLFW_KEY_END: return "end"; case GLFW_KEY_KP_0: return "keypad 0"; case GLFW_KEY_KP_1: return "keypad 1"; case GLFW_KEY_KP_2: return "keypad 2"; case GLFW_KEY_KP_3: return "keypad 3"; case GLFW_KEY_KP_4: return "keypad 4"; case GLFW_KEY_KP_5: return "keypad 5"; case GLFW_KEY_KP_6: return "keypad 6"; case GLFW_KEY_KP_7: return "keypad 7"; case GLFW_KEY_KP_8: return "keypad 8"; case GLFW_KEY_KP_9: return "keypad 9"; case GLFW_KEY_KP_DIVIDE: return "keypad divide"; case GLFW_KEY_KP_MULTIPLY: return "keypad multiply"; case GLFW_KEY_KP_SUBTRACT: return "keypad subtract"; case GLFW_KEY_KP_ADD: return "keypad add"; case GLFW_KEY_KP_DECIMAL: return "keypad decimal"; case GLFW_KEY_KP_EQUAL: return "keypad equal"; case GLFW_KEY_KP_ENTER: return "keypad enter"; case GLFW_KEY_KP_NUM_LOCK: return "keypad num lock"; case GLFW_KEY_CAPS_LOCK: return "caps lock"; case GLFW_KEY_SCROLL_LOCK: return "scroll lock"; case GLFW_KEY_PAUSE: return "pause"; case GLFW_KEY_LSUPER: return "left super"; case GLFW_KEY_RSUPER: return "right super"; case GLFW_KEY_MENU: return "menu"; } return NULL; } static const char* get_action_name(int action) { switch (action) { case GLFW_PRESS: return "was pressed"; case GLFW_RELEASE: return "was released"; } return "caused unknown action"; } static const char* get_button_name(int button) { switch (button) { case GLFW_MOUSE_BUTTON_LEFT: return "left"; case GLFW_MOUSE_BUTTON_RIGHT: return "right"; case GLFW_MOUSE_BUTTON_MIDDLE: return "middle"; } return NULL; } static const char* get_character_string(int character) { static char result[6 + 1]; int length = wctomb(result, character); if (length == -1) length = 0; result[length] = '\0'; return result; } static void GLFWCALL window_size_callback(int width, int height) { printf("%08x at %0.3f: Window size: %i %i\n", counter++, glfwGetTime(), width, height); glViewport(0, 0, width, height); } static int GLFWCALL window_close_callback(void) { printf("%08x at %0.3f: Window close\n", counter++, glfwGetTime()); return 1; } static void GLFWCALL window_refresh_callback(void) { printf("%08x at %0.3f: Window refresh\n", counter++, glfwGetTime()); } static void GLFWCALL mouse_button_callback(int button, int action) { const char* name = get_button_name(button); printf("%08x at %0.3f: Mouse button %i", counter++, glfwGetTime(), button); if (name) printf(" (%s) was %s\n", name, get_action_name(action)); else printf(" was %s\n", get_action_name(action)); } static void GLFWCALL mouse_position_callback(int x, int y) { printf("%08x at %0.3f: Mouse position: %i %i\n", counter++, glfwGetTime(), x, y); } static void GLFWCALL mouse_wheel_callback(int position) { printf("%08x at %0.3f: Mouse wheel: %i\n", counter++, glfwGetTime(), position); } static void GLFWCALL key_callback(int key, int action) { const char* name = get_key_name(key); printf("%08x at %0.3f: Key 0x%04x", counter++, glfwGetTime(), key); if (name) printf(" (%s) was %s\n", name, get_action_name(action)); else if (isgraph(key)) printf(" (%c) was %s\n", key, get_action_name(action)); else printf(" was %s\n", get_action_name(action)); if (action != GLFW_PRESS) return; switch (key) { case 'R': { keyrepeat = !keyrepeat; if (keyrepeat) glfwEnable(GLFW_KEY_REPEAT); else glfwDisable(GLFW_KEY_REPEAT); printf("(( key repeat %s ))\n", keyrepeat ? "enabled" : "disabled"); break; } case 'S': { systemkeys = !systemkeys; if( systemkeys ) glfwEnable(GLFW_SYSTEM_KEYS); else glfwDisable(GLFW_SYSTEM_KEYS); printf("(( system keys %s ))\n", systemkeys ? "enabled" : "disabled"); break; } } } static void GLFWCALL char_callback(int character, int action) { printf("%08x at %0.3f: Character 0x%04x", counter++, glfwGetTime(), character); printf(" (%s) %s\n", get_character_string(character), get_action_name(action)); } int main(void) { setlocale(LC_ALL, ""); if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(1); } printf("Library initialized\n"); if (!glfwOpenWindow(0, 0, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { glfwTerminate(); fprintf(stderr, "Failed to create GLFW window"); exit(1); } printf("Window opened\n"); glfwSetWindowTitle("Event Linter"); glfwSwapInterval(1); glfwSetWindowSizeCallback(window_size_callback); glfwSetWindowCloseCallback(window_close_callback); glfwSetWindowRefreshCallback(window_refresh_callback); glfwSetMouseButtonCallback(mouse_button_callback); glfwSetMousePosCallback(mouse_position_callback); glfwSetMouseWheelCallback(mouse_wheel_callback); glfwSetKeyCallback(key_callback); glfwSetCharCallback(char_callback); printf("Key repeat should be %s\n", keyrepeat ? "enabled" : "disabled"); printf("System keys should be %s\n", systemkeys ? "enabled" : "disabled"); printf("Main loop starting\n"); while (glfwGetWindowParam(GLFW_OPENED) == GL_TRUE) { glfwWaitEvents(); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(); } glfwTerminate(); exit(0); } glfw-2.7.2/tests/dynamic.c0000644000175000017500000000454311613652370016417 0ustar elmindredaelmindreda//======================================================================== // Dynamic linking test // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test came about as the result of bug #3060461 // //======================================================================== #define GLFW_DLL #include #include #include static void GLFWCALL window_size_callback(int width, int height) { glViewport(0, 0, width, height); } int main(void) { int major, minor, rev; glfwGetVersion(&major, &minor, &rev); if (major != GLFW_VERSION_MAJOR || minor != GLFW_VERSION_MINOR || rev != GLFW_VERSION_REVISION) { fprintf(stderr, "GLFW library version mismatch\n"); exit(EXIT_FAILURE); } if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(EXIT_FAILURE); } if (!glfwOpenWindow(0, 0, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { fprintf(stderr, "Failed to open GLFW window\n"); exit(EXIT_FAILURE); } glfwSetWindowTitle("Dynamic Linking Test"); glfwSetWindowSizeCallback(window_size_callback); glfwSwapInterval(1); glClearColor(0, 0, 0, 0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); while (glfwGetWindowParam(GLFW_OPENED)) { glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(); } glfwTerminate(); exit(EXIT_SUCCESS); } glfw-2.7.2/tests/Makefile.win32.cygwin0000644000175000017500000000412211602245453020516 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Windows using Cygwin #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.win32.cygwin ########################################################################## CC = gcc CFLAGS = -I../include -Wall -O2 -mwin32 -mno-cygwin LIB = ../lib/win32/libglfw.a SOLIB = ../lib/win32/libglfwdll.a LFLAGS = -mno-cygwin $(LIB) -lglu32 -lopengl32 SO_LFLAGS = -mno-cygwin $(SOLIB) -lglu32 -lopengl32 WINDOWS = -mwindows -e _mainCRTStartup CONSOLE = -mconsole BINARIES = accuracy.exe defaults.exe dynamic.exe events.exe fsaa.exe \ fsinput.exe iconify.exe joysticks.exe peter.exe reopen.exe \ tearing.exe version.exe HEADER = ../include/GL/glfw.h all: $(BINARIES) accuracy.exe: accuracy.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) accuracy.c $(LFLAGS) -o $@ defaults.exe: defaults.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) defaults.c $(LFLAGS) -o $@ dynamic.exe: dynamic.c $(SOLIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) dynamic.c $(SO_LFLAGS) -o $@ events.exe: events.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) events.c $(LFLAGS) -o $@ fsaa.exe: fsaa.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) fsaa.c $(LFLAGS) -lm -o $@ fsinput.exe: fsinput.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) fsinput.c $(LFLAGS) -lm -o $@ iconify.exe: iconify.c getopt.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) iconify.c getopt.c $(LFLAGS) -o $@ joysticks.exe: joysticks.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) joysticks.c $(LFLAGS) -lm -o $@ peter.exe: peter.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) peter.c $(LFLAGS) -o $@ reopen.exe: reopen.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) reopen.c $(LFLAGS) -lm -o $@ tearing.exe: tearing.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) tearing.c $(LFLAGS) -lm -o $@ version.exe: version.c getopt.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) version.c getopt.c $(LFLAGS) -lm -o $@ clean: rm -f $(BINARIES) glfw-2.7.2/tests/Makefile.win32.cross-mgw0000644000175000017500000000420411602245453021140 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on *nix using MinGW32 #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.win32.cross-mgw ########################################################################## TARGET ?= i586-mingw32msvc- CC = gcc CFLAGS = -I../include -Wall -O2 LIB = ../lib/win32/libglfw.a SOLIB = ../lib/win32/libglfwdll.a LFLAGS = $(LIB) -lglu32 -lopengl32 SO_LFLAGS = $(SOLIB) -lglu32 -lopengl32 WINDOWS = -mwindows -e _mainCRTStartup CONSOLE = -mconsole BINARIES = accuracy.exe defaults.exe dynamic.exe events.exe fsaa.exe \ fsinput.exe iconify.exe joysticks.exe peter.exe reopen.exe \ tearing.exe version.exe HEADER = ../include/GL/glfw.h all: $(BINARIES) accuracy.exe: accuracy.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) accuracy.c $(LFLAGS) -o $@ defaults.exe: defaults.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) defaults.c $(LFLAGS) -o $@ dynamic.exe: dynamic.c $(SOLIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) dynamic.c $(SO_LFLAGS) -o $@ events.exe: events.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) events.c $(LFLAGS) -o $@ fsaa.exe: fsaa.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) fsaa.c $(LFLAGS) -o $@ fsinput.exe: fsinput.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) fsinput.c $(LFLAGS) -o $@ iconify.exe: iconify.c getopt.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) iconify.c getopt.c $(LFLAGS) -o $@ joysticks.exe: joysticks.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) joysticks.c $(LFLAGS) -o $@ peter.exe: peter.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) peter.c $(LFLAGS) -o $@ reopen.exe: reopen.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) reopen.c $(LFLAGS) -o $@ tearing.exe: tearing.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) tearing.c $(LFLAGS) -o $@ version.exe: version.c getopt.c $(LIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) version.c getopt.c $(LFLAGS) -o $@ clean: rm -f $(BINARIES) glfw-2.7.2/tests/fsinput.c0000644000175000017500000000633311427543034016461 0ustar elmindredaelmindreda//======================================================================== // Fullscreen mode input test // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This test came about as the result of bug #2121835 // //======================================================================== #include #include #include #include static GLboolean running; static int window_width = 640, window_height = 480; static void GLFWCALL window_size_callback(int width, int height) { window_width = width; window_height = height; glViewport(0, 0, window_width, window_height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.f, window_width, 0.f, window_height); } static void GLFWCALL key_callback(int key, int action) { if (key == GLFW_KEY_ESC) running = GL_FALSE; } static void GLFWCALL char_callback(int character, int action) { } static void GLFWCALL mouse_button_callback(int button, int action) { } static void GLFWCALL mouse_position_callback(int x, int y) { } static void GLFWCALL mouse_wheel_callback(int position) { } int main(void) { GLFWvidmode mode; if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(1); } glfwGetDesktopMode(&mode); if (!glfwOpenWindow(mode.Width, mode.Height, 0, 0, 0, 0, 0, 0, GLFW_FULLSCREEN)) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW window\n"); exit(1); } glfwSetWindowTitle("Fullscreen Input Detector"); glfwSetKeyCallback(key_callback); glfwSetCharCallback(char_callback); glfwSetMousePosCallback(mouse_position_callback); glfwSetMouseButtonCallback(mouse_button_callback); glfwSetMouseWheelCallback(mouse_wheel_callback); glfwSetWindowSizeCallback(window_size_callback); glfwSwapInterval(1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glfwSetTime(0.0); running = GL_TRUE; while (running) { glClearColor((GLclampf) fabs(cos(glfwGetTime() * 4.f)), 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(); if (!glfwGetWindowParam(GLFW_OPENED)) running = GL_FALSE; if (glfwGetTime() > 10.0) running = GL_FALSE; } glfwTerminate(); exit(0); } glfw-2.7.2/tests/Makefile.win32.mingw0000644000175000017500000000370611602245453020346 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Windows using bare MinGW #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.win32.mingw ########################################################################## CC = gcc CFLAGS = -I../include -Wall -O2 LIB = ../lib/win32/libglfw.a SOLIB = ../lib/win32/libglfwdll.a LFLAGS = $(LIB) -lglu32 -lopengl32 SO_LFLAGS = $(SOLIB) -lglu32 -lopengl32 WINDOWS = -mwindows CONSOLE = -mconsole BINARIES = accuracy.exe defaults.exe dynamic.exe events.exe fsaa.exe \ fsinput.exe iconify.exe joysticks.exe peter.exe reopen.exe \ tearing.exe version.exe HEADER = ../include/GL/glfw.h all: $(BINARIES) accuracy.exe: accuracy.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) accuracy.c $(LFLAGS) -o $@ defaults.exe: defaults.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) defaults.c $(LFLAGS) -o $@ dynamic.exe: dynamic.c $(SOLIB) $(HEADER) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) dynamic.c $(SO_LFLAGS) -o $@ events.exe: events.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) events.c $(LFLAGS) -o $@ fsaa.exe: fsaa.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) fsaa.c $(LFLAGS) -o $@ fsinput.exe: fsinput.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) fsinput.c $(LFLAGS) -o $@ iconify.exe: iconify.c getopt.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) iconify.c getopt.c $(LFLAGS) -o $@ joysticks.exe: joysticks.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) joysticks.c $(LFLAGS) -o $@ peter.exe: peter.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) peter.c $(LFLAGS) -o $@ reopen.exe: reopen.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) reopen.c $(LFLAGS) -o $@ tearing.exe: tearing.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) tearing.c $(LFLAGS) -o $@ version.exe: version.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) version.c $(LFLAGS) -o $@ glfw-2.7.2/tests/Makefile.carbon0000644000175000017500000000551011613120630017512 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Mac OS X using Apple GCC. #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.carbon ########################################################################## # Compiler settings CC = gcc CFLAGS = -I../include -m32 # Linker settings LIB = ../lib/carbon/libglfw.a SOLIB = ../lib/carbon/libglfw.dylib LFLAGS = $(LIB) -framework AGL -framework OpenGL -framework Carbon -m32 SO_LFLAGS = $(SOLIB) -framework OpenGL -m32 # Default: Build all tests all: Accuracy.app/Contents/MacOS/Accuracy \ defaults \ Dynamic.app/Contents/MacOS/Dynamic \ Events.app/Contents/MacOS/Events \ FSAA.app/Contents/MacOS/FSAA \ FSInput.app/Contents/MacOS/FSInput \ Iconify.app/Contents/MacOS/Iconify \ joysticks \ Peter.app/Contents/MacOS/Peter \ ReOpen.app/Contents/MacOS/ReOpen \ Tearing.app/Contents/MacOS/Tearing \ version Accuracy.app/Contents/MacOS/Accuracy: accuracy.c $(LIB) /bin/sh bundle.sh Accuracy $(CC) $(CFLAGS) accuracy.c $(LFLAGS) -o Accuracy.app/Contents/MacOS/Accuracy defaults: defaults.c $(LIB) $(CC) $(CFLAGS) defaults.c $(LFLAGS) -o defaults Dynamic.app/Contents/MacOS/Dynamic: dynamic.c $(SOLIB) /bin/sh bundle.sh Dynamic cp $(SOLIB) Dynamic.app/Contents/MacOS/ $(CC) $(CFLAGS) dynamic.c $(SO_LFLAGS) -o Dynamic.app/Contents/MacOS/Dynamic Events.app/Contents/MacOS/Events: events.c $(LIB) /bin/sh bundle.sh Events $(CC) $(CFLAGS) events.c $(LFLAGS) -o Events.app/Contents/MacOS/Events FSAA.app/Contents/MacOS/FSAA: fsaa.c $(LIB) /bin/sh bundle.sh FSAA $(CC) $(CFLAGS) fsaa.c $(LFLAGS) -o FSAA.app/Contents/MacOS/FSAA FSInput.app/Contents/MacOS/FSInput: fsinput.c $(LIB) /bin/sh bundle.sh FSInput $(CC) $(CFLAGS) fsinput.c $(LFLAGS) -o FSInput.app/Contents/MacOS/FSInput Iconify.app/Contents/MacOS/Iconify: iconify.c $(LIB) /bin/sh bundle.sh Iconify $(CC) $(CFLAGS) iconify.c $(LFLAGS) -o Iconify.app/Contents/MacOS/Iconify joysticks: joysticks.c $(LIB) $(CC) $(CFLAGS) joysticks.c $(LFLAGS) -o joysticks Peter.app/Contents/MacOS/Peter: peter.c $(LIB) /bin/sh bundle.sh Peter $(CC) $(CFLAGS) peter.c $(LFLAGS) -o Peter.app/Contents/MacOS/Peter ReOpen.app/Contents/MacOS/ReOpen: reopen.c $(LIB) /bin/sh bundle.sh ReOpen $(CC) $(CFLAGS) reopen.c $(LFLAGS) -o ReOpen.app/Contents/MacOS/ReOpen Tearing.app/Contents/MacOS/Tearing: tearing.c $(LIB) /bin/sh bundle.sh Tearing $(CC) $(CFLAGS) tearing.c $(LFLAGS) -o Tearing.app/Contents/MacOS/Tearing version: version.c $(LIB) $(CC) $(CFLAGS) version.c $(LFLAGS) -o version clean: rm -rf Accuracy.app defaults Dynamic.app Events.app FSAA.app FSInput.app \ Iconify.app joysticks Peter.app ReOpen.app Tearing.app version glfw-2.7.2/tests/getopt.c0000644000175000017500000001453711427543034016300 0ustar elmindredaelmindreda/***************************************************************************** * getopt.c - competent and free getopt library. * $Header: /cvsroot/freegetopt/freegetopt/getopt.c,v 1.2 2003/10/26 03:10:20 vindaci Exp $ * * Copyright (c)2002-2003 Mark K. Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the original author of this software nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ #include #include #include #include "getopt.h" /* 2009-10-12 Camilla Berglund * * Removed unused global static variable 'ID'. */ char* optarg = NULL; int optind = 0; int opterr = 1; int optopt = '?'; static char** prev_argv = NULL; /* Keep a copy of argv and argc to */ static int prev_argc = 0; /* tell if getopt params change */ static int argv_index = 0; /* Option we're checking */ static int argv_index2 = 0; /* Option argument we're checking */ static int opt_offset = 0; /* Index into compounded "-option" */ static int dashdash = 0; /* True if "--" option reached */ static int nonopt = 0; /* How many nonopts we've found */ static void increment_index() { /* Move onto the next option */ if(argv_index < argv_index2) { while(prev_argv[++argv_index] && prev_argv[argv_index][0] != '-' && argv_index < argv_index2+1); } else argv_index++; opt_offset = 1; } /* * Permutes argv[] so that the argument currently being processed is moved * to the end. */ static int permute_argv_once() { /* Movability check */ if(argv_index + nonopt >= prev_argc) return 1; /* Move the current option to the end, bring the others to front */ else { char* tmp = prev_argv[argv_index]; /* Move the data */ memmove(&prev_argv[argv_index], &prev_argv[argv_index+1], sizeof(char**) * (prev_argc - argv_index - 1)); prev_argv[prev_argc - 1] = tmp; nonopt++; return 0; } } int getopt(int argc, char** argv, char* optstr) { int c = 0; /* If we have new argv, reinitialize */ if(prev_argv != argv || prev_argc != argc) { /* Initialize variables */ prev_argv = argv; prev_argc = argc; argv_index = 1; argv_index2 = 1; opt_offset = 1; dashdash = 0; nonopt = 0; } /* Jump point in case we want to ignore the current argv_index */ getopt_top: /* Misc. initializations */ optarg = NULL; /* Dash-dash check */ if(argv[argv_index] && !strcmp(argv[argv_index], "--")) { dashdash = 1; increment_index(); } /* If we're at the end of argv, that's it. */ if(argv[argv_index] == NULL) { c = -1; } /* Are we looking at a string? Single dash is also a string */ else if(dashdash || argv[argv_index][0] != '-' || !strcmp(argv[argv_index], "-")) { /* If we want a string... */ if(optstr[0] == '-') { c = 1; optarg = argv[argv_index]; increment_index(); } /* If we really don't want it (we're in POSIX mode), we're done */ else if(optstr[0] == '+' || getenv("POSIXLY_CORRECT")) { c = -1; /* Everything else is a non-opt argument */ nonopt = argc - argv_index; } /* If we mildly don't want it, then move it back */ else { if(!permute_argv_once()) goto getopt_top; else c = -1; } } /* Otherwise we're looking at an option */ else { char* opt_ptr = NULL; /* Grab the option */ c = argv[argv_index][opt_offset++]; /* Is the option in the optstr? */ if(optstr[0] == '-') opt_ptr = strchr(optstr+1, c); else opt_ptr = strchr(optstr, c); /* Invalid argument */ if(!opt_ptr) { if(opterr) { fprintf(stderr, "%s: invalid option -- %c\n", argv[0], c); } optopt = c; c = '?'; /* Move onto the next option */ increment_index(); } /* Option takes argument */ else if(opt_ptr[1] == ':') { /* ie, -oARGUMENT, -xxxoARGUMENT, etc. */ if(argv[argv_index][opt_offset] != '\0') { optarg = &argv[argv_index][opt_offset]; increment_index(); } /* ie, -o ARGUMENT (only if it's a required argument) */ else if(opt_ptr[2] != ':') { /* One of those "you're not expected to understand this" moment */ if(argv_index2 < argv_index) argv_index2 = argv_index; while(argv[++argv_index2] && argv[argv_index2][0] == '-'); optarg = argv[argv_index2]; /* Don't cross into the non-option argument list */ if(argv_index2 + nonopt >= prev_argc) optarg = NULL; /* Move onto the next option */ increment_index(); } else { /* Move onto the next option */ increment_index(); } /* In case we got no argument for an option with required argument */ if(optarg == NULL && opt_ptr[2] != ':') { optopt = c; c = '?'; if(opterr) { fprintf(stderr,"%s: option requires an argument -- %c\n", argv[0], optopt); } } } /* Option does not take argument */ else { /* Next argv_index */ if(argv[argv_index][opt_offset] == '\0') { increment_index(); } } } /* Calculate optind */ if(c == -1) { optind = argc - nonopt; } else { optind = argv_index; } return c; } /* vim:ts=3 */ glfw-2.7.2/tests/getopt.h0000644000175000017500000000403311264701056016272 0ustar elmindredaelmindreda/***************************************************************************** * getopt.h - competent and free getopt library. * $Header: /cvsroot/freegetopt/freegetopt/getopt.h,v 1.2 2003/10/26 03:10:20 vindaci Exp $ * * Copyright (c)2002-2003 Mark K. Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the original author of this software nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ #ifndef GETOPT_H_ #define GETOPT_H_ #ifdef __cplusplus extern "C" { #endif extern char* optarg; extern int optind; extern int opterr; extern int optopt; int getopt(int argc, char** argv, char* optstr); #ifdef __cplusplus } #endif #endif /* GETOPT_H_ */ /* vim:ts=3 */ glfw-2.7.2/tests/iconify.c0000644000175000017500000000767711435044437016447 0ustar elmindredaelmindreda//======================================================================== // Iconify/restore test program // Copyright (c) Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // // This program is used to test the iconify/restore functionality for // both fullscreen and windowed mode windows // //======================================================================== #include #include #include #include "getopt.h" static void usage(void) { printf("iconify [-h] [-f]\n"); } static void GLFWCALL key_callback(int key, int action) { printf("%0.2f Key %s\n", glfwGetTime(), action == GLFW_PRESS ? "pressed" : "released"); if (action != GLFW_PRESS) return; switch (key) { case GLFW_KEY_SPACE: glfwIconifyWindow(); break; case GLFW_KEY_ESC: glfwCloseWindow(); break; } } static void GLFWCALL size_callback(int width, int height) { glViewport(0, 0, width, height); } int main(int argc, char** argv) { int width, height, ch; int mode = GLFW_WINDOW; GLboolean active = -1, iconified = -1; while ((ch = getopt(argc, argv, "fh")) != -1) { switch (ch) { case 'h': usage(); exit(EXIT_SUCCESS); case 'f': mode = GLFW_FULLSCREEN; break; default: usage(); exit(EXIT_FAILURE); } } if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); exit(EXIT_FAILURE); } if (mode == GLFW_FULLSCREEN) { GLFWvidmode mode; glfwGetDesktopMode(&mode); width = mode.Width; height = mode.Height; } else { width = 0; height = 0; } if (!glfwOpenWindow(width, height, 0, 0, 0, 0, 0, 0, mode)) { glfwTerminate(); fprintf(stderr, "Failed to open GLFW window\n"); exit(EXIT_FAILURE); } glfwSetWindowTitle("Iconify"); glfwSwapInterval(1); glfwSetKeyCallback(key_callback); glfwSetWindowSizeCallback(size_callback); glEnable(GL_SCISSOR_TEST); while (glfwGetWindowParam(GLFW_OPENED)) { int width, height; if (iconified != glfwGetWindowParam(GLFW_ICONIFIED) || active != glfwGetWindowParam(GLFW_ACTIVE)) { iconified = glfwGetWindowParam(GLFW_ICONIFIED); active = glfwGetWindowParam(GLFW_ACTIVE); printf("%0.2f %s %s\n", glfwGetTime(), iconified ? "Iconified" : "Restored", active ? "Active" : "Inactive"); } glfwGetWindowSize(&width, &height); glScissor(0, 0, width, height); glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT); glScissor(0, 0, 640, 480); glClearColor(1, 1, 1, 0); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(); } glfwTerminate(); exit(EXIT_SUCCESS); } glfw-2.7.2/lib/0000755000175000017500000000000011621215252014216 5ustar elmindredaelmindredaglfw-2.7.2/lib/enable.c0000644000175000017500000002056011427547437015634 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Enable (show) mouse cursor //======================================================================== static void enableMouseCursor( void ) { int centerPosX, centerPosY; if( !_glfwWin.opened || !_glfwWin.mouseLock ) { return; } // Show mouse cursor _glfwPlatformShowMouseCursor(); centerPosX = _glfwWin.width / 2; centerPosY = _glfwWin.height / 2; if( centerPosX != _glfwInput.MousePosX || centerPosY != _glfwInput.MousePosY ) { _glfwPlatformSetMouseCursorPos( centerPosX, centerPosY ); _glfwInput.MousePosX = centerPosX; _glfwInput.MousePosY = centerPosY; if( _glfwWin.mousePosCallback ) { _glfwWin.mousePosCallback( _glfwInput.MousePosX, _glfwInput.MousePosY ); } } // From now on the mouse is unlocked _glfwWin.mouseLock = GL_FALSE; } //======================================================================== // Disable (hide) mouse cursor //======================================================================== static void disableMouseCursor( void ) { if( !_glfwWin.opened || _glfwWin.mouseLock ) { return; } // Hide mouse cursor _glfwPlatformHideMouseCursor(); // Move cursor to the middle of the window _glfwPlatformSetMouseCursorPos( _glfwWin.width >> 1, _glfwWin.height >> 1 ); // From now on the mouse is locked _glfwWin.mouseLock = GL_TRUE; } //======================================================================== // Enable sticky keys //======================================================================== static void enableStickyKeys( void ) { _glfwInput.StickyKeys = 1; } //======================================================================== // Disable sticky keys //======================================================================== static void disableStickyKeys( void ) { int i; _glfwInput.StickyKeys = 0; // Release all sticky keys for( i = 0; i <= GLFW_KEY_LAST; i++ ) { if( _glfwInput.Key[ i ] == 2 ) { _glfwInput.Key[ i ] = 0; } } } //======================================================================== // Enable sticky mouse buttons //======================================================================== static void enableStickyMouseButtons( void ) { _glfwInput.StickyMouseButtons = 1; } //======================================================================== // Disable sticky mouse buttons //======================================================================== static void disableStickyMouseButtons( void ) { int i; _glfwInput.StickyMouseButtons = 0; // Release all sticky mouse buttons for( i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i++ ) { if( _glfwInput.MouseButton[ i ] == 2 ) { _glfwInput.MouseButton[ i ] = 0; } } } //======================================================================== // Enable system keys //======================================================================== static void enableSystemKeys( void ) { if( !_glfwWin.sysKeysDisabled ) { return; } _glfwPlatformEnableSystemKeys(); // Indicate that system keys are no longer disabled _glfwWin.sysKeysDisabled = GL_FALSE; } //======================================================================== // Disable system keys //======================================================================== static void disableSystemKeys( void ) { if( _glfwWin.sysKeysDisabled ) { return; } _glfwPlatformDisableSystemKeys(); // Indicate that system keys are now disabled _glfwWin.sysKeysDisabled = GL_TRUE; } //======================================================================== // Enable key repeat //======================================================================== static void enableKeyRepeat( void ) { _glfwInput.KeyRepeat = 1; } //======================================================================== // Disable key repeat //======================================================================== static void disableKeyRepeat( void ) { _glfwInput.KeyRepeat = 0; } //======================================================================== // Enable automatic event polling //======================================================================== static void enableAutoPollEvents( void ) { _glfwWin.autoPollEvents = 1; } //======================================================================== // Disable automatic event polling //======================================================================== static void disableAutoPollEvents( void ) { _glfwWin.autoPollEvents = 0; } //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Enable certain GLFW/window/system functions. //======================================================================== GLFWAPI void GLFWAPIENTRY glfwEnable( int token ) { // Is GLFW initialized? if( !_glfwInitialized ) { return; } switch( token ) { case GLFW_MOUSE_CURSOR: enableMouseCursor(); break; case GLFW_STICKY_KEYS: enableStickyKeys(); break; case GLFW_STICKY_MOUSE_BUTTONS: enableStickyMouseButtons(); break; case GLFW_SYSTEM_KEYS: enableSystemKeys(); break; case GLFW_KEY_REPEAT: enableKeyRepeat(); break; case GLFW_AUTO_POLL_EVENTS: enableAutoPollEvents(); break; default: break; } } //======================================================================== // Disable certain GLFW/window/system functions. //======================================================================== GLFWAPI void GLFWAPIENTRY glfwDisable( int token ) { // Is GLFW initialized? if( !_glfwInitialized ) { return; } switch( token ) { case GLFW_MOUSE_CURSOR: disableMouseCursor(); break; case GLFW_STICKY_KEYS: disableStickyKeys(); break; case GLFW_STICKY_MOUSE_BUTTONS: disableStickyMouseButtons(); break; case GLFW_SYSTEM_KEYS: disableSystemKeys(); break; case GLFW_KEY_REPEAT: disableKeyRepeat(); break; case GLFW_AUTO_POLL_EVENTS: disableAutoPollEvents(); break; default: break; } } glfw-2.7.2/lib/x11/0000755000175000017500000000000011621215252014627 5ustar elmindredaelmindredaglfw-2.7.2/lib/x11/Makefile.x11.in0000644000175000017500000001726111275615210017316 0ustar elmindredaelmindreda ########################################################################## # Installation prefix (default to /usr/local) ########################################################################## PREFIX ?= /usr/local ########################################################################## # Default: Build GLFW static library ########################################################################## all: libglfw.a libglfw.so ########################################################################## # Library builder settings ########################################################################## AR = ar LD = ld SED = sed INSTALL = install ARFLAGS = -rcs HEADERS = ../../include/GL/glfw.h ../internal.h platform.h ########################################################################## # Install GLFW static library ########################################################################## install: libglfw.a libglfw.pc $(INSTALL) -d $(PREFIX)/lib $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a $(INSTALL) -d $(PREFIX)/include/GL $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h $(INSTALL) -d $(PREFIX)/lib/pkgconfig $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc ########################################################################## # Install GLFW static and shared libraries ########################################################################## dist-install: libglfw.a libglfw.so libglfw.pc $(INSTALL) -d $(PREFIX)/lib $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a $(INSTALL) -c -m 644 libglfw.so $(PREFIX)/lib/libglfw.so $(INSTALL) -d $(PREFIX)/include/GL $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h $(INSTALL) -d $(PREFIX)/lib/pkgconfig $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc ########################################################################## # Object files which are part of the GLFW library ########################################################################## STATIC_OBJS = \ enable.o \ fullscreen.o \ glext.o \ image.o \ init.o \ input.o \ joystick.o \ stream.o \ tga.o \ thread.o \ time.o \ window.o \ x11_enable.o \ x11_fullscreen.o \ x11_glext.o \ x11_init.o \ x11_joystick.o \ x11_keysym2unicode.o \ x11_thread.o \ x11_time.o \ x11_window.o ########################################################################## # Object files which are part of the GLFW library ########################################################################## SHARED_OBJS = \ so_enable.o \ so_fullscreen.o \ so_glext.o \ so_image.o \ so_init.o \ so_input.o \ so_joystick.o \ so_stream.o \ so_tga.o \ so_thread.o \ so_time.o \ so_window.o \ so_x11_enable.o \ so_x11_fullscreen.o \ so_x11_glext.o \ so_x11_init.o \ so_x11_joystick.o \ so_x11_keysym2unicode.o \ so_x11_thread.o \ so_x11_time.o \ so_x11_window.o ########################################################################## # Rule for building libglfw.pc ########################################################################## libglfw.pc: libglfw.pc.in $(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc ########################################################################## # Rule for building static library ########################################################################## libglfw.a: $(STATIC_OBJS) $(AR) $(ARFLAGS) $@ $(STATIC_OBJS) ########################################################################## # Rule for building shared library ########################################################################## libglfw.so: $(SHARED_OBJS) $(CC) $(SOFLAGS) -o $@ $(SHARED_OBJS) $(LFLAGS) $(LIBS) ########################################################################## # Rules for building static library object files ########################################################################## enable.o: ../enable.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../enable.c fullscreen.o: ../fullscreen.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../fullscreen.c glext.o: ../glext.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../glext.c image.o: ../image.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../image.c init.o: ../init.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../init.c input.o: ../input.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../input.c joystick.o: ../joystick.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../joystick.c stream.o: ../stream.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../stream.c tga.o: ../tga.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../tga.c thread.o: ../thread.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../thread.c time.o: ../time.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../time.c window.o: ../window.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../window.c x11_enable.o: x11_enable.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_enable.c x11_fullscreen.o: x11_fullscreen.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_fullscreen.c x11_glext.o: x11_glext.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_glext.c x11_init.o: x11_init.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_init.c x11_joystick.o: x11_joystick.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_joystick.c x11_thread.o: x11_thread.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_thread.c x11_time.o: x11_time.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_time.c x11_window.o: x11_window.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_window.c x11_keysym2unicode.o: x11_keysym2unicode.c $(HEADERS) $(CC) $(CFLAGS) -o $@ x11_keysym2unicode.c ########################################################################## # Rules for building shared library object files ########################################################################## so_enable.o: ../enable.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../enable.c so_fullscreen.o: ../fullscreen.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../fullscreen.c so_glext.o: ../glext.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../glext.c so_image.o: ../image.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../image.c so_init.o: ../init.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../init.c so_input.o: ../input.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../input.c so_joystick.o: ../joystick.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../joystick.c so_stream.o: ../stream.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../stream.c so_tga.o: ../tga.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../tga.c so_thread.o: ../thread.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../thread.c so_time.o: ../time.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../time.c so_window.o: ../window.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ ../window.c so_x11_enable.o: x11_enable.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_enable.c so_x11_fullscreen.o: x11_fullscreen.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_fullscreen.c so_x11_glext.o: x11_glext.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_glext.c so_x11_init.o: x11_init.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_init.c so_x11_joystick.o: x11_joystick.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_joystick.c so_x11_thread.o: x11_thread.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_thread.c so_x11_time.o: x11_time.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_time.c so_x11_window.o: x11_window.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_window.c so_x11_keysym2unicode.o: x11_keysym2unicode.c $(HEADERS) $(CC) -fPIC $(CFLAGS) -o $@ x11_keysym2unicode.c ########################################################################## # Clean ########################################################################## clean: rm -f $(STATIC_OBJS) $(SHARED_OBJS) libglfw.a libglfw.so libglfw.pc glfw-2.7.2/lib/x11/x11_enable.c0000644000175000017500000000453711436475605016741 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11 (Unix) // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Enable system keys //======================================================================== void _glfwPlatformEnableSystemKeys( void ) { if( _glfwWin.keyboardGrabbed ) { XUngrabKeyboard( _glfwLibrary.display, CurrentTime ); _glfwWin.keyboardGrabbed = GL_FALSE; } } //======================================================================== // Disable system keys //======================================================================== void _glfwPlatformDisableSystemKeys( void ) { if( XGrabKeyboard( _glfwLibrary.display, _glfwWin.window, True, GrabModeAsync, GrabModeAsync, CurrentTime ) == GrabSuccess ) { _glfwWin.keyboardGrabbed = GL_TRUE; } } glfw-2.7.2/lib/x11/x11_joystick.c0000644000175000017500000002572611577637342017361 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //======================================================================== // Note: Only Linux joystick input is supported at the moment. Other // systems will behave as if there are no joysticks connected. //======================================================================== //************************************************************************ //**** GLFW internal functions **** //************************************************************************ #ifdef _GLFW_USE_LINUX_JOYSTICKS //------------------------------------------------------------------------ // Here are the Linux joystick driver v1.x interface definitions that we // use (we do not want to rely on ): //------------------------------------------------------------------------ #include #include #include // Joystick event types #define JS_EVENT_BUTTON 0x01 /* button pressed/released */ #define JS_EVENT_AXIS 0x02 /* joystick moved */ #define JS_EVENT_INIT 0x80 /* initial state of device */ // Joystick event structure struct js_event { unsigned int time; /* (u32) event timestamp in milliseconds */ signed short value; /* (s16) value */ unsigned char type; /* (u8) event type */ unsigned char number; /* (u8) axis/button number */ }; // Joystick IOCTL commands #define JSIOCGVERSION _IOR('j', 0x01, int) /* get driver version (u32) */ #define JSIOCGAXES _IOR('j', 0x11, char) /* get number of axes (u8) */ #define JSIOCGBUTTONS _IOR('j', 0x12, char) /* get number of buttons (u8) */ #endif // _GLFW_USE_LINUX_JOYSTICKS //======================================================================== // Initialize joystick interface //======================================================================== void _glfwInitJoysticks( void ) { #ifdef _GLFW_USE_LINUX_JOYSTICKS int k, n, fd, joy_count; char *joy_base_name, joy_dev_name[ 20 ]; int driver_version = 0x000800; char ret_data; #endif // _GLFW_USE_LINUX_JOYSTICKS int i; // Start by saying that there are no sticks for( i = 0; i <= GLFW_JOYSTICK_LAST; ++ i ) { _glfwJoy[ i ].Present = GL_FALSE; } #ifdef _GLFW_USE_LINUX_JOYSTICKS // Try to open joysticks (nonblocking) joy_count = 0; for( k = 0; k <= 1 && joy_count <= GLFW_JOYSTICK_LAST; ++ k ) { // Pick joystick base name switch( k ) { case 0: joy_base_name = "/dev/input/js"; // USB sticks break; case 1: joy_base_name = "/dev/js"; // "Legacy" sticks break; default: continue; // (should never happen) } // Try to open a few of these sticks for( i = 0; i <= 50 && joy_count <= GLFW_JOYSTICK_LAST; ++ i ) { sprintf( joy_dev_name, "%s%d", joy_base_name, i ); fd = open( joy_dev_name, O_NONBLOCK ); if( fd != -1 ) { // Remember fd _glfwJoy[ joy_count ].fd = fd; // Check that the joystick driver version is 1.0+ ioctl( fd, JSIOCGVERSION, &driver_version ); if( driver_version < 0x010000 ) { // It's an old 0.x interface (we don't support it) close( fd ); continue; } // Get number of joystick axes ioctl( fd, JSIOCGAXES, &ret_data ); _glfwJoy[ joy_count ].NumAxes = (int) ret_data; // Get number of joystick buttons ioctl( fd, JSIOCGBUTTONS, &ret_data ); _glfwJoy[ joy_count ].NumButtons = (int) ret_data; // Allocate memory for joystick state _glfwJoy[ joy_count ].Axis = (float *) malloc( sizeof(float) * _glfwJoy[ joy_count ].NumAxes ); if( _glfwJoy[ joy_count ].Axis == NULL ) { close( fd ); continue; } _glfwJoy[ joy_count ].Button = (unsigned char *) malloc( sizeof(char) * _glfwJoy[ joy_count ].NumButtons ); if( _glfwJoy[ joy_count ].Button == NULL ) { free( _glfwJoy[ joy_count ].Axis ); close( fd ); continue; } // Clear joystick state for( n = 0; n < _glfwJoy[ joy_count ].NumAxes; ++ n ) { _glfwJoy[ joy_count ].Axis[ n ] = 0.0f; } for( n = 0; n < _glfwJoy[ joy_count ].NumButtons; ++ n ) { _glfwJoy[ joy_count ].Button[ n ] = GLFW_RELEASE; } // The joystick is supported and connected _glfwJoy[ joy_count ].Present = GL_TRUE; joy_count ++; } } } #endif // _GLFW_USE_LINUX_JOYSTICKS } //======================================================================== // Close all opened joystick handles //======================================================================== void _glfwTerminateJoysticks( void ) { #ifdef _GLFW_USE_LINUX_JOYSTICKS int i; // Close any opened joysticks for( i = 0; i <= GLFW_JOYSTICK_LAST; ++ i ) { if( _glfwJoy[ i ].Present ) { close( _glfwJoy[ i ].fd ); free( _glfwJoy[ i ].Axis ); free( _glfwJoy[ i ].Button ); _glfwJoy[ i ].Present = GL_FALSE; } } #endif // _GLFW_USE_LINUX_JOYSTICKS } //======================================================================== // Empty joystick event queue //======================================================================== static void pollJoystickEvents( void ) { #ifdef _GLFW_USE_LINUX_JOYSTICKS struct js_event e; int i; // Get joystick events for all GLFW joysticks for( i = 0; i <= GLFW_JOYSTICK_LAST; ++ i ) { // Is the stick present? if( _glfwJoy[ i ].Present ) { // Read all queued events (non-blocking) while( read(_glfwJoy[i].fd, &e, sizeof(struct js_event)) > 0 ) { // We don't care if it's an init event or not e.type &= ~JS_EVENT_INIT; // Check event type switch( e.type ) { case JS_EVENT_AXIS: _glfwJoy[ i ].Axis[ e.number ] = (float) e.value / 32767.0f; // We need to change the sign for the Y axes, so that // positive = up/forward, according to the GLFW spec. if( e.number & 1 ) { _glfwJoy[ i ].Axis[ e.number ] = -_glfwJoy[ i ].Axis[ e.number ]; } break; case JS_EVENT_BUTTON: _glfwJoy[ i ].Button[ e.number ] = e.value ? GLFW_PRESS : GLFW_RELEASE; break; default: break; } } } } #endif // _GLFW_USE_LINUX_JOYSTICKS } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Determine joystick capabilities //======================================================================== int _glfwPlatformGetJoystickParam( int joy, int param ) { // Is joystick present? if( !_glfwJoy[ joy ].Present ) { return 0; } switch( param ) { case GLFW_PRESENT: return GL_TRUE; case GLFW_AXES: return _glfwJoy[ joy ].NumAxes; case GLFW_BUTTONS: return _glfwJoy[ joy ].NumButtons; default: break; } return 0; } //======================================================================== // Get joystick axis positions //======================================================================== int _glfwPlatformGetJoystickPos( int joy, float *pos, int numaxes ) { int i; // Is joystick present? if( !_glfwJoy[ joy ].Present ) { return 0; } // Update joystick state pollJoystickEvents(); // Does the joystick support less axes than requested? if( _glfwJoy[ joy ].NumAxes < numaxes ) { numaxes = _glfwJoy[ joy ].NumAxes; } // Copy axis positions from internal state for( i = 0; i < numaxes; ++ i ) { pos[ i ] = _glfwJoy[ joy ].Axis[ i ]; } return numaxes; } //======================================================================== // Get joystick button states //======================================================================== int _glfwPlatformGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ) { int i; // Is joystick present? if( !_glfwJoy[ joy ].Present ) { return 0; } // Update joystick state pollJoystickEvents(); // Does the joystick support less buttons than requested? if( _glfwJoy[ joy ].NumButtons < numbuttons ) { numbuttons = _glfwJoy[ joy ].NumButtons; } // Copy button states from internal state for( i = 0; i < numbuttons; ++ i ) { buttons[ i ] = _glfwJoy[ joy ].Button[ i ]; } return numbuttons; } glfw-2.7.2/lib/x11/x11_init.c0000644000175000017500000001747311427547437016464 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Initialize GLFW thread package //======================================================================== static void initThreads( void ) { // Initialize critical section handle #ifdef _GLFW_HAS_PTHREAD (void) pthread_mutex_init( &_glfwThrd.CriticalSection, NULL ); #endif // The first thread (the main thread) has ID 0 _glfwThrd.NextID = 0; // Fill out information about the main thread (this thread) _glfwThrd.First.ID = _glfwThrd.NextID++; _glfwThrd.First.Function = NULL; _glfwThrd.First.Previous = NULL; _glfwThrd.First.Next = NULL; #ifdef _GLFW_HAS_PTHREAD _glfwThrd.First.PosixID = pthread_self(); #endif } //======================================================================== // Terminate GLFW thread package //======================================================================== static void terminateThreads( void ) { #ifdef _GLFW_HAS_PTHREAD _GLFWthread *t, *t_next; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Kill all threads (NOTE: THE USER SHOULD WAIT FOR ALL THREADS TO // DIE, _BEFORE_ CALLING glfwTerminate()!!!) t = _glfwThrd.First.Next; while( t != NULL ) { // Get pointer to next thread t_next = t->Next; // Simply murder the process, no mercy! pthread_kill( t->PosixID, SIGKILL ); // Free memory allocated for this thread free( (void *) t ); // Select next thread in list t = t_next; } // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Delete critical section handle pthread_mutex_destroy( &_glfwThrd.CriticalSection ); #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Dynamically load libraries //======================================================================== static void initLibraries( void ) { #ifdef _GLFW_DLOPEN_LIBGL int i; char *libGL_names[ ] = { "libGL.so", "libGL.so.1", "/usr/lib/libGL.so", "/usr/lib/libGL.so.1", NULL }; _glfwLibrary.Libs.libGL = NULL; for( i = 0; !libGL_names[ i ] != NULL; i ++ ) { _glfwLibrary.Libs.libGL = dlopen( libGL_names[ i ], RTLD_LAZY | RTLD_GLOBAL ); if( _glfwLibrary.Libs.libGL ) break; } #endif } //======================================================================== // Terminate GLFW when exiting application //======================================================================== static void glfw_atexit( void ) { glfwTerminate(); } //======================================================================== // Initialize X11 display //======================================================================== static int initDisplay( void ) { // Open display _glfwLibrary.display = XOpenDisplay( 0 ); if( !_glfwLibrary.display ) { fprintf(stderr, "Failed to open X display\n"); return GL_FALSE; } // Check for XF86VidMode extension #ifdef _GLFW_HAS_XF86VIDMODE _glfwLibrary.XF86VidMode.available = XF86VidModeQueryExtension( _glfwLibrary.display, &_glfwLibrary.XF86VidMode.eventBase, &_glfwLibrary.XF86VidMode.errorBase); #else _glfwLibrary.XF86VidMode.available = 0; #endif // Check for XRandR extension #ifdef _GLFW_HAS_XRANDR _glfwLibrary.XRandR.available = XRRQueryExtension( _glfwLibrary.display, &_glfwLibrary.XRandR.eventBase, &_glfwLibrary.XRandR.errorBase ); #else _glfwLibrary.XRandR.available = 0; #endif // Fullscreen & screen saver settings // Check if GLX is supported on this display if( !glXQueryExtension( _glfwLibrary.display, NULL, NULL ) ) { fprintf(stderr, "GLX not supported\n"); return GL_FALSE; } // Retrieve GLX version if( !glXQueryVersion( _glfwLibrary.display, &_glfwLibrary.glxMajor, &_glfwLibrary.glxMinor ) ) { fprintf(stderr, "Unable to query GLX version\n"); return GL_FALSE; } return GL_TRUE; } //======================================================================== // Terminate X11 display //======================================================================== static void terminateDisplay( void ) { // Open display if( _glfwLibrary.display ) { XCloseDisplay( _glfwLibrary.display ); _glfwLibrary.display = NULL; } } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Initialize various GLFW state //======================================================================== int _glfwPlatformInit( void ) { // Initialize display if( !initDisplay() ) { return GL_FALSE; } // Initialize thread package initThreads(); // Try to load libGL.so if necessary initLibraries(); // Install atexit() routine atexit( glfw_atexit ); // Initialize joysticks _glfwInitJoysticks(); // Start the timer _glfwInitTimer(); return GL_TRUE; } //======================================================================== // Close window and kill all threads //======================================================================== int _glfwPlatformTerminate( void ) { #ifdef _GLFW_HAS_PTHREAD // Only the main thread is allowed to do this... if( pthread_self() != _glfwThrd.First.PosixID ) { return GL_FALSE; } #endif // _GLFW_HAS_PTHREAD // Close OpenGL window glfwCloseWindow(); // Kill thread package terminateThreads(); // Terminate display terminateDisplay(); // Terminate joysticks _glfwTerminateJoysticks(); // Unload libGL.so if necessary #ifdef _GLFW_DLOPEN_LIBGL if( _glfwLibrary.Libs.libGL != NULL ) { dlclose( _glfwLibrary.Libs.libGL ); _glfwLibrary.Libs.libGL = NULL; } #endif return GL_TRUE; } glfw-2.7.2/lib/x11/x11_window.c0000644000175000017500000017313511561253716017017 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #include /* Define GLX 1.4 FSAA tokens if not already defined */ #ifndef GLX_VERSION_1_4 #define GLX_SAMPLE_BUFFERS 100000 #define GLX_SAMPLES 100001 #endif /*GLX_VERSION_1_4*/ // Action for EWMH client messages #define _NET_WM_STATE_REMOVE 0 #define _NET_WM_STATE_ADD 1 #define _NET_WM_STATE_TOGGLE 2 //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Error handler for BadMatch errors when requesting context with // unavailable OpenGL versions using the GLX_ARB_create_context extension //======================================================================== static int errorHandler( Display *display, XErrorEvent *event ) { return 0; } //======================================================================== // Checks whether the event is a MapNotify for the specified window //======================================================================== static Bool isMapNotify( Display *d, XEvent *e, char *arg ) { return (e->type == MapNotify) && (e->xmap.window == (Window)arg); } //======================================================================== // Retrieve a single window property of the specified type // Inspired by fghGetWindowProperty from freeglut //======================================================================== static unsigned long getWindowProperty( Window window, Atom property, Atom type, unsigned char** value ) { Atom actualType; int actualFormat; unsigned long itemCount, bytesAfter; XGetWindowProperty( _glfwLibrary.display, window, property, 0, LONG_MAX, False, type, &actualType, &actualFormat, &itemCount, &bytesAfter, value ); if( actualType != type ) { return 0; } return itemCount; } //======================================================================== // Check whether the specified atom is supported //======================================================================== static Atom getSupportedAtom( Atom* supportedAtoms, unsigned long atomCount, const char* atomName ) { Atom atom = XInternAtom( _glfwLibrary.display, atomName, True ); if( atom != None ) { unsigned long i; for( i = 0; i < atomCount; i++ ) { if( supportedAtoms[i] == atom ) { return atom; } } } return None; } //======================================================================== // Check whether the running window manager is EWMH-compliant //======================================================================== static GLboolean checkForEWMH( void ) { Window *windowFromRoot = NULL; Window *windowFromChild = NULL; // Hey kids; let's see if the window manager supports EWMH! // First we need a couple of atoms, which should already be there Atom supportingWmCheck = XInternAtom( _glfwLibrary.display, "_NET_SUPPORTING_WM_CHECK", True ); Atom wmSupported = XInternAtom( _glfwLibrary.display, "_NET_SUPPORTED", True ); if( supportingWmCheck == None || wmSupported == None ) { return GL_FALSE; } // Then we look for the _NET_SUPPORTING_WM_CHECK property of the root window if( getWindowProperty( _glfwWin.root, supportingWmCheck, XA_WINDOW, (unsigned char**) &windowFromRoot ) != 1 ) { XFree( windowFromRoot ); return GL_FALSE; } // It should be the ID of a child window (of the root) // Then we look for the same property on the child window if( getWindowProperty( *windowFromRoot, supportingWmCheck, XA_WINDOW, (unsigned char**) &windowFromChild ) != 1 ) { XFree( windowFromRoot ); XFree( windowFromChild ); return GL_FALSE; } // It should be the ID of that same child window if( *windowFromRoot != *windowFromChild ) { XFree( windowFromRoot ); XFree( windowFromChild ); return GL_FALSE; } XFree( windowFromRoot ); XFree( windowFromChild ); // We are now fairly sure that an EWMH-compliant window manager is running Atom *supportedAtoms; unsigned long atomCount; // Now we need to check the _NET_SUPPORTED property of the root window atomCount = getWindowProperty( _glfwWin.root, wmSupported, XA_ATOM, (unsigned char**) &supportedAtoms ); // See which of the atoms we support that are supported by the WM _glfwWin.wmState = getSupportedAtom( supportedAtoms, atomCount, "_NET_WM_STATE" ); _glfwWin.wmStateFullscreen = getSupportedAtom( supportedAtoms, atomCount, "_NET_WM_STATE_FULLSCREEN" ); _glfwWin.wmPing = getSupportedAtom( supportedAtoms, atomCount, "_NET_WM_PING" ); _glfwWin.wmActiveWindow = getSupportedAtom( supportedAtoms, atomCount, "_NET_ACTIVE_WINDOW" ); XFree( supportedAtoms ); return GL_TRUE; } //======================================================================== // Translates an X Window key to internal coding //======================================================================== static int translateKey( int keycode ) { KeySym key, key_lc, key_uc; // Try secondary keysym, for numeric keypad keys // Note: This way we always force "NumLock = ON", which at least // enables GLFW users to detect numeric keypad keys key = XKeycodeToKeysym( _glfwLibrary.display, keycode, 1 ); switch( key ) { // Numeric keypad case XK_KP_0: return GLFW_KEY_KP_0; case XK_KP_1: return GLFW_KEY_KP_1; case XK_KP_2: return GLFW_KEY_KP_2; case XK_KP_3: return GLFW_KEY_KP_3; case XK_KP_4: return GLFW_KEY_KP_4; case XK_KP_5: return GLFW_KEY_KP_5; case XK_KP_6: return GLFW_KEY_KP_6; case XK_KP_7: return GLFW_KEY_KP_7; case XK_KP_8: return GLFW_KEY_KP_8; case XK_KP_9: return GLFW_KEY_KP_9; case XK_KP_Separator: case XK_KP_Decimal: return GLFW_KEY_KP_DECIMAL; case XK_KP_Equal: return GLFW_KEY_KP_EQUAL; case XK_KP_Enter: return GLFW_KEY_KP_ENTER; default: break; } // Now try pimary keysym key = XKeycodeToKeysym( _glfwLibrary.display, keycode, 0 ); switch( key ) { // Special keys (non character keys) case XK_Escape: return GLFW_KEY_ESC; case XK_Tab: return GLFW_KEY_TAB; case XK_Shift_L: return GLFW_KEY_LSHIFT; case XK_Shift_R: return GLFW_KEY_RSHIFT; case XK_Control_L: return GLFW_KEY_LCTRL; case XK_Control_R: return GLFW_KEY_RCTRL; case XK_Meta_L: case XK_Alt_L: return GLFW_KEY_LALT; case XK_Mode_switch: // Mapped to Alt_R on many keyboards case XK_Meta_R: case XK_ISO_Level3_Shift: // AltGr on at least some machines case XK_Alt_R: return GLFW_KEY_RALT; case XK_Super_L: return GLFW_KEY_LSUPER; case XK_Super_R: return GLFW_KEY_RSUPER; case XK_Menu: return GLFW_KEY_MENU; case XK_Num_Lock: return GLFW_KEY_KP_NUM_LOCK; case XK_Caps_Lock: return GLFW_KEY_CAPS_LOCK; case XK_Scroll_Lock: return GLFW_KEY_SCROLL_LOCK; case XK_Pause: return GLFW_KEY_PAUSE; case XK_KP_Delete: case XK_Delete: return GLFW_KEY_DEL; case XK_BackSpace: return GLFW_KEY_BACKSPACE; case XK_Return: return GLFW_KEY_ENTER; case XK_KP_Home: case XK_Home: return GLFW_KEY_HOME; case XK_KP_End: case XK_End: return GLFW_KEY_END; case XK_KP_Page_Up: case XK_Page_Up: return GLFW_KEY_PAGEUP; case XK_KP_Page_Down: case XK_Page_Down: return GLFW_KEY_PAGEDOWN; case XK_KP_Insert: case XK_Insert: return GLFW_KEY_INSERT; case XK_KP_Left: case XK_Left: return GLFW_KEY_LEFT; case XK_KP_Right: case XK_Right: return GLFW_KEY_RIGHT; case XK_KP_Down: case XK_Down: return GLFW_KEY_DOWN; case XK_KP_Up: case XK_Up: return GLFW_KEY_UP; case XK_F1: return GLFW_KEY_F1; case XK_F2: return GLFW_KEY_F2; case XK_F3: return GLFW_KEY_F3; case XK_F4: return GLFW_KEY_F4; case XK_F5: return GLFW_KEY_F5; case XK_F6: return GLFW_KEY_F6; case XK_F7: return GLFW_KEY_F7; case XK_F8: return GLFW_KEY_F8; case XK_F9: return GLFW_KEY_F9; case XK_F10: return GLFW_KEY_F10; case XK_F11: return GLFW_KEY_F11; case XK_F12: return GLFW_KEY_F12; case XK_F13: return GLFW_KEY_F13; case XK_F14: return GLFW_KEY_F14; case XK_F15: return GLFW_KEY_F15; case XK_F16: return GLFW_KEY_F16; case XK_F17: return GLFW_KEY_F17; case XK_F18: return GLFW_KEY_F18; case XK_F19: return GLFW_KEY_F19; case XK_F20: return GLFW_KEY_F20; case XK_F21: return GLFW_KEY_F21; case XK_F22: return GLFW_KEY_F22; case XK_F23: return GLFW_KEY_F23; case XK_F24: return GLFW_KEY_F24; case XK_F25: return GLFW_KEY_F25; // Numeric keypad (should have been detected in secondary keysym!) case XK_KP_Divide: return GLFW_KEY_KP_DIVIDE; case XK_KP_Multiply: return GLFW_KEY_KP_MULTIPLY; case XK_KP_Subtract: return GLFW_KEY_KP_SUBTRACT; case XK_KP_Add: return GLFW_KEY_KP_ADD; case XK_KP_Equal: return GLFW_KEY_KP_EQUAL; case XK_KP_Enter: return GLFW_KEY_KP_ENTER; // The rest (should be printable keys) default: // Make uppercase XConvertCase( key, &key_lc, &key_uc ); key = key_uc; // Valid ISO 8859-1 character? if( (key >= 32 && key <= 126) || (key >= 160 && key <= 255) ) { return (int) key; } return GLFW_KEY_UNKNOWN; } } //======================================================================== // Translates an X Window event to Unicode //======================================================================== static int translateChar( XKeyEvent *event ) { KeySym keysym; // Get X11 keysym XLookupString( event, NULL, 0, &keysym, NULL ); // Convert to Unicode (see x11_keysym2unicode.c) return (int) _glfwKeySym2Unicode( keysym ); } //======================================================================== // Create a blank cursor (for locked mouse mode) //======================================================================== static Cursor createNULLCursor( Display *display, Window root ) { Pixmap cursormask; XGCValues xgc; GC gc; XColor col; Cursor cursor; cursormask = XCreatePixmap( display, root, 1, 1, 1 ); xgc.function = GXclear; gc = XCreateGC( display, cursormask, GCFunction, &xgc ); XFillRectangle( display, cursormask, gc, 0, 0, 1, 1 ); col.pixel = 0; col.red = 0; col.flags = 4; cursor = XCreatePixmapCursor( display, cursormask, cursormask, &col,&col, 0,0 ); XFreePixmap( display, cursormask ); XFreeGC( display, gc ); return cursor; } //======================================================================== // Returns the specified attribute of the specified GLXFBConfig // NOTE: Do not call this unless we have found GLX 1.3+ or GLX_SGIX_fbconfig //======================================================================== static int getFBConfigAttrib( GLXFBConfig fbconfig, int attrib ) { int value; if( _glfwWin.has_GLX_SGIX_fbconfig ) { _glfwWin.GetFBConfigAttribSGIX( _glfwLibrary.display, fbconfig, attrib, &value ); } else { glXGetFBConfigAttrib( _glfwLibrary.display, fbconfig, attrib, &value ); } return value; } //======================================================================== // Return a list of available and usable framebuffer configs //======================================================================== static _GLFWfbconfig *getFBConfigs( unsigned int *found ) { GLXFBConfig *fbconfigs; _GLFWfbconfig *result; int i, count = 0; *found = 0; if( _glfwLibrary.glxMajor == 1 && _glfwLibrary.glxMinor < 3 ) { if( !_glfwWin.has_GLX_SGIX_fbconfig ) { fprintf( stderr, "GLXFBConfigs are not supported by the X server\n" ); return NULL; } } if( _glfwWin.has_GLX_SGIX_fbconfig ) { fbconfigs = _glfwWin.ChooseFBConfigSGIX( _glfwLibrary.display, _glfwWin.screen, NULL, &count ); if( !count ) { fprintf( stderr, "No GLXFBConfigs returned\n" ); return NULL; } } else { fbconfigs = glXGetFBConfigs( _glfwLibrary.display, _glfwWin.screen, &count ); if( !count ) { fprintf( stderr, "No GLXFBConfigs returned\n" ); return NULL; } } result = (_GLFWfbconfig*) malloc( sizeof(_GLFWfbconfig) * count ); if( !result ) { fprintf( stderr, "Out of memory\n" ); return NULL; } for( i = 0; i < count; i++ ) { if( !getFBConfigAttrib( fbconfigs[i], GLX_DOUBLEBUFFER ) || !getFBConfigAttrib( fbconfigs[i], GLX_VISUAL_ID ) ) { // Only consider double-buffered GLXFBConfigs with associated visuals continue; } if( !( getFBConfigAttrib( fbconfigs[i], GLX_RENDER_TYPE ) & GLX_RGBA_BIT ) ) { // Only consider RGBA GLXFBConfigs continue; } if( !( getFBConfigAttrib( fbconfigs[i], GLX_DRAWABLE_TYPE ) & GLX_WINDOW_BIT ) ) { // Only consider window GLXFBConfigs continue; } result[*found].redBits = getFBConfigAttrib( fbconfigs[i], GLX_RED_SIZE ); result[*found].greenBits = getFBConfigAttrib( fbconfigs[i], GLX_GREEN_SIZE ); result[*found].blueBits = getFBConfigAttrib( fbconfigs[i], GLX_BLUE_SIZE ); result[*found].alphaBits = getFBConfigAttrib( fbconfigs[i], GLX_ALPHA_SIZE ); result[*found].depthBits = getFBConfigAttrib( fbconfigs[i], GLX_DEPTH_SIZE ); result[*found].stencilBits = getFBConfigAttrib( fbconfigs[i], GLX_STENCIL_SIZE ); result[*found].accumRedBits = getFBConfigAttrib( fbconfigs[i], GLX_ACCUM_RED_SIZE ); result[*found].accumGreenBits = getFBConfigAttrib( fbconfigs[i], GLX_ACCUM_GREEN_SIZE ); result[*found].accumBlueBits = getFBConfigAttrib( fbconfigs[i], GLX_ACCUM_BLUE_SIZE ); result[*found].accumAlphaBits = getFBConfigAttrib( fbconfigs[i], GLX_ACCUM_ALPHA_SIZE ); result[*found].auxBuffers = getFBConfigAttrib( fbconfigs[i], GLX_AUX_BUFFERS ); result[*found].stereo = getFBConfigAttrib( fbconfigs[i], GLX_STEREO ); if( _glfwWin.has_GLX_ARB_multisample ) { result[*found].samples = getFBConfigAttrib( fbconfigs[i], GLX_SAMPLES ); } else { result[*found].samples = 0; } result[*found].platformID = (GLFWintptr) getFBConfigAttrib( fbconfigs[i], GLX_FBCONFIG_ID ); (*found)++; } XFree( fbconfigs ); return result; } //======================================================================== // Create the OpenGL context //======================================================================== #define setGLXattrib( attribs, index, attribName, attribValue ) \ attribs[index++] = attribName; \ attribs[index++] = attribValue; static int createContext( const _GLFWwndconfig *wndconfig, GLXFBConfigID fbconfigID ) { int attribs[40]; int flags, dummy, index; GLXFBConfig *fbconfig; // Retrieve the previously selected GLXFBConfig { index = 0; setGLXattrib( attribs, index, GLX_FBCONFIG_ID, (int) fbconfigID ); setGLXattrib( attribs, index, None, None ); if( _glfwWin.has_GLX_SGIX_fbconfig ) { fbconfig = _glfwWin.ChooseFBConfigSGIX( _glfwLibrary.display, _glfwWin.screen, attribs, &dummy ); } else { fbconfig = glXChooseFBConfig( _glfwLibrary.display, _glfwWin.screen, attribs, &dummy ); } if( fbconfig == NULL ) { fprintf(stderr, "Unable to retrieve the selected GLXFBConfig\n"); return GL_FALSE; } } // Retrieve the corresponding visual if( _glfwWin.has_GLX_SGIX_fbconfig ) { _glfwWin.visual = _glfwWin.GetVisualFromFBConfigSGIX( _glfwLibrary.display, *fbconfig ); } else { _glfwWin.visual = glXGetVisualFromFBConfig( _glfwLibrary.display, *fbconfig ); } if( _glfwWin.visual == NULL ) { XFree( fbconfig ); fprintf(stderr, "Unable to retrieve visual for GLXFBconfig\n"); return GL_FALSE; } if( _glfwWin.has_GLX_ARB_create_context ) { index = 0; if( wndconfig->glMajor != 1 || wndconfig->glMinor != 0 ) { // Request an explicitly versioned context setGLXattrib( attribs, index, GLX_CONTEXT_MAJOR_VERSION_ARB, wndconfig->glMajor ); setGLXattrib( attribs, index, GLX_CONTEXT_MINOR_VERSION_ARB, wndconfig->glMinor ); } if( wndconfig->glForward || wndconfig->glDebug ) { flags = 0; if( wndconfig->glForward ) { flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } if( wndconfig->glDebug ) { flags |= GLX_CONTEXT_DEBUG_BIT_ARB; } setGLXattrib( attribs, index, GLX_CONTEXT_FLAGS_ARB, flags ); } if( wndconfig->glProfile ) { if( !_glfwWin.has_GLX_ARB_create_context_profile ) { fprintf( stderr, "OpenGL profile requested but GLX_ARB_create_context_profile " "is unavailable\n" ); return GL_FALSE; } if( wndconfig->glProfile == GLFW_OPENGL_CORE_PROFILE ) { flags = GLX_CONTEXT_CORE_PROFILE_BIT_ARB; } else { flags = GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; } setGLXattrib( attribs, index, GLX_CONTEXT_PROFILE_MASK_ARB, flags ); } setGLXattrib( attribs, index, None, None ); // This is the only place we set an Xlib error handler, and we only do // it because glXCreateContextAttribsARB generates a BadMatch error if // the requested OpenGL version is unavailable (instead of a civilized // response like returning NULL) XSetErrorHandler( errorHandler ); _glfwWin.context = _glfwWin.CreateContextAttribsARB( _glfwLibrary.display, *fbconfig, NULL, True, attribs ); // We are done, so unset the error handler again (see above) XSetErrorHandler( NULL ); } else { if( _glfwWin.has_GLX_SGIX_fbconfig ) { _glfwWin.context = _glfwWin.CreateContextWithConfigSGIX( _glfwLibrary.display, *fbconfig, GLX_RGBA_TYPE, NULL, True ); } else { _glfwWin.context = glXCreateNewContext( _glfwLibrary.display, *fbconfig, GLX_RGBA_TYPE, NULL, True ); } } XFree( fbconfig ); if( _glfwWin.context == NULL ) { fprintf(stderr, "Unable to create OpenGL context\n"); return GL_FALSE; } _glfwWin.fbconfigID = fbconfigID; return GL_TRUE; } #undef setGLXattrib //======================================================================== // Initialize GLX-specific extensions //======================================================================== static void initGLXExtensions( void ) { // This needs to include every function pointer loaded below _glfwWin.SwapIntervalSGI = NULL; _glfwWin.GetFBConfigAttribSGIX = NULL; _glfwWin.ChooseFBConfigSGIX = NULL; _glfwWin.CreateContextWithConfigSGIX = NULL; _glfwWin.GetVisualFromFBConfigSGIX = NULL; _glfwWin.CreateContextAttribsARB = NULL; // This needs to include every extension used below _glfwWin.has_GLX_SGIX_fbconfig = GL_FALSE; _glfwWin.has_GLX_SGI_swap_control = GL_FALSE; _glfwWin.has_GLX_ARB_multisample = GL_FALSE; _glfwWin.has_GLX_ARB_create_context = GL_FALSE; _glfwWin.has_GLX_ARB_create_context_profile = GL_FALSE; if( _glfwPlatformExtensionSupported( "GLX_SGI_swap_control" ) ) { _glfwWin.SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC) _glfwPlatformGetProcAddress( "glXSwapIntervalSGI" ); if( _glfwWin.SwapIntervalSGI ) { _glfwWin.has_GLX_SGI_swap_control = GL_TRUE; } } if( _glfwPlatformExtensionSupported( "GLX_SGIX_fbconfig" ) ) { _glfwWin.GetFBConfigAttribSGIX = (PFNGLXGETFBCONFIGATTRIBSGIXPROC) _glfwPlatformGetProcAddress( "glXGetFBConfigAttribSGIX" ); _glfwWin.ChooseFBConfigSGIX = (PFNGLXCHOOSEFBCONFIGSGIXPROC) _glfwPlatformGetProcAddress( "glXChooseFBConfigSGIX" ); _glfwWin.CreateContextWithConfigSGIX = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) _glfwPlatformGetProcAddress( "glXCreateContextWithConfigSGIX" ); _glfwWin.GetVisualFromFBConfigSGIX = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) _glfwPlatformGetProcAddress( "glXGetVisualFromFBConfigSGIX" ); if( _glfwWin.GetFBConfigAttribSGIX && _glfwWin.ChooseFBConfigSGIX && _glfwWin.CreateContextWithConfigSGIX && _glfwWin.GetVisualFromFBConfigSGIX ) { _glfwWin.has_GLX_SGIX_fbconfig = GL_TRUE; } } if( _glfwPlatformExtensionSupported( "GLX_ARB_multisample" ) ) { _glfwWin.has_GLX_ARB_multisample = GL_TRUE; } if( _glfwPlatformExtensionSupported( "GLX_ARB_create_context" ) ) { _glfwWin.CreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC) _glfwPlatformGetProcAddress( "glXCreateContextAttribsARB" ); if( _glfwWin.CreateContextAttribsARB ) { _glfwWin.has_GLX_ARB_create_context = GL_TRUE; } } if( _glfwPlatformExtensionSupported( "GLX_ARB_create_context_profile" ) ) { _glfwWin.has_GLX_ARB_create_context_profile = GL_TRUE; } } //======================================================================== // Create the X11 window (and its colormap) //======================================================================== static GLboolean createWindow( int width, int height, const _GLFWwndconfig *wndconfig ) { XEvent event; unsigned long wamask; XSetWindowAttributes wa; // Every window needs a colormap // Create one based on the visual used by the current context _glfwWin.colormap = XCreateColormap( _glfwLibrary.display, _glfwWin.root, _glfwWin.visual->visual, AllocNone ); // Create the actual window { wamask = CWBorderPixel | CWColormap | CWEventMask; wa.colormap = _glfwWin.colormap; wa.border_pixel = 0; wa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask | FocusChangeMask | VisibilityChangeMask; if( wndconfig->mode == GLFW_WINDOW ) { // The /only/ reason we are setting the background pixel here is // that otherwise our window wont get any decorations on systems // using Compiz on Intel hardware wa.background_pixel = BlackPixel( _glfwLibrary.display, _glfwWin.screen ); wamask |= CWBackPixel; } _glfwWin.window = XCreateWindow( _glfwLibrary.display, _glfwWin.root, 0, 0, // Upper left corner of this window on root _glfwWin.width, _glfwWin.height, 0, // Border width _glfwWin.visual->depth, // Color depth InputOutput, _glfwWin.visual->visual, wamask, &wa ); if( !_glfwWin.window ) { _glfwPlatformCloseWindow(); return GL_FALSE; } } // Check whether an EWMH-compliant window manager is running _glfwWin.hasEWMH = checkForEWMH(); if( _glfwWin.fullscreen && !_glfwWin.hasEWMH ) { // This is the butcher's way of removing window decorations // Setting the override-redirect attribute on a window makes the window // manager ignore the window completely (ICCCM, section 4) // The good thing is that this makes undecorated fullscreen windows // easy to do; the bad thing is that we have to do everything manually // and some things (like iconify/restore) won't work at all, as they're // usually performed by the window manager XSetWindowAttributes attributes; attributes.override_redirect = True; XChangeWindowAttributes( _glfwLibrary.display, _glfwWin.window, CWOverrideRedirect, &attributes ); _glfwWin.overrideRedirect = GL_TRUE; } // Find or create the protocol atom for window close notifications _glfwWin.wmDeleteWindow = XInternAtom( _glfwLibrary.display, "WM_DELETE_WINDOW", False ); // Declare the WM protocols we support { int count = 0; Atom protocols[2]; // The WM_DELETE_WINDOW ICCCM protocol // Basic window close notification protocol if( _glfwWin.wmDeleteWindow != None ) { protocols[count++] = _glfwWin.wmDeleteWindow; } // The _NET_WM_PING EWMH protocol // Tells the WM to ping our window and flag us as unresponsive if we // don't reply within a few seconds if( _glfwWin.wmPing != None ) { protocols[count++] = _glfwWin.wmPing; } if( count > 0 ) { XSetWMProtocols( _glfwLibrary.display, _glfwWin.window, protocols, count ); } } // Set ICCCM WM_HINTS property { XWMHints *hints = XAllocWMHints(); if( !hints ) { _glfwPlatformCloseWindow(); return GL_FALSE; } hints->flags = StateHint; hints->initial_state = NormalState; XSetWMHints( _glfwLibrary.display, _glfwWin.window, hints ); XFree( hints ); } // Set ICCCM WM_NORMAL_HINTS property (even if no parts are set) { XSizeHints *hints = XAllocSizeHints(); if( !hints ) { _glfwPlatformCloseWindow(); return GL_FALSE; } hints->flags = 0; if( wndconfig->windowNoResize && !_glfwWin.fullscreen ) { hints->flags |= (PMinSize | PMaxSize); hints->min_width = hints->max_width = _glfwWin.width; hints->min_height = hints->max_height = _glfwWin.height; } XSetWMNormalHints( _glfwLibrary.display, _glfwWin.window, hints ); XFree( hints ); } _glfwPlatformSetWindowTitle( "GLFW Window" ); // Make sure the window is mapped before proceeding XMapWindow( _glfwLibrary.display, _glfwWin.window ); XPeekIfEvent( _glfwLibrary.display, &event, isMapNotify, (char*)_glfwWin.window ); return GL_TRUE; } //======================================================================== // Enter fullscreen mode //======================================================================== static void enterFullscreenMode( void ) { if( !_glfwWin.Saver.changed ) { // Remember old screen saver settings XGetScreenSaver( _glfwLibrary.display, &_glfwWin.Saver.timeout, &_glfwWin.Saver.interval, &_glfwWin.Saver.blanking, &_glfwWin.Saver.exposure ); // Disable screen saver XSetScreenSaver( _glfwLibrary.display, 0, 0, DontPreferBlanking, DefaultExposures ); _glfwWin.Saver.changed = GL_TRUE; } _glfwSetVideoMode( _glfwWin.screen, &_glfwWin.width, &_glfwWin.height, &_glfwWin.refreshRate ); if( _glfwWin.hasEWMH && _glfwWin.wmState != None && _glfwWin.wmStateFullscreen != None ) { if( _glfwWin.wmActiveWindow != None ) { // Ask the window manager to raise and focus the GLFW window // Only focused windows with the _NET_WM_STATE_FULLSCREEN state end // up on top of all other windows ("Stacking order" in EWMH spec) XEvent event; memset( &event, 0, sizeof(event) ); event.type = ClientMessage; event.xclient.window = _glfwWin.window; event.xclient.format = 32; // Data is 32-bit longs event.xclient.message_type = _glfwWin.wmActiveWindow; event.xclient.data.l[0] = 1; // Sender is a normal application event.xclient.data.l[1] = 0; // We don't really know the timestamp XSendEvent( _glfwLibrary.display, _glfwWin.root, False, SubstructureNotifyMask | SubstructureRedirectMask, &event ); } // Ask the window manager to make the GLFW window a fullscreen window // Fullscreen windows are undecorated and, when focused, are kept // on top of all other windows XEvent event; memset( &event, 0, sizeof(event) ); event.type = ClientMessage; event.xclient.window = _glfwWin.window; event.xclient.format = 32; // Data is 32-bit longs event.xclient.message_type = _glfwWin.wmState; event.xclient.data.l[0] = _NET_WM_STATE_ADD; event.xclient.data.l[1] = _glfwWin.wmStateFullscreen; event.xclient.data.l[2] = 0; // No secondary property event.xclient.data.l[3] = 1; // Sender is a normal application XSendEvent( _glfwLibrary.display, _glfwWin.root, False, SubstructureNotifyMask | SubstructureRedirectMask, &event ); } else if( _glfwWin.overrideRedirect ) { // In override-redirect mode, we have divorced ourselves from the // window manager, so we need to do everything manually XRaiseWindow( _glfwLibrary.display, _glfwWin.window ); XSetInputFocus( _glfwLibrary.display, _glfwWin.window, RevertToParent, CurrentTime ); XMoveWindow( _glfwLibrary.display, _glfwWin.window, 0, 0 ); XResizeWindow( _glfwLibrary.display, _glfwWin.window, _glfwWin.width, _glfwWin.height ); } if( _glfwWin.mouseLock ) { _glfwPlatformHideMouseCursor(); } // HACK: Try to get window inside viewport (for virtual displays) by moving // the mouse cursor to the upper left corner (and then to the center) // This hack should be harmless on saner systems as well XWarpPointer( _glfwLibrary.display, None, _glfwWin.window, 0,0,0,0, 0,0 ); XWarpPointer( _glfwLibrary.display, None, _glfwWin.window, 0,0,0,0, _glfwWin.width / 2, _glfwWin.height / 2 ); } //======================================================================== // Leave fullscreen mode //======================================================================== static void leaveFullscreenMode( void ) { _glfwRestoreVideoMode(); // Did we change the screen saver setting? if( _glfwWin.Saver.changed ) { // Restore old screen saver settings XSetScreenSaver( _glfwLibrary.display, _glfwWin.Saver.timeout, _glfwWin.Saver.interval, _glfwWin.Saver.blanking, _glfwWin.Saver.exposure ); _glfwWin.Saver.changed = GL_FALSE; } if( _glfwWin.hasEWMH && _glfwWin.wmState != None && _glfwWin.wmStateFullscreen != None ) { // Ask the window manager to make the GLFW window a normal window // Normal windows usually have frames and other decorations XEvent event; memset( &event, 0, sizeof(event) ); event.type = ClientMessage; event.xclient.window = _glfwWin.window; event.xclient.format = 32; // Data is 32-bit longs event.xclient.message_type = _glfwWin.wmState; event.xclient.data.l[0] = _NET_WM_STATE_REMOVE; event.xclient.data.l[1] = _glfwWin.wmStateFullscreen; event.xclient.data.l[2] = 0; // No secondary property event.xclient.data.l[3] = 1; // Sender is a normal application XSendEvent( _glfwLibrary.display, _glfwWin.root, False, SubstructureNotifyMask | SubstructureRedirectMask, &event ); } if( _glfwWin.mouseLock ) { _glfwPlatformShowMouseCursor(); } } //======================================================================== // Get and process next X event (called by _glfwPlatformPollEvents) // Returns GL_TRUE if a window close request was received //======================================================================== static GLboolean processSingleEvent( void ) { XEvent event; XNextEvent( _glfwLibrary.display, &event ); switch( event.type ) { case KeyPress: { // A keyboard key was pressed // Translate and report key press _glfwInputKey( translateKey( event.xkey.keycode ), GLFW_PRESS ); // Translate and report character input if( _glfwWin.charCallback ) { _glfwInputChar( translateChar( &event.xkey ), GLFW_PRESS ); } break; } case KeyRelease: { // A keyboard key was released // Do not report key releases for key repeats. For key repeats we // will get KeyRelease/KeyPress pairs with similar or identical // time stamps. User selected key repeat filtering is handled in // _glfwInputKey()/_glfwInputChar(). if( XEventsQueued( _glfwLibrary.display, QueuedAfterReading ) ) { XEvent nextEvent; XPeekEvent( _glfwLibrary.display, &nextEvent ); if( nextEvent.type == KeyPress && nextEvent.xkey.window == event.xkey.window && nextEvent.xkey.keycode == event.xkey.keycode ) { // This last check is a hack to work around key repeats // leaking through due to some sort of time drift // Toshiyuki Takahashi can press a button 16 times per // second so it's fairly safe to assume that no human is // pressing the key 50 times per second (value is ms) if( ( nextEvent.xkey.time - event.xkey.time ) < 20 ) { // Do not report anything for this event break; } } } // Translate and report key release _glfwInputKey( translateKey( event.xkey.keycode ), GLFW_RELEASE ); // Translate and report character input if( _glfwWin.charCallback ) { _glfwInputChar( translateChar( &event.xkey ), GLFW_RELEASE ); } break; } case ButtonPress: { // A mouse button was pressed or a scrolling event occurred if( event.xbutton.button == Button1 ) { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS ); } else if( event.xbutton.button == Button2 ) { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_MIDDLE, GLFW_PRESS ); } else if( event.xbutton.button == Button3 ) { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS ); } // XFree86 3.3.2 and later translates mouse wheel up/down into // mouse button 4 & 5 presses else if( event.xbutton.button == Button4 ) { _glfwInput.WheelPos++; // To verify: is this up or down? if( _glfwWin.mouseWheelCallback ) { _glfwWin.mouseWheelCallback( _glfwInput.WheelPos ); } } else if( event.xbutton.button == Button5 ) { _glfwInput.WheelPos--; if( _glfwWin.mouseWheelCallback ) { _glfwWin.mouseWheelCallback( _glfwInput.WheelPos ); } } break; } case ButtonRelease: { // A mouse button was released if( event.xbutton.button == Button1 ) { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_LEFT, GLFW_RELEASE ); } else if( event.xbutton.button == Button2 ) { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_MIDDLE, GLFW_RELEASE ); } else if( event.xbutton.button == Button3 ) { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_RIGHT, GLFW_RELEASE ); } break; } case MotionNotify: { // The mouse cursor was moved if( event.xmotion.x != _glfwInput.CursorPosX || event.xmotion.y != _glfwInput.CursorPosY ) { // The mouse cursor was moved and we didn't do it if( _glfwWin.mouseLock ) { if( _glfwWin.pointerHidden ) { _glfwInput.MousePosX += event.xmotion.x - _glfwInput.CursorPosX; _glfwInput.MousePosY += event.xmotion.y - _glfwInput.CursorPosY; } } else { _glfwInput.MousePosX = event.xmotion.x; _glfwInput.MousePosY = event.xmotion.y; } _glfwInput.CursorPosX = event.xmotion.x; _glfwInput.CursorPosY = event.xmotion.y; _glfwInput.MouseMoved = GL_TRUE; if( _glfwWin.mousePosCallback ) { _glfwWin.mousePosCallback( _glfwInput.MousePosX, _glfwInput.MousePosY ); } } break; } case ConfigureNotify: { if( event.xconfigure.width != _glfwWin.width || event.xconfigure.height != _glfwWin.height ) { // The window was resized _glfwWin.width = event.xconfigure.width; _glfwWin.height = event.xconfigure.height; if( _glfwWin.windowSizeCallback ) { _glfwWin.windowSizeCallback( _glfwWin.width, _glfwWin.height ); } } break; } case ClientMessage: { if( (Atom) event.xclient.data.l[ 0 ] == _glfwWin.wmDeleteWindow ) { // The window manager was asked to close the window, for example by // the user pressing a 'close' window decoration button return GL_TRUE; } else if( _glfwWin.wmPing != None && (Atom) event.xclient.data.l[ 0 ] == _glfwWin.wmPing ) { // The window manager is pinging us to make sure we are still // responding to events event.xclient.window = _glfwWin.root; XSendEvent( _glfwLibrary.display, event.xclient.window, False, SubstructureNotifyMask | SubstructureRedirectMask, &event ); } break; } case MapNotify: { // The window was mapped _glfwWin.iconified = GL_FALSE; break; } case UnmapNotify: { // The window was unmapped _glfwWin.iconified = GL_TRUE; break; } case FocusIn: { // The window gained focus _glfwWin.active = GL_TRUE; if( _glfwWin.mouseLock ) { _glfwPlatformHideMouseCursor(); } break; } case FocusOut: { // The window lost focus _glfwWin.active = GL_FALSE; _glfwInputDeactivation(); if( _glfwWin.mouseLock ) { _glfwPlatformShowMouseCursor(); } break; } case Expose: { // The window's contents was damaged if( _glfwWin.windowRefreshCallback ) { _glfwWin.windowRefreshCallback(); } break; } // Was the window destroyed? case DestroyNotify: return GL_FALSE; default: { #if defined( _GLFW_HAS_XRANDR ) switch( event.type - _glfwLibrary.XRandR.eventBase ) { case RRScreenChangeNotify: { // Show XRandR that we really care XRRUpdateConfiguration( &event ); break; } } #endif break; } } // The window was not destroyed return GL_FALSE; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Here is where the window is created, and // the OpenGL rendering context is created //======================================================================== int _glfwPlatformOpenWindow( int width, int height, const _GLFWwndconfig* wndconfig, const _GLFWfbconfig* fbconfig ) { _GLFWfbconfig closest; // Clear platform specific GLFW window state _glfwWin.visual = (XVisualInfo*)NULL; _glfwWin.colormap = (Colormap)0; _glfwWin.context = (GLXContext)NULL; _glfwWin.window = (Window)0; _glfwWin.pointerGrabbed = GL_FALSE; _glfwWin.pointerHidden = GL_FALSE; _glfwWin.keyboardGrabbed = GL_FALSE; _glfwWin.overrideRedirect = GL_FALSE; _glfwWin.FS.modeChanged = GL_FALSE; _glfwWin.Saver.changed = GL_FALSE; _glfwWin.refreshRate = wndconfig->refreshRate; _glfwWin.windowNoResize = wndconfig->windowNoResize; _glfwWin.wmDeleteWindow = None; _glfwWin.wmPing = None; _glfwWin.wmState = None; _glfwWin.wmStateFullscreen = None; _glfwWin.wmActiveWindow = None; // As the 2.x API doesn't understand multiple display devices, we hardcode // this choice and hope for the best _glfwWin.screen = DefaultScreen( _glfwLibrary.display ); _glfwWin.root = RootWindow( _glfwLibrary.display, _glfwWin.screen ); // Create the invisible cursor for hidden cursor mode _glfwWin.cursor = createNULLCursor( _glfwLibrary.display, _glfwWin.root ); initGLXExtensions(); // Choose the best available fbconfig { unsigned int fbcount; _GLFWfbconfig *fbconfigs; const _GLFWfbconfig *result; fbconfigs = getFBConfigs( &fbcount ); if( !fbconfigs ) { return GL_FALSE; } result = _glfwChooseFBConfig( fbconfig, fbconfigs, fbcount ); if( !result ) { free( fbconfigs ); return GL_FALSE; } closest = *result; free( fbconfigs ); } if( !createContext( wndconfig, (GLXFBConfigID) closest.platformID ) ) { return GL_FALSE; } if( !createWindow( width, height, wndconfig ) ) { return GL_FALSE; } if( wndconfig->mode == GLFW_FULLSCREEN ) { #if defined( _GLFW_HAS_XRANDR ) // Request screen change notifications if( _glfwLibrary.XRandR.available ) { XRRSelectInput( _glfwLibrary.display, _glfwWin.window, RRScreenChangeNotifyMask ); } #endif enterFullscreenMode(); } // Process the window map event and any other that may have arrived _glfwPlatformPollEvents(); // Retrieve and set initial cursor position { Window window, root; int windowX, windowY, rootX, rootY; unsigned int mask; XQueryPointer( _glfwLibrary.display, _glfwWin.window, &root, &window, &rootX, &rootY, &windowX, &windowY, &mask ); // TODO: Probably check for some corner cases here. _glfwInput.MousePosX = windowX; _glfwInput.MousePosY = windowY; } // Connect the context to the window glXMakeCurrent( _glfwLibrary.display, _glfwWin.window, _glfwWin.context ); return GL_TRUE; } //======================================================================== // Properly kill the window/video display //======================================================================== void _glfwPlatformCloseWindow( void ) { if( _glfwWin.fullscreen ) { leaveFullscreenMode(); } if( _glfwWin.context ) { // Release and destroy the context glXMakeCurrent( _glfwLibrary.display, None, NULL ); glXDestroyContext( _glfwLibrary.display, _glfwWin.context ); _glfwWin.context = NULL; } if( _glfwWin.visual ) { XFree( _glfwWin.visual ); _glfwWin.visual = NULL; } if( _glfwWin.window ) { XUnmapWindow( _glfwLibrary.display, _glfwWin.window ); XDestroyWindow( _glfwLibrary.display, _glfwWin.window ); _glfwWin.window = (Window) 0; } if( _glfwWin.colormap ) { XFreeColormap( _glfwLibrary.display, _glfwWin.colormap ); _glfwWin.colormap = (Colormap) 0; } if( _glfwWin.cursor ) { XFreeCursor( _glfwLibrary.display, _glfwWin.cursor ); _glfwWin.cursor = (Cursor) 0; } } //======================================================================== // Set the window title //======================================================================== void _glfwPlatformSetWindowTitle( const char *title ) { // Set window & icon title XStoreName( _glfwLibrary.display, _glfwWin.window, title ); XSetIconName( _glfwLibrary.display, _glfwWin.window, title ); } //======================================================================== // Set the window size //======================================================================== void _glfwPlatformSetWindowSize( int width, int height ) { int mode = 0, rate, sizeChanged = GL_FALSE; XSizeHints *sizehints; rate = _glfwWin.refreshRate; if( _glfwWin.fullscreen ) { // Get the closest matching video mode for the specified window size mode = _glfwGetClosestVideoMode( _glfwWin.screen, &width, &height, &rate ); } if( _glfwWin.windowNoResize ) { // Update window size restrictions to match new window size sizehints = XAllocSizeHints(); sizehints->flags = 0; sizehints->min_width = sizehints->max_width = width; sizehints->min_height = sizehints->max_height = height; XSetWMNormalHints( _glfwLibrary.display, _glfwWin.window, sizehints ); XFree( sizehints ); } // Change window size before changing fullscreen mode? if( _glfwWin.fullscreen && (width > _glfwWin.width) ) { XResizeWindow( _glfwLibrary.display, _glfwWin.window, width, height ); sizeChanged = GL_TRUE; } if( _glfwWin.fullscreen ) { // Change video mode, keeping current refresh rate _glfwSetVideoModeMODE( _glfwWin.screen, mode, _glfwWin.refreshRate ); } // Set window size (if not already changed) if( !sizeChanged ) { XResizeWindow( _glfwLibrary.display, _glfwWin.window, width, height ); } } //======================================================================== // Set the window position. //======================================================================== void _glfwPlatformSetWindowPos( int x, int y ) { XMoveWindow( _glfwLibrary.display, _glfwWin.window, x, y ); } //======================================================================== // Window iconification //======================================================================== void _glfwPlatformIconifyWindow( void ) { if( _glfwWin.overrideRedirect ) { // We can't iconify/restore override-redirect windows, as that's // performed by the window manager return; } XIconifyWindow( _glfwLibrary.display, _glfwWin.window, _glfwWin.screen ); } //======================================================================== // Window un-iconification //======================================================================== void _glfwPlatformRestoreWindow( void ) { if( _glfwWin.overrideRedirect ) { // We can't iconify/restore override-redirect windows, as that's // performed by the window manager return; } XMapWindow( _glfwLibrary.display, _glfwWin.window ); } //======================================================================== // Swap OpenGL buffers and poll any new events //======================================================================== void _glfwPlatformSwapBuffers( void ) { // Update display-buffer glXSwapBuffers( _glfwLibrary.display, _glfwWin.window ); } //======================================================================== // Set double buffering swap interval //======================================================================== void _glfwPlatformSwapInterval( int interval ) { if( _glfwWin.has_GLX_SGI_swap_control ) { _glfwWin.SwapIntervalSGI( interval ); } } //======================================================================== // Read back framebuffer parameters from the context //======================================================================== void _glfwPlatformRefreshWindowParams( void ) { int dummy; GLXFBConfig *fbconfig; #if defined( _GLFW_HAS_XRANDR ) XRRScreenConfiguration *sc; #elif defined( _GLFW_HAS_XF86VIDMODE ) XF86VidModeModeLine modeline; int dotclock; float pixels_per_second, pixels_per_frame; #endif int attribs[] = { GLX_FBCONFIG_ID, _glfwWin.fbconfigID, None }; if( _glfwWin.has_GLX_SGIX_fbconfig ) { fbconfig = _glfwWin.ChooseFBConfigSGIX( _glfwLibrary.display, _glfwWin.screen, attribs, &dummy ); } else { fbconfig = glXChooseFBConfig( _glfwLibrary.display, _glfwWin.screen, attribs, &dummy ); } if( fbconfig == NULL ) { // This should never ever happen // TODO: Figure out what to do when this happens fprintf( stderr, "Cannot find known GLXFBConfig by ID. " "This cannot happen. Have a nice day.\n"); abort(); } // There is no clear definition of an "accelerated" context on X11/GLX, and // true sounds better than false, so we hardcode true here _glfwWin.accelerated = GL_TRUE; _glfwWin.redBits = getFBConfigAttrib( *fbconfig, GLX_RED_SIZE ); _glfwWin.greenBits = getFBConfigAttrib( *fbconfig, GLX_GREEN_SIZE ); _glfwWin.blueBits = getFBConfigAttrib( *fbconfig, GLX_BLUE_SIZE ); _glfwWin.alphaBits = getFBConfigAttrib( *fbconfig, GLX_ALPHA_SIZE ); _glfwWin.depthBits = getFBConfigAttrib( *fbconfig, GLX_DEPTH_SIZE ); _glfwWin.stencilBits = getFBConfigAttrib( *fbconfig, GLX_STENCIL_SIZE ); _glfwWin.accumRedBits = getFBConfigAttrib( *fbconfig, GLX_ACCUM_RED_SIZE ); _glfwWin.accumGreenBits = getFBConfigAttrib( *fbconfig, GLX_ACCUM_GREEN_SIZE ); _glfwWin.accumBlueBits = getFBConfigAttrib( *fbconfig, GLX_ACCUM_BLUE_SIZE ); _glfwWin.accumAlphaBits = getFBConfigAttrib( *fbconfig, GLX_ACCUM_ALPHA_SIZE ); _glfwWin.auxBuffers = getFBConfigAttrib( *fbconfig, GLX_AUX_BUFFERS ); _glfwWin.stereo = getFBConfigAttrib( *fbconfig, GLX_STEREO ) ? 1 : 0; // Get FSAA buffer sample count if( _glfwWin.has_GLX_ARB_multisample ) { _glfwWin.samples = getFBConfigAttrib( *fbconfig, GLX_SAMPLES ); } else { _glfwWin.samples = 0; } // Default to refresh rate unknown (=0 according to GLFW spec) _glfwWin.refreshRate = 0; // Retrieve refresh rate if possible #if defined( _GLFW_HAS_XRANDR ) if( _glfwLibrary.XRandR.available ) { sc = XRRGetScreenInfo( _glfwLibrary.display, _glfwWin.root ); _glfwWin.refreshRate = XRRConfigCurrentRate( sc ); XRRFreeScreenConfigInfo( sc ); } #elif defined( _GLFW_HAS_XF86VIDMODE ) if( _glfwLibrary.XF86VidMode.available ) { // Use the XF86VidMode extension to get current video mode XF86VidModeGetModeLine( _glfwLibrary.display, _glfwWin.screen, &dotclock, &modeline ); pixels_per_second = 1000.0f * (float) dotclock; pixels_per_frame = (float) modeline.htotal * modeline.vtotal; _glfwWin.refreshRate = (int)(pixels_per_second/pixels_per_frame+0.5); } #endif XFree( fbconfig ); } //======================================================================== // Poll for new window and input events //======================================================================== void _glfwPlatformPollEvents( void ) { GLboolean closeRequested = GL_FALSE; // Flag that the cursor has not moved _glfwInput.MouseMoved = GL_FALSE; // Process all pending events while( XPending( _glfwLibrary.display ) ) { if( processSingleEvent() ) { closeRequested = GL_TRUE; } } // Did we get mouse movement in fully enabled hidden cursor mode? if( _glfwInput.MouseMoved && _glfwWin.pointerHidden ) { _glfwPlatformSetMouseCursorPos( _glfwWin.width/2, _glfwWin.height/2 ); } if( closeRequested && _glfwWin.windowCloseCallback ) { closeRequested = _glfwWin.windowCloseCallback(); } if( closeRequested ) { glfwCloseWindow(); } } //======================================================================== // Wait for new window and input events //======================================================================== void _glfwPlatformWaitEvents( void ) { XEvent event; // Block waiting for an event to arrive XNextEvent( _glfwLibrary.display, &event ); XPutBackEvent( _glfwLibrary.display, &event ); _glfwPlatformPollEvents(); } //======================================================================== // Hide mouse cursor (lock it) //======================================================================== void _glfwPlatformHideMouseCursor( void ) { // Hide cursor if( !_glfwWin.pointerHidden ) { XDefineCursor( _glfwLibrary.display, _glfwWin.window, _glfwWin.cursor ); _glfwWin.pointerHidden = GL_TRUE; } // Grab cursor to user window if( !_glfwWin.pointerGrabbed ) { if( XGrabPointer( _glfwLibrary.display, _glfwWin.window, True, ButtonPressMask | ButtonReleaseMask | PointerMotionMask, GrabModeAsync, GrabModeAsync, _glfwWin.window, None, CurrentTime ) == GrabSuccess ) { _glfwWin.pointerGrabbed = GL_TRUE; } } } //======================================================================== // Show mouse cursor (unlock it) //======================================================================== void _glfwPlatformShowMouseCursor( void ) { // Un-grab cursor (only in windowed mode: in fullscreen mode we still // want the mouse grabbed in order to confine the cursor to the window // area) if( _glfwWin.pointerGrabbed ) { XUngrabPointer( _glfwLibrary.display, CurrentTime ); _glfwWin.pointerGrabbed = GL_FALSE; } // Show cursor if( _glfwWin.pointerHidden ) { XUndefineCursor( _glfwLibrary.display, _glfwWin.window ); _glfwWin.pointerHidden = GL_FALSE; } } //======================================================================== // Set physical mouse cursor position //======================================================================== void _glfwPlatformSetMouseCursorPos( int x, int y ) { // Store the new position so we can recognise it later _glfwInput.CursorPosX = x; _glfwInput.CursorPosY = y; XWarpPointer( _glfwLibrary.display, None, _glfwWin.window, 0,0,0,0, x, y ); } glfw-2.7.2/lib/x11/x11_fullscreen.c0000644000175000017500000004150511561251246017641 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #include //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Convert BPP to RGB bits (based on "best guess") //======================================================================== static void BPP2RGB( int bpp, int *r, int *g, int *b ) { int delta; // Special case: BPP = 32 (I don't think this is necessary for X11??) if( bpp == 32 ) bpp = 24; // Convert "bits per pixel" to red, green & blue sizes *r = *g = *b = bpp / 3; delta = bpp - (*r * 3); if( delta >= 1 ) { *g = *g + 1; } if( delta == 2 ) { *r = *r + 1; } } //======================================================================== // Finds the video mode closest in size to the specified desired size //======================================================================== int _glfwGetClosestVideoMode( int screen, int *width, int *height, int *rate ) { #if defined( _GLFW_HAS_XRANDR ) int i, match, bestmatch; int sizecount, bestsize; int ratecount, bestrate; short *ratelist; XRRScreenConfiguration *sc; XRRScreenSize *sizelist; if( _glfwLibrary.XRandR.available ) { sc = XRRGetScreenInfo( _glfwLibrary.display, RootWindow( _glfwLibrary.display, screen ) ); sizelist = XRRConfigSizes( sc, &sizecount ); // Find the best matching mode bestsize = -1; bestmatch = INT_MAX; for( i = 0; i < sizecount; i++ ) { match = (*width - sizelist[i].width) * (*width - sizelist[i].width) + (*height - sizelist[i].height) * (*height - sizelist[i].height); if( match < bestmatch ) { bestmatch = match; bestsize = i; } } if( bestsize != -1 ) { // Report width & height of best matching mode *width = sizelist[bestsize].width; *height = sizelist[bestsize].height; if( *rate > 0 ) { ratelist = XRRConfigRates( sc, bestsize, &ratecount ); bestrate = -1; bestmatch = INT_MAX; for( i = 0; i < ratecount; i++ ) { match = abs( ratelist[i] - *rate ); if( match < bestmatch ) { bestmatch = match; bestrate = ratelist[i]; } } if( bestrate != -1 ) { *rate = bestrate; } } } // Free modelist XRRFreeScreenConfigInfo( sc ); if( bestsize != -1 ) { return bestsize; } } #elif defined( _GLFW_HAS_XF86VIDMODE ) XF86VidModeModeInfo **modelist; int modecount, i, bestmode, bestmatch, match; // Use the XF86VidMode extension to control video resolution if( _glfwLibrary.XF86VidMode.available ) { // Get a list of all available display modes XF86VidModeGetAllModeLines( _glfwLibrary.display, screen, &modecount, &modelist ); // Find the best matching mode bestmode = -1; bestmatch = INT_MAX; for( i = 0; i < modecount; i++ ) { match = (*width - modelist[i]->hdisplay) * (*width - modelist[i]->hdisplay) + (*height - modelist[i]->vdisplay) * (*height - modelist[i]->vdisplay); if( match < bestmatch ) { bestmatch = match; bestmode = i; } } if( bestmode != -1 ) { // Report width & height of best matching mode *width = modelist[ bestmode ]->hdisplay; *height = modelist[ bestmode ]->vdisplay; } // Free modelist XFree( modelist ); if( bestmode != -1 ) { return bestmode; } } #endif // Default: Simply use the screen resolution *width = DisplayWidth( _glfwLibrary.display, screen ); *height = DisplayHeight( _glfwLibrary.display, screen ); return 0; } //======================================================================== // Change the current video mode //======================================================================== void _glfwSetVideoModeMODE( int screen, int mode, int rate ) { #if defined( _GLFW_HAS_XRANDR ) XRRScreenConfiguration *sc; Window root; if( _glfwLibrary.XRandR.available ) { root = RootWindow( _glfwLibrary.display, screen ); sc = XRRGetScreenInfo( _glfwLibrary.display, root ); // Remember old size and flag that we have changed the mode if( !_glfwWin.FS.modeChanged ) { _glfwWin.FS.oldSizeID = XRRConfigCurrentConfiguration( sc, &_glfwWin.FS.oldRotation ); _glfwWin.FS.oldWidth = DisplayWidth( _glfwLibrary.display, screen ); _glfwWin.FS.oldHeight = DisplayHeight( _glfwLibrary.display, screen ); _glfwWin.FS.modeChanged = GL_TRUE; } if( rate > 0 ) { // Set desired configuration XRRSetScreenConfigAndRate( _glfwLibrary.display, sc, root, mode, RR_Rotate_0, (short) rate, CurrentTime ); } else { // Set desired configuration XRRSetScreenConfig( _glfwLibrary.display, sc, root, mode, RR_Rotate_0, CurrentTime ); } XRRFreeScreenConfigInfo( sc ); } #elif defined( _GLFW_HAS_XF86VIDMODE ) XF86VidModeModeInfo **modelist; int modecount; // Use the XF86VidMode extension to control video resolution if( _glfwLibrary.XF86VidMode.available ) { // Get a list of all available display modes XF86VidModeGetAllModeLines( _glfwLibrary.display, screen, &modecount, &modelist ); // Unlock mode switch if necessary if( _glfwWin.FS.modeChanged ) { XF86VidModeLockModeSwitch( _glfwLibrary.display, screen, 0 ); } // Change the video mode to the desired mode XF86VidModeSwitchToMode( _glfwLibrary.display, screen, modelist[ mode ] ); // Set viewport to upper left corner (where our window will be) XF86VidModeSetViewPort( _glfwLibrary.display, screen, 0, 0 ); // Lock mode switch XF86VidModeLockModeSwitch( _glfwLibrary.display, screen, 1 ); // Remember old mode and flag that we have changed the mode if( !_glfwWin.FS.modeChanged ) { _glfwWin.FS.oldMode = *modelist[ 0 ]; _glfwWin.FS.modeChanged = GL_TRUE; } // Free mode list XFree( modelist ); } #endif } //======================================================================== // Change the current video mode //======================================================================== void _glfwSetVideoMode( int screen, int *width, int *height, int *rate ) { int bestmode; // Find a best match mode bestmode = _glfwGetClosestVideoMode( screen, width, height, rate ); // Change mode _glfwSetVideoModeMODE( screen, bestmode, *rate ); } //======================================================================== // Restore the previously saved (original) video mode //======================================================================== void _glfwRestoreVideoMode( void ) { if( _glfwWin.FS.modeChanged ) { #if defined( _GLFW_HAS_XRANDR ) if( _glfwLibrary.XRandR.available ) { XRRScreenConfiguration *sc; sc = XRRGetScreenInfo( _glfwLibrary.display, _glfwWin.root ); XRRSetScreenConfig( _glfwLibrary.display, sc, _glfwWin.root, _glfwWin.FS.oldSizeID, _glfwWin.FS.oldRotation, CurrentTime ); XRRFreeScreenConfigInfo( sc ); } #elif defined( _GLFW_HAS_XF86VIDMODE ) if( _glfwLibrary.XF86VidMode.available ) { // Unlock mode switch XF86VidModeLockModeSwitch( _glfwLibrary.display, _glfwWin.screen, 0 ); // Change the video mode back to the old mode XF86VidModeSwitchToMode( _glfwLibrary.display, _glfwWin.screen, &_glfwWin.FS.oldMode ); } #endif _glfwWin.FS.modeChanged = GL_FALSE; } } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ struct _glfwResolution { int width; int height; }; //======================================================================== // List available video modes //======================================================================== int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ) { int count, k, l, r, g, b, rgba, gl; int depth, screen; Display *dpy; XVisualInfo *vislist, dummy; int viscount, rgbcount, rescount; int *rgbarray; struct _glfwResolution *resarray; #if defined( _GLFW_HAS_XRANDR ) XRRScreenConfiguration *sc; XRRScreenSize *sizelist; int sizecount; #elif defined( _GLFW_HAS_XF86VIDMODE ) XF86VidModeModeInfo **modelist; int modecount, width, height; #endif // Get display and screen dpy = _glfwLibrary.display; screen = DefaultScreen( dpy ); // Get list of visuals vislist = XGetVisualInfo( dpy, 0, &dummy, &viscount ); if( vislist == NULL ) { return 0; } rgbarray = (int*) malloc( sizeof(int) * viscount ); rgbcount = 0; // Build RGB array for( k = 0; k < viscount; k++ ) { // Does the visual support OpenGL & true color? glXGetConfig( dpy, &vislist[k], GLX_USE_GL, &gl ); glXGetConfig( dpy, &vislist[k], GLX_RGBA, &rgba ); if( gl && rgba ) { // Get color depth for this visual depth = vislist[k].depth; // Convert to RGB BPP2RGB( depth, &r, &g, &b ); depth = (r<<16) | (g<<8) | b; // Is this mode unique? for( l = 0; l < rgbcount; l++ ) { if( depth == rgbarray[ l ] ) { break; } } if( l >= rgbcount ) { rgbarray[ rgbcount ] = depth; rgbcount++; } } } rescount = 0; resarray = NULL; // Build resolution array #if defined( _GLFW_HAS_XRANDR ) if( _glfwLibrary.XRandR.available ) { sc = XRRGetScreenInfo( dpy, RootWindow( dpy, screen ) ); sizelist = XRRConfigSizes( sc, &sizecount ); resarray = (struct _glfwResolution*) malloc( sizeof(struct _glfwResolution) * sizecount ); for( k = 0; k < sizecount; k++ ) { resarray[ rescount ].width = sizelist[ k ].width; resarray[ rescount ].height = sizelist[ k ].height; rescount++; } XRRFreeScreenConfigInfo( sc ); } #elif defined( _GLFW_HAS_XF86VIDMODE ) if( _glfwLibrary.XF86VidMode.available ) { XF86VidModeGetAllModeLines( dpy, screen, &modecount, &modelist ); resarray = (struct _glfwResolution*) malloc( sizeof(struct _glfwResolution) * modecount ); for( k = 0; k < modecount; k++ ) { width = modelist[ k ]->hdisplay; height = modelist[ k ]->vdisplay; // Is this mode unique? for( l = 0; l < rescount; l++ ) { if( width == resarray[ l ].width && height == resarray[ l ].height ) { break; } } if( l >= rescount ) { resarray[ rescount ].width = width; resarray[ rescount ].height = height; rescount++; } } XFree( modelist ); } #endif if( !resarray ) { rescount = 1; resarray = (struct _glfwResolution*) malloc( sizeof(struct _glfwResolution) * rescount ); resarray[ 0 ].width = DisplayWidth( dpy, screen ); resarray[ 0 ].height = DisplayHeight( dpy, screen ); } // Build permutations of colors and resolutions count = 0; for( k = 0; k < rgbcount && count < maxcount; k++ ) { for( l = 0; l < rescount && count < maxcount; l++ ) { list[count].Width = resarray[ l ].width; list[count].Height = resarray[ l ].height; list[count].RedBits = (rgbarray[ k ] >> 16) & 255; list[count].GreenBits = (rgbarray[ k ] >> 8) & 255; list[count].BlueBits = rgbarray[ k ] & 255; count++; } } // Free visuals list XFree( vislist ); free( resarray ); free( rgbarray ); return count; } //======================================================================== // Get the desktop video mode //======================================================================== void _glfwPlatformGetDesktopMode( GLFWvidmode *mode ) { Display *dpy; int bpp, screen; #if defined( _GLFW_HAS_XF86VIDMODE ) XF86VidModeModeInfo **modelist; int modecount; #endif // Get display and screen dpy = _glfwLibrary.display; screen = DefaultScreen( dpy ); // Get display depth bpp = DefaultDepth( dpy, screen ); // Convert BPP to RGB bits BPP2RGB( bpp, &mode->RedBits, &mode->GreenBits, &mode->BlueBits ); #if defined( _GLFW_HAS_XRANDR ) if( _glfwLibrary.XRandR.available ) { if( _glfwWin.FS.modeChanged ) { mode->Width = _glfwWin.FS.oldWidth; mode->Height = _glfwWin.FS.oldHeight; return; } } #elif defined( _GLFW_HAS_XF86VIDMODE ) if( _glfwLibrary.XF86VidMode.available ) { if( _glfwWin.FS.modeChanged ) { // The old (desktop) mode is stored in _glfwWin.FS.oldMode mode->Width = _glfwWin.FS.oldMode.hdisplay; mode->Height = _glfwWin.FS.oldMode.vdisplay; } else { // Use the XF86VidMode extension to get list of video modes XF86VidModeGetAllModeLines( dpy, screen, &modecount, &modelist ); // The first mode in the list is the current (desktio) mode mode->Width = modelist[ 0 ]->hdisplay; mode->Height = modelist[ 0 ]->vdisplay; // Free list XFree( modelist ); } return; } #endif // Get current display width and height mode->Width = DisplayWidth( dpy, screen ); mode->Height = DisplayHeight( dpy, screen ); } glfw-2.7.2/lib/x11/x11_time.c0000644000175000017500000001130611427547437016444 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //======================================================================== // Initialise timer //======================================================================== void _glfwInitTimer( void ) { struct timeval tv; // "Resolution" is 1 us _glfwLibrary.Timer.resolution = 1e-6; // Set start-time for timer gettimeofday( &tv, NULL ); _glfwLibrary.Timer.t0 = (long long) tv.tv_sec * (long long) 1000000 + (long long) tv.tv_usec; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Return timer value in seconds //======================================================================== double _glfwPlatformGetTime( void ) { long long t; struct timeval tv; gettimeofday( &tv, NULL ); t = (long long) tv.tv_sec * (long long) 1000000 + (long long) tv.tv_usec; return (double)(t - _glfwLibrary.Timer.t0) * _glfwLibrary.Timer.resolution; } //======================================================================== // Set timer value in seconds //======================================================================== void _glfwPlatformSetTime( double t ) { long long t0; struct timeval tv; gettimeofday( &tv, NULL ); t0 = (long long) tv.tv_sec * (long long) 1000000 + (long long) tv.tv_usec; // Calulate new starting time _glfwLibrary.Timer.t0 = t0 - (long long)(t/_glfwLibrary.Timer.resolution); } //======================================================================== // Put a thread to sleep for a specified amount of time //======================================================================== void _glfwPlatformSleep( double time ) { #ifdef _GLFW_HAS_PTHREAD if( time == 0.0 ) { #ifdef _GLFW_HAS_SCHED_YIELD sched_yield(); #endif return; } struct timeval currenttime; struct timespec wait; pthread_mutex_t mutex; pthread_cond_t cond; long dt_sec, dt_usec; // Not all pthread implementations have a pthread_sleep() function. We // do it the portable way, using a timed wait for a condition that we // will never signal. NOTE: The unistd functions sleep/usleep suspends // the entire PROCESS, not a signle thread, which is why we can not // use them to implement glfwSleep. // Set timeout time, relatvie to current time gettimeofday( ¤ttime, NULL ); dt_sec = (long) time; dt_usec = (long) ((time - (double)dt_sec) * 1000000.0); wait.tv_nsec = (currenttime.tv_usec + dt_usec) * 1000L; if( wait.tv_nsec > 1000000000L ) { wait.tv_nsec -= 1000000000L; dt_sec++; } wait.tv_sec = currenttime.tv_sec + dt_sec; // Initialize condition and mutex objects pthread_mutex_init( &mutex, NULL ); pthread_cond_init( &cond, NULL ); // Do a timed wait pthread_mutex_lock( &mutex ); pthread_cond_timedwait( &cond, &mutex, &wait ); pthread_mutex_unlock( &mutex ); // Destroy condition and mutex objects pthread_mutex_destroy( &mutex ); pthread_cond_destroy( &cond ); #else // For systems without PTHREAD, use unistd usleep if( time > 0 ) { usleep( (unsigned int) (time*1000000) ); } #endif // _GLFW_HAS_PTHREAD } glfw-2.7.2/lib/x11/x11_keysym2unicode.c0000644000175000017500000005171211577637342020466 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" /* * Marcus: This code was originally written by Markus G. Kuhn. * I have made some slight changes (trimmed it down a bit from >60 KB to * 20 KB), but the functionality is the same. */ /* * This module converts keysym values into the corresponding ISO 10646 * (UCS, Unicode) values. * * The array keysymtab[] contains pairs of X11 keysym values for graphical * characters and the corresponding Unicode value. The function * _glfwKeySym2Unicode() maps a keysym onto a Unicode value using a binary * search, therefore keysymtab[] must remain SORTED by keysym value. * * We allow to represent any UCS character in the range U-00000000 to * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. * This admittedly does not cover the entire 31-bit space of UCS, but * it does cover all of the characters up to U-10FFFF, which can be * represented by UTF-16, and more, and it is very unlikely that higher * UCS codes will ever be assigned by ISO. So to get Unicode character * U+ABCD you can directly use keysym 0x0100abcd. * * Original author: Markus G. Kuhn , University of * Cambridge, April 2001 * * Special thanks to Richard Verhoeven for preparing * an initial draft of the mapping table. * */ //************************************************************************ //**** KeySym to Unicode mapping table **** //************************************************************************ static struct codepair { unsigned short keysym; unsigned short ucs; } keysymtab[] = { { 0x01a1, 0x0104 }, { 0x01a2, 0x02d8 }, { 0x01a3, 0x0141 }, { 0x01a5, 0x013d }, { 0x01a6, 0x015a }, { 0x01a9, 0x0160 }, { 0x01aa, 0x015e }, { 0x01ab, 0x0164 }, { 0x01ac, 0x0179 }, { 0x01ae, 0x017d }, { 0x01af, 0x017b }, { 0x01b1, 0x0105 }, { 0x01b2, 0x02db }, { 0x01b3, 0x0142 }, { 0x01b5, 0x013e }, { 0x01b6, 0x015b }, { 0x01b7, 0x02c7 }, { 0x01b9, 0x0161 }, { 0x01ba, 0x015f }, { 0x01bb, 0x0165 }, { 0x01bc, 0x017a }, { 0x01bd, 0x02dd }, { 0x01be, 0x017e }, { 0x01bf, 0x017c }, { 0x01c0, 0x0154 }, { 0x01c3, 0x0102 }, { 0x01c5, 0x0139 }, { 0x01c6, 0x0106 }, { 0x01c8, 0x010c }, { 0x01ca, 0x0118 }, { 0x01cc, 0x011a }, { 0x01cf, 0x010e }, { 0x01d0, 0x0110 }, { 0x01d1, 0x0143 }, { 0x01d2, 0x0147 }, { 0x01d5, 0x0150 }, { 0x01d8, 0x0158 }, { 0x01d9, 0x016e }, { 0x01db, 0x0170 }, { 0x01de, 0x0162 }, { 0x01e0, 0x0155 }, { 0x01e3, 0x0103 }, { 0x01e5, 0x013a }, { 0x01e6, 0x0107 }, { 0x01e8, 0x010d }, { 0x01ea, 0x0119 }, { 0x01ec, 0x011b }, { 0x01ef, 0x010f }, { 0x01f0, 0x0111 }, { 0x01f1, 0x0144 }, { 0x01f2, 0x0148 }, { 0x01f5, 0x0151 }, { 0x01f8, 0x0159 }, { 0x01f9, 0x016f }, { 0x01fb, 0x0171 }, { 0x01fe, 0x0163 }, { 0x01ff, 0x02d9 }, { 0x02a1, 0x0126 }, { 0x02a6, 0x0124 }, { 0x02a9, 0x0130 }, { 0x02ab, 0x011e }, { 0x02ac, 0x0134 }, { 0x02b1, 0x0127 }, { 0x02b6, 0x0125 }, { 0x02b9, 0x0131 }, { 0x02bb, 0x011f }, { 0x02bc, 0x0135 }, { 0x02c5, 0x010a }, { 0x02c6, 0x0108 }, { 0x02d5, 0x0120 }, { 0x02d8, 0x011c }, { 0x02dd, 0x016c }, { 0x02de, 0x015c }, { 0x02e5, 0x010b }, { 0x02e6, 0x0109 }, { 0x02f5, 0x0121 }, { 0x02f8, 0x011d }, { 0x02fd, 0x016d }, { 0x02fe, 0x015d }, { 0x03a2, 0x0138 }, { 0x03a3, 0x0156 }, { 0x03a5, 0x0128 }, { 0x03a6, 0x013b }, { 0x03aa, 0x0112 }, { 0x03ab, 0x0122 }, { 0x03ac, 0x0166 }, { 0x03b3, 0x0157 }, { 0x03b5, 0x0129 }, { 0x03b6, 0x013c }, { 0x03ba, 0x0113 }, { 0x03bb, 0x0123 }, { 0x03bc, 0x0167 }, { 0x03bd, 0x014a }, { 0x03bf, 0x014b }, { 0x03c0, 0x0100 }, { 0x03c7, 0x012e }, { 0x03cc, 0x0116 }, { 0x03cf, 0x012a }, { 0x03d1, 0x0145 }, { 0x03d2, 0x014c }, { 0x03d3, 0x0136 }, { 0x03d9, 0x0172 }, { 0x03dd, 0x0168 }, { 0x03de, 0x016a }, { 0x03e0, 0x0101 }, { 0x03e7, 0x012f }, { 0x03ec, 0x0117 }, { 0x03ef, 0x012b }, { 0x03f1, 0x0146 }, { 0x03f2, 0x014d }, { 0x03f3, 0x0137 }, { 0x03f9, 0x0173 }, { 0x03fd, 0x0169 }, { 0x03fe, 0x016b }, { 0x047e, 0x203e }, { 0x04a1, 0x3002 }, { 0x04a2, 0x300c }, { 0x04a3, 0x300d }, { 0x04a4, 0x3001 }, { 0x04a5, 0x30fb }, { 0x04a6, 0x30f2 }, { 0x04a7, 0x30a1 }, { 0x04a8, 0x30a3 }, { 0x04a9, 0x30a5 }, { 0x04aa, 0x30a7 }, { 0x04ab, 0x30a9 }, { 0x04ac, 0x30e3 }, { 0x04ad, 0x30e5 }, { 0x04ae, 0x30e7 }, { 0x04af, 0x30c3 }, { 0x04b0, 0x30fc }, { 0x04b1, 0x30a2 }, { 0x04b2, 0x30a4 }, { 0x04b3, 0x30a6 }, { 0x04b4, 0x30a8 }, { 0x04b5, 0x30aa }, { 0x04b6, 0x30ab }, { 0x04b7, 0x30ad }, { 0x04b8, 0x30af }, { 0x04b9, 0x30b1 }, { 0x04ba, 0x30b3 }, { 0x04bb, 0x30b5 }, { 0x04bc, 0x30b7 }, { 0x04bd, 0x30b9 }, { 0x04be, 0x30bb }, { 0x04bf, 0x30bd }, { 0x04c0, 0x30bf }, { 0x04c1, 0x30c1 }, { 0x04c2, 0x30c4 }, { 0x04c3, 0x30c6 }, { 0x04c4, 0x30c8 }, { 0x04c5, 0x30ca }, { 0x04c6, 0x30cb }, { 0x04c7, 0x30cc }, { 0x04c8, 0x30cd }, { 0x04c9, 0x30ce }, { 0x04ca, 0x30cf }, { 0x04cb, 0x30d2 }, { 0x04cc, 0x30d5 }, { 0x04cd, 0x30d8 }, { 0x04ce, 0x30db }, { 0x04cf, 0x30de }, { 0x04d0, 0x30df }, { 0x04d1, 0x30e0 }, { 0x04d2, 0x30e1 }, { 0x04d3, 0x30e2 }, { 0x04d4, 0x30e4 }, { 0x04d5, 0x30e6 }, { 0x04d6, 0x30e8 }, { 0x04d7, 0x30e9 }, { 0x04d8, 0x30ea }, { 0x04d9, 0x30eb }, { 0x04da, 0x30ec }, { 0x04db, 0x30ed }, { 0x04dc, 0x30ef }, { 0x04dd, 0x30f3 }, { 0x04de, 0x309b }, { 0x04df, 0x309c }, { 0x05ac, 0x060c }, { 0x05bb, 0x061b }, { 0x05bf, 0x061f }, { 0x05c1, 0x0621 }, { 0x05c2, 0x0622 }, { 0x05c3, 0x0623 }, { 0x05c4, 0x0624 }, { 0x05c5, 0x0625 }, { 0x05c6, 0x0626 }, { 0x05c7, 0x0627 }, { 0x05c8, 0x0628 }, { 0x05c9, 0x0629 }, { 0x05ca, 0x062a }, { 0x05cb, 0x062b }, { 0x05cc, 0x062c }, { 0x05cd, 0x062d }, { 0x05ce, 0x062e }, { 0x05cf, 0x062f }, { 0x05d0, 0x0630 }, { 0x05d1, 0x0631 }, { 0x05d2, 0x0632 }, { 0x05d3, 0x0633 }, { 0x05d4, 0x0634 }, { 0x05d5, 0x0635 }, { 0x05d6, 0x0636 }, { 0x05d7, 0x0637 }, { 0x05d8, 0x0638 }, { 0x05d9, 0x0639 }, { 0x05da, 0x063a }, { 0x05e0, 0x0640 }, { 0x05e1, 0x0641 }, { 0x05e2, 0x0642 }, { 0x05e3, 0x0643 }, { 0x05e4, 0x0644 }, { 0x05e5, 0x0645 }, { 0x05e6, 0x0646 }, { 0x05e7, 0x0647 }, { 0x05e8, 0x0648 }, { 0x05e9, 0x0649 }, { 0x05ea, 0x064a }, { 0x05eb, 0x064b }, { 0x05ec, 0x064c }, { 0x05ed, 0x064d }, { 0x05ee, 0x064e }, { 0x05ef, 0x064f }, { 0x05f0, 0x0650 }, { 0x05f1, 0x0651 }, { 0x05f2, 0x0652 }, { 0x06a1, 0x0452 }, { 0x06a2, 0x0453 }, { 0x06a3, 0x0451 }, { 0x06a4, 0x0454 }, { 0x06a5, 0x0455 }, { 0x06a6, 0x0456 }, { 0x06a7, 0x0457 }, { 0x06a8, 0x0458 }, { 0x06a9, 0x0459 }, { 0x06aa, 0x045a }, { 0x06ab, 0x045b }, { 0x06ac, 0x045c }, { 0x06ae, 0x045e }, { 0x06af, 0x045f }, { 0x06b0, 0x2116 }, { 0x06b1, 0x0402 }, { 0x06b2, 0x0403 }, { 0x06b3, 0x0401 }, { 0x06b4, 0x0404 }, { 0x06b5, 0x0405 }, { 0x06b6, 0x0406 }, { 0x06b7, 0x0407 }, { 0x06b8, 0x0408 }, { 0x06b9, 0x0409 }, { 0x06ba, 0x040a }, { 0x06bb, 0x040b }, { 0x06bc, 0x040c }, { 0x06be, 0x040e }, { 0x06bf, 0x040f }, { 0x06c0, 0x044e }, { 0x06c1, 0x0430 }, { 0x06c2, 0x0431 }, { 0x06c3, 0x0446 }, { 0x06c4, 0x0434 }, { 0x06c5, 0x0435 }, { 0x06c6, 0x0444 }, { 0x06c7, 0x0433 }, { 0x06c8, 0x0445 }, { 0x06c9, 0x0438 }, { 0x06ca, 0x0439 }, { 0x06cb, 0x043a }, { 0x06cc, 0x043b }, { 0x06cd, 0x043c }, { 0x06ce, 0x043d }, { 0x06cf, 0x043e }, { 0x06d0, 0x043f }, { 0x06d1, 0x044f }, { 0x06d2, 0x0440 }, { 0x06d3, 0x0441 }, { 0x06d4, 0x0442 }, { 0x06d5, 0x0443 }, { 0x06d6, 0x0436 }, { 0x06d7, 0x0432 }, { 0x06d8, 0x044c }, { 0x06d9, 0x044b }, { 0x06da, 0x0437 }, { 0x06db, 0x0448 }, { 0x06dc, 0x044d }, { 0x06dd, 0x0449 }, { 0x06de, 0x0447 }, { 0x06df, 0x044a }, { 0x06e0, 0x042e }, { 0x06e1, 0x0410 }, { 0x06e2, 0x0411 }, { 0x06e3, 0x0426 }, { 0x06e4, 0x0414 }, { 0x06e5, 0x0415 }, { 0x06e6, 0x0424 }, { 0x06e7, 0x0413 }, { 0x06e8, 0x0425 }, { 0x06e9, 0x0418 }, { 0x06ea, 0x0419 }, { 0x06eb, 0x041a }, { 0x06ec, 0x041b }, { 0x06ed, 0x041c }, { 0x06ee, 0x041d }, { 0x06ef, 0x041e }, { 0x06f0, 0x041f }, { 0x06f1, 0x042f }, { 0x06f2, 0x0420 }, { 0x06f3, 0x0421 }, { 0x06f4, 0x0422 }, { 0x06f5, 0x0423 }, { 0x06f6, 0x0416 }, { 0x06f7, 0x0412 }, { 0x06f8, 0x042c }, { 0x06f9, 0x042b }, { 0x06fa, 0x0417 }, { 0x06fb, 0x0428 }, { 0x06fc, 0x042d }, { 0x06fd, 0x0429 }, { 0x06fe, 0x0427 }, { 0x06ff, 0x042a }, { 0x07a1, 0x0386 }, { 0x07a2, 0x0388 }, { 0x07a3, 0x0389 }, { 0x07a4, 0x038a }, { 0x07a5, 0x03aa }, { 0x07a7, 0x038c }, { 0x07a8, 0x038e }, { 0x07a9, 0x03ab }, { 0x07ab, 0x038f }, { 0x07ae, 0x0385 }, { 0x07af, 0x2015 }, { 0x07b1, 0x03ac }, { 0x07b2, 0x03ad }, { 0x07b3, 0x03ae }, { 0x07b4, 0x03af }, { 0x07b5, 0x03ca }, { 0x07b6, 0x0390 }, { 0x07b7, 0x03cc }, { 0x07b8, 0x03cd }, { 0x07b9, 0x03cb }, { 0x07ba, 0x03b0 }, { 0x07bb, 0x03ce }, { 0x07c1, 0x0391 }, { 0x07c2, 0x0392 }, { 0x07c3, 0x0393 }, { 0x07c4, 0x0394 }, { 0x07c5, 0x0395 }, { 0x07c6, 0x0396 }, { 0x07c7, 0x0397 }, { 0x07c8, 0x0398 }, { 0x07c9, 0x0399 }, { 0x07ca, 0x039a }, { 0x07cb, 0x039b }, { 0x07cc, 0x039c }, { 0x07cd, 0x039d }, { 0x07ce, 0x039e }, { 0x07cf, 0x039f }, { 0x07d0, 0x03a0 }, { 0x07d1, 0x03a1 }, { 0x07d2, 0x03a3 }, { 0x07d4, 0x03a4 }, { 0x07d5, 0x03a5 }, { 0x07d6, 0x03a6 }, { 0x07d7, 0x03a7 }, { 0x07d8, 0x03a8 }, { 0x07d9, 0x03a9 }, { 0x07e1, 0x03b1 }, { 0x07e2, 0x03b2 }, { 0x07e3, 0x03b3 }, { 0x07e4, 0x03b4 }, { 0x07e5, 0x03b5 }, { 0x07e6, 0x03b6 }, { 0x07e7, 0x03b7 }, { 0x07e8, 0x03b8 }, { 0x07e9, 0x03b9 }, { 0x07ea, 0x03ba }, { 0x07eb, 0x03bb }, { 0x07ec, 0x03bc }, { 0x07ed, 0x03bd }, { 0x07ee, 0x03be }, { 0x07ef, 0x03bf }, { 0x07f0, 0x03c0 }, { 0x07f1, 0x03c1 }, { 0x07f2, 0x03c3 }, { 0x07f3, 0x03c2 }, { 0x07f4, 0x03c4 }, { 0x07f5, 0x03c5 }, { 0x07f6, 0x03c6 }, { 0x07f7, 0x03c7 }, { 0x07f8, 0x03c8 }, { 0x07f9, 0x03c9 }, { 0x08a1, 0x23b7 }, { 0x08a2, 0x250c }, { 0x08a3, 0x2500 }, { 0x08a4, 0x2320 }, { 0x08a5, 0x2321 }, { 0x08a6, 0x2502 }, { 0x08a7, 0x23a1 }, { 0x08a8, 0x23a3 }, { 0x08a9, 0x23a4 }, { 0x08aa, 0x23a6 }, { 0x08ab, 0x239b }, { 0x08ac, 0x239d }, { 0x08ad, 0x239e }, { 0x08ae, 0x23a0 }, { 0x08af, 0x23a8 }, { 0x08b0, 0x23ac }, { 0x08bc, 0x2264 }, { 0x08bd, 0x2260 }, { 0x08be, 0x2265 }, { 0x08bf, 0x222b }, { 0x08c0, 0x2234 }, { 0x08c1, 0x221d }, { 0x08c2, 0x221e }, { 0x08c5, 0x2207 }, { 0x08c8, 0x223c }, { 0x08c9, 0x2243 }, { 0x08cd, 0x21d4 }, { 0x08ce, 0x21d2 }, { 0x08cf, 0x2261 }, { 0x08d6, 0x221a }, { 0x08da, 0x2282 }, { 0x08db, 0x2283 }, { 0x08dc, 0x2229 }, { 0x08dd, 0x222a }, { 0x08de, 0x2227 }, { 0x08df, 0x2228 }, { 0x08ef, 0x2202 }, { 0x08f6, 0x0192 }, { 0x08fb, 0x2190 }, { 0x08fc, 0x2191 }, { 0x08fd, 0x2192 }, { 0x08fe, 0x2193 }, { 0x09e0, 0x25c6 }, { 0x09e1, 0x2592 }, { 0x09e2, 0x2409 }, { 0x09e3, 0x240c }, { 0x09e4, 0x240d }, { 0x09e5, 0x240a }, { 0x09e8, 0x2424 }, { 0x09e9, 0x240b }, { 0x09ea, 0x2518 }, { 0x09eb, 0x2510 }, { 0x09ec, 0x250c }, { 0x09ed, 0x2514 }, { 0x09ee, 0x253c }, { 0x09ef, 0x23ba }, { 0x09f0, 0x23bb }, { 0x09f1, 0x2500 }, { 0x09f2, 0x23bc }, { 0x09f3, 0x23bd }, { 0x09f4, 0x251c }, { 0x09f5, 0x2524 }, { 0x09f6, 0x2534 }, { 0x09f7, 0x252c }, { 0x09f8, 0x2502 }, { 0x0aa1, 0x2003 }, { 0x0aa2, 0x2002 }, { 0x0aa3, 0x2004 }, { 0x0aa4, 0x2005 }, { 0x0aa5, 0x2007 }, { 0x0aa6, 0x2008 }, { 0x0aa7, 0x2009 }, { 0x0aa8, 0x200a }, { 0x0aa9, 0x2014 }, { 0x0aaa, 0x2013 }, { 0x0aae, 0x2026 }, { 0x0aaf, 0x2025 }, { 0x0ab0, 0x2153 }, { 0x0ab1, 0x2154 }, { 0x0ab2, 0x2155 }, { 0x0ab3, 0x2156 }, { 0x0ab4, 0x2157 }, { 0x0ab5, 0x2158 }, { 0x0ab6, 0x2159 }, { 0x0ab7, 0x215a }, { 0x0ab8, 0x2105 }, { 0x0abb, 0x2012 }, { 0x0abc, 0x2329 }, { 0x0abe, 0x232a }, { 0x0ac3, 0x215b }, { 0x0ac4, 0x215c }, { 0x0ac5, 0x215d }, { 0x0ac6, 0x215e }, { 0x0ac9, 0x2122 }, { 0x0aca, 0x2613 }, { 0x0acc, 0x25c1 }, { 0x0acd, 0x25b7 }, { 0x0ace, 0x25cb }, { 0x0acf, 0x25af }, { 0x0ad0, 0x2018 }, { 0x0ad1, 0x2019 }, { 0x0ad2, 0x201c }, { 0x0ad3, 0x201d }, { 0x0ad4, 0x211e }, { 0x0ad6, 0x2032 }, { 0x0ad7, 0x2033 }, { 0x0ad9, 0x271d }, { 0x0adb, 0x25ac }, { 0x0adc, 0x25c0 }, { 0x0add, 0x25b6 }, { 0x0ade, 0x25cf }, { 0x0adf, 0x25ae }, { 0x0ae0, 0x25e6 }, { 0x0ae1, 0x25ab }, { 0x0ae2, 0x25ad }, { 0x0ae3, 0x25b3 }, { 0x0ae4, 0x25bd }, { 0x0ae5, 0x2606 }, { 0x0ae6, 0x2022 }, { 0x0ae7, 0x25aa }, { 0x0ae8, 0x25b2 }, { 0x0ae9, 0x25bc }, { 0x0aea, 0x261c }, { 0x0aeb, 0x261e }, { 0x0aec, 0x2663 }, { 0x0aed, 0x2666 }, { 0x0aee, 0x2665 }, { 0x0af0, 0x2720 }, { 0x0af1, 0x2020 }, { 0x0af2, 0x2021 }, { 0x0af3, 0x2713 }, { 0x0af4, 0x2717 }, { 0x0af5, 0x266f }, { 0x0af6, 0x266d }, { 0x0af7, 0x2642 }, { 0x0af8, 0x2640 }, { 0x0af9, 0x260e }, { 0x0afa, 0x2315 }, { 0x0afb, 0x2117 }, { 0x0afc, 0x2038 }, { 0x0afd, 0x201a }, { 0x0afe, 0x201e }, { 0x0ba3, 0x003c }, { 0x0ba6, 0x003e }, { 0x0ba8, 0x2228 }, { 0x0ba9, 0x2227 }, { 0x0bc0, 0x00af }, { 0x0bc2, 0x22a5 }, { 0x0bc3, 0x2229 }, { 0x0bc4, 0x230a }, { 0x0bc6, 0x005f }, { 0x0bca, 0x2218 }, { 0x0bcc, 0x2395 }, { 0x0bce, 0x22a4 }, { 0x0bcf, 0x25cb }, { 0x0bd3, 0x2308 }, { 0x0bd6, 0x222a }, { 0x0bd8, 0x2283 }, { 0x0bda, 0x2282 }, { 0x0bdc, 0x22a2 }, { 0x0bfc, 0x22a3 }, { 0x0cdf, 0x2017 }, { 0x0ce0, 0x05d0 }, { 0x0ce1, 0x05d1 }, { 0x0ce2, 0x05d2 }, { 0x0ce3, 0x05d3 }, { 0x0ce4, 0x05d4 }, { 0x0ce5, 0x05d5 }, { 0x0ce6, 0x05d6 }, { 0x0ce7, 0x05d7 }, { 0x0ce8, 0x05d8 }, { 0x0ce9, 0x05d9 }, { 0x0cea, 0x05da }, { 0x0ceb, 0x05db }, { 0x0cec, 0x05dc }, { 0x0ced, 0x05dd }, { 0x0cee, 0x05de }, { 0x0cef, 0x05df }, { 0x0cf0, 0x05e0 }, { 0x0cf1, 0x05e1 }, { 0x0cf2, 0x05e2 }, { 0x0cf3, 0x05e3 }, { 0x0cf4, 0x05e4 }, { 0x0cf5, 0x05e5 }, { 0x0cf6, 0x05e6 }, { 0x0cf7, 0x05e7 }, { 0x0cf8, 0x05e8 }, { 0x0cf9, 0x05e9 }, { 0x0cfa, 0x05ea }, { 0x0da1, 0x0e01 }, { 0x0da2, 0x0e02 }, { 0x0da3, 0x0e03 }, { 0x0da4, 0x0e04 }, { 0x0da5, 0x0e05 }, { 0x0da6, 0x0e06 }, { 0x0da7, 0x0e07 }, { 0x0da8, 0x0e08 }, { 0x0da9, 0x0e09 }, { 0x0daa, 0x0e0a }, { 0x0dab, 0x0e0b }, { 0x0dac, 0x0e0c }, { 0x0dad, 0x0e0d }, { 0x0dae, 0x0e0e }, { 0x0daf, 0x0e0f }, { 0x0db0, 0x0e10 }, { 0x0db1, 0x0e11 }, { 0x0db2, 0x0e12 }, { 0x0db3, 0x0e13 }, { 0x0db4, 0x0e14 }, { 0x0db5, 0x0e15 }, { 0x0db6, 0x0e16 }, { 0x0db7, 0x0e17 }, { 0x0db8, 0x0e18 }, { 0x0db9, 0x0e19 }, { 0x0dba, 0x0e1a }, { 0x0dbb, 0x0e1b }, { 0x0dbc, 0x0e1c }, { 0x0dbd, 0x0e1d }, { 0x0dbe, 0x0e1e }, { 0x0dbf, 0x0e1f }, { 0x0dc0, 0x0e20 }, { 0x0dc1, 0x0e21 }, { 0x0dc2, 0x0e22 }, { 0x0dc3, 0x0e23 }, { 0x0dc4, 0x0e24 }, { 0x0dc5, 0x0e25 }, { 0x0dc6, 0x0e26 }, { 0x0dc7, 0x0e27 }, { 0x0dc8, 0x0e28 }, { 0x0dc9, 0x0e29 }, { 0x0dca, 0x0e2a }, { 0x0dcb, 0x0e2b }, { 0x0dcc, 0x0e2c }, { 0x0dcd, 0x0e2d }, { 0x0dce, 0x0e2e }, { 0x0dcf, 0x0e2f }, { 0x0dd0, 0x0e30 }, { 0x0dd1, 0x0e31 }, { 0x0dd2, 0x0e32 }, { 0x0dd3, 0x0e33 }, { 0x0dd4, 0x0e34 }, { 0x0dd5, 0x0e35 }, { 0x0dd6, 0x0e36 }, { 0x0dd7, 0x0e37 }, { 0x0dd8, 0x0e38 }, { 0x0dd9, 0x0e39 }, { 0x0dda, 0x0e3a }, { 0x0ddf, 0x0e3f }, { 0x0de0, 0x0e40 }, { 0x0de1, 0x0e41 }, { 0x0de2, 0x0e42 }, { 0x0de3, 0x0e43 }, { 0x0de4, 0x0e44 }, { 0x0de5, 0x0e45 }, { 0x0de6, 0x0e46 }, { 0x0de7, 0x0e47 }, { 0x0de8, 0x0e48 }, { 0x0de9, 0x0e49 }, { 0x0dea, 0x0e4a }, { 0x0deb, 0x0e4b }, { 0x0dec, 0x0e4c }, { 0x0ded, 0x0e4d }, { 0x0df0, 0x0e50 }, { 0x0df1, 0x0e51 }, { 0x0df2, 0x0e52 }, { 0x0df3, 0x0e53 }, { 0x0df4, 0x0e54 }, { 0x0df5, 0x0e55 }, { 0x0df6, 0x0e56 }, { 0x0df7, 0x0e57 }, { 0x0df8, 0x0e58 }, { 0x0df9, 0x0e59 }, { 0x0ea1, 0x3131 }, { 0x0ea2, 0x3132 }, { 0x0ea3, 0x3133 }, { 0x0ea4, 0x3134 }, { 0x0ea5, 0x3135 }, { 0x0ea6, 0x3136 }, { 0x0ea7, 0x3137 }, { 0x0ea8, 0x3138 }, { 0x0ea9, 0x3139 }, { 0x0eaa, 0x313a }, { 0x0eab, 0x313b }, { 0x0eac, 0x313c }, { 0x0ead, 0x313d }, { 0x0eae, 0x313e }, { 0x0eaf, 0x313f }, { 0x0eb0, 0x3140 }, { 0x0eb1, 0x3141 }, { 0x0eb2, 0x3142 }, { 0x0eb3, 0x3143 }, { 0x0eb4, 0x3144 }, { 0x0eb5, 0x3145 }, { 0x0eb6, 0x3146 }, { 0x0eb7, 0x3147 }, { 0x0eb8, 0x3148 }, { 0x0eb9, 0x3149 }, { 0x0eba, 0x314a }, { 0x0ebb, 0x314b }, { 0x0ebc, 0x314c }, { 0x0ebd, 0x314d }, { 0x0ebe, 0x314e }, { 0x0ebf, 0x314f }, { 0x0ec0, 0x3150 }, { 0x0ec1, 0x3151 }, { 0x0ec2, 0x3152 }, { 0x0ec3, 0x3153 }, { 0x0ec4, 0x3154 }, { 0x0ec5, 0x3155 }, { 0x0ec6, 0x3156 }, { 0x0ec7, 0x3157 }, { 0x0ec8, 0x3158 }, { 0x0ec9, 0x3159 }, { 0x0eca, 0x315a }, { 0x0ecb, 0x315b }, { 0x0ecc, 0x315c }, { 0x0ecd, 0x315d }, { 0x0ece, 0x315e }, { 0x0ecf, 0x315f }, { 0x0ed0, 0x3160 }, { 0x0ed1, 0x3161 }, { 0x0ed2, 0x3162 }, { 0x0ed3, 0x3163 }, { 0x0ed4, 0x11a8 }, { 0x0ed5, 0x11a9 }, { 0x0ed6, 0x11aa }, { 0x0ed7, 0x11ab }, { 0x0ed8, 0x11ac }, { 0x0ed9, 0x11ad }, { 0x0eda, 0x11ae }, { 0x0edb, 0x11af }, { 0x0edc, 0x11b0 }, { 0x0edd, 0x11b1 }, { 0x0ede, 0x11b2 }, { 0x0edf, 0x11b3 }, { 0x0ee0, 0x11b4 }, { 0x0ee1, 0x11b5 }, { 0x0ee2, 0x11b6 }, { 0x0ee3, 0x11b7 }, { 0x0ee4, 0x11b8 }, { 0x0ee5, 0x11b9 }, { 0x0ee6, 0x11ba }, { 0x0ee7, 0x11bb }, { 0x0ee8, 0x11bc }, { 0x0ee9, 0x11bd }, { 0x0eea, 0x11be }, { 0x0eeb, 0x11bf }, { 0x0eec, 0x11c0 }, { 0x0eed, 0x11c1 }, { 0x0eee, 0x11c2 }, { 0x0eef, 0x316d }, { 0x0ef0, 0x3171 }, { 0x0ef1, 0x3178 }, { 0x0ef2, 0x317f }, { 0x0ef3, 0x3181 }, { 0x0ef4, 0x3184 }, { 0x0ef5, 0x3186 }, { 0x0ef6, 0x318d }, { 0x0ef7, 0x318e }, { 0x0ef8, 0x11eb }, { 0x0ef9, 0x11f0 }, { 0x0efa, 0x11f9 }, { 0x0eff, 0x20a9 }, { 0x13a4, 0x20ac }, { 0x13bc, 0x0152 }, { 0x13bd, 0x0153 }, { 0x13be, 0x0178 }, { 0x20ac, 0x20ac }, // Numeric keypad with numlock on { XK_KP_Space, ' ' }, { XK_KP_Equal, '=' }, { XK_KP_Multiply, '*' }, { XK_KP_Add, '+' }, { XK_KP_Separator, ',' }, { XK_KP_Subtract, '-' }, { XK_KP_Decimal, '.' }, { XK_KP_Divide, '/' }, { XK_KP_0, 0x0030 }, { XK_KP_1, 0x0031 }, { XK_KP_2, 0x0032 }, { XK_KP_3, 0x0033 }, { XK_KP_4, 0x0034 }, { XK_KP_5, 0x0035 }, { XK_KP_6, 0x0036 }, { XK_KP_7, 0x0037 }, { XK_KP_8, 0x0038 }, { XK_KP_9, 0x0039 } }; //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Convert X11 KeySym to Unicode //======================================================================== long _glfwKeySym2Unicode( KeySym keysym ) { int min = 0; int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; int mid; /* First check for Latin-1 characters (1:1 mapping) */ if( (keysym >= 0x0020 && keysym <= 0x007e) || (keysym >= 0x00a0 && keysym <= 0x00ff) ) { return keysym; } /* Also check for directly encoded 24-bit UCS characters */ if( (keysym & 0xff000000) == 0x01000000 ) { return keysym & 0x00ffffff; } /* Binary search in table */ while( max >= min ) { mid = (min + max) / 2; if( keysymtab[mid].keysym < keysym ) { min = mid + 1; } else if( keysymtab[mid].keysym > keysym ) { max = mid - 1; } else { /* Found it! */ return keysymtab[mid].ucs; } } /* No matching Unicode value found */ return -1; } glfw-2.7.2/lib/x11/x11_thread.c0000644000175000017500000003063311577637342016762 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ #ifdef _GLFW_HAS_PTHREAD //======================================================================== // This is simply a "wrapper" for calling the user thread function. //======================================================================== void * _glfwNewThread( void * arg ) { GLFWthreadfun threadfun; _GLFWthread *t; pthread_t posixID; // Get current thread ID posixID = pthread_self(); // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Loop through entire list of threads to find the matching POSIX // thread ID for( t = &_glfwThrd.First; t != NULL; t = t->Next ) { if( t->PosixID == posixID ) { break; } } if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return NULL; } // Get user thread function pointer threadfun = t->Function; // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Call the user thread function threadfun( arg ); // Remove thread from thread list ENTER_THREAD_CRITICAL_SECTION _glfwRemoveThread( t ); LEAVE_THREAD_CRITICAL_SECTION // When the thread function returns, the thread will die... return NULL; } #endif // _GLFW_HAS_PTHREAD //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Create a new thread //======================================================================== GLFWthread _glfwPlatformCreateThread( GLFWthreadfun fun, void *arg ) { #ifdef _GLFW_HAS_PTHREAD GLFWthread ID; _GLFWthread *t; int result; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Create a new thread information memory area t = (_GLFWthread *) malloc( sizeof(_GLFWthread) ); if( t == NULL ) { // Leave critical section LEAVE_THREAD_CRITICAL_SECTION return -1; } // Get a new unique thread id ID = _glfwThrd.NextID ++; // Store thread information in the thread list t->Function = fun; t->ID = ID; // Create thread result = pthread_create( &t->PosixID, // Thread handle NULL, // Default thread attributes _glfwNewThread, // Thread function (a wrapper function) (void *)arg // Argument to thread is user argument ); // Did the thread creation fail? if( result != 0 ) { free( (void *) t ); LEAVE_THREAD_CRITICAL_SECTION return -1; } // Append thread to thread list _glfwAppendThread( t ); // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the GLFW thread ID return ID; #else return -1; #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Kill a thread. NOTE: THIS IS A VERY DANGEROUS OPERATION, AND SHOULD NOT // BE USED EXCEPT IN EXTREME SITUATIONS! //======================================================================== void _glfwPlatformDestroyThread( GLFWthread ID ) { #ifdef _GLFW_HAS_PTHREAD _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return; } // Simply murder the process, no mercy! pthread_kill( t->PosixID, SIGKILL ); // Remove thread from thread list _glfwRemoveThread( t ); // Leave critical section LEAVE_THREAD_CRITICAL_SECTION #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Wait for a thread to die //======================================================================== int _glfwPlatformWaitThread( GLFWthread ID, int waitmode ) { #ifdef _GLFW_HAS_PTHREAD pthread_t thread; _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); // Is the thread already dead? if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return GL_TRUE; } // If got this far, the thread is alive => polling returns FALSE if( waitmode == GLFW_NOWAIT ) { LEAVE_THREAD_CRITICAL_SECTION return GL_FALSE; } // Get thread handle thread = t->PosixID; // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Wait for thread to die (void) pthread_join( thread, NULL ); return GL_TRUE; #else return GL_TRUE; #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Return the thread ID for the current thread //======================================================================== GLFWthread _glfwPlatformGetThreadID( void ) { #ifdef _GLFW_HAS_PTHREAD _GLFWthread *t; GLFWthread ID = -1; pthread_t posixID; // Get current thread ID posixID = pthread_self(); // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Loop through entire list of threads to find the matching POSIX // thread ID for( t = &_glfwThrd.First; t != NULL; t = t->Next ) { if( t->PosixID == posixID ) { ID = t->ID; break; } } // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the found GLFW thread identifier return ID; #else return 0; #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Create a mutual exclusion object //======================================================================== GLFWmutex _glfwPlatformCreateMutex( void ) { #ifdef _GLFW_HAS_PTHREAD pthread_mutex_t *mutex; // Allocate memory for mutex mutex = (pthread_mutex_t *) malloc( sizeof( pthread_mutex_t ) ); if( !mutex ) { return NULL; } // Initialise a mutex object (void) pthread_mutex_init( mutex, NULL ); // Cast to GLFWmutex and return return (GLFWmutex) mutex; #else return (GLFWmutex) 0; #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Destroy a mutual exclusion object //======================================================================== void _glfwPlatformDestroyMutex( GLFWmutex mutex ) { #ifdef _GLFW_HAS_PTHREAD // Destroy the mutex object pthread_mutex_destroy( (pthread_mutex_t *) mutex ); // Free memory for mutex object free( (void *) mutex ); #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Request access to a mutex //======================================================================== void _glfwPlatformLockMutex( GLFWmutex mutex ) { #ifdef _GLFW_HAS_PTHREAD // Wait for mutex to be released (void) pthread_mutex_lock( (pthread_mutex_t *) mutex ); #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Release a mutex //======================================================================== void _glfwPlatformUnlockMutex( GLFWmutex mutex ) { #ifdef _GLFW_HAS_PTHREAD // Release mutex pthread_mutex_unlock( (pthread_mutex_t *) mutex ); #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Create a new condition variable object //======================================================================== GLFWcond _glfwPlatformCreateCond( void ) { #ifdef _GLFW_HAS_PTHREAD pthread_cond_t *cond; // Allocate memory for condition variable cond = (pthread_cond_t *) malloc( sizeof(pthread_cond_t) ); if( !cond ) { return NULL; } // Initialise condition variable (void) pthread_cond_init( cond, NULL ); // Cast to GLFWcond and return return (GLFWcond) cond; #else return (GLFWcond) 0; #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Destroy a condition variable object //======================================================================== void _glfwPlatformDestroyCond( GLFWcond cond ) { #ifdef _GLFW_HAS_PTHREAD // Destroy the condition variable object (void) pthread_cond_destroy( (pthread_cond_t *) cond ); // Free memory for condition variable object free( (void *) cond ); #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Wait for a condition to be raised //======================================================================== void _glfwPlatformWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ) { #ifdef _GLFW_HAS_PTHREAD struct timeval currenttime; struct timespec wait; long dt_sec, dt_usec; // Select infinite or timed wait if( timeout >= GLFW_INFINITY ) { // Wait for condition (infinite wait) (void) pthread_cond_wait( (pthread_cond_t *) cond, (pthread_mutex_t *) mutex ); } else { // Set timeout time, relatvie to current time gettimeofday( ¤ttime, NULL ); dt_sec = (long) timeout; dt_usec = (long) ((timeout - (double)dt_sec) * 1000000.0); wait.tv_nsec = (currenttime.tv_usec + dt_usec) * 1000L; if( wait.tv_nsec > 1000000000L ) { wait.tv_nsec -= 1000000000L; dt_sec ++; } wait.tv_sec = currenttime.tv_sec + dt_sec; // Wait for condition (timed wait) (void) pthread_cond_timedwait( (pthread_cond_t *) cond, (pthread_mutex_t *) mutex, &wait ); } #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Signal a condition to one waiting thread //======================================================================== void _glfwPlatformSignalCond( GLFWcond cond ) { #ifdef _GLFW_HAS_PTHREAD // Signal condition (void) pthread_cond_signal( (pthread_cond_t *) cond ); #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Broadcast a condition to all waiting threads //======================================================================== void _glfwPlatformBroadcastCond( GLFWcond cond ) { #ifdef _GLFW_HAS_PTHREAD // Broadcast condition (void) pthread_cond_broadcast( (pthread_cond_t *) cond ); #endif // _GLFW_HAS_PTHREAD } //======================================================================== // Return the number of processors in the system. //======================================================================== int _glfwPlatformGetNumberOfProcessors( void ) { int n; // Get number of processors online _glfw_numprocessors( n ); return n; } glfw-2.7.2/lib/x11/x11_glext.c0000644000175000017500000000643711602242126016620 0ustar elmindredaelmindreda//================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" void (*glXGetProcAddress(const GLubyte *procName))(); void (*glXGetProcAddressARB(const GLubyte *procName))(); void (*glXGetProcAddressEXT(const GLubyte *procName))(); // We support four different ways for getting addresses for GL/GLX // extension functions: glXGetProcAddress, glXGetProcAddressARB, // glXGetProcAddressEXT, and dlsym #if defined( _GLFW_HAS_GLXGETPROCADDRESSARB ) #define _glfw_glXGetProcAddress(x) glXGetProcAddressARB(x) #elif defined( _GLFW_HAS_GLXGETPROCADDRESS ) #define _glfw_glXGetProcAddress(x) glXGetProcAddress(x) #elif defined( _GLFW_HAS_GLXGETPROCADDRESSEXT ) #define _glfw_glXGetProcAddress(x) glXGetProcAddressEXT(x) #elif defined( _GLFW_HAS_DLOPEN ) #define _glfw_glXGetProcAddress(x) dlsym(_glfwLibrary.Libs.libGL,x) #else #define _glfw_glXGetProcAddress(x) NULL #endif //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Check if an OpenGL extension is available at runtime //======================================================================== int _glfwPlatformExtensionSupported( const char *extension ) { const GLubyte *extensions; // Get list of GLX extensions extensions = (const GLubyte*) glXQueryExtensionsString( _glfwLibrary.display, _glfwWin.screen ); if( extensions != NULL ) { if( _glfwStringInExtensionString( extension, extensions ) ) { return GL_TRUE; } } return GL_FALSE; } //======================================================================== // Get the function pointer to an OpenGL function //======================================================================== void * _glfwPlatformGetProcAddress( const char *procname ) { return (void *) _glfw_glXGetProcAddress( (const GLubyte *) procname ); } glfw-2.7.2/lib/x11/platform.h0000644000175000017500000003705211602242126016632 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: X11/GLX // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #ifndef _platform_h_ #define _platform_h_ // This is the X11 version of GLFW #define _GLFW_X11 // Include files #include #include #include #include #include #include #include #include "../../include/GL/glfw.h" // Do we have pthread support? #ifdef _GLFW_HAS_PTHREAD #include #include #endif // We need declarations for GLX version 1.3 or above even if the server doesn't // support version 1.3 #ifndef GLX_VERSION_1_3 #error "GLX header version 1.3 or above is required" #endif #if defined( _GLFW_HAS_XF86VIDMODE ) && defined( _GLFW_HAS_XRANDR ) #error "Xf86VidMode and RandR extensions cannot both be enabled" #endif // With XFree86, we can use the XF86VidMode extension #if defined( _GLFW_HAS_XF86VIDMODE ) #include #endif #if defined( _GLFW_HAS_XRANDR ) #include #endif // Do we have support for dlopen/dlsym? #if defined( _GLFW_HAS_DLOPEN ) #include #endif // We support two different ways for getting the number of processors in // the system: sysconf (POSIX) and sysctl (BSD?) #if defined( _GLFW_HAS_SYSCONF ) // Use a single constant for querying number of online processors using // the sysconf function (e.g. SGI defines _SC_NPROC_ONLN instead of // _SC_NPROCESSORS_ONLN) #ifndef _SC_NPROCESSORS_ONLN #ifdef _SC_NPROC_ONLN #define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN #else #error POSIX constant _SC_NPROCESSORS_ONLN not defined! #endif #endif // Macro for querying the number of processors #define _glfw_numprocessors(n) n=(int)sysconf(_SC_NPROCESSORS_ONLN) #elif defined( _GLFW_HAS_SYSCTL ) #include #include // Macro for querying the number of processors #define _glfw_numprocessors(n) { \ int mib[2], ncpu; \ size_t len = 1; \ mib[0] = CTL_HW; \ mib[1] = HW_NCPU; \ n = 1; \ if( sysctl( mib, 2, &ncpu, &len, NULL, 0 ) != -1 ) \ { \ if( len > 0 ) \ { \ n = ncpu; \ } \ } \ } #else // If neither sysconf nor sysctl is supported, assume single processor // system #define _glfw_numprocessors(n) n=1 #endif // Pointer length integer // One day, this will most likely move into glfw.h typedef intptr_t GLFWintptr; #ifndef GLX_SGI_swap_control // Function signature for GLX_SGI_swap_control typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); #endif /*GLX_SGI_swap_control*/ #ifndef GLX_SGIX_fbconfig /* Type definitions for GLX_SGIX_fbconfig */ typedef XID GLXFBConfigIDSGIX; typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; /* Function signatures for GLX_SGIX_fbconfig */ typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); /* Tokens for GLX_SGIX_fbconfig */ #define GLX_WINDOW_BIT_SGIX 0x00000001 #define GLX_PIXMAP_BIT_SGIX 0x00000002 #define GLX_RGBA_BIT_SGIX 0x00000001 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 #define GLX_DRAWABLE_TYPE_SGIX 0x8010 #define GLX_RENDER_TYPE_SGIX 0x8011 #define GLX_X_RENDERABLE_SGIX 0x8012 #define GLX_FBCONFIG_ID_SGIX 0x8013 #define GLX_RGBA_TYPE_SGIX 0x8014 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 #define GLX_SCREEN_EXT 0x800C #endif /*GLX_SGIX_fbconfig*/ #ifndef GLX_ARB_create_context /* Tokens for glXCreateContextAttribsARB attributes */ #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 #define GLX_CONTEXT_FLAGS_ARB 0x2094 /* Bits for WGL_CONTEXT_FLAGS_ARB */ #define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 /* Prototype for glXCreateContextAttribs */ typedef GLXContext (*PFNGLXCREATECONTEXTATTRIBSARBPROC)( Display *display, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); #endif /*GLX_ARB_create_context*/ #ifndef GLX_ARB_create_context_profile /* Tokens for glXCreateContextAttribsARB attributes */ #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 /* BIts for GLX_CONTEXT_PROFILE_MASK_ARB */ #define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 #endif /*GLX_ARB_create_context_profile*/ #ifndef GL_VERSION_3_0 typedef const GLubyte * (APIENTRY *PFNGLGETSTRINGIPROC) (GLenum, GLuint); #endif /*GL_VERSION_3_0*/ //======================================================================== // Global variables (GLFW internals) //======================================================================== //------------------------------------------------------------------------ // Window structure //------------------------------------------------------------------------ typedef struct _GLFWwin_struct _GLFWwin; struct _GLFWwin_struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // User callback functions GLFWwindowsizefun windowSizeCallback; GLFWwindowclosefun windowCloseCallback; GLFWwindowrefreshfun windowRefreshCallback; GLFWmousebuttonfun mouseButtonCallback; GLFWmouseposfun mousePosCallback; GLFWmousewheelfun mouseWheelCallback; GLFWkeyfun keyCallback; GLFWcharfun charCallback; // User selected window settings int fullscreen; // Fullscreen flag int mouseLock; // Mouse-lock flag int autoPollEvents; // Auto polling flag int sysKeysDisabled; // System keys disabled flag int windowNoResize; // Resize- and maximize gadgets disabled flag int refreshRate; // Vertical monitor refresh rate // Window status & parameters int opened; // Flag telling if window is opened or not int active; // Application active flag int iconified; // Window iconified flag int width, height; // Window width and heigth int accelerated; // GL_TRUE if window is HW accelerated // Framebuffer attributes int redBits; int greenBits; int blueBits; int alphaBits; int depthBits; int stencilBits; int accumRedBits; int accumGreenBits; int accumBlueBits; int accumAlphaBits; int auxBuffers; int stereo; int samples; // OpenGL extensions and context attributes int has_GL_SGIS_generate_mipmap; int has_GL_ARB_texture_non_power_of_two; int glMajor, glMinor, glRevision; int glForward, glDebug, glProfile; PFNGLGETSTRINGIPROC GetStringi; // ========= PLATFORM SPECIFIC PART ====================================== // Platform specific window resources Colormap colormap; // Window colormap Window window; // Window Window root; // Root window for screen int screen; // Screen ID XVisualInfo *visual; // Visual for selected GLXFBConfig GLXFBConfigID fbconfigID; // ID of selected GLXFBConfig GLXContext context; // OpenGL rendering context Atom wmDeleteWindow; // WM_DELETE_WINDOW atom Atom wmPing; // _NET_WM_PING atom Atom wmState; // _NET_WM_STATE atom Atom wmStateFullscreen; // _NET_WM_STATE_FULLSCREEN atom Atom wmActiveWindow; // _NET_ACTIVE_WINDOW atom Cursor cursor; // Invisible cursor for hidden cursor // GLX extensions PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI; PFNGLXGETFBCONFIGATTRIBSGIXPROC GetFBConfigAttribSGIX; PFNGLXCHOOSEFBCONFIGSGIXPROC ChooseFBConfigSGIX; PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC CreateContextWithConfigSGIX; PFNGLXGETVISUALFROMFBCONFIGSGIXPROC GetVisualFromFBConfigSGIX; PFNGLXCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB; GLboolean has_GLX_SGIX_fbconfig; GLboolean has_GLX_SGI_swap_control; GLboolean has_GLX_ARB_multisample; GLboolean has_GLX_ARB_create_context; GLboolean has_GLX_ARB_create_context_profile; // Various platform specific internal variables GLboolean hasEWMH; // True if window manager supports EWMH GLboolean overrideRedirect; // True if window is OverrideRedirect GLboolean keyboardGrabbed; // True if keyboard is currently grabbed GLboolean pointerGrabbed; // True if pointer is currently grabbed GLboolean pointerHidden; // True if pointer is currently hidden // Screensaver data struct { int changed; int timeout; int interval; int blanking; int exposure; } Saver; // Fullscreen data struct { int modeChanged; #if defined( _GLFW_HAS_XF86VIDMODE ) XF86VidModeModeInfo oldMode; #endif #if defined( _GLFW_HAS_XRANDR ) SizeID oldSizeID; int oldWidth; int oldHeight; Rotation oldRotation; #endif } FS; }; GLFWGLOBAL _GLFWwin _glfwWin; //------------------------------------------------------------------------ // User input status (most of this should go in _GLFWwin) //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Mouse status int MousePosX, MousePosY; int WheelPos; char MouseButton[ GLFW_MOUSE_BUTTON_LAST+1 ]; // Keyboard status char Key[ GLFW_KEY_LAST+1 ]; int LastChar; // User selected settings int StickyKeys; int StickyMouseButtons; int KeyRepeat; // ========= PLATFORM SPECIFIC PART ====================================== // Platform specific internal variables int MouseMoved, CursorPosX, CursorPosY; } _glfwInput; //------------------------------------------------------------------------ // Library global data //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Window opening hints _GLFWhints hints; // ========= PLATFORM SPECIFIC PART ====================================== Display *display; // Server-side GLX version int glxMajor, glxMinor; struct { int available; int eventBase; int errorBase; } XF86VidMode; struct { int available; int eventBase; int errorBase; } XRandR; // Timer data struct { double resolution; long long t0; } Timer; #if defined(_GLFW_HAS_DLOPEN) struct { void *libGL; // dlopen handle for libGL.so } Libs; #endif } _glfwLibrary; //------------------------------------------------------------------------ // Thread record (one for each thread) //------------------------------------------------------------------------ typedef struct _GLFWthread_struct _GLFWthread; struct _GLFWthread_struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Pointer to previous and next threads in linked list _GLFWthread *Previous, *Next; // GLFW user side thread information GLFWthread ID; GLFWthreadfun Function; // ========= PLATFORM SPECIFIC PART ====================================== // System side thread information #ifdef _GLFW_HAS_PTHREAD pthread_t PosixID; #endif }; //------------------------------------------------------------------------ // General thread information //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Next thread ID to use (increments for every created thread) GLFWthread NextID; // First thread in linked list (always the main thread) _GLFWthread First; // ========= PLATFORM SPECIFIC PART ====================================== // Critical section lock #ifdef _GLFW_HAS_PTHREAD pthread_mutex_t CriticalSection; #endif } _glfwThrd; //------------------------------------------------------------------------ // Joystick information & state //------------------------------------------------------------------------ GLFWGLOBAL struct { int Present; int fd; int NumAxes; int NumButtons; float *Axis; unsigned char *Button; } _glfwJoy[ GLFW_JOYSTICK_LAST + 1 ]; //======================================================================== // Macros for encapsulating critical code sections (i.e. making parts // of GLFW thread safe) //======================================================================== // Thread list management #ifdef _GLFW_HAS_PTHREAD #define ENTER_THREAD_CRITICAL_SECTION \ pthread_mutex_lock( &_glfwThrd.CriticalSection ); #define LEAVE_THREAD_CRITICAL_SECTION \ pthread_mutex_unlock( &_glfwThrd.CriticalSection ); #else #define ENTER_THREAD_CRITICAL_SECTION #define LEAVE_THREAD_CRITICAL_SECTION #endif //======================================================================== // Prototypes for platform specific internal functions //======================================================================== // Time void _glfwInitTimer( void ); // Fullscreen support int _glfwGetClosestVideoMode( int screen, int *width, int *height, int *rate ); void _glfwSetVideoModeMODE( int screen, int mode, int rate ); void _glfwSetVideoMode( int screen, int *width, int *height, int *rate ); void _glfwRestoreVideoMode( void ); // Joystick input void _glfwInitJoysticks( void ); void _glfwTerminateJoysticks( void ); // Unicode support long _glfwKeySym2Unicode( KeySym keysym ); #endif // _platform_h_ glfw-2.7.2/lib/image.c0000644000175000017500000004241011577631171015461 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== //======================================================================== // Description: // // This module acts as an interface for different image file formats (the // image file format is detected automatically). // // By default the loaded image is rescaled (using bilinear interpolation) // to the next higher 2^N x 2^M resolution, unless it has a valid // 2^N x 2^M resolution. The interpolation is quite slow, even if the // routine has been optimized for speed (a 200x200 RGB image is scaled to // 256x256 in ~30 ms on a P3-500). // // Paletted images are converted to RGB/RGBA images. // // A convenience function is also included (glfwLoadTexture2D), which // loads a texture image from a file directly to OpenGL texture memory, // with an option to generate all mipmap levels. GL_SGIS_generate_mipmap // is used whenever available, which should give an optimal mipmap // generation speed (possibly performed in hardware). A software fallback // method is included when GL_SGIS_generate_mipmap is not supported (it // generates all mipmaps of a 256x256 RGB texture in ~3 ms on a P3-500). // //======================================================================== #include "internal.h" // We want to support automatic mipmap generation #ifndef GL_SGIS_generate_mipmap #define GL_GENERATE_MIPMAP_SGIS 0x8191 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 #define GL_SGIS_generate_mipmap 1 #endif // GL_SGIS_generate_mipmap //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Upsample image, from size w1 x h1 to w2 x h2 //======================================================================== static void UpsampleImage( unsigned char *src, unsigned char *dst, int w1, int h1, int w2, int h2, int bpp ) { int m, n, k, x, y, col8; float dx, dy, xstep, ystep, col, col1, col2; unsigned char *src1, *src2, *src3, *src4; // Calculate scaling factor xstep = (float)(w1-1) / (float)(w2-1); ystep = (float)(h1-1) / (float)(h2-1); // Copy source data to destination data with bilinear interpolation // Note: The rather strange look of this routine is a direct result of // my attempts at optimizing it. Improvements are welcome! dy = 0.0f; y = 0; for( n = 0; n < h2; n ++ ) { dx = 0.0f; src1 = &src[ y*w1*bpp ]; src3 = y < (h1-1) ? src1 + w1*bpp : src1; src2 = src1 + bpp; src4 = src3 + bpp; x = 0; for( m = 0; m < w2; m ++ ) { for( k = 0; k < bpp; k ++ ) { col1 = *src1 ++; col2 = *src2 ++; col = col1 + (col2 - col1) * dx; col1 = *src3 ++; col2 = *src4 ++; col2 = col1 + (col2 - col1) * dx; col += (col2 - col) * dy; col8 = (int) (col + 0.5); if( col8 >= 256 ) col8 = 255; *dst++ = (unsigned char) col8; } dx += xstep; if( dx >= 1.0f ) { x ++; dx -= 1.0f; if( x >= (w1-1) ) { src2 = src1; src4 = src3; } } else { src1 -= bpp; src2 -= bpp; src3 -= bpp; src4 -= bpp; } } dy += ystep; if( dy >= 1.0f ) { y ++; dy -= 1.0f; } } } //======================================================================== // Build the next mip-map level //======================================================================== static int HalveImage( GLubyte *src, int *width, int *height, int components ) { int halfwidth, halfheight, m, n, k, idx1, idx2; GLubyte *dst; // Last level? if( *width <= 1 && *height <= 1 ) { return GL_FALSE; } // Calculate new width and height (handle 1D case) halfwidth = *width > 1 ? *width / 2 : 1; halfheight = *height > 1 ? *height / 2 : 1; // Downsample image with a simple box-filter dst = src; if( *width == 1 || *height == 1 ) { // 1D case for( m = 0; m < halfwidth+halfheight-1; m ++ ) { for( k = 0; k < components; k ++ ) { *dst ++ = (GLubyte) (((int)*src + (int)src[components] + 1) >> 1); src ++; } src += components; } } else { // 2D case idx1 = *width*components; idx2 = (*width+1)*components; for( m = 0; m < halfheight; m ++ ) { for( n = 0; n < halfwidth; n ++ ) { for( k = 0; k < components; k ++ ) { *dst ++ = (GLubyte) (((int)*src + (int)src[components] + (int)src[idx1] + (int)src[idx2] + 2) >> 2); src ++; } src += components; } src += components * (*width); } } // Return new width and height *width = halfwidth; *height = halfheight; return GL_TRUE; } //======================================================================== // Rescales an image into power-of-two dimensions //======================================================================== static int RescaleImage( GLFWimage* image ) { int width, height, log2, newsize; unsigned char *data; // Calculate next larger 2^N width for( log2 = 0, width = image->Width; width > 1; width >>= 1, log2 ++ ) ; width = (int) 1 << log2; if( width < image->Width ) { width <<= 1; } // Calculate next larger 2^M height for( log2 = 0, height = image->Height; height > 1; height >>= 1, log2 ++ ) ; height = (int) 1 << log2; if( height < image->Height ) { height <<= 1; } // Do we really need to rescale? if( width != image->Width || height != image->Height ) { // Allocate memory for new (upsampled) image data newsize = width * height * image->BytesPerPixel; data = (unsigned char *) malloc( newsize ); if( data == NULL ) { free( image->Data ); return GL_FALSE; } // Copy old image data to new image data with interpolation UpsampleImage( image->Data, data, image->Width, image->Height, width, height, image->BytesPerPixel ); // Free memory for old image data (not needed anymore) free( image->Data ); // Set pointer to new image data, and set new image dimensions image->Data = data; image->Width = width; image->Height = height; } return GL_TRUE; } //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Read an image from a named file //======================================================================== GLFWAPI int GLFWAPIENTRY glfwReadImage( const char *name, GLFWimage *img, int flags ) { _GLFWstream stream; // Is GLFW initialized? if( !_glfwInitialized ) { return GL_FALSE; } // Start with an empty image descriptor img->Width = 0; img->Height = 0; img->BytesPerPixel = 0; img->Data = NULL; // Open file if( !_glfwOpenFileStream( &stream, name, "rb" ) ) { return GL_FALSE; } // We only support TGA files at the moment if( !_glfwReadTGA( &stream, img, flags ) ) { _glfwCloseStream( &stream ); return GL_FALSE; } // Close stream _glfwCloseStream( &stream ); // Should we rescale the image to closest 2^N x 2^M resolution? if( !(flags & GLFW_NO_RESCALE_BIT) ) { if( !RescaleImage( img ) ) { return GL_FALSE; } } // Interpret BytesPerPixel as an OpenGL format switch( img->BytesPerPixel ) { default: case 1: if( flags & GLFW_ALPHA_MAP_BIT ) { img->Format = GL_ALPHA; } else { img->Format = GL_LUMINANCE; } break; case 3: img->Format = GL_RGB; break; case 4: img->Format = GL_RGBA; break; } return GL_TRUE; } //======================================================================== // Read an image file from a memory buffer //======================================================================== GLFWAPI int GLFWAPIENTRY glfwReadMemoryImage( const void *data, long size, GLFWimage *img, int flags ) { _GLFWstream stream; // Is GLFW initialized? if( !_glfwInitialized ) { return GL_FALSE; } // Start with an empty image descriptor img->Width = 0; img->Height = 0; img->BytesPerPixel = 0; img->Data = NULL; // Open buffer if( !_glfwOpenBufferStream( &stream, (void*) data, size ) ) { return GL_FALSE; } // We only support TGA files at the moment if( !_glfwReadTGA( &stream, img, flags ) ) { _glfwCloseStream( &stream ); return GL_FALSE; } // Close stream _glfwCloseStream( &stream ); // Should we rescale the image to closest 2^N x 2^M resolution? if( !(flags & GLFW_NO_RESCALE_BIT) ) { if( !RescaleImage( img ) ) { return GL_FALSE; } } // Interpret BytesPerPixel as an OpenGL format switch( img->BytesPerPixel ) { default: case 1: if( flags & GLFW_ALPHA_MAP_BIT ) { img->Format = GL_ALPHA; } else { img->Format = GL_LUMINANCE; } break; case 3: img->Format = GL_RGB; break; case 4: img->Format = GL_RGBA; break; } return GL_TRUE; } //======================================================================== // Free allocated memory for an image //======================================================================== GLFWAPI void GLFWAPIENTRY glfwFreeImage( GLFWimage *img ) { // Is GLFW initialized? if( !_glfwInitialized ) { return; } // Free memory if( img->Data != NULL ) { free( img->Data ); img->Data = NULL; } // Clear all fields img->Width = 0; img->Height = 0; img->Format = 0; img->BytesPerPixel = 0; } //======================================================================== // Read an image from a file, and upload it to texture memory //======================================================================== GLFWAPI int GLFWAPIENTRY glfwLoadTexture2D( const char *name, int flags ) { GLFWimage img; // Is GLFW initialized? if( !_glfwInitialized || !_glfwWin.opened ) { return GL_FALSE; } // Force rescaling if necessary if( !_glfwWin.has_GL_ARB_texture_non_power_of_two ) { flags &= (~GLFW_NO_RESCALE_BIT); } // Read image from file if( !glfwReadImage( name, &img, flags ) ) { return GL_FALSE; } if( !glfwLoadTextureImage2D( &img, flags ) ) { return GL_FALSE; } // Data buffer is not needed anymore glfwFreeImage( &img ); return GL_TRUE; } //======================================================================== // Read an image from a buffer, and upload it to texture memory //======================================================================== GLFWAPI int GLFWAPIENTRY glfwLoadMemoryTexture2D( const void *data, long size, int flags ) { GLFWimage img; // Is GLFW initialized? if( !_glfwInitialized || !_glfwWin.opened ) { return GL_FALSE; } // Force rescaling if necessary if( !_glfwWin.has_GL_ARB_texture_non_power_of_two ) { flags &= (~GLFW_NO_RESCALE_BIT); } // Read image from file if( !glfwReadMemoryImage( data, size, &img, flags ) ) { return GL_FALSE; } if( !glfwLoadTextureImage2D( &img, flags ) ) { return GL_FALSE; } // Data buffer is not needed anymore glfwFreeImage( &img ); return GL_TRUE; } //======================================================================== // Upload an image object to texture memory //======================================================================== GLFWAPI int GLFWAPIENTRY glfwLoadTextureImage2D( GLFWimage *img, int flags ) { GLint UnpackAlignment, GenMipMap; int level, format, AutoGen, newsize, n; unsigned char *data, *dataptr; // Is GLFW initialized? if( !_glfwInitialized || !_glfwWin.opened ) { return GL_FALSE; } // TODO: Use GL_MAX_TEXTURE_SIZE or GL_PROXY_TEXTURE_2D to determine // whether the image size is valid. // NOTE: May require box filter downsampling routine. // Do we need to convert the alpha map to RGBA format (OpenGL 1.0)? if( (_glfwWin.glMajor == 1) && (_glfwWin.glMinor == 0) && (img->Format == GL_ALPHA) ) { // We go to RGBA representation instead img->BytesPerPixel = 4; // Allocate memory for new RGBA image data newsize = img->Width * img->Height * img->BytesPerPixel; data = (unsigned char *) malloc( newsize ); if( data == NULL ) { free( img->Data ); return GL_FALSE; } // Convert Alpha map to RGBA dataptr = data; for( n = 0; n < (img->Width*img->Height); ++ n ) { *dataptr ++ = 255; *dataptr ++ = 255; *dataptr ++ = 255; *dataptr ++ = img->Data[n]; } // Free memory for old image data (not needed anymore) free( img->Data ); // Set pointer to new image data img->Data = data; } // Set unpack alignment to one byte glGetIntegerv( GL_UNPACK_ALIGNMENT, &UnpackAlignment ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); // Should we use automatic mipmap generation? AutoGen = ( flags & GLFW_BUILD_MIPMAPS_BIT ) && _glfwWin.has_GL_SGIS_generate_mipmap; // Enable automatic mipmap generation if( AutoGen ) { glGetTexParameteriv( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, &GenMipMap ); glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE ); } // Format specification is different for OpenGL 1.0 if( _glfwWin.glMajor == 1 && _glfwWin.glMinor == 0 ) { format = img->BytesPerPixel; } else { format = img->Format; } // Upload to texture memeory level = 0; do { // Upload this mipmap level glTexImage2D( GL_TEXTURE_2D, level, format, img->Width, img->Height, 0, format, GL_UNSIGNED_BYTE, (void*) img->Data ); // Build next mipmap level manually, if required if( ( flags & GLFW_BUILD_MIPMAPS_BIT ) && !AutoGen ) { level = HalveImage( img->Data, &img->Width, &img->Height, img->BytesPerPixel ) ? level + 1 : 0; } } while( level != 0 ); // Restore old automatic mipmap generation state if( AutoGen ) { glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GenMipMap ); } // Restore old unpack alignment glPixelStorei( GL_UNPACK_ALIGNMENT, UnpackAlignment ); return GL_TRUE; } glfw-2.7.2/lib/time.c0000644000175000017500000000516611577631171015344 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Return timer value in seconds //======================================================================== GLFWAPI double GLFWAPIENTRY glfwGetTime( void ) { // Is GLFW initialized? if( !_glfwInitialized ) { return 0.0; } return _glfwPlatformGetTime(); } //======================================================================== // Set timer value in seconds //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetTime( double time ) { // Is GLFW initialized? if( !_glfwInitialized ) { return; } _glfwPlatformSetTime( time ); } //======================================================================== // Put a thread to sleep for a specified amount of time //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSleep( double time ) { // Is GLFW initialized? if( !_glfwInitialized ) { return; } _glfwPlatformSleep( time ); } glfw-2.7.2/lib/input.c0000644000175000017500000001606611577631171015546 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //======================================================================== // Return key state //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetKey( int key ) { if( !_glfwInitialized || !_glfwWin.opened ) { return GLFW_RELEASE; } // Is it a valid key? if( key < 0 || key > GLFW_KEY_LAST ) { return GLFW_RELEASE; } if( _glfwInput.Key[ key ] == GLFW_STICK ) { // Sticky mode: release key now _glfwInput.Key[ key ] = GLFW_RELEASE; return GLFW_PRESS; } return (int) _glfwInput.Key[ key ]; } //======================================================================== // Return mouse button state //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetMouseButton( int button ) { if( !_glfwInitialized || !_glfwWin.opened ) { return GLFW_RELEASE; } // Is it a valid mouse button? if( button < 0 || button > GLFW_MOUSE_BUTTON_LAST ) { return GLFW_RELEASE; } if( _glfwInput.MouseButton[ button ] == GLFW_STICK ) { // Sticky mode: release mouse button now _glfwInput.MouseButton[ button ] = GLFW_RELEASE; return GLFW_PRESS; } return (int) _glfwInput.MouseButton[ button ]; } //======================================================================== // Return mouse cursor position //======================================================================== GLFWAPI void GLFWAPIENTRY glfwGetMousePos( int *xpos, int *ypos ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Return mouse position if( xpos != NULL ) { *xpos = _glfwInput.MousePosX; } if( ypos != NULL ) { *ypos = _glfwInput.MousePosY; } } //======================================================================== // Sets the mouse cursor position //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetMousePos( int xpos, int ypos ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Don't do anything if the mouse position did not change if( xpos == _glfwInput.MousePosX && ypos == _glfwInput.MousePosY ) { return; } // Set GLFW mouse position _glfwInput.MousePosX = xpos; _glfwInput.MousePosY = ypos; // If we have a locked mouse, do not change cursor position if( _glfwWin.mouseLock ) { return; } // Update physical cursor position _glfwPlatformSetMouseCursorPos( xpos, ypos ); } //======================================================================== // Return mouse wheel position //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetMouseWheel( void ) { if( !_glfwInitialized || !_glfwWin.opened ) { return 0; } // Return mouse wheel position return _glfwInput.WheelPos; } //======================================================================== // Set mouse wheel position //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetMouseWheel( int pos ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set mouse wheel position _glfwInput.WheelPos = pos; } //======================================================================== // Set callback function for keyboard input //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetKeyCallback( GLFWkeyfun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.keyCallback = cbfun; } //======================================================================== // Set callback function for character input //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetCharCallback( GLFWcharfun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.charCallback = cbfun; } //======================================================================== // Set callback function for mouse clicks //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.mouseButtonCallback = cbfun; } //======================================================================== // Set callback function for mouse moves //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetMousePosCallback( GLFWmouseposfun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.mousePosCallback = cbfun; // Call the callback function to let the application know the current // mouse position if( cbfun ) { cbfun( _glfwInput.MousePosX, _glfwInput.MousePosY ); } } //======================================================================== // Set callback function for mouse wheel //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetMouseWheelCallback( GLFWmousewheelfun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.mouseWheelCallback = cbfun; // Call the callback function to let the application know the current // mouse wheel position if( cbfun ) { cbfun( _glfwInput.WheelPos ); } } glfw-2.7.2/lib/joystick.c0000644000175000017500000000602111577631171016234 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Determine joystick capabilities //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetJoystickParam( int joy, int param ) { if( !_glfwInitialized ) { return 0; } return _glfwPlatformGetJoystickParam( joy, param ); } //======================================================================== // Get joystick axis positions //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetJoystickPos( int joy, float *pos, int numaxes ) { int i; if( !_glfwInitialized ) { return 0; } // Clear positions for( i = 0; i < numaxes; i++ ) { pos[ i ] = 0.0f; } return _glfwPlatformGetJoystickPos( joy, pos, numaxes ); } //======================================================================== // Get joystick button states //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ) { int i; if( !_glfwInitialized ) { return 0; } // Clear button states for( i = 0; i < numbuttons; i++ ) { buttons[ i ] = GLFW_RELEASE; } return _glfwPlatformGetJoystickButtons( joy, buttons, numbuttons ); } glfw-2.7.2/lib/glext.c0000644000175000017500000001775711577631171015542 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ #ifndef GL_VERSION_3_0 #define GL_NUM_EXTENSIONS 0x821D #define GL_CONTEXT_FLAGS 0x821E #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 #endif #ifndef GL_VERSION_3_2 #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 #define GL_CONTEXT_PROFILE_MASK 0x9126 #endif //======================================================================== // Parses the OpenGL version string and extracts the version number //======================================================================== void _glfwParseGLVersion( int *major, int *minor, int *rev ) { GLuint _major, _minor = 0, _rev = 0; const GLubyte *version; const GLubyte *ptr; // Get OpenGL version string version = glGetString( GL_VERSION ); if( !version ) { return; } // Parse string ptr = version; for( _major = 0; *ptr >= '0' && *ptr <= '9'; ptr ++ ) { _major = 10*_major + (*ptr - '0'); } if( *ptr == '.' ) { ptr ++; for( _minor = 0; *ptr >= '0' && *ptr <= '9'; ptr ++ ) { _minor = 10*_minor + (*ptr - '0'); } if( *ptr == '.' ) { ptr ++; for( _rev = 0; *ptr >= '0' && *ptr <= '9'; ptr ++ ) { _rev = 10*_rev + (*ptr - '0'); } } } // Return parsed values *major = _major; *minor = _minor; *rev = _rev; } //======================================================================== // Check if a string can be found in an OpenGL extension string //======================================================================== int _glfwStringInExtensionString( const char *string, const GLubyte *extensions ) { const GLubyte *start; GLubyte *where, *terminator; // It takes a bit of care to be fool-proof about parsing the // OpenGL extensions string. Don't be fooled by sub-strings, // etc. start = extensions; while( 1 ) { where = (GLubyte *) strstr( (const char *) start, string ); if( !where ) { return GL_FALSE; } terminator = where + strlen( string ); if( where == start || *(where - 1) == ' ' ) { if( *terminator == ' ' || *terminator == '\0' ) { break; } } start = terminator; } return GL_TRUE; } //======================================================================== // Reads back OpenGL context properties from the current context //======================================================================== void _glfwRefreshContextParams( void ) { _glfwParseGLVersion( &_glfwWin.glMajor, &_glfwWin.glMinor, &_glfwWin.glRevision ); _glfwWin.glProfile = 0; _glfwWin.glForward = GL_FALSE; // Read back the context profile, if applicable if( _glfwWin.glMajor >= 3 ) { GLint flags; glGetIntegerv( GL_CONTEXT_FLAGS, &flags ); if( flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT ) { _glfwWin.glForward = GL_TRUE; } } if( _glfwWin.glMajor > 3 || ( _glfwWin.glMajor == 3 && _glfwWin.glMinor >= 2 ) ) { GLint mask; glGetIntegerv( GL_CONTEXT_PROFILE_MASK, &mask ); if( mask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT ) { _glfwWin.glProfile = GLFW_OPENGL_COMPAT_PROFILE; } else if( mask & GL_CONTEXT_CORE_PROFILE_BIT ) { _glfwWin.glProfile = GLFW_OPENGL_CORE_PROFILE; } } } //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Check if an OpenGL extension is available at runtime //======================================================================== GLFWAPI int GLFWAPIENTRY glfwExtensionSupported( const char *extension ) { const GLubyte *extensions; GLubyte *where; GLint count; int i; // Is GLFW initialized? if( !_glfwInitialized || !_glfwWin.opened ) { return GL_FALSE; } // Extension names should not have spaces where = (GLubyte *) strchr( extension, ' ' ); if( where || *extension == '\0' ) { return GL_FALSE; } if( _glfwWin.glMajor < 3 ) { // Check if extension is in the old style OpenGL extensions string extensions = glGetString( GL_EXTENSIONS ); if( extensions != NULL ) { if( _glfwStringInExtensionString( extension, extensions ) ) { return GL_TRUE; } } } else { // Check if extension is in the modern OpenGL extensions string list glGetIntegerv( GL_NUM_EXTENSIONS, &count ); for( i = 0; i < count; i++ ) { if( strcmp( (const char*) _glfwWin.GetStringi( GL_EXTENSIONS, i ), extension ) == 0 ) { return GL_TRUE; } } } // Additional platform specific extension checking (e.g. WGL) if( _glfwPlatformExtensionSupported( extension ) ) { return GL_TRUE; } return GL_FALSE; } //======================================================================== // Get the function pointer to an OpenGL function. This function can be // used to get access to extended OpenGL functions. //======================================================================== GLFWAPI void * GLFWAPIENTRY glfwGetProcAddress( const char *procname ) { // Is GLFW initialized? if( !_glfwInitialized || !_glfwWin.opened ) { return NULL; } return _glfwPlatformGetProcAddress( procname ); } //======================================================================== // Returns the OpenGL version //======================================================================== GLFWAPI void GLFWAPIENTRY glfwGetGLVersion( int *major, int *minor, int *rev ) { // Is GLFW initialized? if( !_glfwInitialized || !_glfwWin.opened ) { return; } if( major != NULL ) { *major = _glfwWin.glMajor; } if( minor != NULL ) { *minor = _glfwWin.glMinor; } if( rev != NULL ) { *rev = _glfwWin.glRevision; } } glfw-2.7.2/lib/internal.h0000644000175000017500000002306711560541566016227 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #ifndef _internal_h_ #define _internal_h_ //======================================================================== // GLFWGLOBAL is a macro that places all global variables in the init.c // module (all other modules reference global variables as 'extern') //======================================================================== #if defined( _init_c_ ) #define GLFWGLOBAL #else #define GLFWGLOBAL extern #endif //======================================================================== // Input handling definitions //======================================================================== // Internal key and button state/action definitions #define GLFW_STICK 2 //======================================================================== // System independent include files //======================================================================== #include #include #include //------------------------------------------------------------------------ // Window opening hints (set by glfwOpenWindowHint) // A bucket of semi-random stuff bunched together for historical reasons // This is used only by the platform independent code and only to store // parameters passed to us by glfwOpenWindowHint //------------------------------------------------------------------------ typedef struct { int refreshRate; int accumRedBits; int accumGreenBits; int accumBlueBits; int accumAlphaBits; int auxBuffers; int stereo; int windowNoResize; int samples; int glMajor; int glMinor; int glForward; int glDebug; int glProfile; } _GLFWhints; //------------------------------------------------------------------------ // Platform specific definitions goes in platform.h (which also includes // glfw.h) //------------------------------------------------------------------------ #include "platform.h" //------------------------------------------------------------------------ // Parameters relating to the creation of the context and window but not // directly related to the properties of the framebuffer // This is used to pass window and context creation parameters from the // platform independent code to the platform specific code //------------------------------------------------------------------------ typedef struct { int mode; int refreshRate; int windowNoResize; int glMajor; int glMinor; int glForward; int glDebug; int glProfile; } _GLFWwndconfig; //------------------------------------------------------------------------ // Framebuffer configuration descriptor, i.e. buffers and their sizes // Also a platform specific ID used to map back to the actual backend APIs // This is used to pass framebuffer parameters from the platform independent // code to the platform specific code, and also to enumerate and select // available framebuffer configurations //------------------------------------------------------------------------ typedef struct { int redBits; int greenBits; int blueBits; int alphaBits; int depthBits; int stencilBits; int accumRedBits; int accumGreenBits; int accumBlueBits; int accumAlphaBits; int auxBuffers; int stereo; int samples; GLFWintptr platformID; } _GLFWfbconfig; //======================================================================== // System independent global variables (GLFW internals) //======================================================================== // Flag indicating if GLFW has been initialized #if defined( _init_c_ ) int _glfwInitialized = 0; #else GLFWGLOBAL int _glfwInitialized; #endif //------------------------------------------------------------------------ // Abstract data stream (for image I/O) //------------------------------------------------------------------------ typedef struct { FILE* file; void* data; long position; long size; } _GLFWstream; //======================================================================== // Prototypes for platform specific implementation functions //======================================================================== // Init/terminate int _glfwPlatformInit( void ); int _glfwPlatformTerminate( void ); // Enable/Disable void _glfwPlatformEnableSystemKeys( void ); void _glfwPlatformDisableSystemKeys( void ); // Fullscreen int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ); void _glfwPlatformGetDesktopMode( GLFWvidmode *mode ); // OpenGL extensions int _glfwPlatformExtensionSupported( const char *extension ); void * _glfwPlatformGetProcAddress( const char *procname ); // Joystick int _glfwPlatformGetJoystickParam( int joy, int param ); int _glfwPlatformGetJoystickPos( int joy, float *pos, int numaxes ); int _glfwPlatformGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ); // Threads GLFWthread _glfwPlatformCreateThread( GLFWthreadfun fun, void *arg ); void _glfwPlatformDestroyThread( GLFWthread ID ); int _glfwPlatformWaitThread( GLFWthread ID, int waitmode ); GLFWthread _glfwPlatformGetThreadID( void ); GLFWmutex _glfwPlatformCreateMutex( void ); void _glfwPlatformDestroyMutex( GLFWmutex mutex ); void _glfwPlatformLockMutex( GLFWmutex mutex ); void _glfwPlatformUnlockMutex( GLFWmutex mutex ); GLFWcond _glfwPlatformCreateCond( void ); void _glfwPlatformDestroyCond( GLFWcond cond ); void _glfwPlatformWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ); void _glfwPlatformSignalCond( GLFWcond cond ); void _glfwPlatformBroadcastCond( GLFWcond cond ); int _glfwPlatformGetNumberOfProcessors( void ); // Time double _glfwPlatformGetTime( void ); void _glfwPlatformSetTime( double time ); void _glfwPlatformSleep( double time ); // Window management int _glfwPlatformOpenWindow( int width, int height, const _GLFWwndconfig *wndconfig, const _GLFWfbconfig *fbconfig ); void _glfwPlatformCloseWindow( void ); void _glfwPlatformSetWindowTitle( const char *title ); void _glfwPlatformSetWindowSize( int width, int height ); void _glfwPlatformSetWindowPos( int x, int y ); void _glfwPlatformIconifyWindow( void ); void _glfwPlatformRestoreWindow( void ); void _glfwPlatformSwapBuffers( void ); void _glfwPlatformSwapInterval( int interval ); void _glfwPlatformRefreshWindowParams( void ); void _glfwPlatformPollEvents( void ); void _glfwPlatformWaitEvents( void ); void _glfwPlatformHideMouseCursor( void ); void _glfwPlatformShowMouseCursor( void ); void _glfwPlatformSetMouseCursorPos( int x, int y ); //======================================================================== // Prototypes for platform independent internal functions //======================================================================== // Window management (window.c) void _glfwClearWindowHints( void ); // Input handling (window.c) void _glfwClearInput( void ); void _glfwInputDeactivation( void ); void _glfwInputKey( int key, int action ); void _glfwInputChar( int character, int action ); void _glfwInputMouseClick( int button, int action ); // Threads (thread.c) _GLFWthread * _glfwGetThreadPointer( int ID ); void _glfwAppendThread( _GLFWthread * t ); void _glfwRemoveThread( _GLFWthread * t ); // OpenGL extensions (glext.c) void _glfwParseGLVersion( int *major, int *minor, int *rev ); int _glfwStringInExtensionString( const char *string, const GLubyte *extensions ); void _glfwRefreshContextParams( void ); // Abstracted data streams (stream.c) int _glfwOpenFileStream( _GLFWstream *stream, const char *name, const char *mode ); int _glfwOpenBufferStream( _GLFWstream *stream, void *data, long size ); long _glfwReadStream( _GLFWstream *stream, void *data, long size ); long _glfwTellStream( _GLFWstream *stream ); int _glfwSeekStream( _GLFWstream *stream, long offset, int whence ); void _glfwCloseStream( _GLFWstream *stream ); // Targa image I/O (tga.c) int _glfwReadTGA( _GLFWstream *s, GLFWimage *img, int flags ); // Framebuffer configs const _GLFWfbconfig *_glfwChooseFBConfig( const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count ); #endif // _internal_h_ glfw-2.7.2/lib/win32/0000755000175000017500000000000011621215251015157 5ustar elmindredaelmindredaglfw-2.7.2/lib/win32/glfwdll_mgw1.def0000644000175000017500000000500110610526460020225 0ustar elmindredaelmindredaLIBRARY GLFW.DLL EXPORTS glfwBroadcastCond = glfwBroadcastCond@4 glfwCloseWindow = glfwCloseWindow@0 glfwCreateCond = glfwCreateCond@0 glfwCreateMutex = glfwCreateMutex@0 glfwCreateThread = glfwCreateThread@8 glfwDestroyCond = glfwDestroyCond@4 glfwDestroyMutex = glfwDestroyMutex@4 glfwDestroyThread = glfwDestroyThread@4 glfwDisable = glfwDisable@4 glfwEnable = glfwEnable@4 glfwExtensionSupported = glfwExtensionSupported@4 glfwFreeImage = glfwFreeImage@4 glfwGetDesktopMode = glfwGetDesktopMode@4 glfwGetGLVersion = glfwGetGLVersion@12 glfwGetJoystickButtons = glfwGetJoystickButtons@12 glfwGetJoystickParam = glfwGetJoystickParam@8 glfwGetJoystickPos = glfwGetJoystickPos@12 glfwGetKey = glfwGetKey@4 glfwGetMouseButton = glfwGetMouseButton@4 glfwGetMousePos = glfwGetMousePos@8 glfwGetMouseWheel = glfwGetMouseWheel@0 glfwGetNumberOfProcessors = glfwGetNumberOfProcessors@0 glfwGetProcAddress = glfwGetProcAddress@4 glfwGetThreadID = glfwGetThreadID@0 glfwGetTime = glfwGetTime@0 glfwGetVersion = glfwGetVersion@12 glfwGetVideoModes = glfwGetVideoModes@8 glfwGetWindowParam = glfwGetWindowParam@4 glfwGetWindowSize = glfwGetWindowSize@8 glfwIconifyWindow = glfwIconifyWindow@0 glfwInit = glfwInit@0 glfwLoadMemoryTexture2D = glfwLoadMemoryTexture2D@12 glfwLoadTexture2D = glfwLoadTexture2D@8 glfwLoadTextureImage2D = glfwLoadTextureImage2D@8 glfwLockMutex = glfwLockMutex@4 glfwOpenWindow = glfwOpenWindow@36 glfwOpenWindowHint = glfwOpenWindowHint@8 glfwPollEvents = glfwPollEvents@0 glfwReadImage = glfwReadImage@12 glfwReadMemoryImage = glfwReadMemoryImage@16 glfwRestoreWindow = glfwRestoreWindow@0 glfwSetCharCallback = glfwSetCharCallback@4 glfwSetKeyCallback = glfwSetKeyCallback@4 glfwSetMouseButtonCallback = glfwSetMouseButtonCallback@4 glfwSetMousePos = glfwSetMousePos@8 glfwSetMousePosCallback = glfwSetMousePosCallback@4 glfwSetMouseWheel = glfwSetMouseWheel@4 glfwSetMouseWheelCallback = glfwSetMouseWheelCallback@4 glfwSetTime = glfwSetTime@8 glfwSetWindowCloseCallback = glfwSetWindowCloseCallback@4 glfwSetWindowRefreshCallback = glfwSetWindowRefreshCallback@4 glfwSetWindowPos = glfwSetWindowPos@8 glfwSetWindowSize = glfwSetWindowSize@8 glfwSetWindowSizeCallback = glfwSetWindowSizeCallback@4 glfwSetWindowTitle = glfwSetWindowTitle@4 glfwSignalCond = glfwSignalCond@4 glfwSleep = glfwSleep@8 glfwSwapBuffers = glfwSwapBuffers@0 glfwSwapInterval = glfwSwapInterval@4 glfwTerminate = glfwTerminate@0 glfwUnlockMutex = glfwUnlockMutex@4 glfwWaitCond = glfwWaitCond@16 glfwWaitEvents = glfwWaitEvents@0 glfwWaitThread = glfwWaitThread@8 glfw-2.7.2/lib/win32/win32_dllmain.c0000644000175000017500000000342511427547437020013 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #if defined(GLFW_BUILD_DLL) //======================================================================== // GLFW DLL entry point //======================================================================== BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, LPVOID reserved ) { // NOTE: Some compilers complains about instance and x never being used - // never mind that (we don't want to use them)! return TRUE; } #endif // GLFW_BUILD_DLL glfw-2.7.2/lib/win32/win32_window.c0000644000175000017500000016711711600370667017703 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ // We use versioned window class names in order not to cause conflicts // between applications using different versions of GLFW #define _GLFW_WNDCLASSNAME "GLFW27" //======================================================================== // Enable/disable minimize/restore animations //======================================================================== static int setMinMaxAnimations( int enable ) { ANIMATIONINFO AI; int old_enable; // Get old animation setting AI.cbSize = sizeof( ANIMATIONINFO ); SystemParametersInfo( SPI_GETANIMATION, AI.cbSize, &AI, 0 ); old_enable = AI.iMinAnimate; // If requested, change setting if( old_enable != enable ) { AI.iMinAnimate = enable; SystemParametersInfo( SPI_SETANIMATION, AI.cbSize, &AI, SPIF_SENDCHANGE ); } return old_enable; } //======================================================================== // Focus the window and bring it to the top of the stack // Due to some nastiness with how Win98/ME/2k/XP handles SetForegroundWindow, // we have to go through some really bizarre measures to achieve this //======================================================================== static void setForegroundWindow( HWND hWnd ) { int try_count = 0; int old_animate; // Try the standard approach first... BringWindowToTop( hWnd ); SetForegroundWindow( hWnd ); // If it worked, return now if( hWnd == GetForegroundWindow() ) { // Try to modify the system settings (since this is the foreground // process, we are allowed to do this) SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID)0, SPIF_SENDCHANGE ); return; } // For other Windows versions than 95 & NT4.0, the standard approach // may not work, so if we failed we have to "trick" Windows into // making our window the foureground window: Iconify and restore // again. It is ugly, but it seems to work (we turn off those annoying // zoom animations to make it look a bit better at least). // Turn off minimize/restore animations old_animate = setMinMaxAnimations( 0 ); // We try this a few times, just to be on the safe side of things... do { // Iconify & restore ShowWindow( hWnd, SW_HIDE ); ShowWindow( hWnd, SW_SHOWMINIMIZED ); ShowWindow( hWnd, SW_SHOWNORMAL ); // Try to get focus BringWindowToTop( hWnd ); SetForegroundWindow( hWnd ); // We do not want to keep going on forever, so we keep track of // how many times we tried try_count ++; } while( hWnd != GetForegroundWindow() && try_count <= 3 ); // Restore the system minimize/restore animation setting (void) setMinMaxAnimations( old_animate ); // Try to modify the system settings (since this is now hopefully the // foreground process, we are probably allowed to do this) SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID)0, SPIF_SENDCHANGE ); } //======================================================================== // Returns the specified attribute of the specified pixel format // NOTE: Do not call this unless we have found WGL_ARB_pixel_format //======================================================================== static int getPixelFormatAttrib(int pixelFormat, int attrib) { int value = 0; if( !_glfwWin.GetPixelFormatAttribivARB( _glfwWin.DC, pixelFormat, 0, 1, &attrib, &value) ) { // NOTE: We should probably handle this error somehow return 0; } return value; } //======================================================================== // Return a list of available and usable framebuffer configs //======================================================================== static _GLFWfbconfig *getFBConfigs( unsigned int *found ) { _GLFWfbconfig *result; PIXELFORMATDESCRIPTOR pfd; int i, count; *found = 0; if( _glfwWin.has_WGL_ARB_pixel_format ) { count = getPixelFormatAttrib( 1, WGL_NUMBER_PIXEL_FORMATS_ARB ); } else { count = _glfw_DescribePixelFormat( _glfwWin.DC, 1, sizeof( PIXELFORMATDESCRIPTOR ), NULL ); } if( !count ) { fprintf( stderr, "No Win32 pixel formats available\n" ); return NULL; } result = (_GLFWfbconfig*) malloc( sizeof( _GLFWfbconfig ) * count ); if( !result ) { fprintf(stderr, "Out of memory"); return NULL; } for( i = 1; i <= count; i++ ) { if( _glfwWin.has_WGL_ARB_pixel_format ) { // Get pixel format attributes through WGL_ARB_pixel_format if( !getPixelFormatAttrib( i, WGL_SUPPORT_OPENGL_ARB ) || !getPixelFormatAttrib( i, WGL_DRAW_TO_WINDOW_ARB ) || !getPixelFormatAttrib( i, WGL_DOUBLE_BUFFER_ARB ) ) { // Only consider doublebuffered OpenGL pixel formats for windows continue; } if( getPixelFormatAttrib( i, WGL_PIXEL_TYPE_ARB ) != WGL_TYPE_RGBA_ARB ) { // Only consider RGBA pixel formats continue; } // Only consider "hardware-accelerated" pixel formats if( getPixelFormatAttrib( i, WGL_ACCELERATION_ARB ) == WGL_NO_ACCELERATION_ARB ) { continue; } result[*found].redBits = getPixelFormatAttrib( i, WGL_RED_BITS_ARB ); result[*found].greenBits = getPixelFormatAttrib( i, WGL_GREEN_BITS_ARB ); result[*found].blueBits = getPixelFormatAttrib( i, WGL_BLUE_BITS_ARB ); result[*found].alphaBits = getPixelFormatAttrib( i, WGL_ALPHA_BITS_ARB ); result[*found].depthBits = getPixelFormatAttrib( i, WGL_DEPTH_BITS_ARB ); result[*found].stencilBits = getPixelFormatAttrib( i, WGL_STENCIL_BITS_ARB ); result[*found].accumRedBits = getPixelFormatAttrib( i, WGL_ACCUM_RED_BITS_ARB ); result[*found].accumGreenBits = getPixelFormatAttrib( i, WGL_ACCUM_GREEN_BITS_ARB ); result[*found].accumBlueBits = getPixelFormatAttrib( i, WGL_ACCUM_BLUE_BITS_ARB ); result[*found].accumAlphaBits = getPixelFormatAttrib( i, WGL_ACCUM_ALPHA_BITS_ARB ); result[*found].auxBuffers = getPixelFormatAttrib( i, WGL_AUX_BUFFERS_ARB ); result[*found].stereo = getPixelFormatAttrib( i, WGL_STEREO_ARB ); if( _glfwWin.has_WGL_ARB_multisample ) { result[*found].samples = getPixelFormatAttrib( i, WGL_SAMPLES_ARB ); } else { result[*found].samples = 0; } } else { // Get pixel format attributes through old-fashioned PFDs if( !_glfw_DescribePixelFormat( _glfwWin.DC, i, sizeof( PIXELFORMATDESCRIPTOR ), &pfd ) ) { continue; } if( !( pfd.dwFlags & PFD_DRAW_TO_WINDOW ) || !( pfd.dwFlags & PFD_SUPPORT_OPENGL ) || !( pfd.dwFlags & PFD_DOUBLEBUFFER ) ) { // Only consider doublebuffered OpenGL pixel formats for windows continue; } if( !( pfd.dwFlags & PFD_GENERIC_ACCELERATED ) && ( pfd.dwFlags & PFD_GENERIC_FORMAT ) ) { continue; } if( pfd.iPixelType != PFD_TYPE_RGBA ) { // Only RGBA pixel formats considered continue; } result[*found].redBits = pfd.cRedBits; result[*found].greenBits = pfd.cGreenBits; result[*found].blueBits = pfd.cBlueBits; result[*found].alphaBits = pfd.cAlphaBits; result[*found].depthBits = pfd.cDepthBits; result[*found].stencilBits = pfd.cStencilBits; result[*found].accumRedBits = pfd.cAccumRedBits; result[*found].accumGreenBits = pfd.cAccumGreenBits; result[*found].accumBlueBits = pfd.cAccumBlueBits; result[*found].accumAlphaBits = pfd.cAccumAlphaBits; result[*found].auxBuffers = pfd.cAuxBuffers; result[*found].stereo = ( pfd.dwFlags & PFD_STEREO ) ? GL_TRUE : GL_FALSE; // PFD pixel formats do not support FSAA result[*found].samples = 0; } result[*found].platformID = i; (*found)++; } return result; } //======================================================================== // Creates an OpenGL context on the specified device context //======================================================================== static GLboolean createContext( HDC dc, const _GLFWwndconfig* wndconfig, int pixelFormat ) { PIXELFORMATDESCRIPTOR pfd; int flags, i = 0, attribs[40]; if( !_glfw_DescribePixelFormat( dc, pixelFormat, sizeof(pfd), &pfd ) ) { return GL_FALSE; } if( !_glfw_SetPixelFormat( dc, pixelFormat, &pfd ) ) { return GL_FALSE; } if( _glfwWin.has_WGL_ARB_create_context ) { // Use the newer wglCreateContextAttribsARB if( wndconfig->glMajor != 1 || wndconfig->glMinor != 0 ) { // Request an explicitly versioned context attribs[i++] = WGL_CONTEXT_MAJOR_VERSION_ARB; attribs[i++] = wndconfig->glMajor; attribs[i++] = WGL_CONTEXT_MINOR_VERSION_ARB; attribs[i++] = wndconfig->glMinor; } if( wndconfig->glForward || wndconfig->glDebug ) { flags = 0; if( wndconfig->glForward ) { flags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } if( wndconfig->glDebug ) { flags |= WGL_CONTEXT_DEBUG_BIT_ARB; } attribs[i++] = WGL_CONTEXT_FLAGS_ARB; attribs[i++] = flags; } if( wndconfig->glProfile ) { if( !_glfwWin.has_WGL_ARB_create_context_profile ) { return GL_FALSE; } if( wndconfig->glProfile == GLFW_OPENGL_CORE_PROFILE ) { flags = WGL_CONTEXT_CORE_PROFILE_BIT_ARB; } else { flags = WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; } attribs[i++] = WGL_CONTEXT_PROFILE_MASK_ARB; attribs[i++] = flags; } attribs[i++] = 0; _glfwWin.context = _glfwWin.CreateContextAttribsARB( dc, NULL, attribs ); if( !_glfwWin.context ) { return GL_FALSE; } } else { _glfwWin.context = wglCreateContext( dc ); if( !_glfwWin.context ) { return GL_FALSE; } } return GL_TRUE; } //======================================================================== // Translates a Windows key to the corresponding GLFW key //======================================================================== static int translateKey( WPARAM wParam, LPARAM lParam ) { MSG next_msg; DWORD msg_time; DWORD scan_code; // Check for numeric keypad keys // Note: This way we always force "NumLock = ON", which at least // enables GLFW users to detect numeric keypad keys int hiFlags = HIWORD( lParam ); if ( !( hiFlags & 0x100 ) ) { switch( MapVirtualKey( hiFlags & 0xFF, 1 ) ) { case VK_INSERT: return GLFW_KEY_KP_0; case VK_END: return GLFW_KEY_KP_1; case VK_DOWN: return GLFW_KEY_KP_2; case VK_NEXT: return GLFW_KEY_KP_3; case VK_LEFT: return GLFW_KEY_KP_4; case VK_CLEAR: return GLFW_KEY_KP_5; case VK_RIGHT: return GLFW_KEY_KP_6; case VK_HOME: return GLFW_KEY_KP_7; case VK_UP: return GLFW_KEY_KP_8; case VK_PRIOR: return GLFW_KEY_KP_9; case VK_DIVIDE: return GLFW_KEY_KP_DIVIDE; case VK_MULTIPLY: return GLFW_KEY_KP_MULTIPLY; case VK_SUBTRACT: return GLFW_KEY_KP_SUBTRACT; case VK_ADD: return GLFW_KEY_KP_ADD; case VK_DELETE: return GLFW_KEY_KP_DECIMAL; } } // Check which key was pressed or released switch( wParam ) { // The SHIFT keys require special handling case VK_SHIFT: { // Compare scan code for this key with that of VK_RSHIFT in // order to determine which shift key was pressed (left or // right) scan_code = MapVirtualKey( VK_RSHIFT, 0 ); if( ((lParam & 0x01ff0000) >> 16) == scan_code ) { return GLFW_KEY_RSHIFT; } return GLFW_KEY_LSHIFT; } // The CTRL keys require special handling case VK_CONTROL: { // Is this an extended key (i.e. right key)? if( lParam & 0x01000000 ) { return GLFW_KEY_RCTRL; } // Here is a trick: "Alt Gr" sends LCTRL, then RALT. We only // want the RALT message, so we try to see if the next message // is a RALT message. In that case, this is a false LCTRL! msg_time = GetMessageTime(); if( PeekMessage( &next_msg, NULL, 0, 0, PM_NOREMOVE ) ) { if( next_msg.message == WM_KEYDOWN || next_msg.message == WM_SYSKEYDOWN ) { if( next_msg.wParam == VK_MENU && (next_msg.lParam & 0x01000000) && next_msg.time == msg_time ) { // Next message is a RALT down message, which // means that this is NOT a proper LCTRL message! return GLFW_KEY_UNKNOWN; } } } return GLFW_KEY_LCTRL; } // The ALT keys require special handling case VK_MENU: { // Is this an extended key (i.e. right key)? if( lParam & 0x01000000 ) { return GLFW_KEY_RALT; } return GLFW_KEY_LALT; } // The ENTER keys require special handling case VK_RETURN: { // Is this an extended key (i.e. right key)? if( lParam & 0x01000000 ) { return GLFW_KEY_KP_ENTER; } return GLFW_KEY_ENTER; } // Special keys (non character keys) case VK_ESCAPE: return GLFW_KEY_ESC; case VK_TAB: return GLFW_KEY_TAB; case VK_BACK: return GLFW_KEY_BACKSPACE; case VK_HOME: return GLFW_KEY_HOME; case VK_END: return GLFW_KEY_END; case VK_PRIOR: return GLFW_KEY_PAGEUP; case VK_NEXT: return GLFW_KEY_PAGEDOWN; case VK_INSERT: return GLFW_KEY_INSERT; case VK_DELETE: return GLFW_KEY_DEL; case VK_LEFT: return GLFW_KEY_LEFT; case VK_UP: return GLFW_KEY_UP; case VK_RIGHT: return GLFW_KEY_RIGHT; case VK_DOWN: return GLFW_KEY_DOWN; case VK_F1: return GLFW_KEY_F1; case VK_F2: return GLFW_KEY_F2; case VK_F3: return GLFW_KEY_F3; case VK_F4: return GLFW_KEY_F4; case VK_F5: return GLFW_KEY_F5; case VK_F6: return GLFW_KEY_F6; case VK_F7: return GLFW_KEY_F7; case VK_F8: return GLFW_KEY_F8; case VK_F9: return GLFW_KEY_F9; case VK_F10: return GLFW_KEY_F10; case VK_F11: return GLFW_KEY_F11; case VK_F12: return GLFW_KEY_F12; case VK_F13: return GLFW_KEY_F13; case VK_F14: return GLFW_KEY_F14; case VK_F15: return GLFW_KEY_F15; case VK_F16: return GLFW_KEY_F16; case VK_F17: return GLFW_KEY_F17; case VK_F18: return GLFW_KEY_F18; case VK_F19: return GLFW_KEY_F19; case VK_F20: return GLFW_KEY_F20; case VK_F21: return GLFW_KEY_F21; case VK_F22: return GLFW_KEY_F22; case VK_F23: return GLFW_KEY_F23; case VK_F24: return GLFW_KEY_F24; case VK_SPACE: return GLFW_KEY_SPACE; // Numeric keypad case VK_NUMPAD0: return GLFW_KEY_KP_0; case VK_NUMPAD1: return GLFW_KEY_KP_1; case VK_NUMPAD2: return GLFW_KEY_KP_2; case VK_NUMPAD3: return GLFW_KEY_KP_3; case VK_NUMPAD4: return GLFW_KEY_KP_4; case VK_NUMPAD5: return GLFW_KEY_KP_5; case VK_NUMPAD6: return GLFW_KEY_KP_6; case VK_NUMPAD7: return GLFW_KEY_KP_7; case VK_NUMPAD8: return GLFW_KEY_KP_8; case VK_NUMPAD9: return GLFW_KEY_KP_9; case VK_DIVIDE: return GLFW_KEY_KP_DIVIDE; case VK_MULTIPLY: return GLFW_KEY_KP_MULTIPLY; case VK_SUBTRACT: return GLFW_KEY_KP_SUBTRACT; case VK_ADD: return GLFW_KEY_KP_ADD; case VK_DECIMAL: return GLFW_KEY_KP_DECIMAL; case VK_NUMLOCK: return GLFW_KEY_KP_NUM_LOCK; case VK_CAPITAL: return GLFW_KEY_CAPS_LOCK; case VK_SCROLL: return GLFW_KEY_SCROLL_LOCK; case VK_PAUSE: return GLFW_KEY_PAUSE; case VK_LWIN: return GLFW_KEY_LSUPER; case VK_RWIN: return GLFW_KEY_RSUPER; case VK_APPS: return GLFW_KEY_MENU; // The rest (should be printable keys) default: { // Convert to printable character (ISO-8859-1 or Unicode) wParam = MapVirtualKey( (UINT) wParam, 2 ) & 0x0000FFFF; // Make sure that the character is uppercase if( _glfwLibrary.Sys.hasUnicode ) { wParam = (WPARAM) CharUpperW( (LPWSTR) wParam ); } else { wParam = (WPARAM) CharUpperA( (LPSTR) wParam ); } // Valid ISO-8859-1 character? if( (wParam >= 32 && wParam <= 126) || (wParam >= 160 && wParam <= 255) ) { return (int) wParam; } return GLFW_KEY_UNKNOWN; } } } //======================================================================== // Translates a Windows key to Unicode //======================================================================== static void translateChar( DWORD wParam, DWORD lParam, int action ) { BYTE keyboard_state[ 256 ]; UCHAR char_buf[ 10 ]; WCHAR unicode_buf[ 10 ]; UINT scan_code; int i, num_chars, unicode; GetKeyboardState( keyboard_state ); // Derive scan code from lParam and action scan_code = (lParam & 0x01ff0000) >> 16; if( action == GLFW_RELEASE ) { scan_code |= 0x8000000; } if( _glfwLibrary.Sys.hasUnicode ) { num_chars = ToUnicode( wParam, // virtual-key code scan_code, // scan code keyboard_state, // key-state array unicode_buf, // buffer for translated key 10, // size of translated key buffer 0 // active-menu flag ); unicode = 1; } else { // Convert to ISO-8859-1 num_chars = ToAscii( wParam, // virtual-key code scan_code, // scan code keyboard_state, // key-state array (LPWORD) char_buf, // buffer for translated key 0 // active-menu flag ); unicode = 0; } // Report characters for( i = 0; i < num_chars; i++ ) { // Get next character from buffer if( unicode ) { _glfwInputChar( (int) unicode_buf[ i ], action ); } else { _glfwInputChar( (int) char_buf[ i ], action ); } } } //======================================================================== // Window callback function (handles window events) //======================================================================== static LRESULT CALLBACK windowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { int wheelDelta, iconified; switch( uMsg ) { // Window activate message? (iconification?) case WM_ACTIVATE: { _glfwWin.active = LOWORD(wParam) != WA_INACTIVE ? GL_TRUE : GL_FALSE; iconified = HIWORD(wParam) ? GL_TRUE : GL_FALSE; // Were we deactivated/iconified? if( (!_glfwWin.active || iconified) && !_glfwWin.iconified ) { _glfwInputDeactivation(); // If we are in fullscreen mode we need to iconify if( _glfwWin.opened && _glfwWin.fullscreen ) { // Do we need to manually iconify? if( !iconified ) { // Minimize window ShowWindow( _glfwWin.window, SW_MINIMIZE ); iconified = GL_TRUE; } // Restore the original desktop resolution ChangeDisplaySettings( NULL, CDS_FULLSCREEN ); } // Unlock mouse if locked if( !_glfwWin.oldMouseLockValid ) { _glfwWin.oldMouseLock = _glfwWin.mouseLock; _glfwWin.oldMouseLockValid = GL_TRUE; glfwEnable( GLFW_MOUSE_CURSOR ); } } else if( _glfwWin.active || !iconified ) { // If we are in fullscreen mode we need to maximize if( _glfwWin.opened && _glfwWin.fullscreen && _glfwWin.iconified ) { // Change display settings to the user selected mode _glfwSetVideoModeMODE( _glfwWin.modeID ); // Do we need to manually restore window? if( iconified ) { // Restore window ShowWindow( _glfwWin.window, SW_RESTORE ); iconified = GL_FALSE; // Activate window ShowWindow( hWnd, SW_SHOW ); setForegroundWindow( _glfwWin.window ); SetFocus( _glfwWin.window ); } } // Lock mouse, if necessary if( _glfwWin.oldMouseLockValid && _glfwWin.oldMouseLock ) { glfwDisable( GLFW_MOUSE_CURSOR ); } _glfwWin.oldMouseLockValid = GL_FALSE; } _glfwWin.iconified = iconified; return 0; } case WM_SYSCOMMAND: { switch( wParam & 0xfff0 ) { case SC_SCREENSAVE: case SC_MONITORPOWER: { if( _glfwWin.fullscreen ) { // Disallow screen saver and screen blanking if we are // running in fullscreen mode return 0; } else { break; } } // User trying to access application menu using ALT? case SC_KEYMENU: return 0; } break; } case WM_CLOSE: { // Translate this to WM_QUIT so that we can handle all cases in the // same place PostQuitMessage( 0 ); return 0; } case WM_KEYDOWN: case WM_SYSKEYDOWN: { _glfwInputKey( translateKey( wParam, lParam ), GLFW_PRESS ); if( _glfwWin.charCallback ) { translateChar( (DWORD) wParam, (DWORD) lParam, GLFW_PRESS ); } return 0; } case WM_KEYUP: case WM_SYSKEYUP: { // Special trick: release both shift keys on SHIFT up event if( wParam == VK_SHIFT ) { _glfwInputKey( GLFW_KEY_LSHIFT, GLFW_RELEASE ); _glfwInputKey( GLFW_KEY_RSHIFT, GLFW_RELEASE ); } else { _glfwInputKey( translateKey( wParam, lParam ), GLFW_RELEASE ); } if( _glfwWin.charCallback ) { translateChar( (DWORD) wParam, (DWORD) lParam, GLFW_RELEASE ); } return 0; } case WM_LBUTTONDOWN: SetCapture(hWnd); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS ); return 0; case WM_RBUTTONDOWN: SetCapture(hWnd); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS ); return 0; case WM_MBUTTONDOWN: SetCapture(hWnd); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_MIDDLE, GLFW_PRESS ); return 0; case WM_XBUTTONDOWN: { if( HIWORD(wParam) == XBUTTON1 ) { SetCapture(hWnd); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_4, GLFW_PRESS ); } else if( HIWORD(wParam) == XBUTTON2 ) { SetCapture(hWnd); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_5, GLFW_PRESS ); } return 1; } case WM_LBUTTONUP: ReleaseCapture(); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_LEFT, GLFW_RELEASE ); return 0; case WM_RBUTTONUP: ReleaseCapture(); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_RIGHT, GLFW_RELEASE ); return 0; case WM_MBUTTONUP: ReleaseCapture(); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_MIDDLE, GLFW_RELEASE ); return 0; case WM_XBUTTONUP: { if( HIWORD(wParam) == XBUTTON1 ) { ReleaseCapture(); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_4, GLFW_RELEASE ); } else if( HIWORD(wParam) == XBUTTON2 ) { ReleaseCapture(); _glfwInputMouseClick( GLFW_MOUSE_BUTTON_5, GLFW_RELEASE ); } return 1; } case WM_MOUSEMOVE: { int NewMouseX, NewMouseY; // Get signed (!) mouse position NewMouseX = (int)((short)LOWORD(lParam)); NewMouseY = (int)((short)HIWORD(lParam)); if( NewMouseX != _glfwInput.OldMouseX || NewMouseY != _glfwInput.OldMouseY ) { if( _glfwWin.mouseLock ) { _glfwInput.MousePosX += NewMouseX - _glfwInput.OldMouseX; _glfwInput.MousePosY += NewMouseY - _glfwInput.OldMouseY; } else { _glfwInput.MousePosX = NewMouseX; _glfwInput.MousePosY = NewMouseY; } _glfwInput.OldMouseX = NewMouseX; _glfwInput.OldMouseY = NewMouseY; _glfwInput.MouseMoved = GL_TRUE; if( _glfwWin.mousePosCallback ) { _glfwWin.mousePosCallback( _glfwInput.MousePosX, _glfwInput.MousePosY ); } } return 0; } case WM_MOUSEWHEEL: { // WM_MOUSEWHEEL is not supported under Windows 95 if( _glfwLibrary.Sys.winVer != _GLFW_WIN_95 ) { wheelDelta = (((int)wParam) >> 16) / WHEEL_DELTA; _glfwInput.WheelPos += wheelDelta; if( _glfwWin.mouseWheelCallback ) { _glfwWin.mouseWheelCallback( _glfwInput.WheelPos ); } return 0; } break; } case WM_SIZE: { _glfwWin.width = LOWORD(lParam); _glfwWin.height = HIWORD(lParam); // If the mouse is locked, update the clipping rect if( _glfwWin.mouseLock ) { RECT ClipWindowRect; if( GetWindowRect( _glfwWin.window, &ClipWindowRect ) ) { ClipCursor( &ClipWindowRect ); } } if( _glfwWin.windowSizeCallback ) { _glfwWin.windowSizeCallback( LOWORD(lParam), HIWORD(lParam) ); } return 0; } case WM_MOVE: { // If the mouse is locked, update the clipping rect if( _glfwWin.mouseLock ) { RECT ClipWindowRect; if( GetWindowRect( _glfwWin.window, &ClipWindowRect ) ) { ClipCursor( &ClipWindowRect ); } } return 0; } // Was the window contents damaged? case WM_PAINT: { if( _glfwWin.windowRefreshCallback ) { _glfwWin.windowRefreshCallback(); } break; } case WM_DISPLAYCHANGE: { // TODO: Do stuff here. break; } } // Pass all unhandled messages to DefWindowProc return DefWindowProc( hWnd, uMsg, wParam, lParam ); } //======================================================================== // Translate client window size to full window size (including window borders) //======================================================================== static void getFullWindowSize( int clientWidth, int clientHeight, int *fullWidth, int *fullHeight ) { RECT rect; // Create a window rectangle rect.left = (long)0; rect.right = (long)clientWidth - 1; rect.top = (long)0; rect.bottom = (long)clientHeight - 1; // Adjust according to window styles AdjustWindowRectEx( &rect, _glfwWin.dwStyle, FALSE, _glfwWin.dwExStyle ); // Calculate width and height of full window *fullWidth = rect.right - rect.left + 1; *fullHeight = rect.bottom - rect.top + 1; } //======================================================================== // Initialize WGL-specific extensions // This function is called once before initial context creation, i.e. before // any WGL extensions could be present. This is done in order to have both // extension variable clearing and loading in the same place, hopefully // decreasing the possibility of forgetting to add one without the other. //======================================================================== static void initWGLExtensions( void ) { // This needs to include every function pointer loaded below _glfwWin.SwapIntervalEXT = NULL; _glfwWin.GetPixelFormatAttribivARB = NULL; _glfwWin.GetExtensionsStringARB = NULL; _glfwWin.GetExtensionsStringEXT = NULL; _glfwWin.CreateContextAttribsARB = NULL; // This needs to include every extension used below except for // WGL_ARB_extensions_string and WGL_EXT_extensions_string _glfwWin.has_WGL_EXT_swap_control = GL_FALSE; _glfwWin.has_WGL_ARB_pixel_format = GL_FALSE; _glfwWin.has_WGL_ARB_multisample = GL_FALSE; _glfwWin.has_WGL_ARB_create_context = GL_FALSE; _glfwWin.has_WGL_ARB_create_context_profile = GL_FALSE; _glfwWin.GetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC) wglGetProcAddress( "wglGetExtensionsStringEXT" ); if( !_glfwWin.GetExtensionsStringEXT ) { _glfwWin.GetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress( "wglGetExtensionsStringARB" ); if( !_glfwWin.GetExtensionsStringARB ) { return; } } if( _glfwPlatformExtensionSupported( "WGL_ARB_multisample" ) ) { _glfwWin.has_WGL_ARB_multisample = GL_TRUE; } if( _glfwPlatformExtensionSupported( "WGL_ARB_create_context" ) ) { _glfwWin.has_WGL_ARB_create_context = GL_TRUE; _glfwWin.CreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress( "wglCreateContextAttribsARB" ); } if( _glfwWin.has_WGL_ARB_create_context ) { if( _glfwPlatformExtensionSupported( "WGL_ARB_create_context_profile" ) ) { _glfwWin.has_WGL_ARB_create_context_profile = GL_TRUE; } } if( _glfwPlatformExtensionSupported( "WGL_EXT_swap_control" ) ) { _glfwWin.has_WGL_EXT_swap_control = GL_TRUE; _glfwWin.SwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress( "wglSwapIntervalEXT" ); } if( _glfwPlatformExtensionSupported( "WGL_ARB_pixel_format" ) ) { _glfwWin.has_WGL_ARB_pixel_format = GL_TRUE; _glfwWin.GetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC) wglGetProcAddress( "wglGetPixelFormatAttribivARB" ); } } //======================================================================== // Registers the GLFW window class //======================================================================== static ATOM registerWindowClass( void ) { WNDCLASS wc; // Set window class parameters wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // Redraw on... wc.lpfnWndProc = (WNDPROC)windowProc; // Message handler wc.cbClsExtra = 0; // No extra class data wc.cbWndExtra = 0; // No extra window data wc.hInstance = _glfwLibrary.instance; // Set instance wc.hCursor = LoadCursor( NULL, IDC_ARROW ); // Load arrow pointer wc.hbrBackground = NULL; // No background wc.lpszMenuName = NULL; // No menu wc.lpszClassName = _GLFW_WNDCLASSNAME; // Set class name // Load user-provided icon if available wc.hIcon = LoadIcon( _glfwLibrary.instance, "GLFW_ICON" ); if( !wc.hIcon ) { // Load default icon wc.hIcon = LoadIcon( NULL, IDI_WINLOGO ); } return RegisterClass( &wc ); } //======================================================================== // Returns the closest matching pixel format, or zero on error //======================================================================== static int choosePixelFormat( const _GLFWfbconfig *fbconfig ) { unsigned int fbcount; int pixelFormat; _GLFWfbconfig *fbconfigs; const _GLFWfbconfig *closest; fbconfigs = getFBConfigs( &fbcount ); if( !fbconfigs ) { fprintf( stderr, "Failed to find any usable GLFWFBConfigs\n" ); return 0; } closest = _glfwChooseFBConfig( fbconfig, fbconfigs, fbcount ); if( !closest ) { fprintf( stderr, "Failed to select a GLFWFBConfig from the alternatives\n" ); free( fbconfigs ); return 0; } pixelFormat = (int) closest->platformID; free( fbconfigs ); fbconfigs = NULL; closest = NULL; return pixelFormat; } //======================================================================== // Creates the GLFW window and rendering context //======================================================================== static int createWindow( const _GLFWwndconfig *wndconfig, const _GLFWfbconfig *fbconfig ) { DWORD dwStyle, dwExStyle; int pixelFormat, fullWidth, fullHeight; RECT wa; POINT pos; _glfwWin.DC = NULL; _glfwWin.context = NULL; _glfwWin.window = NULL; // Set common window styles dwStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VISIBLE; dwExStyle = WS_EX_APPWINDOW; // Set window style, depending on fullscreen mode if( _glfwWin.fullscreen ) { dwStyle |= WS_POPUP; // Here's a trick for helping us getting window focus // (SetForegroundWindow doesn't work properly under // Win98/ME/2K/.NET/+) /* if( _glfwLibrary.Sys.WinVer != _GLFW_WIN_95 && _glfwLibrary.Sys.WinVer != _GLFW_WIN_NT4 && _glfwLibrary.Sys.WinVer != _GLFW_WIN_XP ) { dwStyle |= WS_MINIMIZE; } */ } else { dwStyle |= WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; if( !wndconfig->windowNoResize ) { dwStyle |= ( WS_MAXIMIZEBOX | WS_SIZEBOX ); dwExStyle |= WS_EX_WINDOWEDGE; } } // Remember window styles (used by getFullWindowSize) _glfwWin.dwStyle = dwStyle; _glfwWin.dwExStyle = dwExStyle; // Adjust window size for frame and title bar getFullWindowSize( _glfwWin.width, _glfwWin.height, &fullWidth, &fullHeight ); // Adjust window position to working area (e.g. if the task bar is at // the top of the display). Fullscreen windows are always opened in // the upper left corner regardless of the desktop working area. if( _glfwWin.fullscreen ) { wa.left = wa.top = 0; } else { SystemParametersInfo( SPI_GETWORKAREA, 0, &wa, 0 ); } _glfwWin.window = CreateWindowEx( _glfwWin.dwExStyle, // Extended style _GLFW_WNDCLASSNAME, // Class name "GLFW Window", // Window title _glfwWin.dwStyle, // Defined window style wa.left, wa.top, // Window position fullWidth, // Decorated window width fullHeight, // Decorated window height NULL, // No parent window NULL, // No menu _glfwLibrary.instance, // Instance NULL ); // Nothing to WM_CREATE if( !_glfwWin.window ) { fprintf( stderr, "Unable to create Win32 window\n" ); return GL_FALSE; } _glfwWin.DC = GetDC( _glfwWin.window ); if( !_glfwWin.DC ) { fprintf( stderr, "Unable to retrieve GLFW window DC\n" ); return GL_FALSE; } pixelFormat = choosePixelFormat( fbconfig ); if( !pixelFormat ) { fprintf( stderr, "Unable to find a usable pixel format\n" ); return GL_FALSE; } if( !createContext( _glfwWin.DC, wndconfig, pixelFormat ) ) { fprintf( stderr, "Unable to create OpenGL context\n" ); return GL_FALSE; } if( !wglMakeCurrent( _glfwWin.DC, _glfwWin.context ) ) { fprintf( stderr, "Unable to make OpenGL context current\n" ); return GL_FALSE; } initWGLExtensions(); // Initialize mouse position data GetCursorPos( &pos ); ScreenToClient( _glfwWin.window, &pos ); _glfwInput.OldMouseX = _glfwInput.MousePosX = pos.x; _glfwInput.OldMouseY = _glfwInput.MousePosY = pos.y; return GL_TRUE; } //======================================================================== // Destroys the GLFW window and rendering context //======================================================================== static void destroyWindow( void ) { if( _glfwWin.context ) { wglMakeCurrent( NULL, NULL ); wglDeleteContext( _glfwWin.context ); _glfwWin.context = NULL; } if( _glfwWin.DC ) { ReleaseDC( _glfwWin.window, _glfwWin.DC ); _glfwWin.DC = NULL; } if( _glfwWin.window ) { if( _glfwLibrary.Sys.winVer <= _GLFW_WIN_NT4 ) { // Note: Hiding the window first fixes an annoying W98/NT4 // remaining icon bug for fullscreen displays ShowWindow( _glfwWin.window, SW_HIDE ); } DestroyWindow( _glfwWin.window ); _glfwWin.window = NULL; } } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Here is where the window is created, and the OpenGL rendering context is // created //======================================================================== int _glfwPlatformOpenWindow( int width, int height, const _GLFWwndconfig *wndconfig, const _GLFWfbconfig *fbconfig ) { GLboolean recreateContext = GL_FALSE; // Clear platform specific GLFW window state _glfwWin.classAtom = 0; _glfwWin.oldMouseLockValid = GL_FALSE; _glfwWin.desiredRefreshRate = wndconfig->refreshRate; _glfwWin.classAtom = registerWindowClass(); if( !_glfwWin.classAtom ) { fprintf( stderr, "Failed to register GLFW window class\n" ); return GL_FALSE; } if( _glfwWin.fullscreen ) { _glfwSetVideoMode( &_glfwWin.width, &_glfwWin.height, fbconfig->redBits, fbconfig->greenBits, fbconfig->blueBits, wndconfig->refreshRate ); } initWGLExtensions(); if( !createWindow( wndconfig, fbconfig ) ) { fprintf( stderr, "Failed to create GLFW window\n" ); return GL_FALSE; } _glfwRefreshContextParams(); if( fbconfig->samples > 0 ) { // We want FSAA, but can we get it? // FSAA is not a hard constraint, so otherwise we just don't care if( _glfwWin.has_WGL_ARB_multisample && _glfwWin.has_WGL_ARB_pixel_format ) { // We appear to have both the FSAA extension and the means to ask for it recreateContext = GL_TRUE; } } if( wndconfig->glMajor > 2 ) { if ( wndconfig->glMajor != _glfwWin.glMajor || wndconfig->glMinor != _glfwWin.glMinor ) { // We want a different OpenGL version, but can we get it? // Otherwise, if we got a version greater than required, that's fine, // whereas if we got a version lesser than required, it will be dealt // with in glfwOpenWindow if( _glfwWin.has_WGL_ARB_create_context ) { recreateContext = GL_TRUE; } } if( wndconfig->glForward ) { if( !_glfwWin.has_WGL_ARB_create_context ) { // Forward-compatibility is a hard constraint return GL_FALSE; } recreateContext = GL_TRUE; } if( wndconfig->glProfile ) { if( !_glfwWin.has_WGL_ARB_create_context_profile ) { // Context profile is a hard constraint return GL_FALSE; } recreateContext = GL_TRUE; } } if( recreateContext ) { // Some window hints require us to re-create the context using WGL // extensions retrieved through the current context, as we cannot check // for WGL extensions or retrieve WGL entry points before we have a // current context (actually until we have implicitly loaded the ICD) // Yes, this is strange, and yes, this is the proper way on Win32 // As Windows only allows you to set the pixel format once for a // window, we need to destroy the current window and create a new one // to be able to use the new pixel format // Technically, it may be possible to keep the old window around if // we're just creating an OpenGL 3.0+ context with the same pixel // format, but it's not worth the potential compatibility problems destroyWindow(); if( !createWindow( wndconfig, fbconfig ) ) { fprintf( stderr, "Unable to re-create GLFW window\n" ); return GL_FALSE; } } if( _glfwWin.fullscreen ) { // Place the window above all topmost windows SetWindowPos( _glfwWin.window, HWND_TOPMOST, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE ); } setForegroundWindow( _glfwWin.window ); SetFocus( _glfwWin.window ); return GL_TRUE; } //======================================================================== // Properly kill the window / video display //======================================================================== void _glfwPlatformCloseWindow( void ) { destroyWindow(); if( _glfwWin.classAtom ) { UnregisterClass( _GLFW_WNDCLASSNAME, _glfwLibrary.instance ); _glfwWin.classAtom = 0; } if( _glfwWin.fullscreen ) { // Restore original desktop resolution ChangeDisplaySettings( NULL, CDS_FULLSCREEN ); } } //======================================================================== // Set the window title //======================================================================== void _glfwPlatformSetWindowTitle( const char *title ) { (void) SetWindowText( _glfwWin.window, title ); } //======================================================================== // Set the window size. //======================================================================== void _glfwPlatformSetWindowSize( int width, int height ) { int bpp, mode = 0, refresh; int sizechanged = GL_FALSE; GLint drawbuffer; GLfloat clearcolor[4]; if( _glfwWin.fullscreen ) { // Get some info about the current mode DEVMODE dm; // Get current BPP settings dm.dmSize = sizeof( DEVMODE ); if( EnumDisplaySettings( NULL, _glfwWin.modeID, &dm ) ) { // Get bpp bpp = dm.dmBitsPerPel; // Get closest match for target video mode refresh = _glfwWin.desiredRefreshRate; mode = _glfwGetClosestVideoModeBPP( &width, &height, &bpp, &refresh ); } else { mode = _glfwWin.modeID; } } else { // If we are in windowed mode, adjust the window size to // compensate for window decorations getFullWindowSize( width, height, &width, &height ); } // Change window size before changing fullscreen mode? if( _glfwWin.fullscreen && (width > _glfwWin.width) ) { SetWindowPos( _glfwWin.window, HWND_TOP, 0, 0, width, height, SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOZORDER ); sizechanged = GL_TRUE; } // Change fullscreen video mode? if( _glfwWin.fullscreen && mode != _glfwWin.modeID ) { _glfwSetVideoModeMODE( mode ); // Clear the front buffer to black (avoid ugly desktop remains in // our OpenGL window) glGetIntegerv( GL_DRAW_BUFFER, &drawbuffer ); glGetFloatv( GL_COLOR_CLEAR_VALUE, clearcolor ); glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); glClear( GL_COLOR_BUFFER_BIT ); if( drawbuffer == GL_BACK ) { _glfw_SwapBuffers( _glfwWin.DC ); } glClearColor( clearcolor[0], clearcolor[1], clearcolor[2], clearcolor[3] ); } // Set window size (if not already changed) if( !sizechanged ) { SetWindowPos( _glfwWin.window, HWND_TOP, 0, 0, width, height, SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOZORDER ); } } //======================================================================== // Set the window position //======================================================================== void _glfwPlatformSetWindowPos( int x, int y ) { (void) SetWindowPos( _glfwWin.window, HWND_TOP, x, y, 0, 0, SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER ); } //======================================================================== // Window iconification //======================================================================== void _glfwPlatformIconifyWindow( void ) { // Iconify window ShowWindow( _glfwWin.window, SW_MINIMIZE ); _glfwWin.iconified = GL_TRUE; // If we are in fullscreen mode we need to change video modes if( _glfwWin.fullscreen ) { // Change display settings to the desktop resolution ChangeDisplaySettings( NULL, CDS_FULLSCREEN ); } // Unlock mouse if( !_glfwWin.oldMouseLockValid ) { _glfwWin.oldMouseLock = _glfwWin.mouseLock; _glfwWin.oldMouseLockValid = GL_TRUE; glfwEnable( GLFW_MOUSE_CURSOR ); } } //======================================================================== // Window un-iconification //======================================================================== void _glfwPlatformRestoreWindow( void ) { // If we are in fullscreen mode we need to change video modes if( _glfwWin.fullscreen ) { // Change display settings to the user selected mode _glfwSetVideoModeMODE( _glfwWin.modeID ); } // Un-iconify window ShowWindow( _glfwWin.window, SW_RESTORE ); // Make sure that our window ends up on top of things ShowWindow( _glfwWin.window, SW_SHOW ); setForegroundWindow( _glfwWin.window ); SetFocus( _glfwWin.window ); // Window is no longer iconified _glfwWin.iconified = GL_FALSE; // Lock mouse, if necessary if( _glfwWin.oldMouseLockValid && _glfwWin.oldMouseLock ) { glfwDisable( GLFW_MOUSE_CURSOR ); } _glfwWin.oldMouseLockValid = GL_FALSE; } //======================================================================== // Swap buffers (double-buffering) //======================================================================== void _glfwPlatformSwapBuffers( void ) { _glfw_SwapBuffers( _glfwWin.DC ); } //======================================================================== // Set double buffering swap interval //======================================================================== void _glfwPlatformSwapInterval( int interval ) { if( _glfwWin.has_WGL_EXT_swap_control ) { _glfwWin.SwapIntervalEXT( interval ); } } //======================================================================== // Write back window parameters into GLFW window structure //======================================================================== void _glfwPlatformRefreshWindowParams( void ) { PIXELFORMATDESCRIPTOR pfd; DEVMODE dm; int pixelFormat, mode; // Obtain a detailed description of current pixel format pixelFormat = _glfw_GetPixelFormat( _glfwWin.DC ); if( _glfwWin.has_WGL_ARB_pixel_format ) { if( getPixelFormatAttrib( pixelFormat, WGL_ACCELERATION_ARB ) != WGL_NO_ACCELERATION_ARB ) { _glfwWin.accelerated = GL_TRUE; } else { _glfwWin.accelerated = GL_FALSE; } _glfwWin.redBits = getPixelFormatAttrib( pixelFormat, WGL_RED_BITS_ARB ); _glfwWin.greenBits = getPixelFormatAttrib( pixelFormat, WGL_GREEN_BITS_ARB ); _glfwWin.blueBits = getPixelFormatAttrib( pixelFormat, WGL_BLUE_BITS_ARB ); _glfwWin.alphaBits = getPixelFormatAttrib( pixelFormat, WGL_ALPHA_BITS_ARB ); _glfwWin.depthBits = getPixelFormatAttrib( pixelFormat, WGL_DEPTH_BITS_ARB ); _glfwWin.stencilBits = getPixelFormatAttrib( pixelFormat, WGL_STENCIL_BITS_ARB ); _glfwWin.accumRedBits = getPixelFormatAttrib( pixelFormat, WGL_ACCUM_RED_BITS_ARB ); _glfwWin.accumGreenBits = getPixelFormatAttrib( pixelFormat, WGL_ACCUM_GREEN_BITS_ARB ); _glfwWin.accumBlueBits = getPixelFormatAttrib( pixelFormat, WGL_ACCUM_BLUE_BITS_ARB ); _glfwWin.accumAlphaBits = getPixelFormatAttrib( pixelFormat, WGL_ACCUM_ALPHA_BITS_ARB ); _glfwWin.auxBuffers = getPixelFormatAttrib( pixelFormat, WGL_AUX_BUFFERS_ARB ); _glfwWin.stereo = getPixelFormatAttrib( pixelFormat, WGL_STEREO_ARB ) ? GL_TRUE : GL_FALSE; if( _glfwWin.has_WGL_ARB_multisample ) { _glfwWin.samples = getPixelFormatAttrib( pixelFormat, WGL_SAMPLES_ARB ); // Should we force 1 to 0 here for consistency, or keep 1 for transparency? } else { _glfwWin.samples = 0; } } else { _glfw_DescribePixelFormat( _glfwWin.DC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd ); // Is current OpenGL context accelerated? _glfwWin.accelerated = (pfd.dwFlags & PFD_GENERIC_ACCELERATED) || !(pfd.dwFlags & PFD_GENERIC_FORMAT) ? 1 : 0; // "Standard" window parameters _glfwWin.redBits = pfd.cRedBits; _glfwWin.greenBits = pfd.cGreenBits; _glfwWin.blueBits = pfd.cBlueBits; _glfwWin.alphaBits = pfd.cAlphaBits; _glfwWin.depthBits = pfd.cDepthBits; _glfwWin.stencilBits = pfd.cStencilBits; _glfwWin.accumRedBits = pfd.cAccumRedBits; _glfwWin.accumGreenBits = pfd.cAccumGreenBits; _glfwWin.accumBlueBits = pfd.cAccumBlueBits; _glfwWin.accumAlphaBits = pfd.cAccumAlphaBits; _glfwWin.auxBuffers = pfd.cAuxBuffers; _glfwWin.stereo = (pfd.dwFlags & PFD_STEREO) ? GL_TRUE : GL_FALSE; // If we don't have WGL_ARB_pixel_format then we can't have created a // multisampling context, so it's safe to hardcode zero here _glfwWin.samples = 0; } // Get refresh rate mode = _glfwWin.fullscreen ? _glfwWin.modeID : ENUM_CURRENT_SETTINGS; dm.dmSize = sizeof( DEVMODE ); if( EnumDisplaySettings( NULL, mode, &dm ) ) { _glfwWin.refreshRate = dm.dmDisplayFrequency; if( _glfwWin.refreshRate <= 1 ) { _glfwWin.refreshRate = 0; } } else { _glfwWin.refreshRate = 0; } } //======================================================================== // Poll for new window and input events //======================================================================== void _glfwPlatformPollEvents( void ) { MSG msg; int winclosed = GL_FALSE; // Flag: mouse was not moved (will be changed by _glfwGetNextEvent if // there was a mouse move event) _glfwInput.MouseMoved = GL_FALSE; if( _glfwWin.mouseLock ) { _glfwInput.OldMouseX = _glfwWin.width/2; _glfwInput.OldMouseY = _glfwWin.height/2; } else { _glfwInput.OldMouseX = _glfwInput.MousePosX; _glfwInput.OldMouseY = _glfwInput.MousePosY; } // Check for new window messages while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) ) { switch( msg.message ) { // QUIT-message (from close window)? case WM_QUIT: winclosed = GL_TRUE; break; // Ok, send it to the window message handler default: DispatchMessage( &msg ); break; } } // LSHIFT/RSHIFT fixup (keys tend to "stick" without this fix) // This is the only async event handling in GLFW, but it solves some // nasty problems. // Caveat: Does not work under Win 9x/ME. if( _glfwLibrary.Sys.winVer >= _GLFW_WIN_NT4 ) { int lshift_down, rshift_down; // Get current state of left and right shift keys lshift_down = (GetAsyncKeyState( VK_LSHIFT ) >> 15) & 1; rshift_down = (GetAsyncKeyState( VK_RSHIFT ) >> 15) & 1; // See if this differs from our belief of what has happened // (we only have to check for lost key up events) if( !lshift_down && _glfwInput.Key[ GLFW_KEY_LSHIFT ] == 1 ) { _glfwInputKey( GLFW_KEY_LSHIFT, GLFW_RELEASE ); } if( !rshift_down && _glfwInput.Key[ GLFW_KEY_RSHIFT ] == 1 ) { _glfwInputKey( GLFW_KEY_RSHIFT, GLFW_RELEASE ); } } // Did we have mouse movement in locked cursor mode? if( _glfwInput.MouseMoved && _glfwWin.mouseLock ) { _glfwPlatformSetMouseCursorPos( _glfwWin.width / 2, _glfwWin.height / 2 ); } // Was there a window close request? if( winclosed && _glfwWin.windowCloseCallback ) { // Check if the program wants us to close the window winclosed = _glfwWin.windowCloseCallback(); } if( winclosed ) { glfwCloseWindow(); } } //======================================================================== // Wait for new window and input events //======================================================================== void _glfwPlatformWaitEvents( void ) { WaitMessage(); _glfwPlatformPollEvents(); } //======================================================================== // Hide mouse cursor (lock it) //======================================================================== void _glfwPlatformHideMouseCursor( void ) { RECT ClipWindowRect; ShowCursor( FALSE ); // Clip cursor to the window if( GetWindowRect( _glfwWin.window, &ClipWindowRect ) ) { ClipCursor( &ClipWindowRect ); } // Capture cursor to user window SetCapture( _glfwWin.window ); } //======================================================================== // Show mouse cursor (unlock it) //======================================================================== void _glfwPlatformShowMouseCursor( void ) { // Un-capture cursor ReleaseCapture(); // Release the cursor from the window ClipCursor( NULL ); ShowCursor( TRUE ); } //======================================================================== // Set physical mouse cursor position //======================================================================== void _glfwPlatformSetMouseCursorPos( int x, int y ) { POINT pos; // Convert client coordinates to screen coordinates pos.x = x; pos.y = y; ClientToScreen( _glfwWin.window, &pos ); SetCursorPos( pos.x, pos.y ); } glfw-2.7.2/lib/win32/Makefile.win32.lcc0000644000175000017500000001713411272440721020332 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Windows using LCC-Win32. #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # make -f Makefile.win32.lcc ########################################################################## ########################################################################## # Default: Build static and dynamic versions of GLFW ########################################################################## all: glfw.lib glfw.dll ########################################################################## # GLFW version ########################################################################## VERMAJOR = 2 VERMINOR = 7 ########################################################################## # Compiler settings ########################################################################## CC = lc CFLAGS = -c -O -A -I. -I.. CFLAGS_DLL = $(CFLAGS) -DGLFW_BUILD_DLL ########################################################################## # Library builder settings ########################################################################## # Static library MKLIB = lcclib LIBFLAGS = # DLL LINK = lcclnk LINKFLAGS = -dll -nounderscores -version $(VERMAJOR).$(VERMINOR) -s LINKLIBS = opengl32.lib ########################################################################## # Object files for static library ########################################################################## OBJS = \ enable.obj \ fullscreen.obj \ glext.obj \ image.obj \ init.obj \ input.obj \ joystick.obj \ stream.obj \ tga.obj \ thread.obj \ time.obj \ window.obj \ win32_enable.obj \ win32_fullscreen.obj \ win32_glext.obj \ win32_init.obj \ win32_joystick.obj \ win32_thread.obj \ win32_time.obj \ win32_window.obj ########################################################################## # Object files for dynamic library ########################################################################## DLLOBJS = \ enable_dll.obj \ fullscreen_dll.obj \ glext_dll.obj \ image_dll.obj \ init_dll.obj \ input_dll.obj \ joystick_dll.obj \ stream_dll.obj \ tga_dll.obj \ thread_dll.obj \ time_dll.obj \ window_dll.obj \ win32_dllmain_dll.obj \ win32_enable_dll.obj \ win32_fullscreen_dll.obj \ win32_glext_dll.obj \ win32_init_dll.obj \ win32_joystick_dll.obj \ win32_thread_dll.obj \ win32_time_dll.obj \ win32_window_dll.obj ########################################################################## # Rule for building static library ########################################################################## glfw.lib: $(OBJS) $(MKLIB) $(LIBFLAGS) /out:glfw.lib $(OBJS) ########################################################################## # Rule for building dynamic library ########################################################################## glfw.dll: $(DLLOBJS) if exist glfw.lib rename glfw.lib glfw_lib.bak $(LINK) $(LINKFLAGS) -o $@ $(DLLOBJS) $(LINKLIBS) if exist glfwdll.lib del glfwdll.lib rename glfw.lib glfwdll.lib if exist glfw_lib.bak rename glfw_lib.bak glfw.lib ########################################################################## # Rules for building static library object files ########################################################################## enable.obj: ..\\enable.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\enable.c fullscreen.obj: ..\\fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\fullscreen.c glext.obj: ..\\glext.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\glext.c image.obj: ..\\image.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\image.c init.obj: ..\\init.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\init.c input.obj: ..\\input.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\input.c joystick.obj: ..\\joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\joystick.c stream.obj: ..\\stream.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\stream.c tga.obj: ..\\tga.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\tga.c thread.obj: ..\\thread.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\thread.c time.obj: ..\\time.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\time.c window.obj: ..\\window.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ ..\\window.c win32_enable.obj: win32_enable.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_enable.c win32_fullscreen.obj: win32_fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_fullscreen.c win32_glext.obj: win32_glext.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_glext.c win32_init.obj: win32_init.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_init.c win32_joystick.obj: win32_joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_joystick.c win32_thread.obj: win32_thread.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_thread.c win32_time.obj: win32_time.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_time.c win32_window.obj: win32_window.c ..\\internal.h platform.h $(CC) $(CFLAGS) -Fo$@ win32_window.c ########################################################################## # Rules for building dynamic library object files ########################################################################## enable_dll.obj: ..\\enable.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\enable.c fullscreen_dll.obj: ..\\fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\fullscreen.c glext_dll.obj: ..\\glext.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\glext.c image_dll.obj: ..\\image.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\image.c init_dll.obj: ..\\init.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\init.c input_dll.obj: ..\\input.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\input.c joystick_dll.obj: ..\\joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\joystick.c stream_dll.obj: ..\\stream.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\stream.c tga_dll.obj: ..\\tga.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\tga.c thread_dll.obj: ..\\thread.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\thread.c time_dll.obj: ..\\time.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\time.c window_dll.obj: ..\\window.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ ..\\window.c win32_dllmain_dll.obj: win32_dllmain.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_dllmain.c win32_enable_dll.obj: win32_enable.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_enable.c win32_fullscreen_dll.obj: win32_fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_fullscreen.c win32_glext_dll.obj: win32_glext.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_glext.c win32_init_dll.obj: win32_init.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_init.c win32_joystick_dll.obj: win32_joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_joystick.c win32_thread_dll.obj: win32_thread.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_thread.c win32_time_dll.obj: win32_time.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_time.c win32_window_dll.obj: win32_window.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) -Fo$@ win32_window.c glfw-2.7.2/lib/win32/win32_time.c0000644000175000017500000001063211577637342017330 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Initialise timer //======================================================================== void _glfwInitTimer( void ) { __int64 freq; // Check if we have a performance counter if( QueryPerformanceFrequency( (LARGE_INTEGER *)&freq ) ) { // Performance counter is available => use it! _glfwLibrary.Timer.HasPerformanceCounter = GL_TRUE; // Counter resolution is 1 / counter frequency _glfwLibrary.Timer.Resolution = 1.0 / (double)freq; // Set start time for timer QueryPerformanceCounter( (LARGE_INTEGER *)&_glfwLibrary.Timer.t0_64 ); } else { // No performace counter available => use the tick counter _glfwLibrary.Timer.HasPerformanceCounter = GL_FALSE; // Counter resolution is 1 ms _glfwLibrary.Timer.Resolution = 0.001; // Set start time for timer _glfwLibrary.Timer.t0_32 = _glfw_timeGetTime(); } } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Return timer value in seconds //======================================================================== double _glfwPlatformGetTime( void ) { double t; __int64 t_64; if( _glfwLibrary.Timer.HasPerformanceCounter ) { QueryPerformanceCounter( (LARGE_INTEGER *)&t_64 ); t = (double)(t_64 - _glfwLibrary.Timer.t0_64); } else { t = (double)(_glfw_timeGetTime() - _glfwLibrary.Timer.t0_32); } // Calculate the current time in seconds return t * _glfwLibrary.Timer.Resolution; } //======================================================================== // Set timer value in seconds //======================================================================== void _glfwPlatformSetTime( double t ) { __int64 t_64; if( _glfwLibrary.Timer.HasPerformanceCounter ) { QueryPerformanceCounter( (LARGE_INTEGER *)&t_64 ); _glfwLibrary.Timer.t0_64 = t_64 - (__int64)(t/_glfwLibrary.Timer.Resolution); } else { _glfwLibrary.Timer.t0_32 = _glfw_timeGetTime() - (int)(t*1000.0); } } //======================================================================== // Put a thread to sleep for a specified amount of time //======================================================================== void _glfwPlatformSleep( double time ) { DWORD t; if( time == 0.0 ) { t = 0; } else if( time < 0.001 ) { t = 1; } else if( time > 2147483647.0 ) { t = 2147483647; } else { t = (DWORD)(time*1000.0 + 0.5); } Sleep( t ); } glfw-2.7.2/lib/win32/Makefile.win32.ow0000644000175000017500000001666311272440721020224 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Windows using Open Watcom 1.0. #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # "wmake -ms -f Makefile.win32.ow" or "nmake -f Makefile.win32.ow" ########################################################################## ########################################################################## # Default: Build static and dynamic versions of GLFW ########################################################################## all: glfw.lib glfw.dll ########################################################################## # GLFW version ########################################################################## VERMAJOR = 2 VERMINOR = 7 ########################################################################## # Compiler settings ########################################################################## CC = cl386 CFLAGS = /nologo /c /O1sgiy /Gs /W3 /I. /I.. CFLAGS_DLL = $(CFLAGS) /DGLFW_BUILD_DLL ########################################################################## # Library builder settings ########################################################################## # Static library MKLIB = lib386 LIBFLAGS = /nologo # DLL LINK = wlink LINKFLAGS = OPTION { quiet version=$(VERMAJOR).$(VERMINOR) } SYSTEM nt_dll initinstance terminstance LINKLIBS = opengl32.lib user32.lib ########################################################################## # Object files for static library ########################################################################## OBJS = \ enable.obj \ fullscreen.obj \ glext.obj \ image.obj \ init.obj \ input.obj \ joystick.obj \ stream.obj \ tga.obj \ thread.obj \ time.obj \ window.obj \ win32_enable.obj \ win32_fullscreen.obj \ win32_glext.obj \ win32_init.obj \ win32_joystick.obj \ win32_thread.obj \ win32_time.obj \ win32_window.obj ########################################################################## # Object files for dynamic library ########################################################################## DLLOBJS = \ enable_dll.obj \ fullscreen_dll.obj \ glext_dll.obj \ image_dll.obj \ init_dll.obj \ input_dll.obj \ joystick_dll.obj \ stream_dll.obj \ tga_dll.obj \ thread_dll.obj \ time_dll.obj \ window_dll.obj \ win32_dllmain_dll.obj \ win32_enable_dll.obj \ win32_fullscreen_dll.obj \ win32_glext_dll.obj \ win32_init_dll.obj \ win32_joystick_dll.obj \ win32_thread_dll.obj \ win32_time_dll.obj \ win32_window_dll.obj ########################################################################## # Rule for building static library ########################################################################## glfw.lib: $(OBJS) $(MKLIB) $(LIBFLAGS) /OUT:glfw.lib $(OBJS) ########################################################################## # Rule for building dynamic library ########################################################################## glfw.dll: $(DLLOBJS) $(LINK) $(LINKFLAGS) NAME glfw.dll OPTION { modname='GLFW.DLL' implib=glfwdll.lib stack=1M START=__DLLstartw_ } REFERENCE __DLLstartw_ FILE { $(DLLOBJS) } LIBRARY { $(LINKLIBS) } ########################################################################## # Rules for building static library object files ########################################################################## enable.obj: ..\\enable.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\enable.c fullscreen.obj: ..\\fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\fullscreen.c glext.obj: ..\\glext.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\glext.c image.obj: ..\\image.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\image.c init.obj: ..\\init.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\init.c input.obj: ..\\input.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\input.c joystick.obj: ..\\joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\joystick.c stream.obj: ..\\stream.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\stream.c tga.obj: ..\\tga.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\tga.c thread.obj: ..\\thread.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\thread.c time.obj: ..\\time.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\time.c window.obj: ..\\window.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ ..\\window.c win32_enable.obj: win32_enable.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_enable.c win32_fullscreen.obj: win32_fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_fullscreen.c win32_glext.obj: win32_glext.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_glext.c win32_init.obj: win32_init.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_init.c win32_joystick.obj: win32_joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_joystick.c win32_thread.obj: win32_thread.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_thread.c win32_time.obj: win32_time.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_time.c win32_window.obj: win32_window.c ..\\internal.h platform.h $(CC) $(CFLAGS) /Fo$@ win32_window.c ########################################################################## # Rules for building dynamic library object files ########################################################################## enable_dll.obj: ..\\enable.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\enable.c fullscreen_dll.obj: ..\\fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\fullscreen.c glext_dll.obj: ..\\glext.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\glext.c image_dll.obj: ..\\image.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\image.c init_dll.obj: ..\\init.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\init.c input_dll.obj: ..\\input.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\input.c joystick_dll.obj: ..\\joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\joystick.c stream_dll.obj: ..\\stream.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\stream.c tga_dll.obj: ..\\tga.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\tga.c thread_dll.obj: ..\\thread.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\thread.c time_dll.obj: ..\\time.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\time.c window_dll.obj: ..\\window.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ ..\\window.c win32_dllmain_dll.obj: win32_dllmain.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_dllmain.c win32_enable_dll.obj: win32_enable.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_enable.c win32_fullscreen_dll.obj: win32_fullscreen.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_fullscreen.c win32_glext_dll.obj: win32_glext.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_glext.c win32_init_dll.obj: win32_init.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_init.c win32_joystick_dll.obj: win32_joystick.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_joystick.c win32_thread_dll.obj: win32_thread.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_thread.c win32_time_dll.obj: win32_time.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_time.c win32_window_dll.obj: win32_window.c ..\\internal.h platform.h $(CC) $(CFLAGS_DLL) /Fo$@ win32_window.c glfw-2.7.2/lib/win32/win32_glext.c0000644000175000017500000000550311427547437017515 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Check if the current context supports the specified WGL extension //======================================================================== int _glfwPlatformExtensionSupported( const char *extension ) { const GLubyte *extensions; if( _glfwWin.GetExtensionsStringEXT != NULL ) { extensions = (GLubyte *) _glfwWin.GetExtensionsStringEXT(); if( extensions != NULL ) { if( _glfwStringInExtensionString( extension, extensions ) ) { return GL_TRUE; } } } if( _glfwWin.GetExtensionsStringARB != NULL ) { extensions = (GLubyte *) _glfwWin.GetExtensionsStringARB( _glfwWin.DC ); if( extensions != NULL ) { if( _glfwStringInExtensionString( extension, extensions ) ) { return GL_TRUE; } } } return GL_FALSE; } //======================================================================== // Get the function pointer to an OpenGL function //======================================================================== void *_glfwPlatformGetProcAddress( const char *procname ) { return (void *) wglGetProcAddress( procname ); } glfw-2.7.2/lib/win32/glfwdll_mgw2.def0000644000175000017500000000242210610526460020232 0ustar elmindredaelmindredaLIBRARY GLFW.DLL EXPORTS glfwBroadcastCond@4 glfwCloseWindow@0 glfwCreateCond@0 glfwCreateMutex@0 glfwCreateThread@8 glfwDestroyCond@4 glfwDestroyMutex@4 glfwDestroyThread@4 glfwDisable@4 glfwEnable@4 glfwExtensionSupported@4 glfwFreeImage@4 glfwGetDesktopMode@4 glfwGetGLVersion@12 glfwGetJoystickButtons@12 glfwGetJoystickParam@8 glfwGetJoystickPos@12 glfwGetKey@4 glfwGetMouseButton@4 glfwGetMousePos@8 glfwGetMouseWheel@0 glfwGetNumberOfProcessors@0 glfwGetProcAddress@4 glfwGetThreadID@0 glfwGetTime@0 glfwGetVersion@12 glfwGetVideoModes@8 glfwGetWindowParam@4 glfwGetWindowSize@8 glfwIconifyWindow@0 glfwInit@0 glfwLoadMemoryTexture2D@12 glfwLoadTexture2D@8 glfwLoadTextureImage2D@8 glfwLockMutex@4 glfwOpenWindow@36 glfwOpenWindowHint@8 glfwPollEvents@0 glfwReadImage@12 glfwReadMemoryImage@16 glfwRestoreWindow@0 glfwSetCharCallback@4 glfwSetKeyCallback@4 glfwSetMouseButtonCallback@4 glfwSetMousePos@8 glfwSetMousePosCallback@4 glfwSetMouseWheel@4 glfwSetMouseWheelCallback@4 glfwSetTime@8 glfwSetWindowCloseCallback@4 glfwSetWindowRefreshCallback@4 glfwSetWindowPos@8 glfwSetWindowSize@8 glfwSetWindowSizeCallback@4 glfwSetWindowTitle@4 glfwSignalCond@4 glfwSleep@8 glfwSwapBuffers@0 glfwSwapInterval@4 glfwTerminate@0 glfwUnlockMutex@4 glfwWaitCond@16 glfwWaitEvents@0 glfwWaitThread@8 glfw-2.7.2/lib/win32/win32_fullscreen.c0000644000175000017500000002344611577637342020543 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Convert BPP to RGB bits based on "best guess" //======================================================================== static void bpp2rgb( int bpp, int *r, int *g, int *b ) { int delta; // We assume that by 32 they really meant 24 if( bpp == 32 ) { bpp = 24; } // Convert "bits per pixel" to red, green & blue sizes *r = *g = *b = bpp / 3; delta = bpp - (*r * 3); if( delta >= 1 ) { *g = *g + 1; } if( delta == 2 ) { *r = *r + 1; } } //======================================================================== // Return closest video mode by dimensions, refresh rate and bits per pixel //======================================================================== int _glfwGetClosestVideoModeBPP( int *w, int *h, int *bpp, int *refresh ) { int mode, bestmode, match, bestmatch, rr, bestrr, success; DEVMODE dm; // Find best match bestmatch = 0x7fffffff; bestrr = 0x7fffffff; mode = bestmode = 0; do { dm.dmSize = sizeof( DEVMODE ); success = EnumDisplaySettings( NULL, mode, &dm ); if( success ) { match = dm.dmBitsPerPel - *bpp; if( match < 0 ) match = -match; match = ( match << 25 ) | ( (dm.dmPelsWidth - *w) * (dm.dmPelsWidth - *w) + (dm.dmPelsHeight - *h) * (dm.dmPelsHeight - *h) ); if( match < bestmatch ) { bestmatch = match; bestmode = mode; bestrr = (dm.dmDisplayFrequency - *refresh) * (dm.dmDisplayFrequency - *refresh); } else if( match == bestmatch && *refresh > 0 ) { rr = (dm.dmDisplayFrequency - *refresh) * (dm.dmDisplayFrequency - *refresh); if( rr < bestrr ) { bestmatch = match; bestmode = mode; bestrr = rr; } } } mode ++; } while( success ); // Get the parameters for the best matching display mode dm.dmSize = sizeof( DEVMODE ); (void) EnumDisplaySettings( NULL, bestmode, &dm ); // Fill out actual width and height *w = dm.dmPelsWidth; *h = dm.dmPelsHeight; // Return bits per pixel *bpp = dm.dmBitsPerPel; // Return vertical refresh rate *refresh = dm.dmDisplayFrequency; return bestmode; } //======================================================================== // Return closest video mode by dimensions, refresh rate and channel sizes //======================================================================== static int getClosestVideoMode( int *w, int *h, int *r, int *g, int *b, int *refresh ) { int bpp, bestmode; // Colorbits = sum of red/green/blue bits bpp = *r + *g + *b; // If colorbits < 15 (e.g. 0) or >= 24, default to 32 bpp if( bpp < 15 || bpp >= 24 ) { bpp = 32; } // Find best match bestmode = _glfwGetClosestVideoModeBPP( w, h, &bpp, refresh ); // Convert "bits per pixel" to red, green & blue sizes bpp2rgb( bpp, r, g, b ); return bestmode; } //======================================================================== // Change the current video mode //======================================================================== void _glfwSetVideoModeMODE( int mode ) { DEVMODE dm; int success; // Get the parameters for the best matching display mode dm.dmSize = sizeof( DEVMODE ); (void) EnumDisplaySettings( NULL, mode, &dm ); // Set which fields we want to specify dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL; // Do we have a prefered refresh rate? if( _glfwWin.desiredRefreshRate > 0 ) { dm.dmFields = dm.dmFields | DM_DISPLAYFREQUENCY; dm.dmDisplayFrequency = _glfwWin.desiredRefreshRate; } // Change display setting dm.dmSize = sizeof( DEVMODE ); success = ChangeDisplaySettings( &dm, CDS_FULLSCREEN ); // If the mode change was not possible, query the current display // settings (we'll use the desktop resolution for fullscreen mode) if( success == DISP_CHANGE_SUCCESSFUL ) { _glfwWin.modeID = mode; } else { _glfwWin.modeID = ENUM_REGISTRY_SETTINGS; EnumDisplaySettings( NULL, ENUM_REGISTRY_SETTINGS, &dm ); } // Set the window size to that of the display mode _glfwWin.width = dm.dmPelsWidth; _glfwWin.height = dm.dmPelsHeight; } //======================================================================== // Change the current video mode //======================================================================== void _glfwSetVideoMode( int *w, int *h, int r, int g, int b, int refresh ) { int bestmode; // Find a best match mode bestmode = getClosestVideoMode( w, h, &r, &g, &b, &refresh ); // Change mode _glfwSetVideoModeMODE( bestmode ); } //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Get a list of available video modes //======================================================================== int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ) { int count, success, mode, i, j; int m1, m2, bpp, r, g, b; DEVMODE dm; // Loop through all video modes and extract all the UNIQUE modes count = 0; mode = 0; do { // Get video mode properties dm.dmSize = sizeof( DEVMODE ); success = EnumDisplaySettings( NULL, mode, &dm ); // Is it a valid mode? (only list depths >= 15 bpp) if( success && dm.dmBitsPerPel >= 15 ) { // Convert to RGB, and back to bpp ("mask out" alpha bits etc) bpp2rgb( dm.dmBitsPerPel, &r, &g, &b ); bpp = r + g + b; // Mode "code" for this mode m1 = (bpp << 25) | (dm.dmPelsWidth * dm.dmPelsHeight); // Insert mode in list (sorted), and avoid duplicates for( i = 0; i < count; i ++ ) { // Mode "code" for already listed mode bpp = list[i].RedBits + list[i].GreenBits + list[i].BlueBits; m2 = (bpp << 25) | (list[i].Width * list[i].Height); if( m1 <= m2 ) { break; } } // New entry at the end of the list? if( i >= count ) { list[count].Width = dm.dmPelsWidth; list[count].Height = dm.dmPelsHeight; list[count].RedBits = r; list[count].GreenBits = g; list[count].BlueBits = b; count ++; } // Insert new entry in the list? else if( m1 < m2 ) { for( j = count; j > i; j -- ) { list[j] = list[j-1]; } list[i].Width = dm.dmPelsWidth; list[i].Height = dm.dmPelsHeight; list[i].RedBits = r; list[i].GreenBits = g; list[i].BlueBits = b; count ++; } } mode ++; } while( success && (count < maxcount) ); return count; } //======================================================================== // Get the desktop video mode //======================================================================== void _glfwPlatformGetDesktopMode( GLFWvidmode *mode ) { DEVMODE dm; // Get desktop display mode dm.dmSize = sizeof( DEVMODE ); (void) EnumDisplaySettings( NULL, ENUM_REGISTRY_SETTINGS, &dm ); // Return desktop mode parameters mode->Width = dm.dmPelsWidth; mode->Height = dm.dmPelsHeight; bpp2rgb( dm.dmBitsPerPel, &mode->RedBits, &mode->GreenBits, &mode->BlueBits ); } glfw-2.7.2/lib/win32/Makefile.win32.cygwin0000644000175000017500000001772411601433472021077 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Windows using Cygwin. #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # make -f Makefile.win32.cygwin ########################################################################## PREFIX ?= /usr/local ########################################################################## # GLFW version ########################################################################## VERMAJOR = 2 VERMINOR = 7 ########################################################################## # Compiler settings ########################################################################## CC = gcc CFLAGS = -c -I. -I.. -Wall -mwin32 -mno-cygwin -O2 CFLAGS_DLL = $(CFLAGS) -mdll -DGLFW_BUILD_DLL -D_GLFW_NO_DLOAD_GDI32 -D_GLFW_NO_DLOAD_WINMM HEADERS = ../../include/GL/glfw.h ../internal.h platform.h ########################################################################## # Library builder settings ########################################################################## # Static library MKLIB = ar LIBFLAGS = -rcs # DLL LINK = gcc LINKFLAGS = -shared -s -mno-cygwin -Wl,--kill-at,--major-image-version,$(VERMAJOR),--minor-image-version,$(VERMINOR) LINKLIBS = -lopengl32 -lwinmm -lgdi32 SED = sed INSTALL = install ########################################################################## # Object files for static library ########################################################################## OBJS = \ enable.o \ fullscreen.o \ glext.o \ image.o \ init.o \ input.o \ joystick.o \ stream.o \ tga.o \ thread.o \ time.o \ window.o \ win32_enable.o \ win32_fullscreen.o \ win32_glext.o \ win32_init.o \ win32_joystick.o \ win32_thread.o \ win32_time.o \ win32_window.o ########################################################################## # Object files for dynamic library ########################################################################## DLLOBJS = \ enable_dll.o \ fullscreen_dll.o \ glext_dll.o \ image_dll.o \ init_dll.o \ input_dll.o \ joystick_dll.o \ stream_dll.o \ tga_dll.o \ thread_dll.o \ time_dll.o \ window_dll.o \ win32_dllmain_dll.o \ win32_enable_dll.o \ win32_fullscreen_dll.o \ win32_glext_dll.o \ win32_init_dll.o \ win32_joystick_dll.o \ win32_thread_dll.o \ win32_time_dll.o \ win32_window_dll.o ########################################################################## # Default: Build static and dynamic versions of GLFW ########################################################################## all: libglfw.a glfw.dll ########################################################################## # Install GLFW header and static library ########################################################################## install: libglfw.a libglfw.pc $(INSTALL) -d $(PREFIX)/lib $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a $(INSTALL) -d $(PREFIX)/include/GL $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h $(INSTALL) -d $(PREFIX)/lib/pkgconfig $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc ########################################################################## # Clean up generated files ########################################################################## clean: rm -f $(OBJS) $(DLLOBJS) rm -f libglfw.a glfw.dll libglfw.pc ########################################################################## # Rule for building libglfw.pc ########################################################################## libglfw.pc: libglfw.pc.in $(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc ########################################################################## # Rule for building static library ########################################################################## libglfw.a: $(OBJS) $(MKLIB) $(LIBFLAGS) libglfw.a $(OBJS) ########################################################################## # Rule for building dynamic library ########################################################################## glfw.dll: $(DLLOBJS) $(LINK) $(LINKFLAGS) -o $@ $(DLLOBJS) $(LINKLIBS) dlltool --kill-at --output-lib libglfwdll.a --def glfwdll_mgw2.def ########################################################################## # Rules for building static library object files ########################################################################## enable.o: ../enable.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../enable.c fullscreen.o: ../fullscreen.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../fullscreen.c glext.o: ../glext.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../glext.c image.o: ../image.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../image.c init.o: ../init.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../init.c input.o: ../input.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../input.c joystick.o: ../joystick.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../joystick.c stream.o: ../stream.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../stream.c tga.o: ../tga.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../tga.c thread.o: ../thread.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../thread.c time.o: ../time.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../time.c window.o: ../window.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../window.c win32_enable.o: win32_enable.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_enable.c win32_fullscreen.o: win32_fullscreen.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_fullscreen.c win32_glext.o: win32_glext.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_glext.c win32_init.o: win32_init.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_init.c win32_joystick.o: win32_joystick.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_joystick.c win32_thread.o: win32_thread.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_thread.c win32_time.o: win32_time.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_time.c win32_window.o: win32_window.c $(HEADERS) $(CC) $(CFLAGS) -o $@ win32_window.c ########################################################################## # Rules for building dynamic library object files ########################################################################## enable_dll.o: ../enable.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../enable.c fullscreen_dll.o: ../fullscreen.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../fullscreen.c glext_dll.o: ../glext.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../glext.c image_dll.o: ../image.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../image.c init_dll.o: ../init.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../init.c input_dll.o: ../input.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../input.c joystick_dll.o: ../joystick.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../joystick.c stream_dll.o: ../stream.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../stream.c tga_dll.o: ../tga.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../tga.c thread_dll.o: ../thread.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../thread.c time_dll.o: ../time.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../time.c window_dll.o: ../window.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ ../window.c win32_dllmain_dll.o: win32_dllmain.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_dllmain.c win32_enable_dll.o: win32_enable.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_enable.c win32_fullscreen_dll.o: win32_fullscreen.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_fullscreen.c win32_glext_dll.o: win32_glext.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_glext.c win32_init_dll.o: win32_init.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_init.c win32_joystick_dll.o: win32_joystick.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_joystick.c win32_thread_dll.o: win32_thread.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_thread.c win32_time_dll.o: win32_time.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_time.c win32_window_dll.o: win32_window.c $(HEADERS) $(CC) $(CFLAGS_DLL) -o $@ win32_window.c glfw-2.7.2/lib/win32/Makefile.win32.cross-mgw0000644000175000017500000002047111601433472021511 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Windows using MinGW32. #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # make -f Makefile.win32.mgw ########################################################################## PREFIX ?= /usr/i586-mingw32msvc TARGET ?= i586-mingw32msvc- ########################################################################## # GLFW version ########################################################################## VERMAJOR = 2 VERMINOR = 7 ########################################################################## # Compiler settings ########################################################################## CC = gcc CFLAGS = -c -I. -I.. -Wall -O2 CFLAGS_DLL = $(CFLAGS) -mdll -DGLFW_BUILD_DLL -D_GLFW_NO_DLOAD_GDI32 -D_GLFW_NO_DLOAD_WINMM HEADERS = ../../include/GL/glfw.h ../internal.h platform.h ########################################################################## # Library builder settings ########################################################################## # Static library MKLIB = ar LIBFLAGS = -rcs # DLL LINK = dllwrap LINKFLAGS = -s -Wl,--major-image-version,$(VERMAJOR),--minor-image-version,$(VERMINOR) LINKLIBS = -lopengl32 -lwinmm -lgdi32 DLLTOOL = dlltool SED = sed INSTALL = install ########################################################################## # Object files for static library ########################################################################## OBJS = \ enable.o \ fullscreen.o \ glext.o \ image.o \ init.o \ input.o \ joystick.o \ stream.o \ tga.o \ thread.o \ time.o \ window.o \ win32_enable.o \ win32_fullscreen.o \ win32_glext.o \ win32_init.o \ win32_joystick.o \ win32_thread.o \ win32_time.o \ win32_window.o ########################################################################## # Object files for dynamic library ########################################################################## DLLOBJS = \ enable_dll.o \ fullscreen_dll.o \ glext_dll.o \ image_dll.o \ init_dll.o \ input_dll.o \ joystick_dll.o \ stream_dll.o \ tga_dll.o \ thread_dll.o \ time_dll.o \ window_dll.o \ win32_dllmain_dll.o \ win32_enable_dll.o \ win32_fullscreen_dll.o \ win32_glext_dll.o \ win32_init_dll.o \ win32_joystick_dll.o \ win32_thread_dll.o \ win32_time_dll.o \ win32_window_dll.o ########################################################################## # Default: Build static and dynamic versions of GLFW ########################################################################## all: libglfw.a glfw.dll ########################################################################## # Install GLFW header and static library ########################################################################## install: glfw.dll libglfw.a libglfw.pc $(INSTALL) -d $(PREFIX)/bin $(INSTALL) -c glfw.dll $(PREFIX)/bin/glfw.dll $(INSTALL) -d $(PREFIX)/lib $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a $(INSTALL) -d $(PREFIX)/include/GL $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h $(INSTALL) -d $(PREFIX)/lib/pkgconfig $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc ########################################################################## # Clean up generated files ########################################################################## clean: rm -f $(OBJS) $(DLLOBJS) rm -f libglfw.a libglfwdll.a glfw.dll libglfw.pc ########################################################################## # Rule for building static library ########################################################################## libglfw.a: $(OBJS) $(TARGET)$(MKLIB) $(LIBFLAGS) $@ $(OBJS) $(SYSOBJS) ########################################################################## # Rule for building dynamic library ########################################################################## glfw.dll: $(DLLOBJS) $(TARGET)$(LINK) --dllname $@ --def glfwdll_mgw1.def $(DLLOBJS) $(LINKFLAGS) $(LINKLIBS) $(TARGET)$(DLLTOOL) --kill-at --output-lib libglfwdll.a --def glfwdll_mgw2.def libglfw.pc: libglfw.pc.in $(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc ########################################################################## # Rules for building static library object files ########################################################################## enable.o: ../enable.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../enable.c fullscreen.o: ../fullscreen.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../fullscreen.c glext.o: ../glext.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../glext.c image.o: ../image.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../image.c init.o: ../init.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../init.c input.o: ../input.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../input.c joystick.o: ../joystick.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../joystick.c stream.o: ../stream.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../stream.c tga.o: ../tga.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../tga.c thread.o: ../thread.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../thread.c time.o: ../time.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../time.c window.o: ../window.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ ../window.c win32_enable.o: win32_enable.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_enable.c win32_fullscreen.o: win32_fullscreen.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_fullscreen.c win32_glext.o: win32_glext.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_glext.c win32_init.o: win32_init.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_init.c win32_joystick.o: win32_joystick.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_joystick.c win32_thread.o: win32_thread.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_thread.c win32_time.o: win32_time.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_time.c win32_window.o: win32_window.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS) -o $@ win32_window.c ########################################################################## # Rules for building dynamic library object files ########################################################################## enable_dll.o: ../enable.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../enable.c fullscreen_dll.o: ../fullscreen.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../fullscreen.c glext_dll.o: ../glext.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../glext.c image_dll.o: ../image.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../image.c init_dll.o: ../init.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../init.c input_dll.o: ../input.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../input.c joystick_dll.o: ../joystick.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../joystick.c stream_dll.o: ../stream.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../stream.c tga_dll.o: ../tga.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../tga.c thread_dll.o: ../thread.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../thread.c time_dll.o: ../time.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../time.c window_dll.o: ../window.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ ../window.c win32_dllmain_dll.o: win32_dllmain.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_dllmain.c win32_enable_dll.o: win32_enable.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_enable.c win32_fullscreen_dll.o: win32_fullscreen.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_fullscreen.c win32_glext_dll.o: win32_glext.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_glext.c win32_init_dll.o: win32_init.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_init.c win32_joystick_dll.o: win32_joystick.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_joystick.c win32_thread_dll.o: win32_thread.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_thread.c win32_time_dll.o: win32_time.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_time.c win32_window_dll.o: win32_window.c $(HEADERS) $(TARGET)$(CC) $(CFLAGS_DLL) -o $@ win32_window.c glfw-2.7.2/lib/win32/Makefile.win32.mingw0000644000175000017500000001656711601434576020732 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Windows using MinGW32. #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # make -f Makefile.win32.mgw ########################################################################## ########################################################################## # Default: Build static and dynamic versions of GLFW ########################################################################## all: libglfw.a glfw.dll ########################################################################## # GLFW version ########################################################################## VERMAJOR = 2 VERMINOR = 7 ########################################################################## # Compiler settings ########################################################################## CC = gcc CFLAGS = -c -I. -I.. -Wall -O2 CFLAGS_DLL = $(CFLAGS) -mdll -DGLFW_BUILD_DLL -D_GLFW_NO_DLOAD_GDI32 -D_GLFW_NO_DLOAD_WINMM ########################################################################## # Library builder settings ########################################################################## # Static library MKLIB = ar LIBFLAGS = -rcs # DLL LINK = dllwrap LINKFLAGS = -s -Wl,--major-image-version,$(VERMAJOR),--minor-image-version,$(VERMINOR) LINKLIBS = -lopengl32 -lwinmm -lgdi32 ########################################################################## # Object files for static library ########################################################################## OBJS = \ enable.o \ fullscreen.o \ glext.o \ image.o \ init.o \ input.o \ joystick.o \ stream.o \ tga.o \ thread.o \ time.o \ window.o \ win32_enable.o \ win32_fullscreen.o \ win32_glext.o \ win32_init.o \ win32_joystick.o \ win32_thread.o \ win32_time.o \ win32_window.o ########################################################################## # Object files for dynamic library ########################################################################## DLLOBJS = \ enable_dll.o \ fullscreen_dll.o \ glext_dll.o \ image_dll.o \ init_dll.o \ input_dll.o \ joystick_dll.o \ stream_dll.o \ tga_dll.o \ thread_dll.o \ time_dll.o \ window_dll.o \ win32_dllmain_dll.o \ win32_enable_dll.o \ win32_fullscreen_dll.o \ win32_glext_dll.o \ win32_init_dll.o \ win32_joystick_dll.o \ win32_thread_dll.o \ win32_time_dll.o \ win32_window_dll.o ########################################################################## # Rule for building static library ########################################################################## libglfw.a: $(OBJS) $(MKLIB) $(LIBFLAGS) $@ $(OBJS) $(SYSOBJS) ########################################################################## # Rule for building dynamic library ########################################################################## glfw.dll: $(DLLOBJS) $(LINK) --dllname $@ --def glfwdll_mgw1.def $(DLLOBJS) $(LINKFLAGS) $(LINKLIBS) dlltool --kill-at --output-lib libglfwdll.a --def glfwdll_mgw2.def ########################################################################## # Rules for building static library object files ########################################################################## enable.o: ../enable.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../enable.c fullscreen.o: ../fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../fullscreen.c glext.o: ../glext.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../glext.c image.o: ../image.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../image.c init.o: ../init.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../init.c input.o: ../input.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../input.c joystick.o: ../joystick.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../joystick.c stream.o: ../stream.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../stream.c tga.o: ../tga.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../tga.c thread.o: ../thread.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../thread.c time.o: ../time.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../time.c window.o: ../window.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../window.c win32_enable.o: win32_enable.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_enable.c win32_fullscreen.o: win32_fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_fullscreen.c win32_glext.o: win32_glext.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_glext.c win32_init.o: win32_init.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_init.c win32_joystick.o: win32_joystick.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_joystick.c win32_thread.o: win32_thread.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_thread.c win32_time.o: win32_time.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_time.c win32_window.o: win32_window.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ win32_window.c ########################################################################## # Rules for building dynamic library object files ########################################################################## enable_dll.o: ../enable.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../enable.c fullscreen_dll.o: ../fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../fullscreen.c glext_dll.o: ../glext.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../glext.c image_dll.o: ../image.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../image.c init_dll.o: ../init.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../init.c input_dll.o: ../input.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../input.c joystick_dll.o: ../joystick.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../joystick.c stream_dll.o: ../stream.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../stream.c tga_dll.o: ../tga.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../tga.c thread_dll.o: ../thread.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../thread.c time_dll.o: ../time.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../time.c window_dll.o: ../window.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ ../window.c win32_dllmain_dll.o: win32_dllmain.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_dllmain.c win32_enable_dll.o: win32_enable.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_enable.c win32_fullscreen_dll.o: win32_fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_fullscreen.c win32_glext_dll.o: win32_glext.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_glext.c win32_init_dll.o: win32_init.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_init.c win32_joystick_dll.o: win32_joystick.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_joystick.c win32_thread_dll.o: win32_thread.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_thread.c win32_time_dll.o: win32_time.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_time.c win32_window_dll.o: win32_window.c ../internal.h platform.h $(CC) $(CFLAGS_DLL) -o $@ win32_window.c glfw-2.7.2/lib/win32/win32_init.c0000644000175000017500000002660211601076546017330 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" // With the Borland C++ compiler, we want to disable FPU exceptions #ifdef __BORLANDC__ #include #endif // __BORLANDC__ //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Load necessary libraries (DLLs) //======================================================================== static int _glfwInitLibraries( void ) { // gdi32.dll (OpenGL pixel format functions & SwapBuffers) #ifndef _GLFW_NO_DLOAD_GDI32 _glfwLibrary.Libs.gdi32 = LoadLibrary( "gdi32.dll" ); if( _glfwLibrary.Libs.gdi32 != NULL ) { _glfwLibrary.Libs.ChoosePixelFormat = (CHOOSEPIXELFORMAT_T) GetProcAddress( _glfwLibrary.Libs.gdi32, "ChoosePixelFormat" ); _glfwLibrary.Libs.DescribePixelFormat = (DESCRIBEPIXELFORMAT_T) GetProcAddress( _glfwLibrary.Libs.gdi32, "DescribePixelFormat" ); _glfwLibrary.Libs.GetPixelFormat = (GETPIXELFORMAT_T) GetProcAddress( _glfwLibrary.Libs.gdi32, "GetPixelFormat" ); _glfwLibrary.Libs.SetPixelFormat = (SETPIXELFORMAT_T) GetProcAddress( _glfwLibrary.Libs.gdi32, "SetPixelFormat" ); _glfwLibrary.Libs.SwapBuffers = (SWAPBUFFERS_T) GetProcAddress( _glfwLibrary.Libs.gdi32, "SwapBuffers" ); if( _glfwLibrary.Libs.ChoosePixelFormat == NULL || _glfwLibrary.Libs.DescribePixelFormat == NULL || _glfwLibrary.Libs.GetPixelFormat == NULL || _glfwLibrary.Libs.SetPixelFormat == NULL || _glfwLibrary.Libs.SwapBuffers == NULL ) { FreeLibrary( _glfwLibrary.Libs.gdi32 ); _glfwLibrary.Libs.gdi32 = NULL; return GL_FALSE; } } else { return GL_FALSE; } #endif // _GLFW_NO_DLOAD_GDI32 // winmm.dll (for joystick and timer support) #ifndef _GLFW_NO_DLOAD_WINMM _glfwLibrary.Libs.winmm = LoadLibrary( "winmm.dll" ); if( _glfwLibrary.Libs.winmm != NULL ) { _glfwLibrary.Libs.joyGetDevCapsA = (JOYGETDEVCAPSA_T) GetProcAddress( _glfwLibrary.Libs.winmm, "joyGetDevCapsA" ); _glfwLibrary.Libs.joyGetPos = (JOYGETPOS_T) GetProcAddress( _glfwLibrary.Libs.winmm, "joyGetPos" ); _glfwLibrary.Libs.joyGetPosEx = (JOYGETPOSEX_T) GetProcAddress( _glfwLibrary.Libs.winmm, "joyGetPosEx" ); _glfwLibrary.Libs.timeGetTime = (TIMEGETTIME_T) GetProcAddress( _glfwLibrary.Libs.winmm, "timeGetTime" ); if( _glfwLibrary.Libs.joyGetDevCapsA == NULL || _glfwLibrary.Libs.joyGetPos == NULL || _glfwLibrary.Libs.joyGetPosEx == NULL || _glfwLibrary.Libs.timeGetTime == NULL ) { FreeLibrary( _glfwLibrary.Libs.winmm ); _glfwLibrary.Libs.winmm = NULL; return GL_FALSE; } } else { return GL_FALSE; } #endif // _GLFW_NO_DLOAD_WINMM return GL_TRUE; } //======================================================================== // Unload used libraries (DLLs) //======================================================================== static void _glfwFreeLibraries( void ) { // gdi32.dll #ifndef _GLFW_NO_DLOAD_GDI32 if( _glfwLibrary.Libs.gdi32 != NULL ) { FreeLibrary( _glfwLibrary.Libs.gdi32 ); _glfwLibrary.Libs.gdi32 = NULL; } #endif // _GLFW_NO_DLOAD_GDI32 // winmm.dll #ifndef _GLFW_NO_DLOAD_WINMM if( _glfwLibrary.Libs.winmm != NULL ) { FreeLibrary( _glfwLibrary.Libs.winmm ); _glfwLibrary.Libs.winmm = NULL; } #endif // _GLFW_NO_DLOAD_WINMM } //======================================================================== // Initialize GLFW thread package //======================================================================== static void _glfwInitThreads( void ) { // Initialize critical section handle InitializeCriticalSection( &_glfwThrd.CriticalSection ); // The first thread (the main thread) has ID 0 _glfwThrd.NextID = 0; // Fill out information about the main thread (this thread) _glfwThrd.First.ID = _glfwThrd.NextID ++; _glfwThrd.First.Function = NULL; _glfwThrd.First.Handle = GetCurrentThread(); _glfwThrd.First.WinID = GetCurrentThreadId(); _glfwThrd.First.Previous = NULL; _glfwThrd.First.Next = NULL; } //======================================================================== // Terminate GLFW thread package //======================================================================== static void _glfwTerminateThreads( void ) { _GLFWthread *t, *t_next; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Kill all threads (NOTE: THE USER SHOULD WAIT FOR ALL THREADS TO // DIE, _BEFORE_ CALLING glfwTerminate()!!!) t = _glfwThrd.First.Next; while( t != NULL ) { // Get pointer to next thread t_next = t->Next; // Simply murder the process, no mercy! if( TerminateThread( t->Handle, 0 ) ) { // Close thread handle CloseHandle( t->Handle ); // Free memory allocated for this thread free( (void *) t ); } // Select next thread in list t = t_next; } // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Delete critical section handle DeleteCriticalSection( &_glfwThrd.CriticalSection ); } //======================================================================== // Terminate GLFW when exiting application //======================================================================== void _glfwTerminate_atexit( void ) { glfwTerminate(); } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Initialize various GLFW state //======================================================================== int _glfwPlatformInit( void ) { OSVERSIONINFO osi; // To make SetForegroundWindow() work as we want, we need to fiddle // with the FOREGROUNDLOCKTIMEOUT system setting (we do this as early // as possible in the hope of still being the foreground process) SystemParametersInfo( SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &_glfwLibrary.Sys.foregroundLockTimeout, 0 ); SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID)0, SPIF_SENDCHANGE ); // Check which OS version we are running osi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO ); GetVersionEx( &osi ); _glfwLibrary.Sys.winVer = _GLFW_WIN_UNKNOWN; if( osi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ) { if( osi.dwMajorVersion == 4 && osi.dwMinorVersion < 10 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_95; } else if( osi.dwMajorVersion == 4 && osi.dwMinorVersion < 90 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_98; } else if( osi.dwMajorVersion == 4 && osi.dwMinorVersion == 90 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_ME; } else if( osi.dwMajorVersion >= 4 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_UNKNOWN_9x; } } else if( osi.dwPlatformId == VER_PLATFORM_WIN32_NT ) { if( osi.dwMajorVersion == 4 && osi.dwMinorVersion == 0 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_NT4; } else if( osi.dwMajorVersion == 5 && osi.dwMinorVersion == 0 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_2K; } else if( osi.dwMajorVersion == 5 && osi.dwMinorVersion == 1 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_XP; } else if( osi.dwMajorVersion == 5 && osi.dwMinorVersion == 2 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_NET_SERVER; } else if( osi.dwMajorVersion >= 5 ) { _glfwLibrary.Sys.winVer = _GLFW_WIN_UNKNOWN_NT; } } // Do we have Unicode support? if( _glfwLibrary.Sys.winVer >= _GLFW_WIN_NT4 ) { // Windows NT/2000/XP/.NET has Unicode support _glfwLibrary.Sys.hasUnicode = GL_TRUE; } else { // Windows 9x/ME does not have Unicode support _glfwLibrary.Sys.hasUnicode = GL_FALSE; } // Load libraries (DLLs) if( !_glfwInitLibraries() ) { return GL_FALSE; } // With the Borland C++ compiler, we want to disable FPU exceptions // (this is recommended for OpenGL applications under Windows) #ifdef __BORLANDC__ _control87( MCW_EM, MCW_EM ); #endif // Retrieve GLFW instance handle _glfwLibrary.instance = GetModuleHandle( NULL ); // System keys are not disabled _glfwWin.keyboardHook = NULL; // Initialise thread package _glfwInitThreads(); // Install atexit() routine atexit( _glfwTerminate_atexit ); // Start the timer _glfwInitTimer(); return GL_TRUE; } //======================================================================== // Close window and kill all threads //======================================================================== int _glfwPlatformTerminate( void ) { // Only the main thread is allowed to do this... if( GetCurrentThreadId() != _glfwThrd.First.WinID ) { return GL_FALSE; } // Close OpenGL window glfwCloseWindow(); // Kill thread package _glfwTerminateThreads(); // Enable system keys again (if they were disabled) glfwEnable( GLFW_SYSTEM_KEYS ); // Unload libraries (DLLs) _glfwFreeLibraries(); // Restore FOREGROUNDLOCKTIMEOUT system setting SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID) _glfwLibrary.Sys.foregroundLockTimeout, SPIF_SENDCHANGE ); return GL_TRUE; } glfw-2.7.2/lib/win32/libglfw.pc.in0000644000175000017500000000046111427541114017543 0ustar elmindredaelmindredaprefix=@PREFIX@ exec_prefix=@PREFIX@ libdir=@PREFIX@/lib includedir=@PREFIX@/include Name: GLFW Description: A portable framework for OpenGL development Version: 2.7 URL: http://www.glfw.org/ Libs: -L${libdir} -lglfw -lglu32 -lopengl32 -lm -s -mwindows -e _mainCRTStartup Cflags: -I${includedir} -mwin32 glfw-2.7.2/lib/win32/win32_enable.c0000644000175000017500000001255411427547437017624 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Low level keyboard hook (system callback) function // Used to disable system keys under Windows NT //======================================================================== static LRESULT CALLBACK keyboardHook( int nCode, WPARAM wParam, LPARAM lParam ) { BOOL syskeys = FALSE; PKBDLLHOOKSTRUCT p; // We are only looking for keyboard events - interpret lParam as a // pointer to a KBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) lParam; if( nCode == HC_ACTION ) { // We have a keyboard event switch( wParam ) { case WM_KEYDOWN: case WM_SYSKEYDOWN: case WM_KEYUP: case WM_SYSKEYUP: // Detect: ALT+TAB, ALT+ESC, ALT+F4, CTRL+ESC, // LWIN, RWIN, APPS (mysterious menu key) syskeys = ( p->vkCode == VK_TAB && p->flags & LLKHF_ALTDOWN ) || ( p->vkCode == VK_ESCAPE && p->flags & LLKHF_ALTDOWN ) || ( p->vkCode == VK_F4 && p->flags & LLKHF_ALTDOWN ) || ( p->vkCode == VK_ESCAPE && (GetKeyState(VK_CONTROL) & 0x8000)) || p->vkCode == VK_LWIN || p->vkCode == VK_RWIN || p->vkCode == VK_APPS; break; default: break; } } // Was it a system key combination (e.g. ALT+TAB)? if( syskeys ) { // Pass the key event to our window message loop if( _glfwWin.opened ) { PostMessage( _glfwWin.window, (UINT) wParam, p->vkCode, 0 ); } // We've taken care of it - don't let the system know about this // key event return 1; } else { // It's a harmless key press, let the system deal with it return CallNextHookEx( _glfwWin.keyboardHook, nCode, wParam, lParam ); } } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Enable system keys //======================================================================== void _glfwPlatformEnableSystemKeys( void ) { BOOL dummy; // Use different methods depending on operating system version if( _glfwLibrary.Sys.winVer >= _GLFW_WIN_NT4 ) { if( _glfwWin.keyboardHook != NULL ) { UnhookWindowsHookEx( _glfwWin.keyboardHook ); _glfwWin.keyboardHook = NULL; } } else { (void) SystemParametersInfo( SPI_SETSCREENSAVERRUNNING, FALSE, &dummy, 0 ); } } //======================================================================== // Disable system keys //======================================================================== void _glfwPlatformDisableSystemKeys( void ) { BOOL dummy; // Use different methods depending on operating system version if( _glfwLibrary.Sys.winVer >= _GLFW_WIN_NT4 ) { // Under Windows NT, install a low level keyboard hook _glfwWin.keyboardHook = SetWindowsHookEx( WH_KEYBOARD_LL, keyboardHook, _glfwLibrary.instance, 0 ); } else { // Under Windows 95/98/ME, fool Windows that a screensaver // is running => prevents ALT+TAB, CTRL+ESC and CTRL+ALT+DEL (void) SystemParametersInfo( SPI_SETSCREENSAVERRUNNING, TRUE, &dummy, 0 ); } } glfw-2.7.2/lib/win32/win32_joystick.c0000644000175000017500000001533111577637342020232 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Return GL_TRUE if joystick is present, else return GL_FALSE. //======================================================================== static int _glfwJoystickPresent( int joy ) { JOYINFO ji; // Windows NT 4.0 MMSYSTEM only supports 2 sticks (other Windows // versions support 16 sticks) if( _glfwLibrary.Sys.winVer == _GLFW_WIN_NT4 && joy > GLFW_JOYSTICK_2 ) { return GL_FALSE; } // Is it a valid stick ID (Windows don't support more than 16 sticks)? if( joy < GLFW_JOYSTICK_1 || joy > GLFW_JOYSTICK_16 ) { return GL_FALSE; } // Is the joystick present? if( _glfw_joyGetPos( joy - GLFW_JOYSTICK_1, &ji ) != JOYERR_NOERROR ) { return GL_FALSE; } return GL_TRUE; } //======================================================================== // Calculate joystick position //======================================================================== static float _glfwCalcJoystickPos( DWORD pos, DWORD min, DWORD max ) { float fpos = (float) pos; float fmin = (float) min; float fmax = (float) max; return (2.0f*(fpos - fmin) / (fmax - fmin)) - 1.0f; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Determine joystick capabilities //======================================================================== int _glfwPlatformGetJoystickParam( int joy, int param ) { JOYCAPS jc; // return 0; // Is joystick present? if( !_glfwJoystickPresent( joy ) ) { return 0; } // We got this far, the joystick is present if( param == GLFW_PRESENT ) { return GL_TRUE; } // Get joystick capabilities _glfw_joyGetDevCaps( joy - GLFW_JOYSTICK_1, &jc, sizeof(JOYCAPS) ); switch( param ) { case GLFW_AXES: // Return number of joystick axes return jc.wNumAxes; case GLFW_BUTTONS: // Return number of joystick axes return jc.wNumButtons; default: break; } return 0; } //======================================================================== // Get joystick axis positions //======================================================================== int _glfwPlatformGetJoystickPos( int joy, float *pos, int numaxes ) { JOYCAPS jc; JOYINFOEX ji; int axis; // return 0; // Is joystick present? if( !_glfwJoystickPresent( joy ) ) { return 0; } // Get joystick capabilities _glfw_joyGetDevCaps( joy - GLFW_JOYSTICK_1, &jc, sizeof(JOYCAPS) ); // Get joystick state ji.dwSize = sizeof( JOYINFOEX ); ji.dwFlags = JOY_RETURNX | JOY_RETURNY | JOY_RETURNZ | JOY_RETURNR | JOY_RETURNU | JOY_RETURNV; _glfw_joyGetPosEx( joy - GLFW_JOYSTICK_1, &ji ); // Get position values for all axes axis = 0; if( axis < numaxes ) { pos[ axis++ ] = _glfwCalcJoystickPos( ji.dwXpos, jc.wXmin, jc.wXmax ); } if( axis < numaxes ) { pos[ axis++ ] = -_glfwCalcJoystickPos( ji.dwYpos, jc.wYmin, jc.wYmax ); } if( axis < numaxes && jc.wCaps & JOYCAPS_HASZ ) { pos[ axis++ ] = _glfwCalcJoystickPos( ji.dwZpos, jc.wZmin, jc.wZmax ); } if( axis < numaxes && jc.wCaps & JOYCAPS_HASR ) { pos[ axis++ ] = _glfwCalcJoystickPos( ji.dwRpos, jc.wRmin, jc.wRmax ); } if( axis < numaxes && jc.wCaps & JOYCAPS_HASU ) { pos[ axis++ ] = _glfwCalcJoystickPos( ji.dwUpos, jc.wUmin, jc.wUmax ); } if( axis < numaxes && jc.wCaps & JOYCAPS_HASV ) { pos[ axis++ ] = -_glfwCalcJoystickPos( ji.dwVpos, jc.wVmin, jc.wVmax ); } // Return number of returned axes return axis; } //======================================================================== // Get joystick button states //======================================================================== int _glfwPlatformGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ) { JOYCAPS jc; JOYINFOEX ji; int button; // return 0; // Is joystick present? if( !_glfwJoystickPresent( joy ) ) { return 0; } // Get joystick capabilities _glfw_joyGetDevCaps( joy - GLFW_JOYSTICK_1, &jc, sizeof(JOYCAPS) ); // Get joystick state ji.dwSize = sizeof( JOYINFOEX ); ji.dwFlags = JOY_RETURNBUTTONS; _glfw_joyGetPosEx( joy - GLFW_JOYSTICK_1, &ji ); // Get states of all requested buttons button = 0; while( button < numbuttons && button < (int) jc.wNumButtons ) { buttons[ button ] = (unsigned char) (ji.dwButtons & (1UL << button) ? GLFW_PRESS : GLFW_RELEASE); button ++; } return button; } glfw-2.7.2/lib/win32/platform.h0000644000175000017500000004357711554560243017205 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #ifndef _platform_h_ #define _platform_h_ // This is the Windows version of GLFW #define _GLFW_WIN32 // We don't need all the fancy stuff #define NOMINMAX #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN // Include files #include #include #include "../../include/GL/glfw.h" //======================================================================== // Hack: Define things that some 's do not define //======================================================================== // Some old versions of w32api (used by MinGW and Cygwin) define // WH_KEYBOARD_LL without typedef:ing KBDLLHOOKSTRUCT (!) #if defined(__MINGW32__) || defined(__CYGWIN__) #include #if defined(WH_KEYBOARD_LL) && (__W32API_MAJOR_VERSION == 1) && (__W32API_MINOR_VERSION <= 2) #undef WH_KEYBOARD_LL #endif #endif //------------------------------------------------------------------------ // ** NOTE ** If this gives you compiler errors and you are using MinGW // (or Dev-C++), update to w32api version 1.3 or later: // http://sourceforge.net/project/showfiles.php?group_id=2435 //------------------------------------------------------------------------ #ifndef WH_KEYBOARD_LL #define WH_KEYBOARD_LL 13 typedef struct tagKBDLLHOOKSTRUCT { DWORD vkCode; DWORD scanCode; DWORD flags; DWORD time; DWORD dwExtraInfo; } KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT; #endif // WH_KEYBOARD_LL #ifndef LLKHF_ALTDOWN #define LLKHF_ALTDOWN 0x00000020 #endif #ifndef SPI_SETSCREENSAVERRUNNING #define SPI_SETSCREENSAVERRUNNING 97 #endif #ifndef SPI_GETANIMATION #define SPI_GETANIMATION 72 #endif #ifndef SPI_SETANIMATION #define SPI_SETANIMATION 73 #endif #ifndef SPI_GETFOREGROUNDLOCKTIMEOUT #define SPI_GETFOREGROUNDLOCKTIMEOUT 0x2000 #endif #ifndef SPI_SETFOREGROUNDLOCKTIMEOUT #define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001 #endif #ifndef CDS_FULLSCREEN #define CDS_FULLSCREEN 4 #endif #ifndef PFD_GENERIC_ACCELERATED #define PFD_GENERIC_ACCELERATED 0x00001000 #endif #ifndef PFD_DEPTH_DONTCARE #define PFD_DEPTH_DONTCARE 0x20000000 #endif #ifndef ENUM_CURRENT_SETTINGS #define ENUM_CURRENT_SETTINGS -1 #endif #ifndef ENUM_REGISTRY_SETTINGS #define ENUM_REGISTRY_SETTINGS -2 #endif #ifndef WM_MOUSEWHEEL #define WM_MOUSEWHEEL 0x020A #endif #ifndef WHEEL_DELTA #define WHEEL_DELTA 120 #endif #ifndef WM_XBUTTONDOWN #define WM_XBUTTONDOWN 0x020B #endif #ifndef WM_XBUTTONUP #define WM_XBUTTONUP 0x020C #endif #ifndef XBUTTON1 #define XBUTTON1 1 #endif #ifndef XBUTTON2 #define XBUTTON2 2 #endif #ifndef WGL_EXT_swap_control /* Entry points */ typedef int (APIENTRY * PFNWGLSWAPINTERVALEXTPROC) (int); #endif /*WGL_EXT_swap_control*/ #ifndef WGL_ARB_extensions_string /* Entry points */ typedef const char *(APIENTRY * PFNWGLGETEXTENSIONSSTRINGARBPROC)( HDC ); #endif /*WGL_ARB_extensions_string*/ #ifndef WGL_EXT_extension_string /* Entry points */ typedef const char *(APIENTRY * PFNWGLGETEXTENSIONSSTRINGEXTPROC)( void ); #endif /*WGL_EXT_extension_string*/ #ifndef WGL_ARB_pixel_format /* Entry points */ typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC, int, int, UINT, const int *, int *); /* Constants for wglGetPixelFormatAttribivARB */ #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 #define WGL_DRAW_TO_WINDOW_ARB 0x2001 #define WGL_SUPPORT_OPENGL_ARB 0x2010 #define WGL_ACCELERATION_ARB 0x2003 #define WGL_DOUBLE_BUFFER_ARB 0x2011 #define WGL_STEREO_ARB 0x2012 #define WGL_PIXEL_TYPE_ARB 0x2013 #define WGL_COLOR_BITS_ARB 0x2014 #define WGL_RED_BITS_ARB 0x2015 #define WGL_GREEN_BITS_ARB 0x2017 #define WGL_BLUE_BITS_ARB 0x2019 #define WGL_ALPHA_BITS_ARB 0x201B #define WGL_ACCUM_BITS_ARB 0x201D #define WGL_ACCUM_RED_BITS_ARB 0x201E #define WGL_ACCUM_GREEN_BITS_ARB 0x201F #define WGL_ACCUM_BLUE_BITS_ARB 0x2020 #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 #define WGL_DEPTH_BITS_ARB 0x2022 #define WGL_STENCIL_BITS_ARB 0x2023 #define WGL_AUX_BUFFERS_ARB 0x2024 #define WGL_SAMPLE_BUFFERS_ARB 0x2041 #define WGL_SAMPLES_ARB 0x2042 /* Constants for WGL_ACCELERATION_ARB */ #define WGL_NO_ACCELERATION_ARB 0x2025 #define WGL_GENERIC_ACCELERATION_ARB 0x2026 #define WGL_FULL_ACCELERATION_ARB 0x2027 /* Constants for WGL_PIXEL_TYPE_ARB */ #define WGL_TYPE_RGBA_ARB 0x202B #define WGL_TYPE_COLORINDEX_ARB 0x202C #endif /*WGL_ARB_pixel_format*/ #ifndef WGL_ARB_create_context /* Entry points */ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC, HGLRC, const int *); /* Tokens for wglCreateContextAttribsARB attributes */ #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_FLAGS_ARB 0x2094 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 /* Bits for WGL_CONTEXT_FLAGS_ARB */ #define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 /* Bits for WGL_CONTEXT_PROFILE_MASK_ARB */ #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 #endif /*WGL_ARB_create_context*/ #ifndef GL_VERSION_3_0 typedef const GLubyte * (APIENTRY *PFNGLGETSTRINGIPROC) (GLenum, GLuint); #endif /*GL_VERSION_3_0*/ //======================================================================== // DLLs that are loaded at glfwInit() //======================================================================== // gdi32.dll function pointer typedefs #ifndef _GLFW_NO_DLOAD_GDI32 typedef int (WINAPI * CHOOSEPIXELFORMAT_T) (HDC,CONST PIXELFORMATDESCRIPTOR*); typedef int (WINAPI * DESCRIBEPIXELFORMAT_T) (HDC,int,UINT,LPPIXELFORMATDESCRIPTOR); typedef int (WINAPI * GETPIXELFORMAT_T) (HDC); typedef BOOL (WINAPI * SETPIXELFORMAT_T) (HDC,int,const PIXELFORMATDESCRIPTOR*); typedef BOOL (WINAPI * SWAPBUFFERS_T) (HDC); #endif // _GLFW_NO_DLOAD_GDI32 // winmm.dll function pointer typedefs #ifndef _GLFW_NO_DLOAD_WINMM typedef MMRESULT (WINAPI * JOYGETDEVCAPSA_T) (UINT,LPJOYCAPSA,UINT); typedef MMRESULT (WINAPI * JOYGETPOS_T) (UINT,LPJOYINFO); typedef MMRESULT (WINAPI * JOYGETPOSEX_T) (UINT,LPJOYINFOEX); typedef DWORD (WINAPI * TIMEGETTIME_T) (void); #endif // _GLFW_NO_DLOAD_WINMM // gdi32.dll shortcuts #ifndef _GLFW_NO_DLOAD_GDI32 #define _glfw_ChoosePixelFormat _glfwLibrary.Libs.ChoosePixelFormat #define _glfw_DescribePixelFormat _glfwLibrary.Libs.DescribePixelFormat #define _glfw_GetPixelFormat _glfwLibrary.Libs.GetPixelFormat #define _glfw_SetPixelFormat _glfwLibrary.Libs.SetPixelFormat #define _glfw_SwapBuffers _glfwLibrary.Libs.SwapBuffers #else #define _glfw_ChoosePixelFormat ChoosePixelFormat #define _glfw_DescribePixelFormat DescribePixelFormat #define _glfw_GetPixelFormat GetPixelFormat #define _glfw_SetPixelFormat SetPixelFormat #define _glfw_SwapBuffers SwapBuffers #endif // _GLFW_NO_DLOAD_GDI32 // winmm.dll shortcuts #ifndef _GLFW_NO_DLOAD_WINMM #define _glfw_joyGetDevCaps _glfwLibrary.Libs.joyGetDevCapsA #define _glfw_joyGetPos _glfwLibrary.Libs.joyGetPos #define _glfw_joyGetPosEx _glfwLibrary.Libs.joyGetPosEx #define _glfw_timeGetTime _glfwLibrary.Libs.timeGetTime #else #define _glfw_joyGetDevCaps joyGetDevCapsA #define _glfw_joyGetPos joyGetPos #define _glfw_joyGetPosEx joyGetPosEx #define _glfw_timeGetTime timeGetTime #endif // _GLFW_NO_DLOAD_WINMM //======================================================================== // GLFW platform specific types //======================================================================== //------------------------------------------------------------------------ // Pointer length integer //------------------------------------------------------------------------ typedef INT_PTR GLFWintptr; //------------------------------------------------------------------------ // Window structure //------------------------------------------------------------------------ typedef struct _GLFWwin_struct _GLFWwin; struct _GLFWwin_struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // User callback functions GLFWwindowsizefun windowSizeCallback; GLFWwindowclosefun windowCloseCallback; GLFWwindowrefreshfun windowRefreshCallback; GLFWmousebuttonfun mouseButtonCallback; GLFWmouseposfun mousePosCallback; GLFWmousewheelfun mouseWheelCallback; GLFWkeyfun keyCallback; GLFWcharfun charCallback; // User selected window settings int fullscreen; // Fullscreen flag int mouseLock; // Mouse-lock flag int autoPollEvents; // Auto polling flag int sysKeysDisabled; // System keys disabled flag int windowNoResize; // Resize- and maximize gadgets disabled flag int refreshRate; // Vertical monitor refresh rate // Window status & parameters int opened; // Flag telling if window is opened or not int active; // Application active flag int iconified; // Window iconified flag int width, height; // Window width and heigth int accelerated; // GL_TRUE if window is HW accelerated // Framebuffer attributes int redBits; int greenBits; int blueBits; int alphaBits; int depthBits; int stencilBits; int accumRedBits; int accumGreenBits; int accumBlueBits; int accumAlphaBits; int auxBuffers; int stereo; int samples; // OpenGL extensions and context attributes int has_GL_SGIS_generate_mipmap; int has_GL_ARB_texture_non_power_of_two; int glMajor, glMinor, glRevision; int glForward, glDebug, glProfile; PFNGLGETSTRINGIPROC GetStringi; // ========= PLATFORM SPECIFIC PART ====================================== // Platform specific window resources HDC DC; // Private GDI device context HGLRC context; // Permanent rendering context HWND window; // Window handle ATOM classAtom; // Window class atom int modeID; // Mode ID for fullscreen mode HHOOK keyboardHook; // Keyboard hook handle DWORD dwStyle; // Window styles used for window creation DWORD dwExStyle; // --"-- // Platform specific extensions (context specific) PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT; PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB; PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT; PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB; PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB; GLboolean has_WGL_EXT_swap_control; GLboolean has_WGL_ARB_multisample; GLboolean has_WGL_ARB_pixel_format; GLboolean has_WGL_ARB_create_context; GLboolean has_WGL_ARB_create_context_profile; // Various platform specific internal variables int oldMouseLock; // Old mouse-lock flag (used for remembering // mouse-lock state when iconifying) int oldMouseLockValid; int desiredRefreshRate; // Desired vertical monitor refresh rate }; GLFWGLOBAL _GLFWwin _glfwWin; //------------------------------------------------------------------------ // User input status (most of this should go in _GLFWwin) //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Mouse status int MousePosX, MousePosY; int WheelPos; char MouseButton[ GLFW_MOUSE_BUTTON_LAST+1 ]; // Keyboard status char Key[ GLFW_KEY_LAST+1 ]; int LastChar; // User selected settings int StickyKeys; int StickyMouseButtons; int KeyRepeat; // ========= PLATFORM SPECIFIC PART ====================================== // Platform specific internal variables int MouseMoved, OldMouseX, OldMouseY; } _glfwInput; //------------------------------------------------------------------------ // Library global data //------------------------------------------------------------------------ GLFWGLOBAL struct { // Window opening hints _GLFWhints hints; // ========= PLATFORM SPECIFIC PART ====================================== HINSTANCE instance; // Instance of the application // Timer data struct { int HasPerformanceCounter; double Resolution; unsigned int t0_32; __int64 t0_64; } Timer; // System information struct { int winVer; int hasUnicode; DWORD foregroundLockTimeout; } Sys; #if !defined(_GLFW_NO_DLOAD_WINMM) || !defined(_GLFW_NO_DLOAD_GDI32) // Library handles and function pointers struct { #ifndef _GLFW_NO_DLOAD_GDI32 // gdi32.dll HINSTANCE gdi32; CHOOSEPIXELFORMAT_T ChoosePixelFormat; DESCRIBEPIXELFORMAT_T DescribePixelFormat; GETPIXELFORMAT_T GetPixelFormat; SETPIXELFORMAT_T SetPixelFormat; SWAPBUFFERS_T SwapBuffers; #endif // _GLFW_NO_DLOAD_GDI32 // winmm.dll #ifndef _GLFW_NO_DLOAD_WINMM HINSTANCE winmm; JOYGETDEVCAPSA_T joyGetDevCapsA; JOYGETPOS_T joyGetPos; JOYGETPOSEX_T joyGetPosEx; TIMEGETTIME_T timeGetTime; #endif // _GLFW_NO_DLOAD_WINMM } Libs; #endif } _glfwLibrary; //------------------------------------------------------------------------ // Thread record (one for each thread) //------------------------------------------------------------------------ typedef struct _GLFWthread_struct _GLFWthread; struct _GLFWthread_struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Pointer to previous and next threads in linked list _GLFWthread *Previous, *Next; // GLFW user side thread information GLFWthread ID; GLFWthreadfun Function; // ========= PLATFORM SPECIFIC PART ====================================== // System side thread information HANDLE Handle; DWORD WinID; }; //------------------------------------------------------------------------ // General thread information //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Next thread ID to use (increments for every created thread) GLFWthread NextID; // First thread in linked list (always the main thread) _GLFWthread First; // ========= PLATFORM SPECIFIC PART ====================================== // Critical section lock CRITICAL_SECTION CriticalSection; } _glfwThrd; //======================================================================== // Macros for encapsulating critical code sections (i.e. making parts // of GLFW thread safe) //======================================================================== // Thread list management #define ENTER_THREAD_CRITICAL_SECTION \ EnterCriticalSection( &_glfwThrd.CriticalSection ); #define LEAVE_THREAD_CRITICAL_SECTION \ LeaveCriticalSection( &_glfwThrd.CriticalSection ); //======================================================================== // Various Windows version constants //======================================================================== #define _GLFW_WIN_UNKNOWN 0x0000 // Earlier than 95 or NT4 #define _GLFW_WIN_95 0x0001 #define _GLFW_WIN_98 0x0002 #define _GLFW_WIN_ME 0x0003 #define _GLFW_WIN_UNKNOWN_9x 0x0004 // Later than ME #define _GLFW_WIN_NT4 0x0101 #define _GLFW_WIN_2K 0x0102 #define _GLFW_WIN_XP 0x0103 #define _GLFW_WIN_NET_SERVER 0x0104 #define _GLFW_WIN_UNKNOWN_NT 0x0105 // Later than .NET Server //======================================================================== // Prototypes for platform specific internal functions //======================================================================== // Time void _glfwInitTimer( void ); // Fullscreen support int _glfwGetClosestVideoModeBPP( int *w, int *h, int *bpp, int *refresh ); int _glfwGetClosestVideoMode( int *w, int *h, int *r, int *g, int *b, int *refresh ); void _glfwSetVideoModeMODE( int mode ); void _glfwSetVideoMode( int *w, int *h, int r, int g, int b, int refresh ); #endif // _platform_h_ glfw-2.7.2/lib/win32/win32_thread.c0000644000175000017500000003400211577637342017636 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Win32/WGL // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ // This is an implementation of POSIX "compatible" condition variables for // Win32, as described by Douglas C. Schmidt and Irfan Pyarali: // http://www.cs.wustl.edu/~schmidt/win32-cv-1.html //************************************************************************ enum { _GLFW_COND_SIGNAL = 0, _GLFW_COND_BROADCAST = 1 }; typedef struct { // Signal and broadcast event HANDLEs HANDLE events[ 2 ]; // Count of the number of waiters unsigned int waiters_count; // Serialize access to CRITICAL_SECTION waiters_count_lock; } _GLFWcond; //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // This is simply a "wrapper" for calling the user thread function. //======================================================================== DWORD WINAPI _glfwNewThread( LPVOID lpParam ) { GLFWthreadfun threadfun; _GLFWthread *t; // Get pointer to thread information for current thread t = _glfwGetThreadPointer( _glfwPlatformGetThreadID() ); if( t == NULL ) { return 0; } // Get user thread function pointer threadfun = t->Function; // Call the user thread function threadfun( (void *) lpParam ); // Remove thread from thread list ENTER_THREAD_CRITICAL_SECTION _glfwRemoveThread( t ); LEAVE_THREAD_CRITICAL_SECTION // When the thread function returns, the thread will die... return 0; } //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Create a new thread //======================================================================== GLFWthread _glfwPlatformCreateThread( GLFWthreadfun fun, void *arg ) { GLFWthread ID; _GLFWthread *t, *t_tmp; HANDLE hThread; DWORD dwThreadId; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Create a new thread information memory area t = (_GLFWthread *) malloc( sizeof(_GLFWthread) ); if( t == NULL ) { // Leave critical section LEAVE_THREAD_CRITICAL_SECTION return -1; } // Get a new unique thread id ID = _glfwThrd.NextID ++; // Store thread information in the thread list t->Function = fun; t->ID = ID; // Create thread hThread = CreateThread( NULL, // Default security attributes 0, // Default stack size (1 MB) _glfwNewThread, // Thread function (a wrapper function) (LPVOID)arg, // Argument to thread is the user argument 0, // Default creation flags &dwThreadId // Returned thread identifier ); // Did the thread creation fail? if( hThread == NULL ) { free( (void *) t ); LEAVE_THREAD_CRITICAL_SECTION return -1; } // Store more thread information in the thread list t->Handle = hThread; t->WinID = dwThreadId; // Append thread to thread list t_tmp = &_glfwThrd.First; while( t_tmp->Next != NULL ) { t_tmp = t_tmp->Next; } t_tmp->Next = t; t->Previous = t_tmp; t->Next = NULL; // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the GLFW thread ID return ID; } //======================================================================== // Kill a thread. NOTE: THIS IS A VERY DANGEROUS OPERATION, AND SHOULD NOT // BE USED EXCEPT IN EXTREME SITUATIONS! //======================================================================== void _glfwPlatformDestroyThread( GLFWthread ID ) { _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return; } // Simply murder the process, no mercy! if( TerminateThread( t->Handle, 0 ) ) { // Close thread handle CloseHandle( t->Handle ); // Remove thread from thread list _glfwRemoveThread( t ); } // Leave critical section LEAVE_THREAD_CRITICAL_SECTION } //======================================================================== // Wait for a thread to die //======================================================================== int _glfwPlatformWaitThread( GLFWthread ID, int waitmode ) { DWORD result; HANDLE hThread; _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); // Is the thread already dead? if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return GL_TRUE; } // Get thread handle hThread = t->Handle; // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Wait for thread to die if( waitmode == GLFW_WAIT ) { result = WaitForSingleObject( hThread, INFINITE ); } else if( waitmode == GLFW_NOWAIT ) { result = WaitForSingleObject( hThread, 0 ); } else { return GL_FALSE; } // Did we have a time-out? if( result == WAIT_TIMEOUT ) { return GL_FALSE; } return GL_TRUE; } //======================================================================== // Return the thread ID for the current thread //======================================================================== GLFWthread _glfwPlatformGetThreadID( void ) { _GLFWthread *t; GLFWthread ID = -1; DWORD WinID; // Get Windows thread ID WinID = GetCurrentThreadId(); // Enter critical section (to avoid an inconsistent thread list) ENTER_THREAD_CRITICAL_SECTION // Loop through entire list of threads to find the matching Windows // thread ID for( t = &_glfwThrd.First; t != NULL; t = t->Next ) { if( t->WinID == WinID ) { ID = t->ID; break; } } // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the found GLFW thread identifier return ID; } //======================================================================== // Create a mutual exclusion object //======================================================================== GLFWmutex _glfwPlatformCreateMutex( void ) { CRITICAL_SECTION *mutex; // Allocate memory for mutex mutex = (CRITICAL_SECTION *) malloc( sizeof(CRITICAL_SECTION) ); if( !mutex ) { return NULL; } // Initialize mutex InitializeCriticalSection( mutex ); // Cast to GLFWmutex and return return (GLFWmutex) mutex; } //======================================================================== // Destroy a mutual exclusion object //======================================================================== void _glfwPlatformDestroyMutex( GLFWmutex mutex ) { // Destroy mutex DeleteCriticalSection( (CRITICAL_SECTION *) mutex ); free( mutex ); } //======================================================================== // Request access to a mutex //======================================================================== void _glfwPlatformLockMutex( GLFWmutex mutex ) { // Wait for mutex to be released EnterCriticalSection( (CRITICAL_SECTION *) mutex ); } //======================================================================== // Release a mutex //======================================================================== void _glfwPlatformUnlockMutex( GLFWmutex mutex ) { // Release mutex LeaveCriticalSection( (CRITICAL_SECTION *) mutex ); } //======================================================================== // Create a new condition variable object //======================================================================== GLFWcond _glfwPlatformCreateCond( void ) { _GLFWcond *cond; // Allocate memory for condition variable cond = (_GLFWcond *) malloc( sizeof(_GLFWcond) ); if( !cond ) { return NULL; } // Initialize condition variable cond->waiters_count = 0; cond->events[ _GLFW_COND_SIGNAL ] = CreateEvent( NULL, FALSE, FALSE, NULL ); cond->events[ _GLFW_COND_BROADCAST ] = CreateEvent( NULL, TRUE, FALSE, NULL ); InitializeCriticalSection( &cond->waiters_count_lock ); // Cast to GLFWcond and return return (GLFWcond) cond; } //======================================================================== // Destroy a condition variable object //======================================================================== void _glfwPlatformDestroyCond( GLFWcond cond ) { // Close the condition variable handles CloseHandle( ((_GLFWcond *)cond)->events[ _GLFW_COND_SIGNAL ] ); CloseHandle( ((_GLFWcond *)cond)->events[ _GLFW_COND_BROADCAST ] ); // Delete critical section DeleteCriticalSection( &((_GLFWcond *)cond)->waiters_count_lock ); // Free memory for condition variable free( (void *) cond ); } //======================================================================== // Wait for a condition to be raised //======================================================================== void _glfwPlatformWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ) { _GLFWcond *cv = (_GLFWcond *) cond; int result, last_waiter; DWORD timeout_ms; // Avoid race conditions EnterCriticalSection( &cv->waiters_count_lock ); cv->waiters_count ++; LeaveCriticalSection( &cv->waiters_count_lock ); // It's ok to release the mutex here since Win32 manual-reset events // maintain state when used with SetEvent() LeaveCriticalSection( (CRITICAL_SECTION *) mutex ); // Translate timeout into milliseconds if( timeout >= GLFW_INFINITY ) { timeout_ms = INFINITE; } else { timeout_ms = (DWORD) (1000.0 * timeout + 0.5); if( timeout_ms <= 0 ) { timeout_ms = 1; } } // Wait for either event to become signaled due to glfwSignalCond or // glfwBroadcastCond being called result = WaitForMultipleObjects( 2, cv->events, FALSE, timeout_ms ); // Check if we are the last waiter EnterCriticalSection( &cv->waiters_count_lock ); cv->waiters_count --; last_waiter = (result == WAIT_OBJECT_0 + _GLFW_COND_BROADCAST) && (cv->waiters_count == 0); LeaveCriticalSection( &cv->waiters_count_lock ); // Some thread called glfwBroadcastCond if( last_waiter ) { // We're the last waiter to be notified or to stop waiting, so // reset the manual event ResetEvent( cv->events[ _GLFW_COND_BROADCAST ] ); } // Reacquire the mutex EnterCriticalSection( (CRITICAL_SECTION *) mutex ); } //======================================================================== // Signal a condition to one waiting thread //======================================================================== void _glfwPlatformSignalCond( GLFWcond cond ) { _GLFWcond *cv = (_GLFWcond *) cond; int have_waiters; // Avoid race conditions EnterCriticalSection( &cv->waiters_count_lock ); have_waiters = cv->waiters_count > 0; LeaveCriticalSection( &cv->waiters_count_lock ); if( have_waiters ) { SetEvent( cv->events[ _GLFW_COND_SIGNAL ] ); } } //======================================================================== // Broadcast a condition to all waiting threads //======================================================================== void _glfwPlatformBroadcastCond( GLFWcond cond ) { _GLFWcond *cv = (_GLFWcond *) cond; int have_waiters; // Avoid race conditions EnterCriticalSection( &cv->waiters_count_lock ); have_waiters = cv->waiters_count > 0; LeaveCriticalSection( &cv->waiters_count_lock ); if( have_waiters ) { SetEvent( cv->events[ _GLFW_COND_BROADCAST ] ); } } //======================================================================== // Return the number of processors in the system. //======================================================================== int _glfwPlatformGetNumberOfProcessors( void ) { SYSTEM_INFO si; // Get hardware system information GetSystemInfo( &si ); return (int) si.dwNumberOfProcessors; } glfw-2.7.2/lib/win32/glfwdll.def0000644000175000017500000000221110610526460017272 0ustar elmindredaelmindredaLIBRARY GLFW.DLL EXPORTS glfwBroadcastCond glfwCloseWindow glfwCreateCond glfwCreateMutex glfwCreateThread glfwDestroyCond glfwDestroyMutex glfwDestroyThread glfwDisable glfwEnable glfwExtensionSupported glfwFreeImage glfwGetDesktopMode glfwGetGLVersion glfwGetJoystickButtons glfwGetJoystickParam glfwGetJoystickPos glfwGetKey glfwGetMouseButton glfwGetMousePos glfwGetMouseWheel glfwGetNumberOfProcessors glfwGetProcAddress glfwGetThreadID glfwGetTime glfwGetVersion glfwGetVideoModes glfwGetWindowParam glfwGetWindowSize glfwIconifyWindow glfwInit glfwLoadMemoryTexture2D glfwLoadTexture2D glfwLoadTextureImage2D glfwLockMutex glfwOpenWindow glfwOpenWindowHint glfwPollEvents glfwReadImage glfwReadMemoryImage glfwRestoreWindow glfwSetCharCallback glfwSetKeyCallback glfwSetMouseButtonCallback glfwSetMousePos glfwSetMousePosCallback glfwSetMouseWheel glfwSetMouseWheelCallback glfwSetTime glfwSetWindowCloseCallback glfwSetWindowRefreshCallback glfwSetWindowPos glfwSetWindowSize glfwSetWindowSizeCallback glfwSetWindowTitle glfwSignalCond glfwSleep glfwSwapBuffers glfwSwapInterval glfwTerminate glfwUnlockMutex glfwWaitCond glfwWaitEvents glfwWaitThread glfw-2.7.2/lib/fullscreen.c0000644000175000017500000000614611577631171016547 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Get a list of available video modes //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetVideoModes( GLFWvidmode *list, int maxcount ) { int count, i, swap, res1, res2, depth1, depth2; GLFWvidmode vm; if( !_glfwInitialized || maxcount <= 0 || list == (GLFWvidmode*) 0 ) { return 0; } // Get list of video modes count = _glfwPlatformGetVideoModes( list, maxcount ); // Sort list (bubble sort) do { swap = 0; for( i = 0; i < count-1; ++ i ) { res1 = list[i].Width*list[i].Height; depth1 = list[i].RedBits+list[i].GreenBits+list[i].BlueBits; res2 = list[i+1].Width*list[i+1].Height; depth2 = list[i+1].RedBits+list[i+1].GreenBits+ list[i+1].BlueBits; if( (depth2 // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Check if an OpenGL extension is available at runtime //======================================================================== int _glfwPlatformExtensionSupported( const char *extension ) { // There are no AGL, CGL or NSGL extensions. return GL_FALSE; } //======================================================================== // Get the function pointer to an OpenGL function //======================================================================== void * _glfwPlatformGetProcAddress( const char *procname ) { CFStringRef symbolName = CFStringCreateWithCString( kCFAllocatorDefault, procname, kCFStringEncodingASCII ); void *symbol = CFBundleGetFunctionPointerForName( _glfwLibrary.OpenGLFramework, symbolName ); CFRelease( symbolName ); return symbol; } glfw-2.7.2/lib/cocoa/Makefile.cocoa0000644000175000017500000001245111614002633020027 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Cocoa on Mac OS X using Apple GCC #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # make -f Makefile.cocoa ########################################################################## ########################################################################## # Installation prefix (default to /usr/local) ########################################################################## PREFIX ?= /usr/local ########################################################################## # Default: Build GLFW static and shared library ########################################################################## all: libglfw.a libglfw.dylib ########################################################################## # Compiler settings ########################################################################## CC ?= cc CFLAGS ?= -O2 -g CFLAGS += -c -I. -I.. -Wall -fno-common ########################################################################## # Library builder settings ########################################################################## AR = ar SED = sed INSTALL = install ARFLAGS = -rcs RANLIB = ranlib DYLIBFLAGS = -framework Cocoa -framework OpenGL \ -dynamiclib -Wl,-single_module -compatibility_version 1 \ -current_version 1 -install_name @executable_path/libglfw.dylib HEADERS = ../../include/GL/glfw.h ../internal.h platform.h ########################################################################## # Install GLFW header and static library ########################################################################## install: libglfw.a libglfw.pc $(INSTALL) -d $(PREFIX)/lib $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a $(RANLIB) $(PREFIX)/lib/libglfw.a $(INSTALL) -d $(PREFIX)/include/GL $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h $(INSTALL) -d $(PREFIX)/lib/pkgconfig $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc ########################################################################## # Object files for the GLFW library ########################################################################## OBJS = \ enable.o \ fullscreen.o \ glext.o \ image.o \ init.o \ input.o \ joystick.o \ stream.o \ tga.o \ thread.o \ time.o \ window.o \ cocoa_enable.o \ cocoa_fullscreen.o \ cocoa_glext.o \ cocoa_init.o \ cocoa_joystick.o \ cocoa_thread.o \ cocoa_time.o \ cocoa_window.o ########################################################################## # Rule for building libglfw.pc ########################################################################## libglfw.pc: libglfw.pc.in $(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc ########################################################################## # Rule for building static library ########################################################################## libglfw.a: $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ ########################################################################## # Rule for building shared library ########################################################################## libglfw.dylib: $(OBJS) $(CC) -o $@ $(DYLIBFLAGS) $(OBJS) ########################################################################## # Rule for cleaning up generated files ########################################################################## clean: rm -f $(OBJS) libglfw.a libglfw.dylib libglfw.pc ########################################################################## # Rules for building library object files ########################################################################## enable.o: ../enable.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../enable.c fullscreen.o: ../fullscreen.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../fullscreen.c glext.o: ../glext.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../glext.c image.o: ../image.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../image.c init.o: ../init.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../init.c input.o: ../input.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../input.c joystick.o: ../joystick.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../joystick.c stream.o: ../stream.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../stream.c tga.o: ../tga.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../tga.c thread.o: ../thread.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../thread.c time.o: ../time.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../time.c window.o: ../window.c $(HEADERS) $(CC) $(CFLAGS) -o $@ ../window.c cocoa_enable.o: cocoa_enable.m $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_enable.m cocoa_fullscreen.o: cocoa_fullscreen.m $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_fullscreen.m cocoa_glext.o: cocoa_glext.m $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_glext.m cocoa_init.o: cocoa_init.m $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_init.m cocoa_joystick.o: cocoa_joystick.m $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_joystick.m cocoa_thread.o: cocoa_thread.c $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_thread.c cocoa_time.o: cocoa_time.m $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_time.m cocoa_window.o: cocoa_window.m $(HEADERS) $(CC) $(CFLAGS) -o $@ cocoa_window.m glfw-2.7.2/lib/cocoa/cocoa_thread.c0000644000175000017500000002741111427547437020107 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #include #include //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // _glfwNewThread() - This is simply a "wrapper" for calling the user // thread function. //======================================================================== void * _glfwNewThread( void * arg ) { GLFWthreadfun threadfun; _GLFWthread *t; // Get pointer to thread information for current thread t = _glfwGetThreadPointer( glfwGetThreadID() ); if( t == NULL ) { return 0; } // Get user thread function pointer threadfun = t->Function; // Call the user thread function threadfun( arg ); // Remove thread from thread list ENTER_THREAD_CRITICAL_SECTION _glfwRemoveThread( t ); LEAVE_THREAD_CRITICAL_SECTION // When the thread function returns, the thread will die... return NULL; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // _glfwPlatformCreateThread() - Create a new thread //======================================================================== GLFWthread _glfwPlatformCreateThread( GLFWthreadfun fun, void *arg ) { GLFWthread ID; _GLFWthread *t; int result; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Create a new thread information memory area t = (_GLFWthread *) malloc( sizeof(_GLFWthread) ); if( t == NULL ) { // Leave critical section LEAVE_THREAD_CRITICAL_SECTION return -1; } // Get a new unique thread id ID = _glfwThrd.NextID ++; // Store thread information in the thread list t->Function = fun; t->ID = ID; // Create thread result = pthread_create( &t->PosixID, // Thread handle NULL, // Default thread attributes _glfwNewThread, // Thread function (a wrapper function) (void *)arg // Argument to thread is user argument ); // Did the thread creation fail? if( result != 0 ) { free( (void *) t ); LEAVE_THREAD_CRITICAL_SECTION return -1; } // Append thread to thread list _glfwAppendThread( t ); // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the GLFW thread ID return ID; } //======================================================================== // _glfwPlatformDestroyThread() - Kill a thread. NOTE: THIS IS A VERY // DANGEROUS OPERATION, AND SHOULD NOT BE USED EXCEPT IN EXTREME // SITUATIONS! //======================================================================== void _glfwPlatformDestroyThread( GLFWthread ID ) { _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return; } // Simply murder the process, no mercy! pthread_kill( t->PosixID, SIGKILL ); // Remove thread from thread list _glfwRemoveThread( t ); // Leave critical section LEAVE_THREAD_CRITICAL_SECTION } //======================================================================== // _glfwPlatformWaitThread() - Wait for a thread to die //======================================================================== int _glfwPlatformWaitThread( GLFWthread ID, int waitmode ) { pthread_t thread; _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); // Is the thread already dead? if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return GL_TRUE; } // If got this far, the thread is alive => polling returns FALSE if( waitmode == GLFW_NOWAIT ) { LEAVE_THREAD_CRITICAL_SECTION return GL_FALSE; } // Get thread handle thread = t->PosixID; // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Wait for thread to die (void) pthread_join( thread, NULL ); return GL_TRUE; } //======================================================================== // _glfwPlatformGetThreadID() - Return the thread ID for the current // thread //======================================================================== GLFWthread _glfwPlatformGetThreadID( void ) { _GLFWthread *t; GLFWthread ID = -1; pthread_t posixID; // Get current thread ID posixID = pthread_self(); // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Loop through entire list of threads to find the matching POSIX // thread ID for( t = &_glfwThrd.First; t != NULL; t = t->Next ) { if( t->PosixID == posixID ) { ID = t->ID; break; } } // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the found GLFW thread identifier return ID; } //======================================================================== // _glfwPlatformCreateMutex() - Create a mutual exclusion object //======================================================================== GLFWmutex _glfwPlatformCreateMutex( void ) { pthread_mutex_t *mutex; // Allocate memory for mutex mutex = (pthread_mutex_t *) malloc( sizeof( pthread_mutex_t ) ); if( !mutex ) { return NULL; } // Initialise a mutex object (void) pthread_mutex_init( mutex, NULL ); // Cast to GLFWmutex and return return (GLFWmutex) mutex; } //======================================================================== // _glfwPlatformDestroyMutex() - Destroy a mutual exclusion object //======================================================================== void _glfwPlatformDestroyMutex( GLFWmutex mutex ) { // Destroy the mutex object pthread_mutex_destroy( (pthread_mutex_t *) mutex ); // Free memory for mutex object free( (void *) mutex ); } //======================================================================== // _glfwPlatformLockMutex() - Request access to a mutex //======================================================================== void _glfwPlatformLockMutex( GLFWmutex mutex ) { // Wait for mutex to be released (void) pthread_mutex_lock( (pthread_mutex_t *) mutex ); } //======================================================================== // _glfwPlatformUnlockMutex() - Release a mutex //======================================================================== void _glfwPlatformUnlockMutex( GLFWmutex mutex ) { // Release mutex pthread_mutex_unlock( (pthread_mutex_t *) mutex ); } //======================================================================== // _glfwPlatformCreateCond() - Create a new condition variable object //======================================================================== GLFWcond _glfwPlatformCreateCond( void ) { pthread_cond_t *cond; // Allocate memory for condition variable cond = (pthread_cond_t *) malloc( sizeof(pthread_cond_t) ); if( !cond ) { return NULL; } // Initialise condition variable (void) pthread_cond_init( cond, NULL ); // Cast to GLFWcond and return return (GLFWcond) cond; } //======================================================================== // _glfwPlatformDestroyCond() - Destroy a condition variable object //======================================================================== void _glfwPlatformDestroyCond( GLFWcond cond ) { // Destroy the condition variable object (void) pthread_cond_destroy( (pthread_cond_t *) cond ); // Free memory for condition variable object free( (void *) cond ); } //======================================================================== // _glfwPlatformWaitCond() - Wait for a condition to be raised //======================================================================== void _glfwPlatformWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ) { struct timeval currenttime; struct timespec wait; long dt_sec, dt_usec; // Select infinite or timed wait if( timeout >= GLFW_INFINITY ) { // Wait for condition (infinite wait) (void) pthread_cond_wait( (pthread_cond_t *) cond, (pthread_mutex_t *) mutex ); } else { // Set timeout time, relatvie to current time gettimeofday( ¤ttime, NULL ); dt_sec = (long) timeout; dt_usec = (long) ((timeout - (double)dt_sec) * 1000000.0); wait.tv_nsec = (currenttime.tv_usec + dt_usec) * 1000L; if( wait.tv_nsec > 1000000000L ) { wait.tv_nsec -= 1000000000L; dt_sec ++; } wait.tv_sec = currenttime.tv_sec + dt_sec; // Wait for condition (timed wait) (void) pthread_cond_timedwait( (pthread_cond_t *) cond, (pthread_mutex_t *) mutex, &wait ); } } //======================================================================== // _glfwPlatformSignalCond() - Signal a condition to one waiting thread //======================================================================== void _glfwPlatformSignalCond( GLFWcond cond ) { // Signal condition (void) pthread_cond_signal( (pthread_cond_t *) cond ); } //======================================================================== // _glfwPlatformBroadcastCond() - Broadcast a condition to all waiting // threads //======================================================================== void _glfwPlatformBroadcastCond( GLFWcond cond ) { // Broadcast condition (void) pthread_cond_broadcast( (pthread_cond_t *) cond ); } //======================================================================== // _glfwPlatformGetNumberOfProcessors() - Return the number of processors // in the system. //======================================================================== int _glfwPlatformGetNumberOfProcessors( void ) { int n; // Get number of processors online _glfw_numprocessors( n ); return n; } glfw-2.7.2/lib/cocoa/cocoa_enable.m0000644000175000017500000000402111427547437020070 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Enable and disable system keys //======================================================================== void _glfwPlatformEnableSystemKeys( void ) { // This is checked in macosx_window.m; we take no action here } void _glfwPlatformDisableSystemKeys( void ) { // This is checked in macosx_window.m; we take no action here // I don't think it's really possible to disable stuff like Exposé // except in full-screen mode. } glfw-2.7.2/lib/cocoa/cocoa_time.m0000644000175000017500000000722711427547437017613 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #include //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Return timer value in seconds //======================================================================== double _glfwPlatformGetTime( void ) { return [NSDate timeIntervalSinceReferenceDate] - _glfwLibrary.Timer.t0; } //======================================================================== // Set timer value in seconds //======================================================================== void _glfwPlatformSetTime( double time ) { _glfwLibrary.Timer.t0 = [NSDate timeIntervalSinceReferenceDate] - time; } //======================================================================== // Put a thread to sleep for a specified amount of time //======================================================================== void _glfwPlatformSleep( double time ) { if( time == 0.0 ) { sched_yield(); return; } struct timeval currenttime; struct timespec wait; pthread_mutex_t mutex; pthread_cond_t cond; long dt_sec, dt_usec; // Not all pthread implementations have a pthread_sleep() function. We // do it the portable way, using a timed wait for a condition that we // will never signal. NOTE: The unistd functions sleep/usleep suspends // the entire PROCESS, not a signle thread, which is why we can not // use them to implement glfwSleep. // Set timeout time, relatvie to current time gettimeofday( ¤ttime, NULL ); dt_sec = (long) time; dt_usec = (long) ((time - (double)dt_sec) * 1000000.0); wait.tv_nsec = (currenttime.tv_usec + dt_usec) * 1000L; if( wait.tv_nsec > 1000000000L ) { wait.tv_nsec -= 1000000000L; dt_sec ++; } wait.tv_sec = currenttime.tv_sec + dt_sec; // Initialize condition and mutex objects pthread_mutex_init( &mutex, NULL ); pthread_cond_init( &cond, NULL ); // Do a timed wait pthread_mutex_lock( &mutex ); pthread_cond_timedwait( &cond, &mutex, &wait ); pthread_mutex_unlock( &mutex ); // Destroy condition and mutex objects pthread_mutex_destroy( &mutex ); pthread_cond_destroy( &cond ); } glfw-2.7.2/lib/cocoa/libglfw.pc.in0000644000175000017500000000042511427541114017665 0ustar elmindredaelmindredaprefix=@PREFIX@ exec_prefix=@PREFIX@ libdir=@PREFIX@/lib includedir=@PREFIX@/include Name: GLFW Description: A portable framework for OpenGL development Version: 2.7 URL: http://www.glfw.org/ Libs: -L${libdir} -lglfw -framework Cocoa -framework OpenGL Cflags: -I${includedir} glfw-2.7.2/lib/cocoa/cocoa_fullscreen.m0000644000175000017500000001000111534250701020757 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //======================================================================== // Check whether the display mode should be included in enumeration //======================================================================== static BOOL modeIsGood( NSDictionary *mode ) { // This is a bit controversial, if you've got something other than an // LCD computer monitor as an output device you might not want these // checks. You might also want to reject modes which are interlaced, // or TV out. There is no one-size-fits-all policy that can work here. // This seems like a decent compromise, but certain applications may // wish to patch this... return [[mode objectForKey:(id)kCGDisplayBitsPerPixel] intValue] >= 15 && [mode objectForKey:(id)kCGDisplayModeIsSafeForHardware] != nil && [mode objectForKey:(id)kCGDisplayModeIsStretched] == nil; } //======================================================================== // Convert Core Graphics display mode to GLFW video mode //======================================================================== static GLFWvidmode vidmodeFromCGDisplayMode( NSDictionary *mode ) { unsigned int width = [[mode objectForKey:(id)kCGDisplayWidth] unsignedIntValue]; unsigned int height = [[mode objectForKey:(id)kCGDisplayHeight] unsignedIntValue]; unsigned int bps = [[mode objectForKey:(id)kCGDisplayBitsPerSample] unsignedIntValue]; GLFWvidmode result; result.Width = width; result.Height = height; result.RedBits = bps; result.GreenBits = bps; result.BlueBits = bps; return result; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Get a list of available video modes //======================================================================== int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ) { NSArray *modes = (NSArray *)CGDisplayAvailableModes( CGMainDisplayID() ); unsigned int i, j = 0, n = [modes count]; for( i = 0; i < n && j < (unsigned)maxcount; i++ ) { NSDictionary *mode = [modes objectAtIndex:i]; if( modeIsGood( mode ) ) { list[j++] = vidmodeFromCGDisplayMode( mode ); } } return j; } //======================================================================== // Get the desktop video mode //======================================================================== void _glfwPlatformGetDesktopMode( GLFWvidmode *mode ) { *mode = vidmodeFromCGDisplayMode( _glfwLibrary.DesktopMode ); } glfw-2.7.2/lib/cocoa/cocoa_joystick.m0000644000175000017500000000462011427547437020506 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Determine joystick capabilities //======================================================================== int _glfwPlatformGetJoystickParam( int joy, int param ) { // TODO: Implement this. return 0; } //======================================================================== // Get joystick axis positions //======================================================================== int _glfwPlatformGetJoystickPos( int joy, float *pos, int numaxes ) { // TODO: Implement this. return 0; } //======================================================================== // Get joystick button states //======================================================================== int _glfwPlatformGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ) { // TODO: Implement this. return 0; } glfw-2.7.2/lib/cocoa/platform.h0000644000175000017500000001641211427547437017324 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #ifndef _platform_h_ #define _platform_h_ // This is the Mac OS X version of GLFW #define _GLFW_MAC_OS_X #if defined(__OBJC__) #import #else typedef void *id; #endif #include #include "../../include/GL/glfw.h" #ifndef GL_VERSION_3_0 typedef const GLubyte * (APIENTRY *PFNGLGETSTRINGIPROC) (GLenum, GLuint); #endif /*GL_VERSION_3_0*/ //======================================================================== // GLFW platform specific types //======================================================================== //------------------------------------------------------------------------ // Pointer length integer //------------------------------------------------------------------------ typedef intptr_t GLFWintptr; //------------------------------------------------------------------------ // Window structure //------------------------------------------------------------------------ typedef struct _GLFWwin_struct _GLFWwin; struct _GLFWwin_struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // User callback functions GLFWwindowsizefun windowSizeCallback; GLFWwindowclosefun windowCloseCallback; GLFWwindowrefreshfun windowRefreshCallback; GLFWmousebuttonfun mouseButtonCallback; GLFWmouseposfun mousePosCallback; GLFWmousewheelfun mouseWheelCallback; GLFWkeyfun keyCallback; GLFWcharfun charCallback; // User selected window settings int fullscreen; // Fullscreen flag int mouseLock; // Mouse-lock flag int autoPollEvents; // Auto polling flag int sysKeysDisabled; // System keys disabled flag int windowNoResize; // Resize- and maximize gadgets disabled flag int refreshRate; // Vertical monitor refresh rate // Window status & parameters int opened; // Flag telling if window is opened or not int active; // Application active flag int iconified; // Window iconified flag int width, height; // Window width and heigth int accelerated; // GL_TRUE if window is HW accelerated // Framebuffer attributes int redBits; int greenBits; int blueBits; int alphaBits; int depthBits; int stencilBits; int accumRedBits; int accumGreenBits; int accumBlueBits; int accumAlphaBits; int auxBuffers; int stereo; int samples; // OpenGL extensions and context attributes int has_GL_SGIS_generate_mipmap; int has_GL_ARB_texture_non_power_of_two; int glMajor, glMinor, glRevision; int glForward, glDebug, glProfile; PFNGLGETSTRINGIPROC GetStringi; // ========= PLATFORM SPECIFIC PART ====================================== id window; id pixelFormat; id context; id delegate; unsigned int modifierFlags; }; GLFWGLOBAL _GLFWwin _glfwWin; //------------------------------------------------------------------------ // Library global data //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Window opening hints _GLFWhints hints; // ========= PLATFORM SPECIFIC PART ====================================== // Timer data struct { double t0; } Timer; // dlopen handle for dynamically-loading extension function pointers void *OpenGLFramework; int Unbundled; id DesktopMode; id AutoreleasePool; } _glfwLibrary; //------------------------------------------------------------------------ // User input status (some of this should go in _GLFWwin) //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Mouse status int MousePosX, MousePosY; int WheelPos; char MouseButton[ GLFW_MOUSE_BUTTON_LAST+1 ]; // Keyboard status char Key[ GLFW_KEY_LAST+1 ]; int LastChar; // User selected settings int StickyKeys; int StickyMouseButtons; int KeyRepeat; // ========= PLATFORM SPECIFIC PART ====================================== double WheelPosFloating; } _glfwInput; //------------------------------------------------------------------------ // Thread information //------------------------------------------------------------------------ typedef struct _GLFWthread_struct _GLFWthread; // Thread record (one for each thread) struct _GLFWthread_struct { // Pointer to previous and next threads in linked list _GLFWthread *Previous, *Next; // GLFW user side thread information GLFWthread ID; GLFWthreadfun Function; // System side thread information pthread_t PosixID; }; // General thread information GLFWGLOBAL struct { // Critical section lock pthread_mutex_t CriticalSection; // Next thread ID to use (increments for every created thread) GLFWthread NextID; // First thread in linked list (always the main thread) _GLFWthread First; } _glfwThrd; //======================================================================== // Macros for encapsulating critical code sections (i.e. making parts // of GLFW thread safe) //======================================================================== // Define so we can use the same thread code as X11 #define _glfw_numprocessors(n) { \ int mib[2], ncpu; \ size_t len = 1; \ mib[0] = CTL_HW; \ mib[1] = HW_NCPU; \ n = 1; \ if( sysctl( mib, 2, &ncpu, &len, NULL, 0 ) != -1 ) \ { \ if( len > 0 ) \ { \ n = ncpu; \ } \ } \ } // Thread list management #define ENTER_THREAD_CRITICAL_SECTION \ pthread_mutex_lock( &_glfwThrd.CriticalSection ); #define LEAVE_THREAD_CRITICAL_SECTION \ pthread_mutex_unlock( &_glfwThrd.CriticalSection ); #endif // _platform_h_ glfw-2.7.2/lib/cocoa/cocoa_init.m0000644000175000017500000002317411614047071017602 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== // Needed for _NSGetProgname #include #include "internal.h" @interface GLFWThread : NSThread @end @implementation GLFWThread - (void)main { } @end @interface GLFWApplication : NSApplication @end @implementation GLFWApplication // From http://cocoadev.com/index.pl?GameKeyboardHandlingAlmost // This works around an AppKit bug, where key up events while holding // down the command key don't get sent to the key window. - (void)sendEvent:(NSEvent *)event { if( [event type] == NSKeyUp && ( [event modifierFlags] & NSCommandKeyMask ) ) { [[self keyWindow] sendEvent:event]; } else { [super sendEvent:event]; } } @end // Prior to Snow Leopard, we need to use this oddly-named semi-private API // to get the application menu working properly. Need to be careful in // case it goes away in a future OS update. @interface NSApplication (NSAppleMenu) - (void)setAppleMenu:(NSMenu *)m; @end // Keys to search for as potential application names NSString *GLFWNameKeys[] = { @"CFBundleDisplayName", @"CFBundleName", @"CFBundleExecutable", }; //======================================================================== // Try to figure out what the calling application is called //======================================================================== static NSString *findAppName( void ) { NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; unsigned int i; for( i = 0; i < sizeof(GLFWNameKeys) / sizeof(GLFWNameKeys[0]); i++ ) { id name = [infoDictionary objectForKey:GLFWNameKeys[i]]; if (name && [name isKindOfClass:[NSString class]] && ![@"" isEqualToString:name]) { return name; } } // If we get here, we're unbundled if( !_glfwLibrary.Unbundled ) { // Could do this only if we discover we're unbundled, but it should // do no harm... ProcessSerialNumber psn = { 0, kCurrentProcess }; TransformProcessType( &psn, kProcessTransformToForegroundApplication ); // Having the app in front of the terminal window is also generally // handy. There is an NSApplication API to do this, but... SetFrontProcess( &psn ); _glfwLibrary.Unbundled = GL_TRUE; } char **progname = _NSGetProgname(); if( progname && *progname ) { // TODO: UTF8? return [NSString stringWithUTF8String:*progname]; } // Really shouldn't get here return @"GLFW Application"; } //======================================================================== // Set up the menu bar (manually) // This is nasty, nasty stuff -- calls to undocumented semi-private APIs that // could go away at any moment, lots of stuff that really should be // localize(d|able), etc. Loading a nib would save us this horror, but that // doesn't seem like a good thing to require of GLFW's clients. //======================================================================== static void setUpMenuBar( void ) { NSString *appName = findAppName(); NSMenu *bar = [[NSMenu alloc] init]; [NSApp setMainMenu:bar]; NSMenuItem *appMenuItem = [bar addItemWithTitle:@"" action:NULL keyEquivalent:@""]; NSMenu *appMenu = [[NSMenu alloc] init]; [appMenuItem setSubmenu:appMenu]; [appMenu addItemWithTitle:[NSString stringWithFormat:@"About %@", appName] action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; [appMenu addItem:[NSMenuItem separatorItem]]; NSMenu *servicesMenu = [[NSMenu alloc] init]; [NSApp setServicesMenu:servicesMenu]; [[appMenu addItemWithTitle:@"Services" action:NULL keyEquivalent:@""] setSubmenu:servicesMenu]; [appMenu addItem:[NSMenuItem separatorItem]]; [appMenu addItemWithTitle:[NSString stringWithFormat:@"Hide %@", appName] action:@selector(hide:) keyEquivalent:@"h"]; [[appMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"] setKeyEquivalentModifierMask:NSAlternateKeyMask | NSCommandKeyMask]; [appMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; [appMenu addItem:[NSMenuItem separatorItem]]; [appMenu addItemWithTitle:[NSString stringWithFormat:@"Quit %@", appName] action:@selector(terminate:) keyEquivalent:@"q"]; NSMenuItem *windowMenuItem = [bar addItemWithTitle:@"" action:NULL keyEquivalent:@""]; NSMenu *windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; [NSApp setWindowsMenu:windowMenu]; [windowMenuItem setSubmenu:windowMenu]; [windowMenu addItemWithTitle:@"Miniaturize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; [windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""]; [windowMenu addItem:[NSMenuItem separatorItem]]; [windowMenu addItemWithTitle:@"Bring All to Front" action:@selector(arrangeInFront:) keyEquivalent:@""]; // At least guard the call to private API to avoid an exception if it // goes away. Hopefully that means the worst we'll break in future is to // look ugly... if( [NSApp respondsToSelector:@selector(setAppleMenu:)] ) { [NSApp setAppleMenu:appMenu]; } } //======================================================================== // Terminate GLFW when exiting application //======================================================================== static void glfw_atexit( void ) { glfwTerminate(); } //======================================================================== // Initialize GLFW thread package //======================================================================== static void initThreads( void ) { // Initialize critical section handle (void) pthread_mutex_init( &_glfwThrd.CriticalSection, NULL ); // The first thread (the main thread) has ID 0 _glfwThrd.NextID = 0; // Fill out information about the main thread (this thread) _glfwThrd.First.ID = _glfwThrd.NextID ++; _glfwThrd.First.Function = NULL; _glfwThrd.First.PosixID = pthread_self(); _glfwThrd.First.Previous = NULL; _glfwThrd.First.Next = NULL; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Initialize the GLFW library //======================================================================== int _glfwPlatformInit( void ) { _glfwLibrary.AutoreleasePool = [[NSAutoreleasePool alloc] init]; // Implicitly create shared NSApplication instance [GLFWApplication sharedApplication]; _glfwLibrary.OpenGLFramework = CFBundleGetBundleWithIdentifier( CFSTR( "com.apple.opengl" ) ); if( _glfwLibrary.OpenGLFramework == NULL ) { return GL_FALSE; } GLFWThread* thread = [[GLFWThread alloc] init]; [thread start]; [thread release]; NSString* resourcePath = [[NSBundle mainBundle] resourcePath]; if( access( [resourcePath cStringUsingEncoding:NSUTF8StringEncoding], R_OK ) == 0 ) { chdir( [resourcePath cStringUsingEncoding:NSUTF8StringEncoding] ); } // Setting up menu bar must go exactly here else weirdness ensues setUpMenuBar(); [NSApp finishLaunching]; // Install atexit routine atexit( glfw_atexit ); initThreads(); _glfwPlatformSetTime( 0.0 ); _glfwLibrary.DesktopMode = (NSDictionary *)CGDisplayCurrentMode( CGMainDisplayID() ); return GL_TRUE; } //======================================================================== // Close window, if open, and shut down GLFW //======================================================================== int _glfwPlatformTerminate( void ) { // TODO: Fail unless this is the main thread glfwCloseWindow(); // TODO: Kill all non-main threads? // TODO: Probably other cleanup [_glfwLibrary.AutoreleasePool release]; _glfwLibrary.AutoreleasePool = nil; return GL_TRUE; } glfw-2.7.2/lib/cocoa/cocoa_window.m0000644000175000017500000006361511614011611020141 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Cocoa/NSOpenGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2009-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #include //======================================================================== // Delegate for window related notifications // (but also used as an application delegate) //======================================================================== @interface GLFWWindowDelegate : NSObject @end @implementation GLFWWindowDelegate - (BOOL)windowShouldClose:(id)window { if( _glfwWin.windowCloseCallback ) { if( !_glfwWin.windowCloseCallback() ) { return NO; } } // This is horribly ugly, but it works glfwCloseWindow(); return NO; } - (void)windowDidResize:(NSNotification *)notification { [_glfwWin.context update]; NSRect contentRect = [_glfwWin.window contentRectForFrameRect:[_glfwWin.window frame]]; _glfwWin.width = contentRect.size.width; _glfwWin.height = contentRect.size.height; if( _glfwWin.windowSizeCallback ) { _glfwWin.windowSizeCallback( _glfwWin.width, _glfwWin.height ); } } - (void)windowDidMiniaturize:(NSNotification *)notification { _glfwWin.iconified = GL_TRUE; } - (void)windowDidDeminiaturize:(NSNotification *)notification { _glfwWin.iconified = GL_FALSE; } - (void)windowDidBecomeKey:(NSNotification *)notification { _glfwWin.active = GL_TRUE; } - (void)windowDidResignKey:(NSNotification *)notification { _glfwWin.active = GL_FALSE; _glfwInputDeactivation(); } - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { if( _glfwWin.windowCloseCallback ) { if( !_glfwWin.windowCloseCallback() ) { return NSTerminateCancel; } } // This is horribly ugly, but it works glfwCloseWindow(); return NSTerminateCancel; } @end // TODO: Need to find mappings for F13-F15, volume down/up/mute, and eject. static const unsigned int MAC_TO_GLFW_KEYCODE_MAPPING[128] = { /* 00 */ 'A', /* 01 */ 'S', /* 02 */ 'D', /* 03 */ 'F', /* 04 */ 'H', /* 05 */ 'G', /* 06 */ 'Z', /* 07 */ 'X', /* 08 */ 'C', /* 09 */ 'V', /* 0a */ -1, /* 0b */ 'B', /* 0c */ 'Q', /* 0d */ 'W', /* 0e */ 'E', /* 0f */ 'R', /* 10 */ 'Y', /* 11 */ 'T', /* 12 */ '1', /* 13 */ '2', /* 14 */ '3', /* 15 */ '4', /* 16 */ '6', /* 17 */ '5', /* 18 */ '=', /* 19 */ '9', /* 1a */ '7', /* 1b */ '-', /* 1c */ '8', /* 1d */ '0', /* 1e */ ']', /* 1f */ 'O', /* 20 */ 'U', /* 21 */ '[', /* 22 */ 'I', /* 23 */ 'P', /* 24 */ GLFW_KEY_ENTER, /* 25 */ 'L', /* 26 */ 'J', /* 27 */ '\'', /* 28 */ 'K', /* 29 */ ';', /* 2a */ '\\', /* 2b */ ',', /* 2c */ '/', /* 2d */ 'N', /* 2e */ 'M', /* 2f */ '.', /* 30 */ GLFW_KEY_TAB, /* 31 */ GLFW_KEY_SPACE, /* 32 */ '`', /* 33 */ GLFW_KEY_BACKSPACE, /* 34 */ -1, /* 35 */ GLFW_KEY_ESC, /* 36 */ GLFW_KEY_RSUPER, /* 37 */ GLFW_KEY_LSUPER, /* 38 */ GLFW_KEY_LSHIFT, /* 39 */ GLFW_KEY_CAPS_LOCK, /* 3a */ GLFW_KEY_LALT, /* 3b */ GLFW_KEY_LCTRL, /* 3c */ GLFW_KEY_RSHIFT, /* 3d */ GLFW_KEY_RALT, /* 3e */ GLFW_KEY_RCTRL, /* 3f */ -1, /*Function*/ /* 40 */ GLFW_KEY_F17, /* 41 */ GLFW_KEY_KP_DECIMAL, /* 42 */ -1, /* 43 */ GLFW_KEY_KP_MULTIPLY, /* 44 */ -1, /* 45 */ GLFW_KEY_KP_ADD, /* 46 */ -1, /* 47 */ -1, /*KeypadClear*/ /* 48 */ -1, /*VolumeUp*/ /* 49 */ -1, /*VolumeDown*/ /* 4a */ -1, /*Mute*/ /* 4b */ GLFW_KEY_KP_DIVIDE, /* 4c */ GLFW_KEY_KP_ENTER, /* 4d */ -1, /* 4e */ GLFW_KEY_KP_SUBTRACT, /* 4f */ GLFW_KEY_F18, /* 50 */ GLFW_KEY_F19, /* 51 */ GLFW_KEY_KP_EQUAL, /* 52 */ GLFW_KEY_KP_0, /* 53 */ GLFW_KEY_KP_1, /* 54 */ GLFW_KEY_KP_2, /* 55 */ GLFW_KEY_KP_3, /* 56 */ GLFW_KEY_KP_4, /* 57 */ GLFW_KEY_KP_5, /* 58 */ GLFW_KEY_KP_6, /* 59 */ GLFW_KEY_KP_7, /* 5a */ GLFW_KEY_F20, /* 5b */ GLFW_KEY_KP_8, /* 5c */ GLFW_KEY_KP_9, /* 5d */ -1, /* 5e */ -1, /* 5f */ -1, /* 60 */ GLFW_KEY_F5, /* 61 */ GLFW_KEY_F6, /* 62 */ GLFW_KEY_F7, /* 63 */ GLFW_KEY_F3, /* 64 */ GLFW_KEY_F8, /* 65 */ GLFW_KEY_F9, /* 66 */ -1, /* 67 */ GLFW_KEY_F11, /* 68 */ -1, /* 69 */ GLFW_KEY_F13, /* 6a */ GLFW_KEY_F16, /* 6b */ GLFW_KEY_F14, /* 6c */ -1, /* 6d */ GLFW_KEY_F10, /* 6e */ -1, /* 6f */ GLFW_KEY_F12, /* 70 */ -1, /* 71 */ GLFW_KEY_F15, /* 72 */ GLFW_KEY_INSERT, /*Help*/ /* 73 */ GLFW_KEY_HOME, /* 74 */ GLFW_KEY_PAGEUP, /* 75 */ GLFW_KEY_DEL, /* 76 */ GLFW_KEY_F4, /* 77 */ GLFW_KEY_END, /* 78 */ GLFW_KEY_F2, /* 79 */ GLFW_KEY_PAGEDOWN, /* 7a */ GLFW_KEY_F1, /* 7b */ GLFW_KEY_LEFT, /* 7c */ GLFW_KEY_RIGHT, /* 7d */ GLFW_KEY_DOWN, /* 7e */ GLFW_KEY_UP, /* 7f */ -1, }; //======================================================================== // Converts a Mac OS X keycode to a GLFW keycode //======================================================================== static int convertMacKeyCode( unsigned int macKeyCode ) { if( macKeyCode >= 128 ) { return -1; } // This treats keycodes as *positional*; that is, we'll return 'a' // for the key left of 's', even on an AZERTY keyboard. The charInput // function should still get 'q' though. return MAC_TO_GLFW_KEYCODE_MAPPING[macKeyCode]; } //======================================================================== // Content view class for the GLFW window //======================================================================== @interface GLFWContentView : NSView @end @implementation GLFWContentView - (BOOL)isOpaque { return YES; } - (BOOL)canBecomeKeyView { return YES; } - (BOOL)acceptsFirstResponder { return YES; } - (void)mouseDown:(NSEvent *)event { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS ); } - (void)mouseDragged:(NSEvent *)event { [self mouseMoved:event]; } - (void)mouseUp:(NSEvent *)event { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_LEFT, GLFW_RELEASE ); } - (void)mouseMoved:(NSEvent *)event { if( _glfwWin.mouseLock ) { _glfwInput.MousePosX += [event deltaX]; _glfwInput.MousePosY += [event deltaY]; } else { NSPoint p = [event locationInWindow]; // Cocoa coordinate system has origin at lower left _glfwInput.MousePosX = p.x; _glfwInput.MousePosY = [[_glfwWin.window contentView] bounds].size.height - p.y; } if( _glfwWin.mousePosCallback ) { _glfwWin.mousePosCallback( _glfwInput.MousePosX, _glfwInput.MousePosY ); } } - (void)rightMouseDown:(NSEvent *)event { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS ); } - (void)rightMouseDragged:(NSEvent *)event { [self mouseMoved:event]; } - (void)rightMouseUp:(NSEvent *)event { _glfwInputMouseClick( GLFW_MOUSE_BUTTON_RIGHT, GLFW_RELEASE ); } - (void)otherMouseDown:(NSEvent *)event { _glfwInputMouseClick( [event buttonNumber], GLFW_PRESS ); } - (void)otherMouseDragged:(NSEvent *)event { [self mouseMoved:event]; } - (void)otherMouseUp:(NSEvent *)event { _glfwInputMouseClick( [event buttonNumber], GLFW_RELEASE ); } - (void)keyDown:(NSEvent *)event { NSUInteger length; NSString* characters; int i, code = convertMacKeyCode( [event keyCode] ); if( code != -1 ) { _glfwInputKey( code, GLFW_PRESS ); if( [event modifierFlags] & NSCommandKeyMask ) { if( !_glfwWin.sysKeysDisabled ) { [super keyDown:event]; } } else { characters = [event characters]; length = [characters length]; for( i = 0; i < length; i++ ) { _glfwInputChar( [characters characterAtIndex:i], GLFW_PRESS ); } } } } - (void)flagsChanged:(NSEvent *)event { unsigned int newModifierFlags = [event modifierFlags] | NSDeviceIndependentModifierFlagsMask; int mode; if( newModifierFlags > _glfwWin.modifierFlags ) { mode = GLFW_PRESS; } else { mode = GLFW_RELEASE; } _glfwWin.modifierFlags = newModifierFlags; _glfwInputKey( MAC_TO_GLFW_KEYCODE_MAPPING[[event keyCode]], mode ); } - (void)keyUp:(NSEvent *)event { NSUInteger length; NSString* characters; int i, code = convertMacKeyCode( [event keyCode] ); if( code != -1 ) { _glfwInputKey( code, GLFW_RELEASE ); characters = [event characters]; length = [characters length]; for( i = 0; i < length; i++ ) { _glfwInputChar( [characters characterAtIndex:i], GLFW_RELEASE ); } } } - (void)scrollWheel:(NSEvent *)event { _glfwInput.WheelPosFloating += [event deltaY]; _glfwInput.WheelPos = lrint(_glfwInput.WheelPosFloating); if( _glfwWin.mouseWheelCallback ) { _glfwWin.mouseWheelCallback( _glfwInput.WheelPos ); } } @end //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Here is where the window is created, and the OpenGL rendering context is // created //======================================================================== int _glfwPlatformOpenWindow( int width, int height, const _GLFWwndconfig *wndconfig, const _GLFWfbconfig *fbconfig ) { int colorBits; _glfwWin.pixelFormat = nil; _glfwWin.window = nil; _glfwWin.context = nil; _glfwWin.delegate = nil; #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 // Fail if OpenGL 3.3 or above was requested if( wndconfig->glMajor > 3 || wndconfig->glMajor == 3 && wndconfig->glMinor > 2 ) { return GL_FALSE; } if( wndconfig->glProfile ) { // Fail if a profile other than core was explicitly selected if( wndconfig->glProfile != GLFW_OPENGL_CORE_PROFILE ) { return GL_FALSE; } } #else // Fail if OpenGL 3.0 or above was requested if( wndconfig->glMajor > 2 ) { return GL_FALSE; } #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ _glfwWin.delegate = [[GLFWWindowDelegate alloc] init]; if( _glfwWin.delegate == nil ) { return GL_FALSE; } [NSApp setDelegate:_glfwWin.delegate]; // Mac OS X needs non-zero color size, so set resonable values colorBits = fbconfig->redBits + fbconfig->greenBits + fbconfig->blueBits; if( colorBits == 0 ) { colorBits = 24; } else if( colorBits < 15 ) { colorBits = 15; } // Ignored hints: // OpenGLDebug // pending it meaning anything on Mac OS X // Don't use accumulation buffer support; it's not accelerated // Aux buffers probably aren't accelerated either CFDictionaryRef fullscreenMode = NULL; if( wndconfig->mode == GLFW_FULLSCREEN ) { fullscreenMode = // I think it's safe to pass 0 to the refresh rate for this function // rather than conditionalizing the code to call the version which // doesn't specify refresh... CGDisplayBestModeForParametersAndRefreshRateWithProperty( CGMainDisplayID(), colorBits + fbconfig->alphaBits, width, height, wndconfig->refreshRate, // Controversial, see macosx_fullscreen.m for discussion kCGDisplayModeIsSafeForHardware, NULL); width = [[(id)fullscreenMode objectForKey:(id)kCGDisplayWidth] intValue]; height = [[(id)fullscreenMode objectForKey:(id)kCGDisplayHeight] intValue]; } unsigned int styleMask = 0; if( wndconfig->mode == GLFW_WINDOW ) { styleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask; if( !wndconfig->windowNoResize ) { styleMask |= NSResizableWindowMask; } } else { styleMask = NSBorderlessWindowMask; } _glfwWin.window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, width, height) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO]; [_glfwWin.window setContentView:[[GLFWContentView alloc] init]]; [_glfwWin.window setDelegate:_glfwWin.delegate]; [_glfwWin.window setAcceptsMouseMovedEvents:YES]; [_glfwWin.window center]; if( wndconfig->mode == GLFW_FULLSCREEN ) { CGCaptureAllDisplays(); CGDisplaySwitchToMode( CGMainDisplayID(), fullscreenMode ); } unsigned int attribute_count = 0; #define ADD_ATTR(x) attributes[attribute_count++] = x #define ADD_ATTR2(x, y) (void)({ ADD_ATTR(x); ADD_ATTR(y); }) #define MAX_ATTRS 64 // urrgh NSOpenGLPixelFormatAttribute attributes[MAX_ATTRS]; ADD_ATTR( NSOpenGLPFADoubleBuffer ); if( wndconfig->mode == GLFW_FULLSCREEN ) { ADD_ATTR( NSOpenGLPFAFullScreen ); ADD_ATTR( NSOpenGLPFANoRecovery ); ADD_ATTR2( NSOpenGLPFAScreenMask, CGDisplayIDToOpenGLDisplayMask( CGMainDisplayID() ) ); } #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if( wndconfig->glMajor > 2 ) { ADD_ATTR2( NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core ); } #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ ADD_ATTR2( NSOpenGLPFAColorSize, colorBits ); if( fbconfig->alphaBits > 0) { ADD_ATTR2( NSOpenGLPFAAlphaSize, fbconfig->alphaBits ); } if( fbconfig->depthBits > 0) { ADD_ATTR2( NSOpenGLPFADepthSize, fbconfig->depthBits ); } if( fbconfig->stencilBits > 0) { ADD_ATTR2( NSOpenGLPFAStencilSize, fbconfig->stencilBits ); } int accumBits = fbconfig->accumRedBits + fbconfig->accumGreenBits + fbconfig->accumBlueBits + fbconfig->accumAlphaBits; if( accumBits > 0) { ADD_ATTR2( NSOpenGLPFAAccumSize, accumBits ); } if( fbconfig->auxBuffers > 0) { ADD_ATTR2( NSOpenGLPFAAuxBuffers, fbconfig->auxBuffers ); } if( fbconfig->stereo) { ADD_ATTR( NSOpenGLPFAStereo ); } if( fbconfig->samples > 0) { ADD_ATTR2( NSOpenGLPFASampleBuffers, 1 ); ADD_ATTR2( NSOpenGLPFASamples, fbconfig->samples ); } ADD_ATTR(0); _glfwWin.pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes]; if( _glfwWin.pixelFormat == nil ) { return GL_FALSE; } _glfwWin.context = [[NSOpenGLContext alloc] initWithFormat:_glfwWin.pixelFormat shareContext:nil]; if( _glfwWin.context == nil ) { return GL_FALSE; } [_glfwWin.window makeKeyAndOrderFront:nil]; [_glfwWin.context setView:[_glfwWin.window contentView]]; if( wndconfig->mode == GLFW_FULLSCREEN ) { // TODO: Make this work on pre-Leopard systems [[_glfwWin.window contentView] enterFullScreenMode:[NSScreen mainScreen] withOptions:nil]; } [_glfwWin.context makeCurrentContext]; NSPoint point = [[NSCursor currentCursor] hotSpot]; _glfwInput.MousePosX = point.x; _glfwInput.MousePosY = point.y; return GL_TRUE; } //======================================================================== // Properly kill the window / video display //======================================================================== void _glfwPlatformCloseWindow( void ) { [_glfwWin.window orderOut:nil]; if( _glfwWin.fullscreen ) { [[_glfwWin.window contentView] exitFullScreenModeWithOptions:nil]; CGDisplaySwitchToMode( CGMainDisplayID(), (CFDictionaryRef)_glfwLibrary.DesktopMode ); CGReleaseAllDisplays(); } [_glfwWin.pixelFormat release]; _glfwWin.pixelFormat = nil; [NSOpenGLContext clearCurrentContext]; [_glfwWin.context release]; _glfwWin.context = nil; [_glfwWin.window setDelegate:nil]; [NSApp setDelegate:nil]; [_glfwWin.delegate release]; _glfwWin.delegate = nil; [_glfwWin.window close]; _glfwWin.window = nil; // TODO: Probably more cleanup } //======================================================================== // Set the window title //======================================================================== void _glfwPlatformSetWindowTitle( const char *title ) { [_glfwWin.window setTitle:[NSString stringWithCString:title encoding:NSISOLatin1StringEncoding]]; } //======================================================================== // Set the window size //======================================================================== void _glfwPlatformSetWindowSize( int width, int height ) { [_glfwWin.window setContentSize:NSMakeSize(width, height)]; } //======================================================================== // Set the window position //======================================================================== void _glfwPlatformSetWindowPos( int x, int y ) { NSRect contentRect = [_glfwWin.window contentRectForFrameRect:[_glfwWin.window frame]]; // We assume here that the client code wants to position the window within the // screen the window currently occupies NSRect screenRect = [[_glfwWin.window screen] visibleFrame]; contentRect.origin = NSMakePoint(screenRect.origin.x + x, screenRect.origin.y + screenRect.size.height - y - contentRect.size.height); [_glfwWin.window setFrame:[_glfwWin.window frameRectForContentRect:contentRect] display:YES]; } //======================================================================== // Iconify the window //======================================================================== void _glfwPlatformIconifyWindow( void ) { [_glfwWin.window miniaturize:nil]; } //======================================================================== // Restore (un-iconify) the window //======================================================================== void _glfwPlatformRestoreWindow( void ) { [_glfwWin.window deminiaturize:nil]; } //======================================================================== // Swap buffers //======================================================================== void _glfwPlatformSwapBuffers( void ) { // ARP appears to be unnecessary, but this is future-proof [_glfwWin.context flushBuffer]; } //======================================================================== // Set double buffering swap interval //======================================================================== void _glfwPlatformSwapInterval( int interval ) { GLint sync = interval; [_glfwWin.context setValues:&sync forParameter:NSOpenGLCPSwapInterval]; } //======================================================================== // Write back window parameters into GLFW window structure //======================================================================== void _glfwPlatformRefreshWindowParams( void ) { GLint value; // Since GLFW 2.x doesn't understand screens, we use virtual screen zero [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFAAccelerated forVirtualScreen:0]; _glfwWin.accelerated = value; [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFAAlphaSize forVirtualScreen:0]; _glfwWin.alphaBits = value; // It seems that the color size includes the size of the alpha channel [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFAColorSize forVirtualScreen:0]; value -= _glfwWin.alphaBits; _glfwWin.redBits = value / 3; _glfwWin.greenBits = value / 3; _glfwWin.blueBits = value / 3; [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFADepthSize forVirtualScreen:0]; _glfwWin.depthBits = value; [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFAStencilSize forVirtualScreen:0]; _glfwWin.stencilBits = value; [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFAAccumSize forVirtualScreen:0]; _glfwWin.accumRedBits = value / 3; _glfwWin.accumGreenBits = value / 3; _glfwWin.accumBlueBits = value / 3; // TODO: Figure out what to set this value to _glfwWin.accumAlphaBits = 0; [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFAAuxBuffers forVirtualScreen:0]; _glfwWin.auxBuffers = value; [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFAStereo forVirtualScreen:0]; _glfwWin.stereo = value; [_glfwWin.pixelFormat getValues:&value forAttribute:NSOpenGLPFASamples forVirtualScreen:0]; _glfwWin.samples = value; _glfwWin.glDebug = GL_FALSE; } //======================================================================== // Poll for new window and input events //======================================================================== void _glfwPlatformPollEvents( void ) { NSEvent *event; do { event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES]; if (event) { [NSApp sendEvent:event]; } } while (event); [_glfwLibrary.AutoreleasePool drain]; _glfwLibrary.AutoreleasePool = [[NSAutoreleasePool alloc] init]; } //======================================================================== // Wait for new window and input events //======================================================================== void _glfwPlatformWaitEvents( void ) { // I wanted to pass NO to dequeue:, and rely on PollEvents to // dequeue and send. For reasons not at all clear to me, passing // NO to dequeue: causes this method never to return. NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES]; [NSApp sendEvent:event]; _glfwPlatformPollEvents(); } //======================================================================== // Hide mouse cursor (lock it) //======================================================================== void _glfwPlatformHideMouseCursor( void ) { [NSCursor hide]; CGAssociateMouseAndMouseCursorPosition( false ); } //======================================================================== // Show mouse cursor (unlock it) //======================================================================== void _glfwPlatformShowMouseCursor( void ) { [NSCursor unhide]; CGAssociateMouseAndMouseCursorPosition( true ); } //======================================================================== // Set physical mouse cursor position //======================================================================== void _glfwPlatformSetMouseCursorPos( int x, int y ) { // The library seems to assume that after calling this the mouse won't move, // but obviously it will, and escape the app's window, and activate other apps, // and other badness in pain. I think the API's just silly, but maybe I'm // misunderstanding it... // Also, (x, y) are window coords... // Also, it doesn't seem possible to write this robustly without // calculating the maximum y coordinate of all screens, since Cocoa's // "global coordinates" are upside down from CG's... // Without this (once per app run, but it's convenient to do it here) // events will be suppressed for a default of 0.25 seconds after we // move the cursor. CGSetLocalEventsSuppressionInterval( 0.0 ); NSPoint localPoint = NSMakePoint( x, y ); NSPoint globalPoint = [_glfwWin.window convertBaseToScreen:localPoint]; CGPoint mainScreenOrigin = CGDisplayBounds( CGMainDisplayID() ).origin; double mainScreenHeight = CGDisplayBounds( CGMainDisplayID() ).size.height; CGPoint targetPoint = CGPointMake( globalPoint.x - mainScreenOrigin.x, mainScreenHeight - globalPoint.y - mainScreenOrigin.y ); CGDisplayMoveCursorToPoint( CGMainDisplayID(), targetPoint ); } glfw-2.7.2/lib/carbon/0000755000175000017500000000000011621215252015462 5ustar elmindredaelmindredaglfw-2.7.2/lib/carbon/carbon_window.c0000644000175000017500000013251511561253716020502 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // Copyright (c) 2006-2007 Robin Leffmann // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #define _glfwTestModifier( modifierMask, glfwKey ) \ if ( changed & modifierMask ) \ { \ _glfwInputKey( glfwKey, (modifiers & modifierMask ? GLFW_PRESS : GLFW_RELEASE) ); \ } //************************************************************************ //**** GLFW internal functions **** //************************************************************************ static void handleMacModifierChange( UInt32 modifiers ) { UInt32 changed = modifiers ^ _glfwInput.Modifiers; // The right *key variants below never actually occur // There also isn't even a broken right command key constant _glfwTestModifier( shiftKey, GLFW_KEY_LSHIFT ); _glfwTestModifier( rightShiftKey, GLFW_KEY_RSHIFT ); _glfwTestModifier( controlKey, GLFW_KEY_LCTRL ); _glfwTestModifier( rightControlKey, GLFW_KEY_RCTRL ); _glfwTestModifier( optionKey, GLFW_KEY_LALT ); _glfwTestModifier( rightOptionKey, GLFW_KEY_RALT ); _glfwTestModifier( cmdKey, GLFW_KEY_LSUPER ); _glfwInput.Modifiers = modifiers; } static void handleMacKeyChange( UInt32 keyCode, int action ) { switch ( keyCode ) { case MAC_KEY_ENTER: _glfwInputKey( GLFW_KEY_ENTER, action); break; case MAC_KEY_RETURN: _glfwInputKey( GLFW_KEY_KP_ENTER, action); break; case MAC_KEY_ESC: _glfwInputKey( GLFW_KEY_ESC, action); break; case MAC_KEY_F1: _glfwInputKey( GLFW_KEY_F1, action); break; case MAC_KEY_F2: _glfwInputKey( GLFW_KEY_F2, action); break; case MAC_KEY_F3: _glfwInputKey( GLFW_KEY_F3, action); break; case MAC_KEY_F4: _glfwInputKey( GLFW_KEY_F4, action); break; case MAC_KEY_F5: _glfwInputKey( GLFW_KEY_F5, action); break; case MAC_KEY_F6: _glfwInputKey( GLFW_KEY_F6, action); break; case MAC_KEY_F7: _glfwInputKey( GLFW_KEY_F7, action); break; case MAC_KEY_F8: _glfwInputKey( GLFW_KEY_F8, action); break; case MAC_KEY_F9: _glfwInputKey( GLFW_KEY_F9, action); break; case MAC_KEY_F10: _glfwInputKey( GLFW_KEY_F10, action); break; case MAC_KEY_F11: _glfwInputKey( GLFW_KEY_F11, action); break; case MAC_KEY_F12: _glfwInputKey( GLFW_KEY_F12, action); break; case MAC_KEY_F13: _glfwInputKey( GLFW_KEY_F13, action); break; case MAC_KEY_F14: _glfwInputKey( GLFW_KEY_F14, action); break; case MAC_KEY_F15: _glfwInputKey( GLFW_KEY_F15, action); break; case MAC_KEY_UP: _glfwInputKey( GLFW_KEY_UP, action); break; case MAC_KEY_DOWN: _glfwInputKey( GLFW_KEY_DOWN, action); break; case MAC_KEY_LEFT: _glfwInputKey( GLFW_KEY_LEFT, action); break; case MAC_KEY_RIGHT: _glfwInputKey( GLFW_KEY_RIGHT, action); break; case MAC_KEY_TAB: _glfwInputKey( GLFW_KEY_TAB, action); break; case MAC_KEY_BACKSPACE: _glfwInputKey( GLFW_KEY_BACKSPACE, action); break; case MAC_KEY_HELP: _glfwInputKey( GLFW_KEY_INSERT, action); break; case MAC_KEY_DEL: _glfwInputKey( GLFW_KEY_DEL, action); break; case MAC_KEY_PAGEUP: _glfwInputKey( GLFW_KEY_PAGEUP, action); break; case MAC_KEY_PAGEDOWN: _glfwInputKey( GLFW_KEY_PAGEDOWN, action); break; case MAC_KEY_HOME: _glfwInputKey( GLFW_KEY_HOME, action); break; case MAC_KEY_END: _glfwInputKey( GLFW_KEY_END, action); break; case MAC_KEY_KP_0: _glfwInputKey( GLFW_KEY_KP_0, action); break; case MAC_KEY_KP_1: _glfwInputKey( GLFW_KEY_KP_1, action); break; case MAC_KEY_KP_2: _glfwInputKey( GLFW_KEY_KP_2, action); break; case MAC_KEY_KP_3: _glfwInputKey( GLFW_KEY_KP_3, action); break; case MAC_KEY_KP_4: _glfwInputKey( GLFW_KEY_KP_4, action); break; case MAC_KEY_KP_5: _glfwInputKey( GLFW_KEY_KP_5, action); break; case MAC_KEY_KP_6: _glfwInputKey( GLFW_KEY_KP_6, action); break; case MAC_KEY_KP_7: _glfwInputKey( GLFW_KEY_KP_7, action); break; case MAC_KEY_KP_8: _glfwInputKey( GLFW_KEY_KP_8, action); break; case MAC_KEY_KP_9: _glfwInputKey( GLFW_KEY_KP_9, action); break; case MAC_KEY_KP_DIVIDE: _glfwInputKey( GLFW_KEY_KP_DIVIDE, action); break; case MAC_KEY_KP_MULTIPLY: _glfwInputKey( GLFW_KEY_KP_MULTIPLY, action); break; case MAC_KEY_KP_SUBTRACT: _glfwInputKey( GLFW_KEY_KP_SUBTRACT, action); break; case MAC_KEY_KP_ADD: _glfwInputKey( GLFW_KEY_KP_ADD, action); break; case MAC_KEY_KP_DECIMAL: _glfwInputKey( GLFW_KEY_KP_DECIMAL, action); break; case MAC_KEY_KP_EQUAL: _glfwInputKey( GLFW_KEY_KP_EQUAL, action); break; case MAC_KEY_KP_ENTER: _glfwInputKey( GLFW_KEY_KP_ENTER, action); break; case MAC_KEY_NUMLOCK: _glfwInputKey( GLFW_KEY_KP_NUM_LOCK, action); break; default: { extern void *KCHRPtr; UInt32 state = 0; char charCode = (char)KeyTranslate( KCHRPtr, keyCode, &state ); UppercaseText( &charCode, 1, smSystemScript ); _glfwInputKey( (unsigned char)charCode, action ); } break; } } // The set of event class/kind combinations supported by keyEventHandler // This is used by installEventHandlers below static const EventTypeSpec GLFW_KEY_EVENT_TYPES[] = { { kEventClassKeyboard, kEventRawKeyDown }, { kEventClassKeyboard, kEventRawKeyUp }, { kEventClassKeyboard, kEventRawKeyRepeat }, { kEventClassKeyboard, kEventRawKeyModifiersChanged } }; static OSStatus keyEventHandler( EventHandlerCallRef handlerCallRef, EventRef event, void *userData ) { UInt32 keyCode; short int keyChar; UInt32 modifiers; switch( GetEventKind( event ) ) { case kEventRawKeyRepeat: case kEventRawKeyDown: { if( GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof( UInt32 ), NULL, &keyCode ) == noErr ) { handleMacKeyChange( keyCode, GLFW_PRESS ); } if( GetEventParameter( event, kEventParamKeyUnicodes, typeUnicodeText, NULL, sizeof(keyChar), NULL, &keyChar) == noErr ) { _glfwInputChar( keyChar, GLFW_PRESS ); } return noErr; } case kEventRawKeyUp: { if( GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof( UInt32 ), NULL, &keyCode ) == noErr ) { handleMacKeyChange( keyCode, GLFW_RELEASE ); } if( GetEventParameter( event, kEventParamKeyUnicodes, typeUnicodeText, NULL, sizeof(keyChar), NULL, &keyChar) == noErr ) { _glfwInputChar( keyChar, GLFW_RELEASE ); } return noErr; } case kEventRawKeyModifiersChanged: { if( GetEventParameter( event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof( UInt32 ), NULL, &modifiers ) == noErr ) { handleMacModifierChange( modifiers ); return noErr; } } break; } return eventNotHandledErr; } // The set of event class/kind combinations supported by mouseEventHandler // This is used by installEventHandlers below static const EventTypeSpec GLFW_MOUSE_EVENT_TYPES[] = { { kEventClassMouse, kEventMouseDown }, { kEventClassMouse, kEventMouseUp }, { kEventClassMouse, kEventMouseMoved }, { kEventClassMouse, kEventMouseDragged }, { kEventClassMouse, kEventMouseWheelMoved }, }; static OSStatus mouseEventHandler( EventHandlerCallRef handlerCallRef, EventRef event, void *userData ) { switch( GetEventKind( event ) ) { case kEventMouseDown: { WindowRef window; EventRecord oldStyleMacEvent; ConvertEventRefToEventRecord( event, &oldStyleMacEvent ); if( FindWindow ( oldStyleMacEvent.where, &window ) == inMenuBar ) { MenuSelect( oldStyleMacEvent.where ); HiliteMenu(0); return noErr; } else { EventMouseButton button; if( GetEventParameter( event, kEventParamMouseButton, typeMouseButton, NULL, sizeof( EventMouseButton ), NULL, &button ) == noErr ) { button -= kEventMouseButtonPrimary; if( button <= GLFW_MOUSE_BUTTON_LAST ) { _glfwInputMouseClick( button + GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS ); } return noErr; } } break; } case kEventMouseUp: { EventMouseButton button; if( GetEventParameter( event, kEventParamMouseButton, typeMouseButton, NULL, sizeof( EventMouseButton ), NULL, &button ) == noErr ) { button -= kEventMouseButtonPrimary; if( button <= GLFW_MOUSE_BUTTON_LAST ) { _glfwInputMouseClick( button + GLFW_MOUSE_BUTTON_LEFT, GLFW_RELEASE ); } return noErr; } break; } case kEventMouseMoved: case kEventMouseDragged: { HIPoint mouseLocation; if( _glfwWin.mouseLock ) { if( GetEventParameter( event, kEventParamMouseDelta, typeHIPoint, NULL, sizeof( HIPoint ), NULL, &mouseLocation ) != noErr ) { break; } _glfwInput.MousePosX += mouseLocation.x; _glfwInput.MousePosY += mouseLocation.y; } else { if( GetEventParameter( event, kEventParamMouseLocation, typeHIPoint, NULL, sizeof( HIPoint ), NULL, &mouseLocation ) != noErr ) { break; } _glfwInput.MousePosX = mouseLocation.x; _glfwInput.MousePosY = mouseLocation.y; if( !_glfwWin.fullscreen ) { Rect content; GetWindowBounds( _glfwWin.window, kWindowContentRgn, &content ); _glfwInput.MousePosX -= content.left; _glfwInput.MousePosY -= content.top; } } if( _glfwWin.mousePosCallback ) { _glfwWin.mousePosCallback( _glfwInput.MousePosX, _glfwInput.MousePosY ); } break; } case kEventMouseWheelMoved: { EventMouseWheelAxis axis; if( GetEventParameter( event, kEventParamMouseWheelAxis, typeMouseWheelAxis, NULL, sizeof( EventMouseWheelAxis ), NULL, &axis) == noErr ) { long wheelDelta; if( axis == kEventMouseWheelAxisY && GetEventParameter( event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof( long ), NULL, &wheelDelta ) == noErr ) { _glfwInput.WheelPos += wheelDelta; if( _glfwWin.mouseWheelCallback ) { _glfwWin.mouseWheelCallback( _glfwInput.WheelPos ); } return noErr; } } break; } } return eventNotHandledErr; } // The set of event class/kind combinations supported by commandHandler // This is used by installEventHandlers below static const EventTypeSpec GLFW_COMMAND_EVENT_TYPES[] = { { kEventClassCommand, kEventCommandProcess } }; static OSStatus commandHandler( EventHandlerCallRef handlerCallRef, EventRef event, void *userData ) { if( _glfwWin.sysKeysDisabled ) { // TODO: Give adequate UI feedback that this is the case return eventNotHandledErr; } HICommand command; if( GetEventParameter( event, kEventParamDirectObject, typeHICommand, NULL, sizeof( HICommand ), NULL, &command ) == noErr ) { switch( command.commandID ) { case kHICommandClose: case kHICommandQuit: { // Check if the program wants us to close the window if( _glfwWin.windowCloseCallback ) { if( _glfwWin.windowCloseCallback() ) { glfwCloseWindow(); } } else { glfwCloseWindow(); } return noErr; } } } return eventNotHandledErr; } // The set of event class/kind combinations supported by windowEventHandler // This is used by installEventHandlers below static const EventTypeSpec GLFW_WINDOW_EVENT_TYPES[] = { { kEventClassWindow, kEventWindowBoundsChanged }, { kEventClassWindow, kEventWindowClose }, { kEventClassWindow, kEventWindowDrawContent }, { kEventClassWindow, kEventWindowActivated }, { kEventClassWindow, kEventWindowDeactivated }, }; static OSStatus windowEventHandler( EventHandlerCallRef handlerCallRef, EventRef event, void *userData ) { switch( GetEventKind(event) ) { case kEventWindowBoundsChanged: { WindowRef window; GetEventParameter( event, kEventParamDirectObject, typeWindowRef, NULL, sizeof(WindowRef), NULL, &window ); Rect rect; GetWindowPortBounds( window, &rect ); if( _glfwWin.width != rect.right || _glfwWin.height != rect.bottom ) { aglUpdateContext( _glfwWin.aglContext ); _glfwWin.width = rect.right; _glfwWin.height = rect.bottom; if( _glfwWin.windowSizeCallback ) { _glfwWin.windowSizeCallback( _glfwWin.width, _glfwWin.height ); } // Emulate (force) content invalidation if( _glfwWin.windowRefreshCallback ) { _glfwWin.windowRefreshCallback(); } } break; } case kEventWindowClose: { // Check if the client wants us to close the window if( _glfwWin.windowCloseCallback ) { if( _glfwWin.windowCloseCallback() ) { glfwCloseWindow(); } } else { glfwCloseWindow(); } return noErr; } case kEventWindowDrawContent: { if( _glfwWin.windowRefreshCallback ) { _glfwWin.windowRefreshCallback(); } break; } case kEventWindowActivated: { _glfwWin.active = GL_TRUE; break; } case kEventWindowDeactivated: { _glfwWin.active = GL_FALSE; _glfwInputDeactivation(); break; } } return eventNotHandledErr; } static int installEventHandlers( void ) { OSStatus error; _glfwWin.mouseUPP = NewEventHandlerUPP( mouseEventHandler ); error = InstallEventHandler( GetApplicationEventTarget(), _glfwWin.mouseUPP, GetEventTypeCount( GLFW_MOUSE_EVENT_TYPES ), GLFW_MOUSE_EVENT_TYPES, NULL, NULL ); if( error != noErr ) { fprintf( stderr, "Failed to install Carbon application mouse event handler\n" ); return GL_FALSE; } _glfwWin.commandUPP = NewEventHandlerUPP( commandHandler ); error = InstallEventHandler( GetApplicationEventTarget(), _glfwWin.commandUPP, GetEventTypeCount( GLFW_COMMAND_EVENT_TYPES ), GLFW_COMMAND_EVENT_TYPES, NULL, NULL ); if( error != noErr ) { fprintf( stderr, "Failed to install Carbon application command event handler\n" ); return GL_FALSE; } _glfwWin.keyboardUPP = NewEventHandlerUPP( keyEventHandler ); error = InstallEventHandler( GetApplicationEventTarget(), _glfwWin.keyboardUPP, GetEventTypeCount( GLFW_KEY_EVENT_TYPES ), GLFW_KEY_EVENT_TYPES, NULL, NULL ); if( error != noErr ) { fprintf( stderr, "Failed to install Carbon application key event handler\n" ); return GL_FALSE; } return GL_TRUE; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ #define _setAGLAttribute( aglAttributeName, AGLparameter ) \ if ( AGLparameter != 0 ) \ { \ AGLpixelFormatAttributes[numAGLAttrs++] = aglAttributeName; \ AGLpixelFormatAttributes[numAGLAttrs++] = AGLparameter; \ } #define _setCGLAttribute( cglAttributeName, CGLparameter ) \ if ( CGLparameter != 0 ) \ { \ CGLpixelFormatAttributes[ numCGLAttrs++ ] = cglAttributeName; \ CGLpixelFormatAttributes[ numCGLAttrs++ ] = CGLparameter; \ } //======================================================================== // Here is where the window is created, and // the OpenGL rendering context is created //======================================================================== int _glfwPlatformOpenWindow( int width, int height, const _GLFWwndconfig *wndconfig, const _GLFWfbconfig *fbconfig ) { OSStatus error; unsigned int windowAttributes; ProcessSerialNumber psn; // TODO: Break up this function! _glfwWin.windowUPP = NULL; _glfwWin.mouseUPP = NULL; _glfwWin.keyboardUPP = NULL; _glfwWin.commandUPP = NULL; _glfwWin.window = NULL; _glfwWin.aglContext = NULL; _glfwWin.aglPixelFormat = NULL; _glfwWin.cglContext = NULL; _glfwWin.cglPixelFormat = NULL; _glfwWin.refreshRate = wndconfig->refreshRate; // Fail if OpenGL 3.0 or above was requested if( wndconfig->glMajor > 2 ) { fprintf( stderr, "OpenGL 3.0+ is not yet supported on Mac OS X\n" ); return GL_FALSE; } if( _glfwLibrary.Unbundled ) { if( GetCurrentProcess( &psn ) != noErr ) { fprintf( stderr, "Failed to get the process serial number\n" ); return GL_FALSE; } if( TransformProcessType( &psn, kProcessTransformToForegroundApplication ) != noErr ) { fprintf( stderr, "Failed to become a foreground application\n" ); return GL_FALSE; } if( wndconfig->mode == GLFW_FULLSCREEN ) { if( SetFrontProcess( &psn ) != noErr ) { fprintf( stderr, "Failed to become the front process\n" ); return GL_FALSE; } } } if( !installEventHandlers() ) { fprintf( stderr, "Failed to install Carbon application event handlers\n" ); return GL_FALSE; } // Windowed or fullscreen; AGL or CGL? Quite the mess... // AGL appears to be the only choice for attaching OpenGL contexts to // Carbon windows, but it leaves the user no control over fullscreen // mode stretching. Solution: AGL for windowed, CGL for fullscreen. if( wndconfig->mode == GLFW_WINDOW ) { // create AGL pixel format attribute list GLint AGLpixelFormatAttributes[256]; int numAGLAttrs = 0; AGLpixelFormatAttributes[numAGLAttrs++] = AGL_RGBA; AGLpixelFormatAttributes[numAGLAttrs++] = AGL_DOUBLEBUFFER; AGLpixelFormatAttributes[numAGLAttrs++] = AGL_CLOSEST_POLICY; if( fbconfig->stereo ) { AGLpixelFormatAttributes[numAGLAttrs++] = AGL_STEREO; } _setAGLAttribute( AGL_AUX_BUFFERS, fbconfig->auxBuffers); _setAGLAttribute( AGL_RED_SIZE, fbconfig->redBits ); _setAGLAttribute( AGL_GREEN_SIZE, fbconfig->greenBits ); _setAGLAttribute( AGL_BLUE_SIZE, fbconfig->blueBits ); _setAGLAttribute( AGL_ALPHA_SIZE, fbconfig->alphaBits ); _setAGLAttribute( AGL_DEPTH_SIZE, fbconfig->depthBits ); _setAGLAttribute( AGL_STENCIL_SIZE, fbconfig->stencilBits ); _setAGLAttribute( AGL_ACCUM_RED_SIZE, fbconfig->accumRedBits ); _setAGLAttribute( AGL_ACCUM_GREEN_SIZE, fbconfig->accumGreenBits ); _setAGLAttribute( AGL_ACCUM_BLUE_SIZE, fbconfig->accumBlueBits ); _setAGLAttribute( AGL_ACCUM_ALPHA_SIZE, fbconfig->accumAlphaBits ); if( fbconfig->samples > 1 ) { _setAGLAttribute( AGL_SAMPLE_BUFFERS_ARB, 1 ); _setAGLAttribute( AGL_SAMPLES_ARB, fbconfig->samples ); AGLpixelFormatAttributes[numAGLAttrs++] = AGL_NO_RECOVERY; } AGLpixelFormatAttributes[numAGLAttrs++] = AGL_NONE; // create pixel format descriptor AGLDevice mainMonitor = GetMainDevice(); _glfwWin.aglPixelFormat = aglChoosePixelFormat( &mainMonitor, 1, AGLpixelFormatAttributes ); if( _glfwWin.aglPixelFormat == NULL ) { fprintf( stderr, "Failed to choose AGL pixel format: %s\n", aglErrorString( aglGetError() ) ); return GL_FALSE; } // create AGL context _glfwWin.aglContext = aglCreateContext( _glfwWin.aglPixelFormat, NULL ); if( _glfwWin.aglContext == NULL ) { fprintf( stderr, "Failed to create AGL context: %s\n", aglErrorString( aglGetError() ) ); return GL_FALSE; } // create window Rect windowContentBounds; windowContentBounds.left = 0; windowContentBounds.top = 0; windowContentBounds.right = width; windowContentBounds.bottom = height; windowAttributes = ( kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute | kWindowStandardHandlerAttribute ); if( wndconfig->windowNoResize ) { windowAttributes |= kWindowLiveResizeAttribute; } else { windowAttributes |= ( kWindowFullZoomAttribute | kWindowResizableAttribute ); } error = CreateNewWindow( kDocumentWindowClass, windowAttributes, &windowContentBounds, &( _glfwWin.window ) ); if( ( error != noErr ) || ( _glfwWin.window == NULL ) ) { fprintf( stderr, "Failed to create Carbon window\n" ); return GL_FALSE; } _glfwWin.windowUPP = NewEventHandlerUPP( windowEventHandler ); error = InstallWindowEventHandler( _glfwWin.window, _glfwWin.windowUPP, GetEventTypeCount( GLFW_WINDOW_EVENT_TYPES ), GLFW_WINDOW_EVENT_TYPES, NULL, NULL ); if( error != noErr ) { fprintf( stderr, "Failed to install Carbon window event handler\n" ); return GL_FALSE; } // Don't care if we fail here (void)SetWindowTitleWithCFString( _glfwWin.window, CFSTR( "GLFW Window" ) ); (void)RepositionWindow( _glfwWin.window, NULL, kWindowCenterOnMainScreen ); if( !aglSetDrawable( _glfwWin.aglContext, GetWindowPort( _glfwWin.window ) ) ) { fprintf( stderr, "Failed to set the AGL context as the Carbon window drawable: %s\n", aglErrorString( aglGetError() ) ); return GL_FALSE; } // Make OpenGL context current if( !aglSetCurrentContext( _glfwWin.aglContext ) ) { fprintf( stderr, "Failed to make AGL context current: %s\n", aglErrorString( aglGetError() ) ); return GL_FALSE; } ShowWindow( _glfwWin.window ); } else { CGDisplayErr cgErr; CGLError cglErr; CFDictionaryRef optimalMode; GLint numCGLvs = 0; CGLPixelFormatAttribute CGLpixelFormatAttributes[64]; int numCGLAttrs = 0; // variables for enumerating color depths GLint rgbColorDepth; // CGL pixel format attributes _setCGLAttribute( kCGLPFADisplayMask, CGDisplayIDToOpenGLDisplayMask( kCGDirectMainDisplay ) ); if( fbconfig->stereo ) { CGLpixelFormatAttributes[ numCGLAttrs++ ] = kCGLPFAStereo; } if( fbconfig->samples > 1 ) { _setCGLAttribute( kCGLPFASamples, (CGLPixelFormatAttribute)fbconfig->samples ); _setCGLAttribute( kCGLPFASampleBuffers, (CGLPixelFormatAttribute)1 ); CGLpixelFormatAttributes[ numCGLAttrs++ ] = kCGLPFANoRecovery; } CGLpixelFormatAttributes[ numCGLAttrs++ ] = kCGLPFAFullScreen; CGLpixelFormatAttributes[ numCGLAttrs++ ] = kCGLPFADoubleBuffer; CGLpixelFormatAttributes[ numCGLAttrs++ ] = kCGLPFAAccelerated; CGLpixelFormatAttributes[ numCGLAttrs++ ] = kCGLPFANoRecovery; CGLpixelFormatAttributes[ numCGLAttrs++ ] = kCGLPFAMinimumPolicy; _setCGLAttribute( kCGLPFAAccumSize, (CGLPixelFormatAttribute)( fbconfig->accumRedBits \ + fbconfig->accumGreenBits \ + fbconfig->accumBlueBits \ + fbconfig->accumAlphaBits ) ); _setCGLAttribute( kCGLPFAAlphaSize, (CGLPixelFormatAttribute)fbconfig->alphaBits ); _setCGLAttribute( kCGLPFADepthSize, (CGLPixelFormatAttribute)fbconfig->depthBits ); _setCGLAttribute( kCGLPFAStencilSize, (CGLPixelFormatAttribute)fbconfig->stencilBits ); _setCGLAttribute( kCGLPFAAuxBuffers, (CGLPixelFormatAttribute)fbconfig->auxBuffers ); CGLpixelFormatAttributes[ numCGLAttrs++ ] = (CGLPixelFormatAttribute)NULL; // create a suitable pixel format with above attributes.. cglErr = CGLChoosePixelFormat( CGLpixelFormatAttributes, &_glfwWin.cglPixelFormat, &numCGLvs ); if( cglErr != kCGLNoError ) { fprintf( stderr, "Failed to choose CGL pixel format: %s\n", CGLErrorString( cglErr ) ); return GL_FALSE; } // ..and create a rendering context using that pixel format cglErr = CGLCreateContext( _glfwWin.cglPixelFormat, NULL, &_glfwWin.cglContext ); if( cglErr != kCGLNoError ) { fprintf( stderr, "Failed to create CGL context: %s\n", CGLErrorString( cglErr ) ); return GL_FALSE; } // enumerate depth of RGB channels - unlike AGL, CGL works with // a single parameter reflecting the full depth of the frame buffer (void)CGLDescribePixelFormat( _glfwWin.cglPixelFormat, 0, kCGLPFAColorSize, &rgbColorDepth ); // capture the display for our application cgErr = CGCaptureAllDisplays(); if( cgErr != kCGErrorSuccess ) { fprintf( stderr, "Failed to capture Core Graphics displays\n"); return GL_FALSE; } // find closest matching NON-STRETCHED display mode.. optimalMode = CGDisplayBestModeForParametersAndRefreshRateWithProperty( kCGDirectMainDisplay, rgbColorDepth, width, height, wndconfig->refreshRate, NULL, NULL ); if( optimalMode == NULL ) { fprintf( stderr, "Failed to retrieve Core Graphics display mode\n"); return GL_FALSE; } // ..and switch to that mode cgErr = CGDisplaySwitchToMode( kCGDirectMainDisplay, optimalMode ); if( cgErr != kCGErrorSuccess ) { fprintf( stderr, "Failed to switch to Core Graphics display mode\n"); return GL_FALSE; } // switch to our OpenGL context, and bring it up fullscreen cglErr = CGLSetCurrentContext( _glfwWin.cglContext ); if( cglErr != kCGLNoError ) { fprintf( stderr, "Failed to make CGL context current: %s\n", CGLErrorString( cglErr ) ); return GL_FALSE; } cglErr = CGLSetFullScreen( _glfwWin.cglContext ); if( cglErr != kCGLNoError ) { fprintf( stderr, "Failed to set CGL fullscreen mode: %s\n", CGLErrorString( cglErr ) ); return GL_FALSE; } } return GL_TRUE; } //======================================================================== // Properly kill the window/video display //======================================================================== void _glfwPlatformCloseWindow( void ) { if( _glfwWin.mouseUPP != NULL ) { DisposeEventHandlerUPP( _glfwWin.mouseUPP ); _glfwWin.mouseUPP = NULL; } if( _glfwWin.commandUPP != NULL ) { DisposeEventHandlerUPP( _glfwWin.commandUPP ); _glfwWin.commandUPP = NULL; } if( _glfwWin.keyboardUPP != NULL ) { DisposeEventHandlerUPP( _glfwWin.keyboardUPP ); _glfwWin.keyboardUPP = NULL; } if( _glfwWin.windowUPP != NULL ) { DisposeEventHandlerUPP( _glfwWin.windowUPP ); _glfwWin.windowUPP = NULL; } if( _glfwWin.fullscreen ) { if( _glfwWin.cglContext != NULL ) { CGLSetCurrentContext( NULL ); CGLClearDrawable( _glfwWin.cglContext ); CGLDestroyContext( _glfwWin.cglContext ); CGReleaseAllDisplays(); _glfwWin.cglContext = NULL; } if( _glfwWin.cglPixelFormat != NULL ) { CGLDestroyPixelFormat( _glfwWin.cglPixelFormat ); _glfwWin.cglPixelFormat = NULL; } } else { if( _glfwWin.aglContext != NULL ) { aglSetCurrentContext( NULL ); aglSetDrawable( _glfwWin.aglContext, NULL ); aglDestroyContext( _glfwWin.aglContext ); _glfwWin.aglContext = NULL; } if( _glfwWin.aglPixelFormat != NULL ) { aglDestroyPixelFormat( _glfwWin.aglPixelFormat ); _glfwWin.aglPixelFormat = NULL; } } if( _glfwWin.window != NULL ) { ReleaseWindow( _glfwWin.window ); _glfwWin.window = NULL; } } //======================================================================== // Set the window title //======================================================================== void _glfwPlatformSetWindowTitle( const char *title ) { CFStringRef windowTitle; if( !_glfwWin.fullscreen ) { windowTitle = CFStringCreateWithCString( kCFAllocatorDefault, title, kCFStringEncodingISOLatin1 ); (void)SetWindowTitleWithCFString( _glfwWin.window, windowTitle ); CFRelease( windowTitle ); } } //======================================================================== // Set the window size //======================================================================== void _glfwPlatformSetWindowSize( int width, int height ) { if( !_glfwWin.fullscreen ) { SizeWindow( _glfwWin.window, width, height, TRUE ); } } //======================================================================== // Set the window position //======================================================================== void _glfwPlatformSetWindowPos( int x, int y ) { if( !_glfwWin.fullscreen ) { MoveWindow( _glfwWin.window, x, y, FALSE ); } } //======================================================================== // Window iconification //======================================================================== void _glfwPlatformIconifyWindow( void ) { if( !_glfwWin.fullscreen ) { (void)CollapseWindow( _glfwWin.window, TRUE ); } } //======================================================================== // Window un-iconification //======================================================================== void _glfwPlatformRestoreWindow( void ) { if( !_glfwWin.fullscreen ) { (void)CollapseWindow( _glfwWin.window, FALSE ); } } //======================================================================== // Swap buffers (double-buffering) and poll any new events //======================================================================== void _glfwPlatformSwapBuffers( void ) { if( _glfwWin.fullscreen ) { CGLFlushDrawable( _glfwWin.cglContext ); } else { aglSwapBuffers( _glfwWin.aglContext ); } } //======================================================================== // Set double buffering swap interval //======================================================================== void _glfwPlatformSwapInterval( int interval ) { GLint AGLparameter = interval; // CGL doesn't seem to like intervals other than 0 (vsync off) or 1 (vsync on) long CGLparameter = ( interval ? 1 : 0 ); if( _glfwWin.fullscreen ) { // Don't care if we fail here.. (void)CGLSetParameter( _glfwWin.cglContext, kCGLCPSwapInterval, (GLint*) &CGLparameter ); } else { // ..or here (void)aglSetInteger( _glfwWin.aglContext, AGL_SWAP_INTERVAL, &AGLparameter ); } } //======================================================================== // Read back framebuffer parameters from the context //======================================================================== #define _getAGLAttribute( aglAttributeName, variableName ) \ { \ GLint aglValue; \ (void)aglDescribePixelFormat( _glfwWin.aglPixelFormat, aglAttributeName, &aglValue ); \ variableName = aglValue; \ } #define _getCGLAttribute( cglAttributeName, variableName ) \ { \ GLint cglValue; \ (void)CGLDescribePixelFormat( _glfwWin.cglPixelFormat, 0, cglAttributeName, &cglValue ); \ variableName = cglValue; \ } void _glfwPlatformRefreshWindowParams( void ) { GLint rgbColorDepth; GLint rgbaAccumDepth = 0; GLint rgbChannelDepth = 0; if( _glfwWin.fullscreen ) { _getCGLAttribute( kCGLPFAAccelerated, _glfwWin.accelerated ); _getCGLAttribute( kCGLPFAAlphaSize, _glfwWin.alphaBits ); _getCGLAttribute( kCGLPFADepthSize, _glfwWin.depthBits ); _getCGLAttribute( kCGLPFAStencilSize, _glfwWin.stencilBits ); _getCGLAttribute( kCGLPFAAuxBuffers, _glfwWin.auxBuffers ); _getCGLAttribute( kCGLPFAStereo, _glfwWin.stereo ); _getCGLAttribute( kCGLPFASamples, _glfwWin.samples ); // Enumerate depth of RGB channels - unlike AGL, CGL works with // a single parameter reflecting the full depth of the frame buffer (void)CGLDescribePixelFormat( _glfwWin.cglPixelFormat, 0, kCGLPFAColorSize, &rgbColorDepth ); if( rgbColorDepth == 24 || rgbColorDepth == 32 ) { rgbChannelDepth = 8; } if( rgbColorDepth == 16 ) { rgbChannelDepth = 5; } _glfwWin.redBits = rgbChannelDepth; _glfwWin.greenBits = rgbChannelDepth; _glfwWin.blueBits = rgbChannelDepth; // Get pixel depth of accumulator - I haven't got the slightest idea // how this number conforms to any other channel depth than 8 bits, // so this might end up giving completely knackered results... _getCGLAttribute( kCGLPFAColorSize, rgbaAccumDepth ); if( rgbaAccumDepth == 32 ) { rgbaAccumDepth = 8; } _glfwWin.accumRedBits = rgbaAccumDepth; _glfwWin.accumGreenBits = rgbaAccumDepth; _glfwWin.accumBlueBits = rgbaAccumDepth; _glfwWin.accumAlphaBits = rgbaAccumDepth; } else { _getAGLAttribute( AGL_ACCELERATED, _glfwWin.accelerated ); _getAGLAttribute( AGL_RED_SIZE, _glfwWin.redBits ); _getAGLAttribute( AGL_GREEN_SIZE, _glfwWin.greenBits ); _getAGLAttribute( AGL_BLUE_SIZE, _glfwWin.blueBits ); _getAGLAttribute( AGL_ALPHA_SIZE, _glfwWin.alphaBits ); _getAGLAttribute( AGL_DEPTH_SIZE, _glfwWin.depthBits ); _getAGLAttribute( AGL_STENCIL_SIZE, _glfwWin.stencilBits ); _getAGLAttribute( AGL_ACCUM_RED_SIZE, _glfwWin.accumRedBits ); _getAGLAttribute( AGL_ACCUM_GREEN_SIZE, _glfwWin.accumGreenBits ); _getAGLAttribute( AGL_ACCUM_BLUE_SIZE, _glfwWin.accumBlueBits ); _getAGLAttribute( AGL_ACCUM_ALPHA_SIZE, _glfwWin.accumAlphaBits ); _getAGLAttribute( AGL_AUX_BUFFERS, _glfwWin.auxBuffers ); _getAGLAttribute( AGL_STEREO, _glfwWin.stereo ); _getAGLAttribute( AGL_SAMPLES_ARB, _glfwWin.samples ); } } //======================================================================== // Poll for new window and input events //======================================================================== void _glfwPlatformPollEvents( void ) { EventRef event; EventTargetRef eventDispatcher = GetEventDispatcherTarget(); while ( ReceiveNextEvent( 0, NULL, 0.0, TRUE, &event ) == noErr ) { SendEventToEventTarget( event, eventDispatcher ); ReleaseEvent( event ); } } //======================================================================== // Wait for new window and input events //======================================================================== void _glfwPlatformWaitEvents( void ) { EventRef event; // Wait for new events ReceiveNextEvent( 0, NULL, kEventDurationForever, FALSE, &event ); // Process the new events _glfwPlatformPollEvents(); } //======================================================================== // Hide mouse cursor (lock it) //======================================================================== void _glfwPlatformHideMouseCursor( void ) { CGDisplayHideCursor( kCGDirectMainDisplay ); CGAssociateMouseAndMouseCursorPosition( false ); } //======================================================================== // Show mouse cursor (unlock it) //======================================================================== void _glfwPlatformShowMouseCursor( void ) { CGDisplayShowCursor( kCGDirectMainDisplay ); CGAssociateMouseAndMouseCursorPosition( true ); } //======================================================================== // Set physical mouse cursor position //======================================================================== void _glfwPlatformSetMouseCursorPos( int x, int y ) { Rect content; if( _glfwWin.fullscreen ) { CGDisplayMoveCursorToPoint( kCGDirectMainDisplay, CGPointMake( x, y ) ); } else { GetWindowBounds(_glfwWin.window, kWindowContentRgn, &content); _glfwInput.MousePosX = x + content.left; _glfwInput.MousePosY = y + content.top; CGDisplayMoveCursorToPoint( kCGDirectMainDisplay, CGPointMake( _glfwInput.MousePosX, _glfwInput.MousePosY ) ); } } glfw-2.7.2/lib/carbon/carbon_glext.c0000644000175000017500000000515311577637342020323 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Check if an OpenGL extension is available at runtime //======================================================================== int _glfwPlatformExtensionSupported( const char *extension ) { // There are no AGL, CGL or NSGL extensions. return GL_FALSE; } //======================================================================== // Get the function pointer to an OpenGL function //======================================================================== void * _glfwPlatformGetProcAddress( const char *procname ) { CFStringRef symbolName = CFStringCreateWithCString( kCFAllocatorDefault, procname, kCFStringEncodingASCII ); void *symbol = CFBundleGetFunctionPointerForName( _glfwLibrary.Libs.OpenGLFramework, symbolName ); CFRelease( symbolName ); return symbol; } glfw-2.7.2/lib/carbon/carbon_fullscreen.c0000644000175000017500000001070011577637342021334 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //======================================================================== // Compares two video modes //======================================================================== static int _glfwVideoModesEqual( GLFWvidmode* first, GLFWvidmode* second ) { if( first->Width != second->Width ) return 0; if( first->Height != second->Height ) return 0; if( first->RedBits + first->GreenBits + first->BlueBits != second->RedBits + second->GreenBits + second->BlueBits ) return 0; return 1; } //======================================================================== // Converts a CG mode to a GLFW mode //======================================================================== static void _glfwCGToGLFWVideoMode( CFDictionaryRef cgMode, GLFWvidmode* glfwMode ) { int bitsPerSample; CFNumberGetValue( CFDictionaryGetValue( cgMode, kCGDisplayWidth ), kCFNumberIntType, &(glfwMode->Width) ); CFNumberGetValue( CFDictionaryGetValue( cgMode, kCGDisplayHeight ), kCFNumberIntType, &(glfwMode->Height) ); CFNumberGetValue( CFDictionaryGetValue( cgMode, kCGDisplayBitsPerSample ), kCFNumberIntType, &bitsPerSample ); glfwMode->RedBits = bitsPerSample; glfwMode->GreenBits = bitsPerSample; glfwMode->BlueBits = bitsPerSample; } //======================================================================== // Get a list of available video modes //======================================================================== int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ) { int i, j, maxModes, numModes; GLFWvidmode mode; CFArrayRef availableModes = CGDisplayAvailableModes( kCGDirectMainDisplay ); CFIndex numberOfAvailableModes = CFArrayGetCount( availableModes ); numModes = 0; maxModes = ( numberOfAvailableModes < maxcount ? numberOfAvailableModes : maxcount ); for( i = 0; i < maxModes; ++i ) { _glfwCGToGLFWVideoMode( CFArrayGetValueAtIndex( availableModes, i ), &mode ); // Is it a valid mode? (only list depths >= 15 bpp) if( mode.RedBits + mode.GreenBits + mode.BlueBits < 15 ) { continue; } // Check for duplicate of current mode in target list for( j = 0; j < numModes; ++j ) { if( _glfwVideoModesEqual( &mode, &(list[j]) ) ) { break; } } // If empty list or no match found if( numModes == 0 || j == numModes ) { list[numModes++] = mode; } } return numModes; } //======================================================================== // Get the desktop video mode //======================================================================== void _glfwPlatformGetDesktopMode( GLFWvidmode *mode ) { _glfwCGToGLFWVideoMode( _glfwDesktopVideoMode, mode ); } glfw-2.7.2/lib/carbon/Makefile.carbon.universal0000644000175000017500000001227211400255654022405 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Mac OS X using GCC (Apple SDK). #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # make -f Makefile.carbon.universal ########################################################################## ########################################################################## # Installation prefix (default to /usr/local) ########################################################################## PREFIX ?= /usr/local ########################################################################## # Default: Build GLFW static library ########################################################################## all: libglfw.a ########################################################################## # Compiler settings ########################################################################## CC = gcc FATFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ -mmacosx-version-min=10.4 -arch ppc -arch i386 CFLAGS = -c -I. -I.. -Wall -O2 -fno-common $(FATFLAGS) ########################################################################## # Library builder settings ########################################################################## SED = sed INSTALL = install MKLIB = ar LIBFLAGS = -rcs RANLIB = ranlib ########################################################################## # Install GLFW header and static library ########################################################################## install: libglfw.a libglfw.pc $(INSTALL) -d $(PREFIX)/lib $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a $(RANLIB) $(PREFIX)/lib/libglfw.a $(INSTALL) -d $(PREFIX)/include/GL $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h $(INSTALL) -d $(PREFIX)/lib/pkgconfig $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc ########################################################################## # Rule for cleaning up generated files ########################################################################## clean: rm -f *.o libglfw.a libglfw.pc ########################################################################## # Object files which are part of the GLFW library ########################################################################## OBJS = \ enable.o \ fullscreen.o \ glext.o \ image.o \ init.o \ input.o \ joystick.o \ stream.o \ tga.o \ thread.o \ time.o \ window.o \ carbon_enable.o \ carbon_fullscreen.o \ carbon_glext.o \ carbon_init.o \ carbon_joystick.o \ carbon_thread.o \ carbon_time.o \ carbon_window.o ########################################################################## # Rule for building libglfw.pc ########################################################################## libglfw.pc: libglfw.pc.in $(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc ########################################################################## # Rule for building library ########################################################################## libglfw.a: $(OBJS) rm -f $@ $(MKLIB) $(LIBFLAGS) $@ $(OBJS) $(RANLIB) $@ ########################################################################## # Rules for building library object files ########################################################################## enable.o: ../enable.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../enable.c fullscreen.o: ../fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../fullscreen.c glext.o: ../glext.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../glext.c image.o: ../image.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../image.c init.o: ../init.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../init.c input.o: ../input.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../input.c joystick.o: ../joystick.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../joystick.c stream.o: ../stream.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../stream.c tga.o: ../tga.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../tga.c thread.o: ../thread.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../thread.c time.o: ../time.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../time.c window.o: ../window.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../window.c carbon_enable.o: carbon_enable.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_enable.c carbon_fullscreen.o: carbon_fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_fullscreen.c carbon_glext.o: carbon_glext.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_glext.c carbon_init.o: carbon_init.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_init.c carbon_joystick.o: carbon_joystick.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_joystick.c carbon_thread.o: carbon_thread.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_thread.c carbon_time.o: carbon_time.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_time.c carbon_window.o: carbon_window.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_window.c glfw-2.7.2/lib/carbon/carbon_init.c0000644000175000017500000001467711577637342020156 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // Copyright (c) 2006-2007 Robin Leffmann // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #include //======================================================================== // Global variables //======================================================================== // KCHR resource pointer for keycode translation void *KCHRPtr; //======================================================================== // Terminate GLFW when exiting application //======================================================================== static void glfw_atexit( void ) { glfwTerminate(); } //======================================================================== // Initialize GLFW thread package //======================================================================== static void _glfwInitThreads( void ) { // Initialize critical section handle (void) pthread_mutex_init( &_glfwThrd.CriticalSection, NULL ); // The first thread (the main thread) has ID 0 _glfwThrd.NextID = 0; // Fill out information about the main thread (this thread) _glfwThrd.First.ID = _glfwThrd.NextID ++; _glfwThrd.First.Function = NULL; _glfwThrd.First.PosixID = pthread_self(); _glfwThrd.First.Previous = NULL; _glfwThrd.First.Next = NULL; } #define NO_BUNDLE_MESSAGE \ "Working in unbundled mode. " \ "You should build a .app wrapper for your Mac OS X applications.\n" #define UNBUNDLED \ fprintf(stderr, NO_BUNDLE_MESSAGE); \ _glfwLibrary.Unbundled = 1; \ return //======================================================================== // Changes the current directory to the Resources directory of the bundle // we're in, or leaves it alone if we're not inside a bundle //======================================================================== void _glfwChangeToResourcesDirectory( void ) { CFBundleRef mainBundle = CFBundleGetMainBundle(); if( mainBundle == NULL ) { UNBUNDLED; } CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL( mainBundle ); char resourcesPath[ _GLFW_MAX_PATH_LENGTH ]; CFStringRef lastComponent = CFURLCopyLastPathComponent( resourcesURL ); if( kCFCompareEqualTo != CFStringCompare( CFSTR( "Resources" ), lastComponent, 0 ) ) { UNBUNDLED; } CFRelease( lastComponent ); if( !CFURLGetFileSystemRepresentation( resourcesURL, TRUE, (UInt8*)resourcesPath, _GLFW_MAX_PATH_LENGTH ) ) { CFRelease( resourcesURL ); UNBUNDLED; } CFRelease( resourcesURL ); if( chdir( resourcesPath ) != 0 ) { UNBUNDLED; } } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Initialize various GLFW state //======================================================================== int _glfwPlatformInit( void ) { struct timeval tv; UInt32 nullDummy = 0; _glfwWin.window = NULL; _glfwWin.aglContext = NULL; _glfwWin.cglContext = NULL; _glfwWin.windowUPP = NULL; _glfwInput.Modifiers = 0; _glfwLibrary.Unbundled = 0; _glfwLibrary.Libs.OpenGLFramework = CFBundleGetBundleWithIdentifier( CFSTR( "com.apple.opengl" ) ); if( _glfwLibrary.Libs.OpenGLFramework == NULL ) { fprintf( stderr, "glfwInit failing because you aren't linked to OpenGL\n" ); return GL_FALSE; } _glfwDesktopVideoMode = CGDisplayCurrentMode( kCGDirectMainDisplay ); if( _glfwDesktopVideoMode == NULL ) { fprintf( stderr, "glfwInit failing because it kind find the desktop display mode\n" ); return GL_FALSE; } // Install atexit routine atexit( glfw_atexit ); _glfwInitThreads(); _glfwChangeToResourcesDirectory(); // Ugly hack to reduce the nasty jump that occurs at the first non- // sys keypress, caused by OS X loading certain meta scripts used // for lexical- and raw keycode translation - instead of letting // this happen while our application is running, we do some blunt // function calls in advance just to get the script caching out of // the way BEFORE our window/screen is opened. These calls might // generate err return codes, but we don't care in this case. // NOTE: KCHRPtr is declared globally, because we need it later on. KCHRPtr = (void *)GetScriptVariable( smCurrentScript, smKCHRCache ); KeyTranslate( KCHRPtr, 0, &nullDummy ); UppercaseText( (char *)&nullDummy, 0, smSystemScript ); gettimeofday( &tv, NULL ); _glfwLibrary.Timer.t0 = tv.tv_sec + (double) tv.tv_usec / 1000000.0; return GL_TRUE; } //======================================================================== // Close window and kill all threads //======================================================================== int _glfwPlatformTerminate( void ) { return GL_TRUE; } glfw-2.7.2/lib/carbon/carbon_time.c0000644000175000017500000000751411427551440020125 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Return timer value in seconds //======================================================================== double _glfwPlatformGetTime( void ) { struct timeval tv; gettimeofday( &tv, NULL ); return tv.tv_sec + (double) tv.tv_usec / 1000000.0 - _glfwLibrary.Timer.t0; } //======================================================================== // Set timer value in seconds //======================================================================== void _glfwPlatformSetTime( double time ) { struct timeval tv; gettimeofday( &tv, NULL ); _glfwLibrary.Timer.t0 = tv.tv_sec + (double) tv.tv_usec / 1000000.0 - time; } //======================================================================== // Put a thread to sleep for a specified amount of time //======================================================================== void _glfwPlatformSleep( double time ) { if( time == 0.0 ) { sched_yield(); return; } struct timeval currenttime; struct timespec wait; pthread_mutex_t mutex; pthread_cond_t cond; long dt_sec, dt_usec; // Not all pthread implementations have a pthread_sleep() function. We // do it the portable way, using a timed wait for a condition that we // will never signal. NOTE: The unistd functions sleep/usleep suspends // the entire PROCESS, not a signle thread, which is why we can not // use them to implement glfwSleep. // Set timeout time, relatvie to current time gettimeofday( ¤ttime, NULL ); dt_sec = (long) time; dt_usec = (long) ((time - (double)dt_sec) * 1000000.0); wait.tv_nsec = (currenttime.tv_usec + dt_usec) * 1000L; if( wait.tv_nsec > 1000000000L ) { wait.tv_nsec -= 1000000000L; dt_sec ++; } wait.tv_sec = currenttime.tv_sec + dt_sec; // Initialize condition and mutex objects pthread_mutex_init( &mutex, NULL ); pthread_cond_init( &cond, NULL ); // Do a timed wait pthread_mutex_lock( &mutex ); pthread_cond_timedwait( &cond, &mutex, &wait ); pthread_mutex_unlock( &mutex ); // Destroy condition and mutex objects pthread_mutex_destroy( &mutex ); pthread_cond_destroy( &cond ); } glfw-2.7.2/lib/carbon/carbon_enable.c0000644000175000017500000000436011577637342020425 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Enable system keys //======================================================================== void _glfwPlatformEnableSystemKeys( void ) { // Nothing to do; event handling code checks the status of // _glfwWin.sysKeysDisabled to ensure this behavior. } //======================================================================== // Disable system keys //======================================================================== void _glfwPlatformDisableSystemKeys( void ) { // Nothing to do; event handling code checks the status of // _glfwWin.sysKeysDisabled to ensure this behavior. } glfw-2.7.2/lib/carbon/Makefile.carbon0000644000175000017500000001307111275623424020400 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW on Mac OS X using GCC (Apple SDK). #------------------------------------------------------------------------- # To compile GLFW using this makefile, run: # make -f Makefile.carbon ########################################################################## ########################################################################## # Installation prefix (default to /usr/local) ########################################################################## PREFIX ?= /usr/local ########################################################################## # Default: Build GLFW static and shared library ########################################################################## all: libglfw.a libglfw.dylib ########################################################################## # Compiler settings ########################################################################## CC = gcc CFLAGS = -c -I. -I.. -Wall -O2 -fno-common -g -m32 ########################################################################## # Library builder settings ########################################################################## AR = ar SED = sed INSTALL = install ARFLAGS = -rcs RANLIB = ranlib DYLIBFLAGS = -framework AGL -framework Carbon -framework OpenGL \ -dynamiclib -Wl,-single_module -compatibility_version 1 \ -current_version 1 -install_name @executable_path/libglfw.dylib -m32 ########################################################################## # Install GLFW header and static library ########################################################################## install: libglfw.a libglfw.pc $(INSTALL) -d $(PREFIX)/lib $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a $(RANLIB) $(PREFIX)/lib/libglfw.a $(INSTALL) -d $(PREFIX)/include/GL $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h $(INSTALL) -d $(PREFIX)/lib/pkgconfig $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc ########################################################################## # Object files for the GLFW library ########################################################################## OBJS = \ enable.o \ fullscreen.o \ glext.o \ image.o \ init.o \ input.o \ joystick.o \ stream.o \ tga.o \ thread.o \ time.o \ window.o \ carbon_enable.o \ carbon_fullscreen.o \ carbon_glext.o \ carbon_init.o \ carbon_joystick.o \ carbon_thread.o \ carbon_time.o \ carbon_window.o ########################################################################## # Rule for building libglfw.pc ########################################################################## libglfw.pc: libglfw.pc.in $(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc ########################################################################## # Rule for building static library ########################################################################## libglfw.a: $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(RANLIB) $@ ########################################################################## # Rule for building shared library ########################################################################## libglfw.dylib: $(OBJS) $(CC) -o $@ $(DYLIBFLAGS) $(OBJS) ########################################################################## # Rule for cleaning up generated files ########################################################################## clean: @rm -f *.o libglfw.a libglfw.dylib libglfw.pc ########################################################################## # Rules for building library object files ########################################################################## enable.o: ../enable.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../enable.c fullscreen.o: ../fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../fullscreen.c glext.o: ../glext.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../glext.c image.o: ../image.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../image.c init.o: ../init.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../init.c input.o: ../input.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../input.c joystick.o: ../joystick.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../joystick.c stream.o: ../stream.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../stream.c tga.o: ../tga.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../tga.c thread.o: ../thread.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../thread.c time.o: ../time.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../time.c window.o: ../window.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ ../window.c carbon_enable.o: carbon_enable.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_enable.c carbon_fullscreen.o: carbon_fullscreen.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_fullscreen.c carbon_glext.o: carbon_glext.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_glext.c carbon_init.o: carbon_init.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_init.c carbon_joystick.o: carbon_joystick.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_joystick.c carbon_thread.o: carbon_thread.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_thread.c carbon_time.o: carbon_time.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_time.c carbon_window.o: carbon_window.c ../internal.h platform.h $(CC) $(CFLAGS) -o $@ carbon_window.c glfw-2.7.2/lib/carbon/libglfw.pc.in0000644000175000017500000000044511427541114020047 0ustar elmindredaelmindredaprefix=@PREFIX@ exec_prefix=@PREFIX@ libdir=@PREFIX@/lib includedir=@PREFIX@/include Name: GLFW Description: A portable framework for OpenGL development Version: 2.7 URL: http://www.glfw.org/ Libs: -L${libdir} -lglfw -framework AGL -framework OpenGL -framework Carbon Cflags: -I${includedir} glfw-2.7.2/lib/carbon/carbon_thread.c0000644000175000017500000002655511577637342020460 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // This is simply a "wrapper" for calling the user thread function. //======================================================================== void * _glfwNewThread( void * arg ) { GLFWthreadfun threadfun; _GLFWthread *t; // Get pointer to thread information for current thread t = _glfwGetThreadPointer( glfwGetThreadID() ); if( t == NULL ) { return 0; } // Get user thread function pointer threadfun = t->Function; // Call the user thread function threadfun( arg ); // Remove thread from thread list ENTER_THREAD_CRITICAL_SECTION _glfwRemoveThread( t ); LEAVE_THREAD_CRITICAL_SECTION // When the thread function returns, the thread will die... return NULL; } //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Create a new thread //======================================================================== GLFWthread _glfwPlatformCreateThread( GLFWthreadfun fun, void *arg ) { GLFWthread ID; _GLFWthread *t; int result; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Create a new thread information memory area t = (_GLFWthread *) malloc( sizeof(_GLFWthread) ); if( t == NULL ) { // Leave critical section LEAVE_THREAD_CRITICAL_SECTION return -1; } // Get a new unique thread id ID = _glfwThrd.NextID ++; // Store thread information in the thread list t->Function = fun; t->ID = ID; // Create thread result = pthread_create( &t->PosixID, // Thread handle NULL, // Default thread attributes _glfwNewThread, // Thread function (a wrapper function) (void *)arg // Argument to thread is user argument ); // Did the thread creation fail? if( result != 0 ) { free( (void *) t ); LEAVE_THREAD_CRITICAL_SECTION return -1; } // Append thread to thread list _glfwAppendThread( t ); // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the GLFW thread ID return ID; } //======================================================================== // Kill a thread. NOTE: THIS IS A VERY DANGEROUS OPERATION, AND SHOULD NOT // BE USED EXCEPT IN EXTREME SITUATIONS! //======================================================================== void _glfwPlatformDestroyThread( GLFWthread ID ) { _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return; } // Simply murder the process, no mercy! pthread_kill( t->PosixID, SIGKILL ); // Remove thread from thread list _glfwRemoveThread( t ); // Leave critical section LEAVE_THREAD_CRITICAL_SECTION } //======================================================================== // Wait for a thread to die //======================================================================== int _glfwPlatformWaitThread( GLFWthread ID, int waitmode ) { pthread_t thread; _GLFWthread *t; // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Get thread information pointer t = _glfwGetThreadPointer( ID ); // Is the thread already dead? if( t == NULL ) { LEAVE_THREAD_CRITICAL_SECTION return GL_TRUE; } // If got this far, the thread is alive => polling returns FALSE if( waitmode == GLFW_NOWAIT ) { LEAVE_THREAD_CRITICAL_SECTION return GL_FALSE; } // Get thread handle thread = t->PosixID; // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Wait for thread to die (void) pthread_join( thread, NULL ); return GL_TRUE; } //======================================================================== // Return the thread ID for the current thread //======================================================================== GLFWthread _glfwPlatformGetThreadID( void ) { _GLFWthread *t; GLFWthread ID = -1; pthread_t posixID; // Get current thread ID posixID = pthread_self(); // Enter critical section ENTER_THREAD_CRITICAL_SECTION // Loop through entire list of threads to find the matching POSIX // thread ID for( t = &_glfwThrd.First; t != NULL; t = t->Next ) { if( t->PosixID == posixID ) { ID = t->ID; break; } } // Leave critical section LEAVE_THREAD_CRITICAL_SECTION // Return the found GLFW thread identifier return ID; } //======================================================================== // Create a mutual exclusion object //======================================================================== GLFWmutex _glfwPlatformCreateMutex( void ) { pthread_mutex_t *mutex; // Allocate memory for mutex mutex = (pthread_mutex_t *) malloc( sizeof( pthread_mutex_t ) ); if( !mutex ) { return NULL; } // Initialise a mutex object (void) pthread_mutex_init( mutex, NULL ); // Cast to GLFWmutex and return return (GLFWmutex) mutex; } //======================================================================== // Destroy a mutual exclusion object //======================================================================== void _glfwPlatformDestroyMutex( GLFWmutex mutex ) { // Destroy the mutex object pthread_mutex_destroy( (pthread_mutex_t *) mutex ); // Free memory for mutex object free( (void *) mutex ); } //======================================================================== // Request access to a mutex //======================================================================== void _glfwPlatformLockMutex( GLFWmutex mutex ) { // Wait for mutex to be released (void) pthread_mutex_lock( (pthread_mutex_t *) mutex ); } //======================================================================== // Release a mutex //======================================================================== void _glfwPlatformUnlockMutex( GLFWmutex mutex ) { // Release mutex pthread_mutex_unlock( (pthread_mutex_t *) mutex ); } //======================================================================== // Create a new condition variable object //======================================================================== GLFWcond _glfwPlatformCreateCond( void ) { pthread_cond_t *cond; // Allocate memory for condition variable cond = (pthread_cond_t *) malloc( sizeof(pthread_cond_t) ); if( !cond ) { return NULL; } // Initialise condition variable (void) pthread_cond_init( cond, NULL ); // Cast to GLFWcond and return return (GLFWcond) cond; } //======================================================================== // Destroy a condition variable object //======================================================================== void _glfwPlatformDestroyCond( GLFWcond cond ) { // Destroy the condition variable object (void) pthread_cond_destroy( (pthread_cond_t *) cond ); // Free memory for condition variable object free( (void *) cond ); } //======================================================================== // Wait for a condition to be raised //======================================================================== void _glfwPlatformWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ) { struct timeval currenttime; struct timespec wait; long dt_sec, dt_usec; // Select infinite or timed wait if( timeout >= GLFW_INFINITY ) { // Wait for condition (infinite wait) (void) pthread_cond_wait( (pthread_cond_t *) cond, (pthread_mutex_t *) mutex ); } else { // Set timeout time, relatvie to current time gettimeofday( ¤ttime, NULL ); dt_sec = (long) timeout; dt_usec = (long) ((timeout - (double)dt_sec) * 1000000.0); wait.tv_nsec = (currenttime.tv_usec + dt_usec) * 1000L; if( wait.tv_nsec > 1000000000L ) { wait.tv_nsec -= 1000000000L; dt_sec ++; } wait.tv_sec = currenttime.tv_sec + dt_sec; // Wait for condition (timed wait) (void) pthread_cond_timedwait( (pthread_cond_t *) cond, (pthread_mutex_t *) mutex, &wait ); } } //======================================================================== // Signal a condition to one waiting thread //======================================================================== void _glfwPlatformSignalCond( GLFWcond cond ) { // Signal condition (void) pthread_cond_signal( (pthread_cond_t *) cond ); } //======================================================================== // Broadcast a condition to all waiting threads //======================================================================== void _glfwPlatformBroadcastCond( GLFWcond cond ) { // Broadcast condition (void) pthread_cond_broadcast( (pthread_cond_t *) cond ); } //======================================================================== // Return the number of processors in the system. //======================================================================== int _glfwPlatformGetNumberOfProcessors( void ) { int n; // Get number of processors online _glfw_numprocessors( n ); return n; } glfw-2.7.2/lib/carbon/carbon_joystick.c0000644000175000017500000000473211577637342021041 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" // TO DO: use HID manager to implement joystick support. //************************************************************************ //**** Platform implementation functions **** //************************************************************************ //======================================================================== // Determine joystick capabilities //======================================================================== int _glfwPlatformGetJoystickParam( int joy, int param ) { // GL_FALSE == 0 return 0; } //======================================================================== // Get joystick axis positions //======================================================================== int _glfwPlatformGetJoystickPos( int joy, float *pos, int numaxes ) { return 0; } //======================================================================== // Get joystick button states //======================================================================== int _glfwPlatformGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ) { return 0; } glfw-2.7.2/lib/carbon/platform.h0000644000175000017500000002343111427551440017470 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Carbon/AGL/CGL // API Version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2003 Keith Bauer // Copyright (c) 2003-2010 Camilla Berglund // Copyright (c) 2006-2007 Robin Leffmann // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #ifndef _platform_h_ #define _platform_h_ // This is the Mac OS X version of GLFW #define _GLFW_MAC_OS_X #include #include #include #include #include #include #include "../../include/GL/glfw.h" #if MACOSX_DEPLOYMENT_TARGET < MAC_OS_X_VERSION_10_3 #ifndef kCGLNoError #define kCGLNoError 0 #endif #endif #ifndef GL_VERSION_3_0 typedef const GLubyte * (APIENTRY *PFNGLGETSTRINGIPROC) (GLenum, GLuint); #endif /*GL_VERSION_3_0*/ //======================================================================== // Defines //======================================================================== #define _GLFW_MAX_PATH_LENGTH (8192) #define MAC_KEY_ENTER 0x24 #define MAC_KEY_RETURN 0x34 #define MAC_KEY_ESC 0x35 #define MAC_KEY_F1 0x7A #define MAC_KEY_F2 0x78 #define MAC_KEY_F3 0x63 #define MAC_KEY_F4 0x76 #define MAC_KEY_F5 0x60 #define MAC_KEY_F6 0x61 #define MAC_KEY_F7 0x62 #define MAC_KEY_F8 0x64 #define MAC_KEY_F9 0x65 #define MAC_KEY_F10 0x6D #define MAC_KEY_F11 0x67 #define MAC_KEY_F12 0x6F #define MAC_KEY_F13 0x69 #define MAC_KEY_F14 0x6B #define MAC_KEY_F15 0x71 #define MAC_KEY_UP 0x7E #define MAC_KEY_DOWN 0x7D #define MAC_KEY_LEFT 0x7B #define MAC_KEY_RIGHT 0x7C #define MAC_KEY_TAB 0x30 #define MAC_KEY_BACKSPACE 0x33 #define MAC_KEY_HELP 0x72 #define MAC_KEY_DEL 0x75 #define MAC_KEY_PAGEUP 0x74 #define MAC_KEY_PAGEDOWN 0x79 #define MAC_KEY_HOME 0x73 #define MAC_KEY_END 0x77 #define MAC_KEY_KP_0 0x52 #define MAC_KEY_KP_1 0x53 #define MAC_KEY_KP_2 0x54 #define MAC_KEY_KP_3 0x55 #define MAC_KEY_KP_4 0x56 #define MAC_KEY_KP_5 0x57 #define MAC_KEY_KP_6 0x58 #define MAC_KEY_KP_7 0x59 #define MAC_KEY_KP_8 0x5B #define MAC_KEY_KP_9 0x5C #define MAC_KEY_KP_DIVIDE 0x4B #define MAC_KEY_KP_MULTIPLY 0x43 #define MAC_KEY_KP_SUBTRACT 0x4E #define MAC_KEY_KP_ADD 0x45 #define MAC_KEY_KP_DECIMAL 0x41 #define MAC_KEY_KP_EQUAL 0x51 #define MAC_KEY_KP_ENTER 0x4C #define MAC_KEY_NUMLOCK 0x47 //======================================================================== // GLFW platform specific types //======================================================================== //------------------------------------------------------------------------ // Pointer length integer //------------------------------------------------------------------------ typedef intptr_t GLFWintptr; GLFWGLOBAL CFDictionaryRef _glfwDesktopVideoMode; //------------------------------------------------------------------------ // Window structure //------------------------------------------------------------------------ typedef struct _GLFWwin_struct _GLFWwin; struct _GLFWwin_struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // User callback functions GLFWwindowsizefun windowSizeCallback; GLFWwindowclosefun windowCloseCallback; GLFWwindowrefreshfun windowRefreshCallback; GLFWmousebuttonfun mouseButtonCallback; GLFWmouseposfun mousePosCallback; GLFWmousewheelfun mouseWheelCallback; GLFWkeyfun keyCallback; GLFWcharfun charCallback; // User selected window settings int fullscreen; // Fullscreen flag int mouseLock; // Mouse-lock flag int autoPollEvents; // Auto polling flag int sysKeysDisabled; // System keys disabled flag int windowNoResize; // Resize- and maximize gadgets disabled flag int refreshRate; // Vertical monitor refresh rate // Window status & parameters int opened; // Flag telling if window is opened or not int active; // Application active flag int iconified; // Window iconified flag int width, height; // Window width and heigth int accelerated; // GL_TRUE if window is HW accelerated // Framebuffer attributes int redBits; int greenBits; int blueBits; int alphaBits; int depthBits; int stencilBits; int accumRedBits; int accumGreenBits; int accumBlueBits; int accumAlphaBits; int auxBuffers; int stereo; int samples; // OpenGL extensions and context attributes int has_GL_SGIS_generate_mipmap; int has_GL_ARB_texture_non_power_of_two; int glMajor, glMinor, glRevision; int glForward, glDebug, glProfile; PFNGLGETSTRINGIPROC GetStringi; // ========= PLATFORM SPECIFIC PART ====================================== WindowRef window; AGLContext aglContext; AGLPixelFormat aglPixelFormat; CGLContextObj cglContext; CGLPixelFormatObj cglPixelFormat; EventHandlerUPP windowUPP; EventHandlerUPP mouseUPP; EventHandlerUPP commandUPP; EventHandlerUPP keyboardUPP; }; GLFWGLOBAL _GLFWwin _glfwWin; //------------------------------------------------------------------------ // User input status (some of this should go in _GLFWwin) //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Mouse status int MousePosX, MousePosY; int WheelPos; char MouseButton[ GLFW_MOUSE_BUTTON_LAST + 1 ]; // Keyboard status char Key[ GLFW_KEY_LAST + 1 ]; int LastChar; // User selected settings int StickyKeys; int StickyMouseButtons; int KeyRepeat; // ========= PLATFORM SPECIFIC PART ====================================== UInt32 Modifiers; } _glfwInput; //------------------------------------------------------------------------ // Thread information //------------------------------------------------------------------------ typedef struct _GLFWthread_struct _GLFWthread; // Thread record (one for each thread) struct _GLFWthread_struct { // Pointer to previous and next threads in linked list _GLFWthread *Previous, *Next; // GLFW user side thread information GLFWthread ID; GLFWthreadfun Function; // System side thread information pthread_t PosixID; }; // General thread information GLFWGLOBAL struct { // Critical section lock pthread_mutex_t CriticalSection; // Next thread ID to use (increments for every created thread) GLFWthread NextID; // First thread in linked list (always the main thread) _GLFWthread First; } _glfwThrd; //------------------------------------------------------------------------ // Library global data //------------------------------------------------------------------------ GLFWGLOBAL struct { // ========= PLATFORM INDEPENDENT MANDATORY PART ========================= // Window opening hints _GLFWhints hints; // ========= PLATFORM SPECIFIC PART ====================================== // Timer data struct { double t0; } Timer; struct { // Bundle for dynamically-loading extension function pointers CFBundleRef OpenGLFramework; } Libs; int Unbundled; } _glfwLibrary; //======================================================================== // Macros for encapsulating critical code sections (i.e. making parts // of GLFW thread safe) //======================================================================== // Define so we can use the same thread code as X11 #define _glfw_numprocessors(n) { \ int mib[2], ncpu; \ size_t len = 1; \ mib[0] = CTL_HW; \ mib[1] = HW_NCPU; \ n = 1; \ if( sysctl( mib, 2, &ncpu, &len, NULL, 0 ) != -1 ) \ { \ if( len > 0 ) \ { \ n = ncpu; \ } \ } \ } // Thread list management #define ENTER_THREAD_CRITICAL_SECTION \ pthread_mutex_lock( &_glfwThrd.CriticalSection ); #define LEAVE_THREAD_CRITICAL_SECTION \ pthread_mutex_unlock( &_glfwThrd.CriticalSection ); //======================================================================== // Prototypes for platform specific internal functions //======================================================================== void _glfwChangeToResourcesDirectory( void ); #endif // _platform_h_ glfw-2.7.2/lib/init.c0000644000175000017500000000642711577631171015352 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #define _init_c_ #include "internal.h" //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Initialize various GLFW state //======================================================================== GLFWAPI int GLFWAPIENTRY glfwInit( void ) { // Is GLFW already initialized? if( _glfwInitialized ) { return GL_TRUE; } memset( &_glfwLibrary, 0, sizeof( _glfwLibrary ) ); memset( &_glfwWin, 0, sizeof( _glfwWin ) ); // Window is not yet opened _glfwWin.opened = GL_FALSE; // Default enable/disable settings _glfwWin.sysKeysDisabled = GL_FALSE; // Clear window hints _glfwClearWindowHints(); // Platform specific initialization if( !_glfwPlatformInit() ) { return GL_FALSE; } // Form now on, GLFW state is valid _glfwInitialized = GL_TRUE; return GL_TRUE; } //======================================================================== // Close window and kill all threads. //======================================================================== GLFWAPI void GLFWAPIENTRY glfwTerminate( void ) { // Is GLFW initialized? if( !_glfwInitialized ) { return; } // Platform specific termination if( !_glfwPlatformTerminate() ) { return; } // GLFW is no longer initialized _glfwInitialized = GL_FALSE; } //======================================================================== // Get GLFW version //======================================================================== GLFWAPI void GLFWAPIENTRY glfwGetVersion( int *major, int *minor, int *rev ) { if( major != NULL ) *major = GLFW_VERSION_MAJOR; if( minor != NULL ) *minor = GLFW_VERSION_MINOR; if( rev != NULL ) *rev = GLFW_VERSION_REVISION; } glfw-2.7.2/lib/thread.c0000644000175000017500000002215411577631171015651 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions **** //************************************************************************ //======================================================================== // Find pointer to thread with a matching ID //======================================================================== _GLFWthread * _glfwGetThreadPointer( int ID ) { _GLFWthread *t; for( t = &_glfwThrd.First; t != NULL; t = t->Next ) { if( t->ID == ID ) { break; } } return t; } //======================================================================== // Append thread to thread list //======================================================================== void _glfwAppendThread( _GLFWthread * t ) { _GLFWthread *t_tmp; t_tmp = &_glfwThrd.First; while( t_tmp->Next != NULL ) { t_tmp = t_tmp->Next; } t_tmp->Next = t; t->Previous = t_tmp; t->Next = NULL; } //======================================================================== // Remove thread from thread list //======================================================================== void _glfwRemoveThread( _GLFWthread * t ) { if( t->Previous != NULL ) { t->Previous->Next = t->Next; } if( t->Next != NULL ) { t->Next->Previous = t->Previous; } free( (void *) t ); } //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Create a new thread //======================================================================== GLFWAPI GLFWthread GLFWAPIENTRY glfwCreateThread( GLFWthreadfun fun, void *arg ) { // Is GLFW initialized? if( !_glfwInitialized ) { return -1; } // Return the GLFW thread ID return _glfwPlatformCreateThread( fun, arg ); } //======================================================================== // Kill a thread. NOTE: THIS IS A VERY DANGEROUS OPERATION, AND SHOULD NOT // BE USED EXCEPT IN EXTREME SITUATIONS! //======================================================================== GLFWAPI void GLFWAPIENTRY glfwDestroyThread( GLFWthread ID ) { // Is GLFW initialized? if( !_glfwInitialized ) { return; } // Is it a valid thread? (killing the main thread is not allowed) if( ID < 1 ) { return; } _glfwPlatformDestroyThread( ID ); } //======================================================================== // Wait for a thread to die //======================================================================== GLFWAPI int GLFWAPIENTRY glfwWaitThread( GLFWthread ID, int waitmode ) { // Is GLFW initialized? if( !_glfwInitialized ) { return GL_TRUE; } // Is it a valid thread? (waiting for the main thread is not allowed) if( ID < 1 ) { return GL_TRUE; } return _glfwPlatformWaitThread( ID, waitmode ); } //======================================================================== // Return the thread ID for the current thread //======================================================================== GLFWAPI GLFWthread GLFWAPIENTRY glfwGetThreadID( void ) { // Is GLFW initialized? if( !_glfwInitialized ) { return 0; } return _glfwPlatformGetThreadID(); } //======================================================================== // Create a mutual exclusion object //======================================================================== GLFWAPI GLFWmutex GLFWAPIENTRY glfwCreateMutex( void ) { // Is GLFW initialized? if( !_glfwInitialized ) { return (GLFWmutex) 0; } return _glfwPlatformCreateMutex(); } //======================================================================== // Destroy a mutual exclusion object //======================================================================== GLFWAPI void GLFWAPIENTRY glfwDestroyMutex( GLFWmutex mutex ) { // Initialized & valid mutex (no real way of assuring this)? if( !_glfwInitialized || !mutex ) { return; } _glfwPlatformDestroyMutex( mutex ); } //======================================================================== // Request access to a mutex //======================================================================== GLFWAPI void GLFWAPIENTRY glfwLockMutex( GLFWmutex mutex ) { // Initialized & valid mutex (no real way of assuring this)? if( !_glfwInitialized && !mutex ) { return; } _glfwPlatformLockMutex( mutex ); } //======================================================================== // Release a mutex //======================================================================== GLFWAPI void GLFWAPIENTRY glfwUnlockMutex( GLFWmutex mutex ) { // Initialized & valid mutex (no real way of assuring this)? if( !_glfwInitialized && !mutex ) { return; } _glfwPlatformUnlockMutex( mutex ); } //======================================================================== // Create a new condition variable object //======================================================================== GLFWAPI GLFWcond GLFWAPIENTRY glfwCreateCond( void ) { // Is GLFW initialized? if( !_glfwInitialized ) { return (GLFWcond) 0; } return _glfwPlatformCreateCond(); } //======================================================================== // Destroy a condition variable object //======================================================================== GLFWAPI void GLFWAPIENTRY glfwDestroyCond( GLFWcond cond ) { // Initialized & valid condition variable? if( !_glfwInitialized || !cond ) { return; } _glfwPlatformDestroyCond( cond ); } //======================================================================== // Wait for a condition to be raised //======================================================================== GLFWAPI void GLFWAPIENTRY glfwWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ) { // Initialized & valid condition variable and mutex? if( !_glfwInitialized || !cond || !mutex ) { return; } _glfwPlatformWaitCond( cond, mutex, timeout ); } //======================================================================== // Signal a condition to one waiting thread //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSignalCond( GLFWcond cond ) { // Initialized & valid condition variable? if( !_glfwInitialized || !cond ) { return; } _glfwPlatformSignalCond( cond ); } //======================================================================== // Broadcast a condition to all waiting threads //======================================================================== GLFWAPI void GLFWAPIENTRY glfwBroadcastCond( GLFWcond cond ) { // Initialized & valid condition variable? if( !_glfwInitialized || !cond ) { return; } _glfwPlatformBroadcastCond( cond ); } //======================================================================== // Return the number of processors in the system. This information can be // useful for determining the optimal number of threads to use for // performing a certain task. //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetNumberOfProcessors( void ) { // Is GLFW initialized? if( !_glfwInitialized ) { return 0; } return _glfwPlatformGetNumberOfProcessors(); } glfw-2.7.2/lib/tga.c0000644000175000017500000002652411577631171015162 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== //======================================================================== // Description: // // TGA format image file loader. This module supports version 1 Targa // images, with these restrictions: // - Pixel format may only be 8, 24 or 32 bits // - Colormaps must be no longer than 256 entries // //======================================================================== #include "internal.h" //************************************************************************ //**** GLFW internal functions & declarations **** //************************************************************************ //======================================================================== // TGA file header information //======================================================================== typedef struct { int idlen; // 1 byte int cmaptype; // 1 byte int imagetype; // 1 byte int cmapfirstidx; // 2 bytes int cmaplen; // 2 bytes int cmapentrysize; // 1 byte int xorigin; // 2 bytes int yorigin; // 2 bytes int width; // 2 bytes int height; // 2 bytes int bitsperpixel; // 1 byte int imageinfo; // 1 byte int _alphabits; // (derived from imageinfo) int _origin; // (derived from imageinfo) } _tga_header_t; #define _TGA_CMAPTYPE_NONE 0 #define _TGA_CMAPTYPE_PRESENT 1 #define _TGA_IMAGETYPE_NONE 0 #define _TGA_IMAGETYPE_CMAP 1 #define _TGA_IMAGETYPE_TC 2 #define _TGA_IMAGETYPE_GRAY 3 #define _TGA_IMAGETYPE_CMAP_RLE 9 #define _TGA_IMAGETYPE_TC_RLE 10 #define _TGA_IMAGETYPE_GRAY_RLE 11 #define _TGA_IMAGEINFO_ALPHA_MASK 0x0f #define _TGA_IMAGEINFO_ALPHA_SHIFT 0 #define _TGA_IMAGEINFO_ORIGIN_MASK 0x30 #define _TGA_IMAGEINFO_ORIGIN_SHIFT 4 #define _TGA_ORIGIN_BL 0 #define _TGA_ORIGIN_BR 1 #define _TGA_ORIGIN_UL 2 #define _TGA_ORIGIN_UR 3 //======================================================================== // Read TGA file header (and check that it is valid) //======================================================================== static int ReadTGAHeader( _GLFWstream *s, _tga_header_t *h ) { unsigned char buf[ 18 ]; int pos; // Read TGA file header from file pos = _glfwTellStream( s ); _glfwReadStream( s, buf, 18 ); // Interpret header (endian independent parsing) h->idlen = (int) buf[0]; h->cmaptype = (int) buf[1]; h->imagetype = (int) buf[2]; h->cmapfirstidx = (int) buf[3] | (((int) buf[4]) << 8); h->cmaplen = (int) buf[5] | (((int) buf[6]) << 8); h->cmapentrysize = (int) buf[7]; h->xorigin = (int) buf[8] | (((int) buf[9]) << 8); h->yorigin = (int) buf[10] | (((int) buf[11]) << 8); h->width = (int) buf[12] | (((int) buf[13]) << 8); h->height = (int) buf[14] | (((int) buf[15]) << 8); h->bitsperpixel = (int) buf[16]; h->imageinfo = (int) buf[17]; // Extract alphabits and origin information h->_alphabits = (int) (h->imageinfo & _TGA_IMAGEINFO_ALPHA_MASK) >> _TGA_IMAGEINFO_ALPHA_SHIFT; h->_origin = (int) (h->imageinfo & _TGA_IMAGEINFO_ORIGIN_MASK) >> _TGA_IMAGEINFO_ORIGIN_SHIFT; // Validate TGA header (is this a TGA file?) if( (h->cmaptype == 0 || h->cmaptype == 1) && ((h->imagetype >= 1 && h->imagetype <= 3) || (h->imagetype >= 9 && h->imagetype <= 11)) && (h->bitsperpixel == 8 || h->bitsperpixel == 24 || h->bitsperpixel == 32) ) { // Skip the ID field _glfwSeekStream( s, h->idlen, SEEK_CUR ); // Indicate that the TGA header was valid return GL_TRUE; } else { // Restore file position _glfwSeekStream( s, pos, SEEK_SET ); // Indicate that the TGA header was invalid return GL_FALSE; } } //======================================================================== // Read Run-Length Encoded data //======================================================================== static void ReadTGA_RLE( unsigned char *buf, int size, int bpp, _GLFWstream *s ) { int repcount, bytes, k, n; unsigned char pixel[ 4 ]; char c; // Dummy check if( bpp > 4 ) { return; } while( size > 0 ) { // Get repetition count _glfwReadStream( s, &c, 1 ); repcount = (unsigned int) c; bytes = ((repcount & 127) + 1) * bpp; if( size < bytes ) { bytes = size; } // Run-Length packet? if( repcount & 128 ) { _glfwReadStream( s, pixel, bpp ); for( n = 0; n < (repcount & 127) + 1; n ++ ) { for( k = 0; k < bpp; k ++ ) { *buf ++ = pixel[ k ]; } } } else { // It's a Raw packet _glfwReadStream( s, buf, bytes ); buf += bytes; } size -= bytes; } } //======================================================================== // Read a TGA image from a file //======================================================================== int _glfwReadTGA( _GLFWstream *s, GLFWimage *img, int flags ) { _tga_header_t h; unsigned char *cmap, *pix, tmp, *src, *dst; int cmapsize, pixsize, pixsize2; int bpp, bpp2, k, m, n, swapx, swapy; // Read TGA header if( !ReadTGAHeader( s, &h ) ) { return 0; } // Is there a colormap? cmapsize = (h.cmaptype == _TGA_CMAPTYPE_PRESENT ? 1 : 0) * h.cmaplen * ((h.cmapentrysize+7) / 8); if( cmapsize > 0 ) { // Is it a colormap that we can handle? if( (h.cmapentrysize != 24 && h.cmapentrysize != 32) || h.cmaplen == 0 || h.cmaplen > 256 ) { return 0; } // Allocate memory for colormap cmap = (unsigned char *) malloc( cmapsize ); if( cmap == NULL ) { return 0; } // Read colormap from file _glfwReadStream( s, cmap, cmapsize ); } else { cmap = NULL; } // Size of pixel data pixsize = h.width * h.height * ((h.bitsperpixel + 7) / 8); // Bytes per pixel (pixel data - unexpanded) bpp = (h.bitsperpixel + 7) / 8; // Bytes per pixel (expanded pixels - not colormap indeces) if( cmap ) { bpp2 = (h.cmapentrysize + 7) / 8; } else { bpp2 = bpp; } // For colormaped images, the RGB/RGBA image data may use more memory // than the stored pixel data pixsize2 = h.width * h.height * bpp2; // Allocate memory for pixel data pix = (unsigned char *) malloc( pixsize2 ); if( pix == NULL ) { if( cmap ) { free( cmap ); } return 0; } // Read pixel data from file if( h.imagetype >= _TGA_IMAGETYPE_CMAP_RLE ) { ReadTGA_RLE( pix, pixsize, bpp, s ); } else { _glfwReadStream( s, pix, pixsize ); } // If the image origin is not what we want, re-arrange the pixels switch( h._origin ) { default: case _TGA_ORIGIN_UL: swapx = 0; swapy = 1; break; case _TGA_ORIGIN_BL: swapx = 0; swapy = 0; break; case _TGA_ORIGIN_UR: swapx = 1; swapy = 1; break; case _TGA_ORIGIN_BR: swapx = 1; swapy = 0; break; } if( (swapy && !(flags & GLFW_ORIGIN_UL_BIT)) || (!swapy && (flags & GLFW_ORIGIN_UL_BIT)) ) { src = pix; dst = &pix[ (h.height-1)*h.width*bpp ]; for( n = 0; n < h.height/2; n ++ ) { for( m = 0; m < h.width ; m ++ ) { for( k = 0; k < bpp; k ++ ) { tmp = *src; *src ++ = *dst; *dst ++ = tmp; } } dst -= 2*h.width*bpp; } } if( swapx ) { src = pix; dst = &pix[ (h.width-1)*bpp ]; for( n = 0; n < h.height; n ++ ) { for( m = 0; m < h.width/2 ; m ++ ) { for( k = 0; k < bpp; k ++ ) { tmp = *src; *src ++ = *dst; *dst ++ = tmp; } dst -= 2*bpp; } src += ((h.width+1)/2)*bpp; dst += ((3*h.width+1)/2)*bpp; } } // Convert BGR/BGRA to RGB/RGBA, and optionally colormap indeces to // RGB/RGBA values if( cmap ) { // Convert colormap pixel format (BGR -> RGB or BGRA -> RGBA) if( bpp2 == 3 || bpp2 == 4 ) { for( n = 0; n < h.cmaplen; n ++ ) { tmp = cmap[ n*bpp2 ]; cmap[ n*bpp2 ] = cmap[ n*bpp2 + 2 ]; cmap[ n*bpp2 + 2 ] = tmp; } } // Convert pixel data to RGB/RGBA data for( m = h.width * h.height - 1; m >= 0; m -- ) { n = pix[ m ]; for( k = 0; k < bpp2; k ++ ) { pix[ m*bpp2 + k ] = cmap[ n*bpp2 + k ]; } } // Free memory for colormap (it's not needed anymore) free( cmap ); } else { // Convert image pixel format (BGR -> RGB or BGRA -> RGBA) if( bpp2 == 3 || bpp2 == 4 ) { src = pix; dst = &pix[ 2 ]; for( n = 0; n < h.height * h.width; n ++ ) { tmp = *src; *src = *dst; *dst = tmp; src += bpp2; dst += bpp2; } } } // Fill out GLFWimage struct (the Format field will be set by // glfwReadImage) img->Width = h.width; img->Height = h.height; img->BytesPerPixel = bpp2; img->Data = pix; return 1; } glfw-2.7.2/lib/stream.c0000644000175000017500000001202611601076546015667 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #define _CRT_SECURE_NO_WARNINGS #include "internal.h" //======================================================================== // Opens a GLFW stream with a file //======================================================================== int _glfwOpenFileStream( _GLFWstream *stream, const char* name, const char* mode ) { memset( stream, 0, sizeof(_GLFWstream) ); stream->file = fopen( name, mode ); if( stream->file == NULL ) { return GL_FALSE; } return GL_TRUE; } //======================================================================== // Opens a GLFW stream with a memory block //======================================================================== int _glfwOpenBufferStream( _GLFWstream *stream, void *data, long size ) { memset( stream, 0, sizeof(_GLFWstream) ); stream->data = data; stream->size = size; return GL_TRUE; } //======================================================================== // Reads data from a GLFW stream //======================================================================== long _glfwReadStream( _GLFWstream *stream, void *data, long size ) { if( stream->file != NULL ) { return (long) fread( data, 1, size, stream->file ); } if( stream->data != NULL ) { // Check for EOF if( stream->position == stream->size ) { return 0; } // Clamp read size to available data if( stream->position + size > stream->size ) { size = stream->size - stream->position; } // Perform data read memcpy( data, (unsigned char*) stream->data + stream->position, size ); stream->position += size; return size; } return 0; } //======================================================================== // Returns the current position of a GLFW stream //======================================================================== long _glfwTellStream( _GLFWstream *stream ) { if( stream->file != NULL ) { return ftell( stream->file ); } if( stream->data != NULL ) { return stream->position; } return 0; } //======================================================================== // Sets the current position of a GLFW stream //======================================================================== int _glfwSeekStream( _GLFWstream *stream, long offset, int whence ) { long position; if( stream->file != NULL ) { if( fseek( stream->file, offset, whence ) != 0 ) { return GL_FALSE; } return GL_TRUE; } if( stream->data != NULL ) { position = offset; // Handle whence parameter if( whence == SEEK_CUR ) { position += stream->position; } else if( whence == SEEK_END ) { position += stream->size; } else if( whence != SEEK_SET ) { return GL_FALSE; } // Clamp offset to buffer bounds and apply it if( position > stream->size ) { stream->position = stream->size; } else if( position < 0 ) { stream->position = 0; } else { stream->position = position; } return GL_TRUE; } return GL_FALSE; } //======================================================================== // Closes a GLFW stream //======================================================================== void _glfwCloseStream( _GLFWstream *stream ) { if( stream->file != NULL ) { fclose( stream->file ); } // Nothing to be done about (user allocated) memory blocks memset( stream, 0, sizeof(_GLFWstream) ); } glfw-2.7.2/lib/window.c0000644000175000017500000007214311604600355015703 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Any // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include "internal.h" #include #ifndef GL_VERSION_3_2 #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 #define GL_CONTEXT_PROFILE_MASK 0x9126 #endif /*GL_VERSION_3_2*/ //************************************************************************ //**** GLFW internal functions **** //************************************************************************ static int Max(int a, int b) { return (a > b) ? a : b; } //======================================================================== // Clear all open window hints //======================================================================== void _glfwClearWindowHints( void ) { memset( &_glfwLibrary.hints, 0, sizeof( _glfwLibrary.hints ) ); _glfwLibrary.hints.glMajor = 1; } //======================================================================== // Handle the input tracking part of window deactivation //======================================================================== void _glfwInputDeactivation( void ) { int i; // Release all keyboard keys for( i = 0; i <= GLFW_KEY_LAST; i ++ ) { if( _glfwInput.Key[ i ] == GLFW_PRESS ) { _glfwInputKey( i, GLFW_RELEASE ); } } // Release all mouse buttons for( i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i ++ ) { if( _glfwInput.MouseButton[ i ] == GLFW_PRESS ) { _glfwInputMouseClick( i, GLFW_RELEASE ); } } } //======================================================================== // Clear all input state //======================================================================== void _glfwClearInput( void ) { int i; // Release all keyboard keys for( i = 0; i <= GLFW_KEY_LAST; i ++ ) { _glfwInput.Key[ i ] = GLFW_RELEASE; } // Clear last character _glfwInput.LastChar = 0; // Release all mouse buttons for( i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i ++ ) { _glfwInput.MouseButton[ i ] = GLFW_RELEASE; } // Set mouse position to (0,0) _glfwInput.MousePosX = 0; _glfwInput.MousePosY = 0; // Set mouse wheel position to 0 _glfwInput.WheelPos = 0; // The default is to use non sticky keys and mouse buttons _glfwInput.StickyKeys = GL_FALSE; _glfwInput.StickyMouseButtons = GL_FALSE; // The default is to disable key repeat _glfwInput.KeyRepeat = GL_FALSE; } //======================================================================== // Register keyboard activity //======================================================================== void _glfwInputKey( int key, int action ) { int keyrepeat = 0; if( key < 0 || key > GLFW_KEY_LAST ) { return; } // Are we trying to release an already released key? if( action == GLFW_RELEASE && _glfwInput.Key[ key ] != GLFW_PRESS ) { return; } // Register key action if( action == GLFW_RELEASE && _glfwInput.StickyKeys ) { _glfwInput.Key[ key ] = GLFW_STICK; } else { keyrepeat = (_glfwInput.Key[ key ] == GLFW_PRESS) && (action == GLFW_PRESS); _glfwInput.Key[ key ] = (char) action; } // Call user callback function if( _glfwWin.keyCallback && (_glfwInput.KeyRepeat || !keyrepeat) ) { _glfwWin.keyCallback( key, action ); } } //======================================================================== // Register (keyboard) character activity //======================================================================== void _glfwInputChar( int character, int action ) { int keyrepeat = 0; // Valid Unicode (ISO 10646) character? if( !( (character >= 32 && character <= 126) || character >= 160 ) ) { return; } // Is this a key repeat? if( action == GLFW_PRESS && _glfwInput.LastChar == character ) { keyrepeat = 1; } // Store this character as last character (or clear it, if released) if( action == GLFW_PRESS ) { _glfwInput.LastChar = character; } else { _glfwInput.LastChar = 0; } if( action != GLFW_PRESS ) { // This intentionally breaks release notifications for Unicode // characters, partly to see if anyone cares but mostly because it's // a nonsensical concept to begin with // // It will remain broken either until its removal in the 3.0 API or // until someone explains, in a way that makes sense to people outside // the US and Scandinavia, what "Unicode character up" actually means // // If what you want is "physical key up" then you should be using the // key functions and/or the key callback, NOT the Unicode input // // However, if your particular application uses this misfeature for... // something, you can re-enable it by removing this if-statement return; } if( _glfwWin.charCallback && (_glfwInput.KeyRepeat || !keyrepeat) ) { _glfwWin.charCallback( character, action ); } } //======================================================================== // Register mouse button clicks //======================================================================== void _glfwInputMouseClick( int button, int action ) { if( button >= 0 && button <= GLFW_MOUSE_BUTTON_LAST ) { // Register mouse button action if( action == GLFW_RELEASE && _glfwInput.StickyMouseButtons ) { _glfwInput.MouseButton[ button ] = GLFW_STICK; } else { _glfwInput.MouseButton[ button ] = (char) action; } // Call user callback function if( _glfwWin.mouseButtonCallback ) { _glfwWin.mouseButtonCallback( button, action ); } } } //======================================================================== // Return the available framebuffer config closest to the desired values // This is based on the manual GLX Visual selection from 2.6 //======================================================================== const _GLFWfbconfig *_glfwChooseFBConfig( const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count ) { unsigned int i; unsigned int missing, leastMissing = UINT_MAX; unsigned int colorDiff, leastColorDiff = UINT_MAX; unsigned int extraDiff, leastExtraDiff = UINT_MAX; const _GLFWfbconfig *current; const _GLFWfbconfig *closest = NULL; for( i = 0; i < count; i++ ) { current = alternatives + i; if( desired->stereo > 0 && current->stereo == 0 ) { // Stereo is a hard constraint continue; } // Count number of missing buffers { missing = 0; if( desired->alphaBits > 0 && current->alphaBits == 0 ) { missing++; } if( desired->depthBits > 0 && current->depthBits == 0 ) { missing++; } if( desired->stencilBits > 0 && current->stencilBits == 0 ) { missing++; } if( desired->auxBuffers > 0 && current->auxBuffers < desired->auxBuffers ) { missing += desired->auxBuffers - current->auxBuffers; } if( desired->samples > 0 && current->samples == 0 ) { // Technically, several multisampling buffers could be // involved, but that's a lower level implementation detail and // not important to us here, so we count them as one missing++; } } // These polynomials make many small channel size differences matter // less than one large channel size difference // Calculate color channel size difference value { colorDiff = 0; if ( desired->redBits > 0 ) { colorDiff += ( desired->redBits - current->redBits ) * ( desired->redBits - current->redBits ); } if ( desired->greenBits > 0 ) { colorDiff += ( desired->greenBits - current->greenBits ) * ( desired->greenBits - current->greenBits ); } if ( desired->blueBits > 0 ) { colorDiff += ( desired->blueBits - current->blueBits ) * ( desired->blueBits - current->blueBits ); } } // Calculate non-color channel size difference value { extraDiff = 0; if( desired->alphaBits > 0 ) { extraDiff += ( desired->alphaBits - current->alphaBits ) * ( desired->alphaBits - current->alphaBits ); } if( desired->depthBits > 0 ) { extraDiff += ( desired->depthBits - current->depthBits ) * ( desired->depthBits - current->depthBits ); } if( desired->stencilBits > 0 ) { extraDiff += ( desired->stencilBits - current->stencilBits ) * ( desired->stencilBits - current->stencilBits ); } if( desired->accumRedBits > 0 ) { extraDiff += ( desired->accumRedBits - current->accumRedBits ) * ( desired->accumRedBits - current->accumRedBits ); } if( desired->accumGreenBits > 0 ) { extraDiff += ( desired->accumGreenBits - current->accumGreenBits ) * ( desired->accumGreenBits - current->accumGreenBits ); } if( desired->accumBlueBits > 0 ) { extraDiff += ( desired->accumBlueBits - current->accumBlueBits ) * ( desired->accumBlueBits - current->accumBlueBits ); } if( desired->accumAlphaBits > 0 ) { extraDiff += ( desired->accumAlphaBits - current->accumAlphaBits ) * ( desired->accumAlphaBits - current->accumAlphaBits ); } if( desired->samples > 0 ) { extraDiff += ( desired->samples - current->samples ) * ( desired->samples - current->samples ); } } // Figure out if the current one is better than the best one found so far if( missing < leastMissing ) { closest = current; } else if( missing == leastMissing ) { if( ( colorDiff < leastColorDiff ) || ( colorDiff == leastColorDiff && extraDiff < leastExtraDiff ) ) { closest = current; } } if( current == closest ) { leastMissing = missing; leastColorDiff = colorDiff; leastExtraDiff = extraDiff; } } return closest; } //************************************************************************ //**** GLFW user functions **** //************************************************************************ //======================================================================== // Create the GLFW window and its associated context //======================================================================== GLFWAPI int GLFWAPIENTRY glfwOpenWindow( int width, int height, int redbits, int greenbits, int bluebits, int alphabits, int depthbits, int stencilbits, int mode ) { _GLFWfbconfig fbconfig; _GLFWwndconfig wndconfig; if( !_glfwInitialized || _glfwWin.opened ) { return GL_FALSE; } // Set up desired framebuffer config fbconfig.redBits = Max( redbits, 0 ); fbconfig.greenBits = Max( greenbits, 0 ); fbconfig.blueBits = Max( bluebits, 0 ); fbconfig.alphaBits = Max( alphabits, 0 ); fbconfig.depthBits = Max( depthbits, 0 ); fbconfig.stencilBits = Max( stencilbits, 0 ); fbconfig.accumRedBits = Max( _glfwLibrary.hints.accumRedBits, 0 ); fbconfig.accumGreenBits = Max( _glfwLibrary.hints.accumGreenBits, 0 ); fbconfig.accumBlueBits = Max( _glfwLibrary.hints.accumBlueBits, 0 ); fbconfig.accumAlphaBits = Max( _glfwLibrary.hints.accumAlphaBits, 0 ); fbconfig.auxBuffers = Max( _glfwLibrary.hints.auxBuffers, 0 ); fbconfig.stereo = _glfwLibrary.hints.stereo ? GL_TRUE : GL_FALSE; fbconfig.samples = Max( _glfwLibrary.hints.samples, 0 ); // Set up desired window config wndconfig.mode = mode; wndconfig.refreshRate = Max( _glfwLibrary.hints.refreshRate, 0 ); wndconfig.windowNoResize = _glfwLibrary.hints.windowNoResize ? GL_TRUE : GL_FALSE; wndconfig.glMajor = Max( _glfwLibrary.hints.glMajor, 1 ); wndconfig.glMinor = Max( _glfwLibrary.hints.glMinor, 0 ); wndconfig.glForward = _glfwLibrary.hints.glForward ? GL_TRUE : GL_FALSE; wndconfig.glDebug = _glfwLibrary.hints.glDebug ? GL_TRUE : GL_FALSE; wndconfig.glProfile = _glfwLibrary.hints.glProfile; if( wndconfig.glMajor == 1 && wndconfig.glMinor > 5 ) { // OpenGL 1.x series ended with version 1.5 return GL_FALSE; } else if( wndconfig.glMajor == 2 && wndconfig.glMinor > 1 ) { // OpenGL 2.x series ended with version 2.1 return GL_FALSE; } else if( wndconfig.glMajor == 3 && wndconfig.glMinor > 3 ) { // OpenGL 3.x series ended with version 3.3 return GL_FALSE; } else { // For now, let everything else through } if( wndconfig.glProfile && ( wndconfig.glMajor < 3 || ( wndconfig.glMajor == 3 && wndconfig.glMinor < 2 ) ) ) { // Context profiles are only defined for OpenGL version 3.2 and above return GL_FALSE; } if( wndconfig.glForward && wndconfig.glMajor < 3 ) { // Forward-compatible contexts are only defined for OpenGL version 3.0 and above return GL_FALSE; } // Clear for next open call _glfwClearWindowHints(); // Check input arguments if( mode != GLFW_WINDOW && mode != GLFW_FULLSCREEN ) { return GL_FALSE; } // Clear GLFW window state _glfwWin.active = GL_TRUE; _glfwWin.iconified = GL_FALSE; _glfwWin.mouseLock = GL_FALSE; _glfwWin.autoPollEvents = GL_TRUE; _glfwClearInput(); // Unregister all callback functions _glfwWin.windowSizeCallback = NULL; _glfwWin.windowCloseCallback = NULL; _glfwWin.windowRefreshCallback = NULL; _glfwWin.keyCallback = NULL; _glfwWin.charCallback = NULL; _glfwWin.mousePosCallback = NULL; _glfwWin.mouseButtonCallback = NULL; _glfwWin.mouseWheelCallback = NULL; // Check width & height if( width > 0 && height <= 0 ) { // Set the window aspect ratio to 4:3 height = (width * 3) / 4; } else if( width <= 0 && height > 0 ) { // Set the window aspect ratio to 4:3 width = (height * 4) / 3; } else if( width <= 0 && height <= 0 ) { // Default window size width = 640; height = 480; } // Remember window settings _glfwWin.width = width; _glfwWin.height = height; _glfwWin.fullscreen = (mode == GLFW_FULLSCREEN ? GL_TRUE : GL_FALSE); // Platform specific window opening routine if( !_glfwPlatformOpenWindow( width, height, &wndconfig, &fbconfig ) ) { glfwCloseWindow(); return GL_FALSE; } // Flag that window is now opened _glfwWin.opened = GL_TRUE; // Read back window and context parameters _glfwPlatformRefreshWindowParams(); _glfwRefreshContextParams(); if( _glfwWin.glMajor < wndconfig.glMajor || ( _glfwWin.glMajor == wndconfig.glMajor && _glfwWin.glMinor < wndconfig.glMinor ) ) { glfwCloseWindow(); return GL_FALSE; } // Do we have non-power-of-two textures (added to core in version 2.0)? _glfwWin.has_GL_ARB_texture_non_power_of_two = ( _glfwWin.glMajor >= 2 ) || glfwExtensionSupported( "GL_ARB_texture_non_power_of_two" ); // Do we have automatic mipmap generation (added to core in version 1.4)? _glfwWin.has_GL_SGIS_generate_mipmap = ( _glfwWin.glMajor >= 2 ) || ( _glfwWin.glMinor >= 4 ) || glfwExtensionSupported( "GL_SGIS_generate_mipmap" ); if( _glfwWin.glMajor > 2 ) { _glfwWin.GetStringi = (PFNGLGETSTRINGIPROC) glfwGetProcAddress( "glGetStringi" ); if( !_glfwWin.GetStringi ) { // This is a very common problem among people who compile GLFW // on X11/GLX using custom build systems, as it needs explicit // configuration in order to work // // See readme.html section 2.2 for details glfwCloseWindow(); return GL_FALSE; } } // If full-screen mode was requested, disable mouse cursor if( mode == GLFW_FULLSCREEN ) { glfwDisable( GLFW_MOUSE_CURSOR ); } // Start by clearing the front buffer to black (avoid ugly desktop // remains in our OpenGL window) glClear( GL_COLOR_BUFFER_BIT ); _glfwPlatformSwapBuffers(); return GL_TRUE; } //======================================================================== // Set hints for opening the window //======================================================================== GLFWAPI void GLFWAPIENTRY glfwOpenWindowHint( int target, int hint ) { if( !_glfwInitialized ) { return; } switch( target ) { case GLFW_REFRESH_RATE: _glfwLibrary.hints.refreshRate = hint; break; case GLFW_ACCUM_RED_BITS: _glfwLibrary.hints.accumRedBits = hint; break; case GLFW_ACCUM_GREEN_BITS: _glfwLibrary.hints.accumGreenBits = hint; break; case GLFW_ACCUM_BLUE_BITS: _glfwLibrary.hints.accumBlueBits = hint; break; case GLFW_ACCUM_ALPHA_BITS: _glfwLibrary.hints.accumAlphaBits = hint; break; case GLFW_AUX_BUFFERS: _glfwLibrary.hints.auxBuffers = hint; break; case GLFW_STEREO: _glfwLibrary.hints.stereo = hint; break; case GLFW_WINDOW_NO_RESIZE: _glfwLibrary.hints.windowNoResize = hint; break; case GLFW_FSAA_SAMPLES: _glfwLibrary.hints.samples = hint; break; case GLFW_OPENGL_VERSION_MAJOR: _glfwLibrary.hints.glMajor = hint; break; case GLFW_OPENGL_VERSION_MINOR: _glfwLibrary.hints.glMinor = hint; break; case GLFW_OPENGL_FORWARD_COMPAT: _glfwLibrary.hints.glForward = hint; break; case GLFW_OPENGL_DEBUG_CONTEXT: _glfwLibrary.hints.glDebug = hint; break; case GLFW_OPENGL_PROFILE: _glfwLibrary.hints.glProfile = hint; break; default: break; } } //======================================================================== // Properly kill the window / video display //======================================================================== GLFWAPI void GLFWAPIENTRY glfwCloseWindow( void ) { if( !_glfwInitialized ) { return; } // Show mouse pointer again (if hidden) glfwEnable( GLFW_MOUSE_CURSOR ); _glfwPlatformCloseWindow(); memset( &_glfwWin, 0, sizeof(_glfwWin) ); } //======================================================================== // Set the window title //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetWindowTitle( const char *title ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set window title _glfwPlatformSetWindowTitle( title ); } //======================================================================== // Get the window size //======================================================================== GLFWAPI void GLFWAPIENTRY glfwGetWindowSize( int *width, int *height ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } if( width != NULL ) { *width = _glfwWin.width; } if( height != NULL ) { *height = _glfwWin.height; } } //======================================================================== // Set the window size //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetWindowSize( int width, int height ) { if( !_glfwInitialized || !_glfwWin.opened || _glfwWin.iconified ) { return; } // Don't do anything if the window size did not change if( width == _glfwWin.width && height == _glfwWin.height ) { return; } // Change window size _glfwPlatformSetWindowSize( width, height ); // Refresh window parameters (may have changed due to changed video // modes) _glfwPlatformRefreshWindowParams(); } //======================================================================== // Set the window position //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetWindowPos( int x, int y ) { if( !_glfwInitialized || !_glfwWin.opened || _glfwWin.fullscreen || _glfwWin.iconified ) { return; } // Set window position _glfwPlatformSetWindowPos( x, y ); } //======================================================================== // Window iconification //======================================================================== GLFWAPI void GLFWAPIENTRY glfwIconifyWindow( void ) { if( !_glfwInitialized || !_glfwWin.opened || _glfwWin.iconified ) { return; } // Iconify window _glfwPlatformIconifyWindow(); } //======================================================================== // Window un-iconification //======================================================================== GLFWAPI void GLFWAPIENTRY glfwRestoreWindow( void ) { if( !_glfwInitialized || !_glfwWin.opened || !_glfwWin.iconified ) { return; } // Restore iconified window _glfwPlatformRestoreWindow(); // Refresh window parameters _glfwPlatformRefreshWindowParams(); } //======================================================================== // Swap buffers (double-buffering) and poll any new events //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSwapBuffers( void ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } _glfwPlatformSwapBuffers(); // Check for window messages if( _glfwWin.autoPollEvents ) { glfwPollEvents(); } } //======================================================================== // Set double buffering swap interval (0 = vsync off) //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSwapInterval( int interval ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set double buffering swap interval _glfwPlatformSwapInterval( interval ); } //======================================================================== // Get window parameter //======================================================================== GLFWAPI int GLFWAPIENTRY glfwGetWindowParam( int param ) { if( !_glfwInitialized ) { return 0; } // Is the window opened? if( !_glfwWin.opened ) { if( param == GLFW_OPENED ) { return GL_FALSE; } return 0; } // Window parameters switch( param ) { case GLFW_OPENED: return GL_TRUE; case GLFW_ACTIVE: return _glfwWin.active; case GLFW_ICONIFIED: return _glfwWin.iconified; case GLFW_ACCELERATED: return _glfwWin.accelerated; case GLFW_RED_BITS: return _glfwWin.redBits; case GLFW_GREEN_BITS: return _glfwWin.greenBits; case GLFW_BLUE_BITS: return _glfwWin.blueBits; case GLFW_ALPHA_BITS: return _glfwWin.alphaBits; case GLFW_DEPTH_BITS: return _glfwWin.depthBits; case GLFW_STENCIL_BITS: return _glfwWin.stencilBits; case GLFW_ACCUM_RED_BITS: return _glfwWin.accumRedBits; case GLFW_ACCUM_GREEN_BITS: return _glfwWin.accumGreenBits; case GLFW_ACCUM_BLUE_BITS: return _glfwWin.accumBlueBits; case GLFW_ACCUM_ALPHA_BITS: return _glfwWin.accumAlphaBits; case GLFW_AUX_BUFFERS: return _glfwWin.auxBuffers; case GLFW_STEREO: return _glfwWin.stereo; case GLFW_REFRESH_RATE: return _glfwWin.refreshRate; case GLFW_WINDOW_NO_RESIZE: return _glfwWin.windowNoResize; case GLFW_FSAA_SAMPLES: return _glfwWin.samples; case GLFW_OPENGL_VERSION_MAJOR: return _glfwWin.glMajor; case GLFW_OPENGL_VERSION_MINOR: return _glfwWin.glMinor; case GLFW_OPENGL_FORWARD_COMPAT: return _glfwWin.glForward; case GLFW_OPENGL_DEBUG_CONTEXT: return _glfwWin.glDebug; case GLFW_OPENGL_PROFILE: return _glfwWin.glProfile; default: return 0; } } //======================================================================== // Set callback function for window size changes //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.windowSizeCallback = cbfun; // Call the callback function to let the application know the current // window size if( cbfun ) { cbfun( _glfwWin.width, _glfwWin.height ); } } //======================================================================== // Set callback function for window close events //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.windowCloseCallback = cbfun; } //======================================================================== // Set callback function for window refresh events //======================================================================== GLFWAPI void GLFWAPIENTRY glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Set callback function _glfwWin.windowRefreshCallback = cbfun; } //======================================================================== // Poll for new window and input events //======================================================================== GLFWAPI void GLFWAPIENTRY glfwPollEvents( void ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Poll for new events _glfwPlatformPollEvents(); } //======================================================================== // Wait for new window and input events //======================================================================== GLFWAPI void GLFWAPIENTRY glfwWaitEvents( void ) { if( !_glfwInitialized || !_glfwWin.opened ) { return; } // Poll for new events _glfwPlatformWaitEvents(); } glfw-2.7.2/docs/0000755000175000017500000000000011621215255014403 5ustar elmindredaelmindredaglfw-2.7.2/docs/UsersGuide.pdf0000644000175000017500000120312411621215255017160 0ustar elmindredaelmindreda%PDF-1.4 % 1 0 obj << /S /GoTo /D (chapter.1) >> endobj 4 0 obj (1 Introduction) endobj 5 0 obj << /S /GoTo /D (chapter.2) >> endobj 8 0 obj (2 Getting Started) endobj 9 0 obj << /S /GoTo /D (section.2.1) >> endobj 12 0 obj (2.1 Initializing GLFW) endobj 13 0 obj << /S /GoTo /D (section.2.2) >> endobj 16 0 obj (2.2 Opening An OpenGL Window) endobj 17 0 obj << /S /GoTo /D (section.2.3) >> endobj 20 0 obj (2.3 Using Keyboard Input) endobj 21 0 obj << /S /GoTo /D (section.2.4) >> endobj 24 0 obj (2.4 Putting It Together: A Minimal GLFW Application) endobj 25 0 obj << /S /GoTo /D (chapter.3) >> endobj 28 0 obj (3 Window Operations) endobj 29 0 obj << /S /GoTo /D (section.3.1) >> endobj 32 0 obj (3.1 Setting Window Properties) endobj 33 0 obj << /S /GoTo /D (section.3.2) >> endobj 36 0 obj (3.2 Getting Window Properties) endobj 37 0 obj << /S /GoTo /D (section.3.3) >> endobj 40 0 obj (3.3 Buffer Swapping) endobj 41 0 obj << /S /GoTo /D (section.3.4) >> endobj 44 0 obj (3.4 Querying Video Modes) endobj 45 0 obj << /S /GoTo /D (chapter.4) >> endobj 48 0 obj (4 Input Handling) endobj 49 0 obj << /S /GoTo /D (section.4.1) >> endobj 52 0 obj (4.1 Event Polling) endobj 53 0 obj << /S /GoTo /D (section.4.2) >> endobj 56 0 obj (4.2 Keyboard Input) endobj 57 0 obj << /S /GoTo /D (subsection.4.2.1) >> endobj 60 0 obj (4.2.1 Key state) endobj 61 0 obj << /S /GoTo /D (subsection.4.2.2) >> endobj 64 0 obj (4.2.2 Character input) endobj 65 0 obj << /S /GoTo /D (subsection.4.2.3) >> endobj 68 0 obj (4.2.3 Key repeat) endobj 69 0 obj << /S /GoTo /D (subsection.4.2.4) >> endobj 72 0 obj (4.2.4 Special system keys) endobj 73 0 obj << /S /GoTo /D (section.4.3) >> endobj 76 0 obj (4.3 Mouse Input) endobj 77 0 obj << /S /GoTo /D (subsection.4.3.1) >> endobj 80 0 obj (4.3.1 Mouse position) endobj 81 0 obj << /S /GoTo /D (subsection.4.3.2) >> endobj 84 0 obj (4.3.2 Mouse buttons) endobj 85 0 obj << /S /GoTo /D (subsection.4.3.3) >> endobj 88 0 obj (4.3.3 Mouse wheel) endobj 89 0 obj << /S /GoTo /D (subsection.4.3.4) >> endobj 92 0 obj (4.3.4 Hiding the mouse cursor) endobj 93 0 obj << /S /GoTo /D (section.4.4) >> endobj 96 0 obj (4.4 Joystick Input) endobj 97 0 obj << /S /GoTo /D (subsection.4.4.1) >> endobj 100 0 obj (4.4.1 Joystick capabilities) endobj 101 0 obj << /S /GoTo /D (subsection.4.4.2) >> endobj 104 0 obj (4.4.2 Joystick position) endobj 105 0 obj << /S /GoTo /D (subsection.4.4.3) >> endobj 108 0 obj (4.4.3 Joystick buttons) endobj 109 0 obj << /S /GoTo /D (chapter.5) >> endobj 112 0 obj (5 Timing) endobj 113 0 obj << /S /GoTo /D (section.5.1) >> endobj 116 0 obj (5.1 High Resolution Timer) endobj 117 0 obj << /S /GoTo /D (section.5.2) >> endobj 120 0 obj (5.2 Sleep) endobj 121 0 obj << /S /GoTo /D (chapter.6) >> endobj 124 0 obj (6 Image and Texture Import) endobj 125 0 obj << /S /GoTo /D (section.6.1) >> endobj 128 0 obj (6.1 Texture Loading) endobj 129 0 obj << /S /GoTo /D (section.6.2) >> endobj 132 0 obj (6.2 Image Loading) endobj 133 0 obj << /S /GoTo /D (chapter.7) >> endobj 136 0 obj (7 OpenGL Extension Support) endobj 137 0 obj << /S /GoTo /D (section.7.1) >> endobj 140 0 obj (7.1 Compile Time Check) endobj 141 0 obj << /S /GoTo /D (section.7.2) >> endobj 144 0 obj (7.2 Runtime Check) endobj 145 0 obj << /S /GoTo /D (section.7.3) >> endobj 148 0 obj (7.3 Fetching Function Pointers) endobj 149 0 obj << /S /GoTo /D (subsection.7.3.1) >> endobj 152 0 obj (7.3.1 Function pointer type definitions) endobj 153 0 obj << /S /GoTo /D (chapter.8) >> endobj 156 0 obj (8 Multi-threading) endobj 157 0 obj << /S /GoTo /D (section.8.1) >> endobj 160 0 obj (8.1 Why Use Multi-threading?) endobj 161 0 obj << /S /GoTo /D (subsection.8.1.1) >> endobj 164 0 obj (8.1.1 Avoid unnecessary waiting) endobj 165 0 obj << /S /GoTo /D (subsection.8.1.2) >> endobj 168 0 obj (8.1.2 Improve real time performance) endobj 169 0 obj << /S /GoTo /D (section.8.2) >> endobj 172 0 obj (8.2 How To Use Multi Threading) endobj 173 0 obj << /S /GoTo /D (section.8.3) >> endobj 176 0 obj (8.3 Creating Threads) endobj 177 0 obj << /S /GoTo /D (section.8.4) >> endobj 180 0 obj (8.4 Data Sharing Using Mutex Objects) endobj 181 0 obj << /S /GoTo /D (section.8.5) >> endobj 184 0 obj (8.5 Thread Synchronization Using Condition Variables) endobj 185 0 obj << /S /GoTo /D (section.8.6) >> endobj 188 0 obj (8.6 Calling GLFW Functions From Multiple Threads) endobj 189 0 obj << /S /GoTo /D [190 0 R /FitH ] >> endobj 192 0 obj << /Length 335 /Filter /FlateDecode >> stream xڕRKK@W13̾bQPx=6BZ5dETf7c V@0NG@4:GY,Z P-a/GŬdUq01Ȃ U.6tF [݀xښo64fF'cA=D*ݾR vhЇ(bmp}HS%OC% '?S+tAA ><(v_ AGR zel餱8WfԗOݶk q)|WG?uleG\?1_0%f4tֻUn4ߞ]|ED endstream endobj 190 0 obj << /Type /Page /Contents 192 0 R /Resources 191 0 R /MediaBox [0 0 595.276 841.89] /Parent 198 0 R >> endobj 193 0 obj << /D [190 0 R /FitH 778.724] >> endobj 194 0 obj << /D [190 0 R /FitH 740.862] >> endobj 191 0 obj << /Font << /F27 195 0 R /F30 196 0 R /F26 197 0 R >> /ProcSet [ /PDF /Text ] >> endobj 201 0 obj << /Length 688 /Filter /FlateDecode >> stream xڥV]o0}5CxL$ԮU`ji85nVm0sDZ/Y9Й]Aˮn(vPQ;҉!E嗬p~i~enA$0ݡsAǡ֬nnnCVY+яXV+^.Ћvm,^1+!z>v1|-H޲j/:i6VJT Ɇ eA[JZط&ޓYmy͚wAtIq Cwv!@ 8a =D :Y^DIb>>H0F& B!16} RPncEF'āvi57LŘleS~Ś [vOsTޔ,5 RY\*OFrlOByB%+i. 5Dc8 ktI}00udG{&?fNI endstream endobj 200 0 obj << /Type /Page /Contents 201 0 R /Resources 199 0 R /MediaBox [0 0 595.276 841.89] /Parent 198 0 R >> endobj 202 0 obj << /D [200 0 R /FitH 778.724] >> endobj 203 0 obj << /D [200 0 R /FitH 598.545] >> endobj 199 0 obj << /Font << /F27 195 0 R /F33 204 0 R /F30 196 0 R >> /ProcSet [ /PDF /Text ] >> endobj 237 0 obj << /Length 1009 /Filter /FlateDecode >> stream xZMF&=[첵ǫxX1(ek3|M`e%dA@b~= йwwX8,A)42х܁V 9C0) 0GB UsnoWZI=rcCi`ۛ|ʂV̷Z1r-sgZ}J9>"fTf墕VF},>5ό/@y-g7 ĂsRˋBW%qa>-ጿHO8ipRB*=ܧ4Umus 1*T 0iɀW>.k|LTԿ|Tz64ULm*l0/'z}]i!ܔ:V ޣM)yRѷ(!'.?B]ZF\wŪk|'8bEeq< 3i$[yy+qyS=AeYGo@)*S逆b5淭̟l(| XHp1(ϒ'jwZeU1p%f$2H96y0݌M/(>< iZ:Y9)+2xTA95/MΜ}լ7TYGymu11c^bΦ\f24{Y י\v_<Z>߿vMO1l]΀oR'v;1r.ίR&|4+~Pc]0؜/Jp[CwHW-`dFXԻN? t.b"^Oao2VۼHw TQo{ 4+AرJ;geѭڨ6ze`RCTy'%yju҆p09E鐳C> :Ӕb o^ [v|_Yf[]d0chZ:zo9 @Tqvvyfɰ endstream endobj 236 0 obj << /Type /Page /Contents 237 0 R /Resources 235 0 R /MediaBox [0 0 595.276 841.89] /Parent 198 0 R /Annots [ 205 0 R 206 0 R 207 0 R 208 0 R 209 0 R 210 0 R 211 0 R 212 0 R 213 0 R 214 0 R 215 0 R 216 0 R 217 0 R 218 0 R 219 0 R 220 0 R 221 0 R 222 0 R 223 0 R 224 0 R 225 0 R 226 0 R 227 0 R 228 0 R 229 0 R 230 0 R 231 0 R 232 0 R 233 0 R ] >> endobj 205 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 577.991 147.429 587.631] /A << /S /GoTo /D (chapter.1) >> >> endobj 206 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 551.449 160.64 563.173] /A << /S /GoTo /D (chapter.2) >> >> endobj 207 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 537.753 194.829 549.504] /A << /S /GoTo /D (section.2.1) >> >> endobj 208 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 524.204 247.433 535.954] /A << /S /GoTo /D (section.2.2) >> >> endobj 209 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 510.655 210.44 522.405] /A << /S /GoTo /D (section.2.3) >> >> endobj 210 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 497.105 337.943 508.856] /A << /S /GoTo /D (section.2.4) >> >> endobj 211 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 472.794 182.174 484.518] /A << /S /GoTo /D (chapter.3) >> >> endobj 212 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 459.098 230.785 470.848] /A << /S /GoTo /D (section.3.1) >> >> endobj 213 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 445.549 232.596 457.299] /A << /S /GoTo /D (section.3.2) >> >> endobj 214 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 432 187.771 443.75] /A << /S /GoTo /D (section.3.3) >> >> endobj 215 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 418.45 215.676 430.201] /A << /S /GoTo /D (section.3.4) >> >> endobj 216 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 394.139 160.683 405.863] /A << /S /GoTo /D (chapter.4) >> >> endobj 217 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 380.443 172.858 392.193] /A << /S /GoTo /D (section.4.1) >> >> endobj 218 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 366.894 181.651 378.644] /A << /S /GoTo /D (section.4.2) >> >> endobj 219 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 353.344 188.687 365.095] /A << /S /GoTo /D (subsection.4.2.1) >> >> endobj 220 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 339.795 215.785 351.546] /A << /S /GoTo /D (subsection.4.2.2) >> >> endobj 221 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 326.246 195.342 337.997] /A << /S /GoTo /D (subsection.4.2.3) >> >> endobj 222 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 312.697 235.825 324.447] /A << /S /GoTo /D (subsection.4.2.4) >> >> endobj 223 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 299.148 168.767 310.898] /A << /S /GoTo /D (section.4.3) >> >> endobj 224 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 285.599 215.807 297.349] /A << /S /GoTo /D (subsection.4.3.1) >> >> endobj 225 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 274.302 212.556 283.8] /A << /S /GoTo /D (subsection.4.3.2) >> >> endobj 226 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 260.753 206.698 270.251] /A << /S /GoTo /D (subsection.4.3.3) >> >> endobj 227 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 244.951 255.788 256.701] /A << /S /GoTo /D (subsection.4.3.4) >> >> endobj 228 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 231.402 174.723 243.152] /A << /S /GoTo /D (section.4.4) >> >> endobj 229 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 217.853 236.294 229.603] /A << /S /GoTo /D (subsection.4.4.1) >> >> endobj 230 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 204.303 221.763 216.054] /A << /S /GoTo /D (subsection.4.4.2) >> >> endobj 231 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 190.754 218.512 202.505] /A << /S /GoTo /D (subsection.4.4.3) >> >> endobj 232 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 166.443 121.978 178.166] /A << /S /GoTo /D (chapter.5) >> >> endobj 233 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 152.747 214.148 164.497] /A << /S /GoTo /D (section.5.1) >> >> endobj 238 0 obj << /D [236 0 R /FitH 778.724] >> endobj 239 0 obj << /D [236 0 R /FitH 603.28] >> endobj 235 0 obj << /Font << /F27 195 0 R /F33 204 0 R >> /ProcSet [ /PDF /Text ] >> endobj 259 0 obj << /Length 790 /Filter /FlateDecode >> stream xXS@pp괩IQ& Cj.aA&њC1[qm cCardk`FpexFƅIl(2O'Bs|g:M]k,!g&ljofc渌6P⍕Lka٠ 娺 ,Lq=SL$˗115a- %ZMőz5f0 G^%S:i5+[jy y;.qn\8rxX 9Y Ot iODQ\jS=Es9dF3zBmؓBw_j2"eΜ1(d72٬c *)uʴ.[ y6 vZ] Tc$!2.7v /H&Շ`Uubt9*&ylm\ݪ bhKkآ]LTc.QsjA߸ʼnyc2X! )E$f0Ӥ:b(ouEAo λ4% Wʞ4֔TdWI6 e$:@} [l:{OTTwR|ҁK&xkڣB4oڣ NA4<ԇq5͚ۣ"T"WLlZ\}'qwx߬`'r߯|BX1^ND)^tYdN& >jY2m.:0B^CcˀQ߰]B 8? endstream endobj 258 0 obj << /Type /Page /Contents 259 0 R /Resources 257 0 R /MediaBox [0 0 595.276 841.89] /Parent 198 0 R /Annots [ 234 0 R 240 0 R 241 0 R 242 0 R 243 0 R 244 0 R 245 0 R 246 0 R 247 0 R 248 0 R 249 0 R 250 0 R 251 0 R 252 0 R 253 0 R 254 0 R 255 0 R 256 0 R ] >> endobj 234 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 726.545 137.557 738.296] /A << /S /GoTo /D (section.5.2) >> >> endobj 240 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 702.234 212.163 713.957] /A << /S /GoTo /D (chapter.6) >> >> endobj 241 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 688.538 185.404 700.288] /A << /S /GoTo /D (section.6.1) >> >> endobj 242 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 674.988 179.665 686.739] /A << /S /GoTo /D (section.6.2) >> >> endobj 243 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 650.677 219.166 662.401] /A << /S /GoTo /D (chapter.7) >> >> endobj 244 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 636.981 206.872 648.731] /A << /S /GoTo /D (section.7.1) >> >> endobj 245 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 625.684 181.498 635.182] /A << /S /GoTo /D (section.7.2) >> >> endobj 246 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 609.883 231.505 621.633] /A << /S /GoTo /D (section.7.3) >> >> endobj 247 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 596.333 290.959 608.084] /A << /S /GoTo /D (subsection.7.3.1) >> >> endobj 248 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 572.022 163.181 583.746] /A << /S /GoTo /D (chapter.8) >> >> endobj 249 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 558.326 230.817 570.076] /A << /S /GoTo /D (section.8.1) >> >> endobj 250 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 544.777 265.857 556.527] /A << /S /GoTo /D (subsection.8.1.1) >> >> endobj 251 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 531.227 283.912 542.978] /A << /S /GoTo /D (subsection.8.1.2) >> >> endobj 252 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 517.678 242.458 529.429] /A << /S /GoTo /D (section.8.2) >> >> endobj 253 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 504.129 188.752 515.88] /A << /S /GoTo /D (section.8.3) >> >> endobj 254 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 490.58 266.468 502.33] /A << /S /GoTo /D (section.8.4) >> >> endobj 255 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 477.031 336.929 488.781] /A << /S /GoTo /D (section.8.5) >> >> endobj 256 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 463.481 329.38 475.232] /A << /S /GoTo /D (section.8.6) >> >> endobj 260 0 obj << /D [258 0 R /FitH 778.724] >> endobj 257 0 obj << /Font << /F33 204 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 265 0 obj << /Length 1442 /Filter /FlateDecode >> stream xڽX[s8~ϯc2Cd[Y0tiXiD}C)YcIۥ}hc9wn=\͞ G0JqJƋ1JȋArˏOdbA\luC)$QI'+ǂ9וQX JBˮ@k3"# Pz|̳}x(.gb/oAB&m7B j} ro/ȏ=6|:( b 6k c47U!{K!$fJɼ۵`D8-ijCSi TEVP3[3N̰fgZqQavk3E1͆ 6l p&7X}7T:'\xe.esjo\",japdM Nd?7[+ W}g7ܭ\׽6OD>J#mA=(Dc`zz-{l~#;3WtuQzҠ:n xV߆XcLn^: Vݿ~NHkQKh~͖aǸ)Й#E)l(c΄~{C$b4], n20,Q=|:샶bC?QoAm}IW.?w (YĚO~ B}bKϻK]F!'$BC(y|RNZpNKrV1"ދ v0-[NJG!m ]ZA> + &Px޽2q z>@y"=Q$!($2uLٚpʡ(dn7p w$'p_:<.X(J.yow[w/U/ endstream endobj 264 0 obj << /Type /Page /Contents 265 0 R /Resources 263 0 R /MediaBox [0 0 595.276 841.89] /Parent 198 0 R /Annots [ 262 0 R 261 0 R ] >> endobj 262 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 261 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [274.435 191.95 280.911 205.666] /A << /S /GoTo /D (Hfootnote.1) >> >> endobj 2 0 obj << /D [264 0 R /FitH 740.862] >> endobj 267 0 obj << /D [264 0 R /FitH 162.501] >> endobj 263 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R /F26 197 0 R >> /ProcSet [ /PDF /Text ] >> endobj 272 0 obj << /Length 1674 /Filter /FlateDecode >> stream xڵYs8~_=S$[i3dzovnm]1 i8 V߮v?mw=z;G0 qH“BxRЛ͇ɔrޮ|eg#JƂ@( *ڔLy Y# M@<,,u|)TL`D_/hQ+Wz`ymN'I=JTElBxg%dvfKxTzI?6*iF/*8 =m=aԟRDW?մo!H7Wq R$zMl*$C:F$ctaଇ{!9bԃ@CܺLQ;a;+8۸79۠Fi\rQS޹9AD>r;Sm!>b6|M#1pa8Zd:5J+jئsB-.(S5WEn#ƾrTB%eˆ`bM3@ݡF8ĤC9&`id2HHN*z+X N3~lńU,p\l+;prBz]E| d&VE?76L leu{W /i76#.o{R@F pGHM4}A'̃p/Wޢ~}JA?L{! RӖRe Ce4avF8ڔSHn8?kh*g8uD>i;OيF]/ ̘b\<8^/0,OUEbn>PWlq"'oc;#je7LTB3SHEDr6@?z vB;D!6R4W6O{v;JޖE ԿR-aFȇW7_RlQ_DZ)0rF--k0`+<:rg:I'oa+DePk;L<[Ul"ܥ&K3:[ٰ=z4sʼ;PaTC@_2u')z~z)t+ S5]\%**=6U5x|K P'YqtkwW)j˸BC'ɐrgilKJl}%w}5kmVB%لvhZt@'mQ>L Pw 璷h9@,Rh5NQtj@?ԷjVԶLW*m7_v,H4/C$.ߺb|t:qisI3Іg!Se66Iu]Fvw+=Er'ȵcUs}zG}AjyRϭ*3z@M'@L8V<\ wsp o ;;7irUV5ޖWuH 4L# endstream endobj 271 0 obj << /Type /Page /Contents 272 0 R /Resources 270 0 R /MediaBox [0 0 595.276 841.89] /Parent 198 0 R /Annots [ 269 0 R ] >> endobj 269 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 273 0 obj << /D [271 0 R /FitH 778.724] >> endobj 6 0 obj << /D [271 0 R /FitH 739.268] >> endobj 10 0 obj << /D [271 0 R /FitH 496.96] >> endobj 274 0 obj << /D [271 0 R /FitH 421.111] >> endobj 276 0 obj << /D [271 0 R /FitH 422.357] >> endobj 279 0 obj << /D [271 0 R /FitH 336.229] >> endobj 280 0 obj << /D [271 0 R /FitH 337.475] >> endobj 14 0 obj << /D [271 0 R /FitH 247.327] >> endobj 270 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R /F26 197 0 R >> /ProcSet [ /PDF /Text ] >> endobj 285 0 obj << /Length 2556 /Filter /FlateDecode >> stream x[n8}Wb)lO'l{F;32m -K]:-J$u1X},aUNx`kcaO7?QlimykylXO+K9y{_+>W@]q) RC9a3q6ț/u}6M|nxI`Z/;o?4 Gn!p NPx̊v7|+ ;w(b7op7Pu @gb?0zTQy%Yx+yasxV6oŊ- 7p!G[e/bϢ |F?><ѣgu˭̚תr%T.<*v?slkk:$L7&R9$QzVJٛdiӯsjc& qYC]>P| >rn|. $$Mz PBn)S7)a (BlDrϳG-kbC6$_ȯ3kiu+NLA_F QޛLE]2 W`Y |)#dY?lkfL^aϠsF.%r.yr=LvGw.eGe=#kEZI.NJ5xİ̈́5եVf- C6֒jV#)Srw(axzv|{QC(:vqQ΂en [y&yG[[([*igJ+ZUaB5puf$t|sҨ4LR>p x'l5DeFjdȮnbʚ1Xh&09~#k¢J+,3vf |;AZ$\p|,`bnL96:CzubH,i&h q9d1)/cqr(^@Yg ET;*zu(^XYœY>:D6U+qc2eh/><۷VQ&|Z bS7,',_)FHⰢD (ઞx1T$'쉸՟Xiq} ,-3h MIZ'd<5IiNS>­t۟[(I 6@Et·V~ K;r6>#u: D":|P1߉t6Bg# wSsϻ)Kk(~u NDHM+NS(Q<a eB 9я4)B|>nJij=W&ݳ&~ ȝ4 $Q)"*xBms$B4$_YǬCN/lǤ|؀5и:`T]I>YFJ^|q̥np6 T_4f[tT@w5B0Y. P ˰u*.9tFt j_%_YK}e8t x SJnPlӭn(Ȯ+9xjk ,yMQU9QNĊ&|kmYOkGz&'5P*>{myMB雸[3UǬ6JN6%# 0baJo{sR5Ek =)%,DĞd-zfSJOW:6g ̉~ mJ`HN75?t#LQX˱voP.=' 'WDMi+@=+uy%jJ;? endstream endobj 284 0 obj << /Type /Page /Contents 285 0 R /Resources 283 0 R /MediaBox [0 0 595.276 841.89] /Parent 296 0 R /Annots [ 282 0 R 281 0 R ] >> endobj 282 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 281 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [104.702 176.827 112.149 188.698] /A << /S /GoTo /D (chapter.4) >> >> endobj 286 0 obj << /D [284 0 R /FitH 778.724] >> endobj 287 0 obj << /D [284 0 R /FitH 638.675] >> endobj 288 0 obj << /D [284 0 R /FitH 639.921] >> endobj 289 0 obj << /D [284 0 R /FitH 626.371] >> endobj 290 0 obj << /D [284 0 R /FitH 612.822] >> endobj 291 0 obj << /D [284 0 R /FitH 599.273] >> endobj 292 0 obj << /D [284 0 R /FitH 323.457] >> endobj 293 0 obj << /D [284 0 R /FitH 324.703] >> endobj 18 0 obj << /D [284 0 R /FitH 247.695] >> endobj 294 0 obj << /D [284 0 R /FitH 171.846] >> endobj 295 0 obj << /D [284 0 R /FitH 173.092] >> endobj 283 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F26 197 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 300 0 obj << /Length 2687 /Filter /FlateDecode >> stream xڵ[ko8_~ $,%u@f 2fEg*6 ud$7.H(Rz><%xR˳]n~F!1E>gIpzyuJȋtxL.gɝP%FW9ݺ:;hvzDߏ 07?ُ{Z{~PK{?j8!E#İ&Ty*4IJis&E;bT4[SL]VHv'w 4=apucI`^3ÌbjFC1'$D886qM0OWkmro5>,ӵkFZwgjv1;}G_ՒІwa6=g[ j,zo@=˫=_aG@QW>'( ^.e9 s^Xp}}/F1\{m,G՘v0bxg@C|SߚhX80ͮ6FzaE!9ȆСv#$I;f\Ľ^NJfۉ<yf }*8Mg+BndJMZZML(p)7; lbmwdbW&:u^owu~iA|XŎ ^:1-60FD7p/dXΓMgb,9iPi$Evag:Or뵌c{oCa|ĈeͲٞ1'$cm2S-iɳo.L }|9=aX[O,c$]:MrUoKبrFط#Ĥ]uNX?F&2Z4hl-s2ߘ J]5M_ mYӭ$ep^lQl?“]Y1ռiL';!KPo*J*ЩVi=ſ(roE~ V3Luo2 7Պ6ih˩g/BVTk&LTCn񐖫yE*~vQ8 *NBl0ϯ+̇@a]]Bv׾%Dw;C),aQi(!cNc;;XQaHd9h xd:R] .(rо`,4zgwusVH.zk_J=8{k9x8 R">rQ.p%@ X%#Y*ˁc%'VG`} C3{$Ku9p3p@p<Ɍ>gI!#d[աU[1a]I}xLEtz=a>|`=4c׃=zrx='ְc=@8XgKCyYָcUi d)5ZF c*_~`]U#ijO7Wg|3LcnJR]=P<*QBsGl8plXIc"+rma>mJR]K=P<-~W$]VZdIV[R/~wc#v}7cmd.Z(Փc}spcQ_V@ X]#Yˁc]'֒cPۣioʉ*:ͧf_$Ly[ckd.Zo(Oe!J߁M{Y6ceid).eZJ(ec[cufd.uZ(Btwۀ,ɚ;gz5a$)Hv@ c=ytp/tX+|~E*,0FϿZc=rxq'c=ޒ! qTɀE R]=P<1܈>͒R (:ī- XZY*Cc:'xzCҀ#f~heQm+% endstream endobj 299 0 obj << /Type /Page /Contents 300 0 R /Resources 298 0 R /MediaBox [0 0 595.276 841.89] /Parent 296 0 R /Annots [ 297 0 R ] >> endobj 297 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 301 0 obj << /D [299 0 R /FitH 778.724] >> endobj 302 0 obj << /D [299 0 R /FitH 665.773] >> endobj 303 0 obj << /D [299 0 R /FitH 667.019] >> endobj 304 0 obj << /D [299 0 R /FitH 653.47] >> endobj 305 0 obj << /D [299 0 R /FitH 593.643] >> endobj 306 0 obj << /D [299 0 R /FitH 573.32] >> endobj 22 0 obj << /D [299 0 R /FitH 474.843] >> endobj 307 0 obj << /D [299 0 R /FitH 398.994] >> endobj 308 0 obj << /D [299 0 R /FitH 400.24] >> endobj 309 0 obj << /D [299 0 R /FitH 386.691] >> endobj 310 0 obj << /D [299 0 R /FitH 373.142] >> endobj 311 0 obj << /D [299 0 R /FitH 359.592] >> endobj 312 0 obj << /D [299 0 R /FitH 346.043] >> endobj 313 0 obj << /D [299 0 R /FitH 332.494] >> endobj 314 0 obj << /D [299 0 R /FitH 318.945] >> endobj 315 0 obj << /D [299 0 R /FitH 305.396] >> endobj 317 0 obj << /D [299 0 R /FitH 291.846] >> endobj 318 0 obj << /D [299 0 R /FitH 278.297] >> endobj 319 0 obj << /D [299 0 R /FitH 264.748] >> endobj 320 0 obj << /D [299 0 R /FitH 251.199] >> endobj 321 0 obj << /D [299 0 R /FitH 237.65] >> endobj 322 0 obj << /D [299 0 R /FitH 224.101] >> endobj 323 0 obj << /D [299 0 R /FitH 210.551] >> endobj 324 0 obj << /D [299 0 R /FitH 197.002] >> endobj 325 0 obj << /D [299 0 R /FitH 183.453] >> endobj 326 0 obj << /D [299 0 R /FitH 169.904] >> endobj 298 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F61 278 0 R /F41 266 0 R /F60 277 0 R /F63 316 0 R >> /ProcSet [ /PDF /Text ] >> endobj 330 0 obj << /Length 1770 /Filter /FlateDecode >> stream xڵ[o6+fgvfN6[E7E&Jjԑ3YZ D;+O(R~IzēDD8:Fkͯ#Q,ed(*z?>>9z7Roi>!xtqʨ qL&OzlEj2%Lb|V%7M#a˿sxdU5G JuaH+]ގѕI{eۈ /ʻG7rFQGS}TƑQ΋h#:O+%{P0! 4FD Q# ՃoL/߳335VcX`r~eƞh EanCvWr070X쯵*GT`ɥ!lCtWr07,X쯵ct@(CERb$LJotpzf'UfWi޴7tmC> endobj 327 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 331 0 obj << /D [329 0 R /FitH 778.724] >> endobj 332 0 obj << /D [329 0 R /FitH 741.858] >> endobj 333 0 obj << /D [329 0 R /FitH 728.309] >> endobj 334 0 obj << /D [329 0 R /FitH 714.76] >> endobj 335 0 obj << /D [329 0 R /FitH 701.211] >> endobj 336 0 obj << /D [329 0 R /FitH 687.662] >> endobj 337 0 obj << /D [329 0 R /FitH 674.112] >> endobj 338 0 obj << /D [329 0 R /FitH 660.563] >> endobj 339 0 obj << /D [329 0 R /FitH 647.014] >> endobj 340 0 obj << /D [329 0 R /FitH 633.465] >> endobj 341 0 obj << /D [329 0 R /FitH 619.916] >> endobj 342 0 obj << /D [329 0 R /FitH 606.366] >> endobj 343 0 obj << /D [329 0 R /FitH 592.817] >> endobj 344 0 obj << /D [329 0 R /FitH 579.268] >> endobj 345 0 obj << /D [329 0 R /FitH 565.719] >> endobj 346 0 obj << /D [329 0 R /FitH 552.17] >> endobj 347 0 obj << /D [329 0 R /FitH 538.621] >> endobj 348 0 obj << /D [329 0 R /FitH 525.071] >> endobj 349 0 obj << /D [329 0 R /FitH 511.522] >> endobj 350 0 obj << /D [329 0 R /FitH 497.973] >> endobj 351 0 obj << /D [329 0 R /FitH 484.424] >> endobj 352 0 obj << /D [329 0 R /FitH 470.875] >> endobj 353 0 obj << /D [329 0 R /FitH 457.325] >> endobj 328 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F61 278 0 R /F63 316 0 R /F60 277 0 R /F4 275 0 R /F41 266 0 R >> /ProcSet [ /PDF /Text ] >> endobj 358 0 obj << /Length 1669 /Filter /FlateDecode >> stream xڵXn8}WbDJڷp)68mm+K.MݯߡD9m%SÙ3ggՅ-Qb6Ϙ1N`"lnS"nh)PycYgee$m}h.xT mK0)ȵrl 4 iRdinYh#RdG5".r\fk]|_Wc<:<ƛL4HC3iS)LBEU ͺN曒ƛ`T2pqCߔIH"yɵt6v2$D(?al|L.{51C"8LJ?3 y!Pc +nS*<5iu}-RzFC#}oJ7Dix:}2C)BΡxL:< Kx9A &$YU>eެ:AHz+b$> >tr9 ڭO,' ıʄ4吝?:&- ;%\+@ q:^ Z{+'ԣ= `M_Z<\jp}D͂g qP٨ XEB10=(`j@W"?VEL6) Ƙʨt:ǧ3U) nLӌmoE@~Y6rKvjh4 UGsۛ# ,S ,i4twkߓAsz`6"ī^?FM5ۖ{hs|4ՐyR@XF"rU~f.S R]óFoCj(=:!?hjT%W%Mx\TM)8.+VUF&`Q #`2sl=](f=VewWfւ VVaqvSi(WOØDZ`-6#J7Zv8iT< }Q՜OjC$cW&\-yW!>=Le.tLKș_Va‘ƃ%LaG s!;N@cЌxtzk߻V'a,?dB~0=pC]-~Tܹ[v5K5,ۍHx3`n8ɽs /no\/~+)#jx:趯w}.; jE˥mU$T_f> endobj 355 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 354 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [346.586 347.985 362.215 359.736] /A << /S /GoTo /D (table.3.1) >> >> endobj 359 0 obj << /D [357 0 R /FitH 778.724] >> endobj 26 0 obj << /D [357 0 R /FitH 739.268] >> endobj 30 0 obj << /D [357 0 R /FitH 496.96] >> endobj 360 0 obj << /D [357 0 R /FitH 394.16] >> endobj 361 0 obj << /D [357 0 R /FitH 395.259] >> endobj 356 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 366 0 obj << /Length 2126 /Filter /FlateDecode >> stream xڵ_s6)gj?H.N.7I:Nӹ!4黒 LεXv%SO>LO~<@~yO'4M߼˳02c|egh[NAn`xsa'"YeF@|`Cݨ{47ď`trr~Mԫz4u`?Po>C 4 {/0@ٛnO~!Exۆ|:ШjB~Vc^uԳSE̍ZD4EI˷)~ ՔF~oU!dn&d{Q . $-A Pj+EwXe2SU,)W"suTW;bhjSȹ 5UoIS`OL]3%>B-a?>򕩲qVע˺fڟ˅rj=D<-4h*:h|ID( 5y?]ۧ.H"]7 iJ-uכT[-cRTYB926٠fI>P0/ Ƽ.V(?.2 3'(\D(OFw`tbƆ10:Qt #eF-Jb"(S)gU Q?C`9n8pHZ9py7zCX taBŰDjP"DZaDف1H#9ڣV(?.>3)H`70DZa^|G [,uchtXWj"clAb"SIcS9E` /xp[} q"zh!aׇj|wv6taaݖ. ](֕ZdhTO&qLEf4 3 %!wᵂ(IkNGx? NoFY_v'4߮,YAļda! ʔsedOխ&d%k]R U=ު:惾O'*^܍*Xs{ɛyȴt7>,1uCק>eۋ/9.L6m.T[Riz/aTS%-Zj .pp;u`'6XnFt`'J-uv+H""^SYRPef{H8Cxe"T}}NU9uЪaFO+Z=.SXr7xbz2]g6뇫d?NLl!uBZy{YDdC%ԇJLdY!9^˾Z 03M!p9 O ⺓0l kӅ [JL3ю1n`\eྵ0hn^ #a[[,} a89}8Gī^uPVu\&hkncK<28M&Up/̋gqqO&k*Dܛ>'*#n3WNnm A֦!mdQMŞfG͌-~\:bb[n%[t$[Nn!k(]DRu!VN# Mԝ>QRfV(w{_ufQ`9]HeYպx-Z7+fϫUেjC!P:STŹl9Ũq<5h`ƒYkWO6v Fۺ@:,5f;DH=y#TCR d'+y\Γ,DY Wg0sŋ^=~OIV6N/g^ endstream endobj 365 0 obj << /Type /Page /Contents 366 0 R /Resources 364 0 R /MediaBox [0 0 595.276 841.89] /Parent 296 0 R /Annots [ 363 0 R ] >> endobj 363 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 367 0 obj << /D [365 0 R /FitH 778.724] >> endobj 362 0 obj << /D [365 0 R /FitH 216.078] >> endobj 364 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 371 0 obj << /Length 2442 /Filter /FlateDecode >> stream xڵZr8}WQڵ\x-3c{rbld*EK EjHjox$Xpptyqss5(!q3'Q:pD=M) ~{gF\^Rl槚fkdxFjw@9,Gdljצ2D3I,f5xi }o= NЌC2{r;4Ó-O%#.{lkv?0@B^S/DHr0o U&hWze`aC^n'CmzR;ڹe*fURv|hegߍpJ$htŠ[saQY@0u_Ej!h!ͩG Ry>\Ӡ"^`K2{ds%r"Q^ oy#o-G sH#I)CeW W-',^E/"FIȨ/̣Ő)XcuܤgaV饍o) Mq'?fDʴ ۛe5=0[] 8ȅ ] DM9pfm*Iدe|ߩJt>CZȺ$4ծm%O6G_kBMj34ÛD]O`i?N00Gp 9(z'p[3}[W k,'~đu,7a}_g31 *  m@f1M*i]ֱUɁ#pIAx%MaBWV3 ˑQV)ImI呮L4ԈP}tےGD}DX;t%S(VShæ5cD $iޞmTn+1͡$De]KA츖18XNzf0M:. Li 'ѳD]U:UT$.hA4zli xB'dx%oefVެ+Ե I&}csSVh՛}5}k<6]m]( ۱H=v%Ɇ@E.e(r jzVL6[, s**0UI |_c D=Ezf 5vK{ri56nkf/8XcQb̯E5N}Dk<-6k8ԩe^HFg q`UO$|5!7F5U_"7 FĖՀa:]KfŖ|p{3~OiɍMUQ 3*A>E k~ q<zx2>ch=f=PC#tN!ZXڏ= N!p[5 ek(!Hwi$2vr\%B䤁M$Z::g=ric[1G4٭xU.G-3ꭗ1 lDbϤ환JtDu'tf$)&yYdSQaa&#.iT* u#ʲnxWWry~llī9Զidϱ7Z5)LDQDylZ72sJuymyҡ+*1 DSa\s10I횋yҞ6}\^44 Mac$6,vgUʌp> endobj 368 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 372 0 obj << /D [370 0 R /FitH 778.724] >> endobj 373 0 obj << /D [370 0 R /FitH 503.252] >> endobj 374 0 obj << /D [370 0 R /FitH 504.498] >> endobj 375 0 obj << /D [370 0 R /FitH 377.86] >> endobj 376 0 obj << /D [370 0 R /FitH 379.106] >> endobj 377 0 obj << /D [370 0 R /FitH 306.666] >> endobj 378 0 obj << /D [370 0 R /FitH 307.912] >> endobj 34 0 obj << /D [370 0 R /FitH 233.259] >> endobj 369 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F41 266 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 383 0 obj << /Length 2450 /Filter /FlateDecode >> stream xڽ\Ms6WhoĦxrf3C-+Tgk6H_"LCwm=߻WR>( D/w+y|m^yJ6/ `I)]w<9d"m\C~po|$<:ѿo~Վ"po*Cﵼs1Ng S?X7 ͷ- $!T-L`1{{փIy6,_eI$jvto)A>@S% D2$VY=ϗI^ f.H[NYd(yp'0赆*%)FQHjM&YQ4pHEۦϯq%6׏1s~Qxw+@86^ 2{΍@1Hө͂6FALw[1 rE8~՞+nOXuÂ7bvKs`}[Q4\.tïMY$/M9Q)r9Сw͠c\v%~H[,[I0AVj+rwH7I=kSi8>:౺ϧ|E@i Ao c$ݵ ־fӯ?Q>E_G#"aBcԽ$HbPXW]T I6(9$#k*V\ձ[ ׺0.E6ޠ%~-+?4cHvLPG0vLA JBŽ [ > , 5m`:rA=tl%4?$w22*"%-ӫJ`I`(cX&̭HSg\-ΠUӈ ZQ=n|w8At3Ķ>lyH Q_WwM=lGq6wQ-Led(n{rKq@5ԴsB"rPӁU=:0  (+Is$CM9p,J7Rr@=Z!dL.x2͑ 2ܨX9 Bqurˊ˳Ja@ο+hs$CA9p,h7"t@=A3 Z P:sid>FM(ǺCS*"c Sv .\L_kvݰ髟P3>YuTqQWxNd!/ҷN Bd%M֑DNfbtO[.+UoJ-wy]9 otOa9g.NQ&%4iqA/NDŤۅn> endobj 380 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 379 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [334.205 685.101 349.834 696.851] /A << /S /GoTo /D (table.3.2) >> >> endobj 384 0 obj << /D [382 0 R /FitH 778.724] >> endobj 385 0 obj << /D [382 0 R /FitH 739.268] >> endobj 386 0 obj << /D [382 0 R /FitH 732.374] >> endobj 387 0 obj << /D [382 0 R /FitH 632.697] >> endobj 388 0 obj << /D [382 0 R /FitH 633.943] >> endobj 389 0 obj << /D [382 0 R /FitH 581.688] >> endobj 390 0 obj << /D [382 0 R /FitH 582.934] >> endobj 391 0 obj << /D [382 0 R /FitH 517.13] >> endobj 392 0 obj << /D [382 0 R /FitH 518.376] >> endobj 393 0 obj << /D [382 0 R /FitH 504.827] >> endobj 394 0 obj << /D [382 0 R /FitH 491.278] >> endobj 395 0 obj << /D [382 0 R /FitH 477.729] >> endobj 396 0 obj << /D [382 0 R /FitH 464.18] >> endobj 397 0 obj << /D [382 0 R /FitH 450.631] >> endobj 398 0 obj << /D [382 0 R /FitH 437.081] >> endobj 399 0 obj << /D [382 0 R /FitH 423.532] >> endobj 400 0 obj << /D [382 0 R /FitH 409.983] >> endobj 401 0 obj << /D [382 0 R /FitH 396.434] >> endobj 402 0 obj << /D [382 0 R /FitH 382.885] >> endobj 403 0 obj << /D [382 0 R /FitH 369.335] >> endobj 404 0 obj << /D [382 0 R /FitH 355.786] >> endobj 405 0 obj << /D [382 0 R /FitH 342.237] >> endobj 406 0 obj << /D [382 0 R /FitH 229.158] >> endobj 407 0 obj << /D [382 0 R /FitH 230.257] >> endobj 381 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 413 0 obj << /Length 2104 /Filter /FlateDecode >> stream xś[s+xu}ca*!3[{)'a kfg~iY#ıeYVZ2Nt>~P$; Pٙ-;uz;ݻ}۫j}ZY 1B#iPOnWHg1łw'YIU| ' q;:.0$W/Hz؜Y³/Pt3%s{ߢGm"õmxQ#o ZWVʬ J]$ETxzG&Tv%1&v/"^yD@8=BY<5l4^ (>M{ fA_Wr#gSz p}tz=u׷>aٸc0bVX2$̾ϋ_Ԇв$dHDw!Q!(d(PΜËh8P@46Z8q*18C]D%OIE\L20M!'aX?q*Q8UɄ@J1JԿ@VaY@]I%!+qPTz&! $_=gb7P{4JV Zp;y"潻yGcE\sJm YHiK m  H,QnEI:HhJ~.o܊`.pe'v"K00Sꪵ@R-PJdAKJ` 5L%'-v jsT;B0+aRhrРճ4SY/ as-+DWtlTtieE!V){b9+a b#lF!r*i؈w_ Tĉ]N%2K3T0w?`O4†(Fd"ÿ*W :pŬtPpu V8.~ռ[\.M<64 qA ߆qh k5Y ea W%,uMt>+qZ맙_pPA:G\L6:j>hN-h*'\C;3l  0m5"X.8d6u:գW6-dEԯBmUJ`6aZ%߯eb4Jk'v>0U`|'>7/bE\CJ7Qc٣_$`7G( Ub%6}{v6}epT چ,hSUݸW`48LNO<\Ɏ9.,ӿ0r~1f5-HW/g, @]SHPZ.eyV!Z _zo  ^^GzJq a4jPXj2v ~3Iқaaɛ|x0HR6E wV}}nWj% $h/?`WGqg*p$E#Q_!q*qLWq8؄(ʟc0/tPD`S[W'J endstream endobj 412 0 obj << /Type /Page /Contents 413 0 R /Resources 411 0 R /MediaBox [0 0 595.276 841.89] /Parent 408 0 R /Annots [ 410 0 R ] >> endobj 410 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 414 0 obj << /D [412 0 R /FitH 778.724] >> endobj 409 0 obj << /D [412 0 R /FitH 220.86] >> endobj 411 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 419 0 obj << /Length 2676 /Filter /FlateDecode >> stream xڵZK6ϯQ!ILfr֎=qQ52AJ^ F@J0B> &iz{vNWRE$w!?)EFWUvA+h+eL4oo !X&ޡ{!  Ղ3V\k!?H0`mxsـZ>~/픅uM|źtvFf6 ˔?vf竹gF Kk4)fn@Y߫we}1~CzP;WQb+dzǦ*Zi$ʲN;z_S:*DS߄Ֆԛ _qZ}Yl/rG"rVVoPp8R YWwBr[Zȇ>Q1 ђjg<9D뾖k9*o8B;6VkgLAԻ&*{MI26bG1NOi簱0jP;[vMV 8q3\7odкB+52Doue&0J6z@ l>0ZtERHm$ATQb*t%`%ˍs ai߸jd܉ژxY>6;@+a)Rq^.VPH[ɧ7O^ԢjcJWMM-BNoGNer=кQ,k;Jr+/يb2t(x[1bB}YpNjq SY'(I lsPžK8r*K\FK]Qf#wN$!D;0"TPfo~h"LCIt =0C%ͮ ǭS0N hw4)vY:F~Q J15Lt.HK`<|JWl&$='60[4+P?D!00NYLxYgFSԋFh׼U5M' 8MKKx cΓݢG&"$_$8xD"ڔND^OODάtfͧ[M!rX썅)mGh]gnW~U+k dw NtIbxl;F & \|!_r/m$Hxf1eCsEg餆fz&sHϨ3ZBc[LfH?)5bF6Eo"waQeEuVŲɴIǹlo_J)l/pJƊBE&_ b)w'7Ėv1b4[h7)MNx9 )$1_>A!3%_~HاςKYIBZ @ #$='6x^69LxY R1M,;͐Ǚ[S jeOK!ы%M% 4iə tf ֩6]p8PS;RWt'D4fw 6y0iez0|4gZˀ~4:GԶ>Ca3Kעï+R MTџ/}Př94KWaHCH> -i;wmv 3)bp0sc:>.?gw>Lc핏'WV\ ~ꤗ.gW;r,w}k.EŎ0mk 3o㽎vi/w+C:78y;fب`VD}7*ͣ^kl*ݞ>Yfg?yDMb>$|3j3=otUҖJ4}YYc<UwQ0rK؟t}F9Qi՜2l3 d jm=]U)ˍ6JGaO]9SѺbg 9pΘGJs؛p ytd ڔaU;p~:FCL/qoAJOfۦJ_^wo߼rn>I~2؊.+p endstream endobj 418 0 obj << /Type /Page /Contents 419 0 R /Resources 417 0 R /MediaBox [0 0 595.276 841.89] /Parent 408 0 R /Annots [ 416 0 R 415 0 R ] >> endobj 416 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 415 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [139.24 513.61 145.716 527.327] /A << /S /GoTo /D (Hfootnote.2) >> >> endobj 420 0 obj << /D [418 0 R /FitH 778.724] >> endobj 38 0 obj << /D [418 0 R /FitH 739.268] >> endobj 421 0 obj << /D [418 0 R /FitH 573.187] >> endobj 422 0 obj << /D [418 0 R /FitH 574.433] >> endobj 423 0 obj << /D [418 0 R /FitH 420.559] >> endobj 424 0 obj << /D [418 0 R /FitH 421.805] >> endobj 42 0 obj << /D [418 0 R /FitH 243.178] >> endobj 425 0 obj << /D [418 0 R /FitH 166.441] >> endobj 417 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 429 0 obj << /Length 2194 /Filter /FlateDecode >> stream xڵ[[s۸~FfL;>d K͉$')H6)|xG7o~`8"lHtFZHI(3:4ïx= S? C *}s"fp@/#Z~v HFlfsyvЫ3 %g^'w u[uYjpncjwh``#úߖ}|ONdO^IJ|>أ-/>v9ɟ-aMnnmYn*/9$EG:)`@ywVS72.mKwnNU蒱HP[2gj)q9 GSN3?RЬy"Hk-$T: "`F.+Vj+1: #t-[ Ȭ˿a^w: <),*T!cZyo[;CDҀ Ve8vԏ-C0 r!M``ñ2fʮ NB Dyj IE"i;7,|!1&Hq.eb !4/쎄Ɖv7yv2*ԥVMQ<20I-j&049H-(#ƶZFǶv!Cc{YprAiEb[ҳgc8-'l_QY>"+UZbSثpZC9[/61^Wh1nX9CxwVmt``4yS8O˴)ٮQ 3I@^Wt`}ۭv h,mmS]mtL!<= k$A\HR2 E(Q}_L/BV~qTqFX h$q k uF "d8֪uF IixV Da5.tU:фlO]ۍ6>xt)"ɬ4j 2Wc'6L. ñ: Y$4(>gkNxS./Ԕ{W ox NA%S2$GNuH=ݡi%x8wz{Ý]cs؝<@Avvہ C<# Cx`XA.W}_ MLe{}zD}"K0p > }\dz+3CP8D\J (5IfD79HB֯ѨUkWN5NunRtkb+;m*]KvE]pVM 3{hGkp!k6Kpr5/lsn+ڕ~ڼy+#߬%4Ӽ_ 0]bv endstream endobj 428 0 obj << /Type /Page /Contents 429 0 R /Resources 427 0 R /MediaBox [0 0 595.276 841.89] /Parent 408 0 R /Annots [ 426 0 R ] >> endobj 426 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 430 0 obj << /D [428 0 R /FitH 778.724] >> endobj 431 0 obj << /D [428 0 R /FitH 706.421] >> endobj 432 0 obj << /D [428 0 R /FitH 707.667] >> endobj 433 0 obj << /D [428 0 R /FitH 610.242] >> endobj 434 0 obj << /D [428 0 R /FitH 609.236] >> endobj 435 0 obj << /D [428 0 R /FitH 595.686] >> endobj 436 0 obj << /D [428 0 R /FitH 582.137] >> endobj 437 0 obj << /D [428 0 R /FitH 568.588] >> endobj 438 0 obj << /D [428 0 R /FitH 555.039] >> endobj 439 0 obj << /D [428 0 R /FitH 541.49] >> endobj 440 0 obj << /D [428 0 R /FitH 489.235] >> endobj 441 0 obj << /D [428 0 R /FitH 490.481] >> endobj 442 0 obj << /D [428 0 R /FitH 476.932] >> endobj 443 0 obj << /D [428 0 R /FitH 463.383] >> endobj 446 0 obj << /D [428 0 R /FitH 377.255] >> endobj 447 0 obj << /D [428 0 R /FitH 378.501] >> endobj 427 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R /F63 316 0 R /F38 444 0 R /F15 445 0 R /F26 197 0 R >> /ProcSet [ /PDF /Text ] >> endobj 451 0 obj << /Length 1420 /Filter /FlateDecode >> stream xڝWr6W8S%ApvdŎ,)8:.LhO Ks\~u[{ [w՛[ƖﺖȦ˫sZT׵lHlo?:B9.C:oo? ֢ӲP7lm %>[g|/BH+\ #Uri!]lW,!!Ya[<h[rȆg\Y6l'L>\w"r<9s}cqho/\]jK:Ucej ^MI-귭5O2BeW*:STJKݤᓺhΌEKieJ+#0Yda4Q&qu\[""⹋nl8-{^JkMt06~Ԟ1|W\CZV@WL_J&Mn6 QNFpE؈h ڽڈw..sBʵh ) ׋HCЫ-OO#h 2C)Thr٧^Jg#EQ@)6#?k$jɸre 3|L0, &EZ/D7Aك+D躬A)oQ7{6ź.A,BQbh~ ўNXB1J@mMXƍХ''-R=4bi.jb$p0V @$U7 $AW} Zv<9 ;5j#;.HY@AP=~RH%E;E4BU%q:i\&I7F:'o&䆛!6s*F^[w's\Z*OnS78m\o`Ŗ.ctqΈ(^*e4Zi&UQEZ, { Mgy*s'"#poi&vPdЩ("RRF-?PԻ0/ endstream endobj 450 0 obj << /Type /Page /Contents 451 0 R /Resources 449 0 R /MediaBox [0 0 595.276 841.89] /Parent 408 0 R /Annots [ 448 0 R ] >> endobj 448 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 452 0 obj << /D [450 0 R /FitH 778.724] >> endobj 46 0 obj << /D [450 0 R /FitH 739.268] >> endobj 50 0 obj << /D [450 0 R /FitH 499.213] >> endobj 54 0 obj << /D [450 0 R /FitH 240.542] >> endobj 449 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R /F26 197 0 R >> /ProcSet [ /PDF /Text ] >> endobj 456 0 obj << /Length 2578 /Filter /FlateDecode >> stream xڵZ[o6~ϯУ$,)>i={EQbѶYJu7~E"%'<%j8q8P[{ػ⻟(F N"00F>McqO]^ /E#vy/|б()L N%a ^7yU>. %1[|5H|Qaz{i")n. p V PD[n/{<$$vȭ0X .qxm#@ȋQIdi34tmM|ŋ4K_L!%o\O.W6mUUˋ ŕ5yV?c|Rr:! keѵx°ܤul}1TrI[yn*3y7/;5rzZ? ` }m+^RԶڦ/gZmqVBxr K;KǬv'"mFeɋɪՃT ʬm0y=V nFIjll6퍡-ˬ_p{0VSTj/85o)ˮnifNۊ *Vo6V%~sAx%xYxj&~ۆpg]n!_YQ` z7P6fUR:l@[nERW2;U6 QJbFe PzTv( DgW'!cⱈ E. F t'WO,"QY$o>^ ke#VL+s9^ `;rdR$dXCa@\`N>i-lz"3HzO%8 (3s$agxYgs>m ]3,!""2oaP?H!96/$,HcvH#cB? vYE< (gS)9oٸklIr=w&JA)ȏ->;'#Cv@i&ư DΤGVffvl$ItVfdeFf*30(qS_tbdž LD ٧g ʧӃ= o>u #d{3J()u) Wp%Y'U9nHr@ Vͩn  9o"Dcئ]X*2: 9A9u#5k0DUq㏳~퇍fji?X uwwU+9M ]uP=zqe*)n|Y\Lz]dk>7|]]r~P R'oۭ6r_ndiַ@\ Nwd%c0,`Uys_= sv߱s[Idž+y,7}*2pCڢK[T՝g9HBb<5"4uupYM޴N?*ᵹJ+otZ#y@-ҭ=ɨs{';XN9Kv,W*OZBŹS}xg34sSV4VjET^樇>{m}%loힼ}%1bGGX ڰ[ a̿ze4;:~8 ;`SvPUy"|!-಄0~.SJh]YmԻ{h ISo~94A!] M/l76ؒ(ة_ JP%Z 0͖c,U;=+(${V#'N18o}s@|_0Fa\7fN"?lG!'L^> !F!/hFcBqzzHkd1ƙu5F endstream endobj 455 0 obj << /Type /Page /Contents 456 0 R /Resources 454 0 R /MediaBox [0 0 595.276 841.89] /Parent 408 0 R /Annots [ 453 0 R ] >> endobj 453 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 457 0 obj << /D [455 0 R /FitH 778.724] >> endobj 58 0 obj << /D [455 0 R /FitH 628.698] >> endobj 458 0 obj << /D [455 0 R /FitH 574.31] >> endobj 459 0 obj << /D [455 0 R /FitH 575.556] >> endobj 460 0 obj << /D [455 0 R /FitH 421.683] >> endobj 461 0 obj << /D [455 0 R /FitH 422.929] >> endobj 462 0 obj << /D [455 0 R /FitH 181.132] >> endobj 463 0 obj << /D [455 0 R /FitH 182.231] >> endobj 454 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F26 197 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 467 0 obj << /Length 2073 /Filter /FlateDecode >> stream xYr6+BtdOFt:mCĖ"U>{AE),Ht{瀦6LիiPf@L⻮>Xowo,fNJ^L9)wu`[E׆I7|R6EY"tFm'.\e+I_~~w']]\sEꜱI1#^i=XxlFn ل9b1Y351,ئDj&<$@̰"bϪFQt8(]dDr]2nzTd:!vjڻr/orQ DְX1!.c@DMIrM*JVVN 3<1Iď`Fǜ\Kx˒G9>3&(&6fd\Fyf~KGE0)U0{٦Sƶ:]=yA˟ޠő\/XǤڌeej'ez'm>˘YP`P&z8<~x0;*&%R ^& 1OyXJM- RG4B/+3gwq-fʋM8qJSQT>fi5*-Uw'i)Y4rģXaهs?ֈkq,./*PtEI%|]\Xy9y p+8vu5V`ᆷ! ,SV V06^&jd-#4+uIkLe4CX1n="J^>H|3ХW"uU6Bc" *\X{pċA;ƺ2 ۃ,rXG"~CQE:~%O f{$p}A~sǥQF3ƪvZU̡eΐW *jc4m\-d2^#fB&ePA꜌G,9ġB m465Ç|5q" X:1't 0C1 f@i.tDŽ}ɓm Y(ȿE5[>* m̓h.f΋tAv0i]L`V WGrfQXμΔ^ ⅜T=u$Bcn}hx 9&@|.rcc0XQɳ_ZU{<`:K>';pKXթꭣ"8]yçvyY& \EGXq-#y AjGO$'<(X5B}s>\l;O6TgG)Xlq{LlJ1?>.+gM6gc1Fj[^3vfJ)WP%8;%907({1҇YT]ʾg K'愎e joUtD[m .ջ~46 PHӖwن&H1Y" @b ?F&{!; ߣ_]NܬGOuq$x(Ul+x*|kw(j M%bee+2V;0` `)Grfd ηb޼辉Yb̌_ķ$:VD]Ld*THrUTуHJ/[ܼ ÈOKQSN\Fk:3i endstream endobj 466 0 obj << /Type /Page /Contents 467 0 R /Resources 465 0 R /MediaBox [0 0 595.276 841.89] /Parent 473 0 R /Annots [ 464 0 R ] >> endobj 464 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 468 0 obj << /D [466 0 R /FitH 778.724] >> endobj 62 0 obj << /D [466 0 R /FitH 622.038] >> endobj 469 0 obj << /D [466 0 R /FitH 540.934] >> endobj 470 0 obj << /D [466 0 R /FitH 542.033] >> endobj 66 0 obj << /D [466 0 R /FitH 351.433] >> endobj 471 0 obj << /D [466 0 R /FitH 283.73] >> endobj 472 0 obj << /D [466 0 R /FitH 284.976] >> endobj 70 0 obj << /D [466 0 R /FitH 211.798] >> endobj 465 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 477 0 obj << /Length 2106 /Filter /FlateDecode >> stream x͚s6WѺPx96W+鴝 %A64#PRlI=$H`X=xwwfq[{Gbo$zoI_*T>uaUZX)-1NAI-̄/3\ Hb\Ϣe`|#ȯן@6 8k+ `Bx5<{h(zxWi1o=E'qQlc>*M|C=Y留,TVv&ϞlN﬇V*/~)ⲊJyXZU2Q]]\H`!jhjGv(X>TOf؟:++JKoTVz:~2c;hkζfE,Zy"I:(ho DsAlFBxw0bM'B^?TOC _~_n#9?"y^r<:n}1 0 e۴G 8߽#uGy! 9Sj)T?zG#?8Kőd<򲿛:|(hS:: 2 H`Z39E6V(Z#@o "ъT։Tx(e'nI eX=OSּo>L6JɰQR]ҢlΞhM*_hbi܌z؊CH!9 p.R% ` *Er*^z|*z"dz&o >Ot\L|0-_p3~-GxM`r9(p_´&[XYȻ-I|:;)NvN# 'Xyڮe4XwOxѧyie>~~|Z,?[ HzؚgC/% ,U3} v}31 endstream endobj 476 0 obj << /Type /Page /Contents 477 0 R /Resources 475 0 R /MediaBox [0 0 595.276 841.89] /Parent 473 0 R /Annots [ 474 0 R ] >> endobj 474 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 478 0 obj << /D [476 0 R /FitH 778.724] >> endobj 479 0 obj << /D [476 0 R /FitH 692.871] >> endobj 480 0 obj << /D [476 0 R /FitH 694.117] >> endobj 74 0 obj << /D [476 0 R /FitH 603.56] >> endobj 78 0 obj << /D [476 0 R /FitH 531.284] >> endobj 481 0 obj << /D [476 0 R /FitH 476.896] >> endobj 482 0 obj << /D [476 0 R /FitH 478.142] >> endobj 483 0 obj << /D [476 0 R /FitH 392.162] >> endobj 484 0 obj << /D [476 0 R /FitH 393.261] >> endobj 82 0 obj << /D [476 0 R /FitH 270.058] >> endobj 485 0 obj << /D [476 0 R /FitH 215.67] >> endobj 486 0 obj << /D [476 0 R /FitH 216.916] >> endobj 475 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F61 278 0 R /F60 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 490 0 obj << /Length 2140 /Filter /FlateDecode >> stream xڵZYs6~5c @[utLaSTyD.ʖD?x$Q^ZZȺx=7,! kh<$o_&SL]Mlm'ĶPxVl1q%+$lC^~EK&p_ d{QW՝7 btz~ob>닿!+ށֶY\JlrSkv'"DLMP'B<|>qˏ>.兌o]"jE L Ud몂xA|P6ISaB:|篈*YDu$^<NJ\'3KkQV+y(Xɳ8ɖJDsi}[&] z6Xwq5o+ZVl?_ͮ#s׹C# եT}CM^CB?|cRV!|r⣴̟E6}cwOPXUgU\BXV&;p|*?ah!V{ɔ$HdzHP2ދd2sf^ $G~/²^ w6}_23ˊe8n^8e[T>@NJO$NBTb06qCI{@va4 :CȨVQ}ҋ}V?v# bJ75dq$rU/mhz${#C^sc<9xAU^-F#qp* .Vwh"etbX]| 󓒍y1Nպ!٢dS{{zp$L7XDY?::EzGFl:BUGp(N~aP( ΀ssl hq@Y{Xصk' G] =ֵ]"7^=_#R}(ޞVXC,|!:Ԡ<8iz|EJQ?#H:#8/ @@3ectY 2=S7NHBG"U%4ÛCN6YR'~Ô|hqzU-n#J=VXu ִTjT.! R [trEN&|%ݯ']'|hGm3D/=Y0' l}b= `Ri؆s~z_: $/d"B;~vQUk-K0\]5Y/'*_ N; LMEV l`Th$٢dOb&J>s**b1-4+մ[Ӻ2z,jٳҸ(X'qp2MρLRoix9Naj zA}cO\S(O/B0m쏚H>}r'j=raC \g$~ ƥ]/`E鲆vV!ԙj/FMuQƞ ʨD9fG3Q%4xDPD/ $Kw踞=QOTrbeS}mRo&³\hF|1AvK#OG\ȧmD pJ endstream endobj 489 0 obj << /Type /Page /Contents 490 0 R /Resources 488 0 R /MediaBox [0 0 595.276 841.89] /Parent 473 0 R /Annots [ 487 0 R ] >> endobj 487 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 491 0 obj << /D [489 0 R /FitH 778.724] >> endobj 492 0 obj << /D [489 0 R /FitH 523.654] >> endobj 493 0 obj << /D [489 0 R /FitH 524.752] >> endobj 86 0 obj << /D [489 0 R /FitH 421.873] >> endobj 494 0 obj << /D [489 0 R /FitH 340.388] >> endobj 495 0 obj << /D [489 0 R /FitH 341.633] >> endobj 496 0 obj << /D [489 0 R /FitH 228.555] >> endobj 497 0 obj << /D [489 0 R /FitH 229.653] >> endobj 488 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 502 0 obj << /Length 2194 /Filter /FlateDecode >> stream xڵZYs6~Ue!8y$O3dk{$DBB IEix˒` ٍuCyrss~zQLﺎFΗ˛?g4_>q>"?ld~~)-qJFD\y!"o4&N] S/0rpê[o.@6 IӋ?/c ζspj3W!D=AQ1!`/!#>VKm*|Y>vCBo^gE!gSfR%e,;t^Zg$^8ԛ=]>x+%HpY@Cd{$wUłDʵ~ث u';_:;J85P{_XA9 Qk}b$2$qodAqUEKҽAz:4'Yj~.d5U0~~n ?2l t,Ujov =gQ".* !\%IU@/4rO$*ʀp^r~p 8GQETIт7WHy:=WR?ש>AleJ<4QYЕd\Gul+LM[$OjF~,%JUV%WEXn^j>7Ȫo' fQC碔?jzS0L5:bͺ- F) m}FAL@STˆpj–stbo&Btژk5d*z+(\Yj)@Q#,D׉i"PjyyS UwuU~=Zj0oGl4@ИcM(Y\UْPx͓8 !![:&p~Xp"E "\p߅( ݬ#l3 E %ɳ;{wÙLd)[?A慉~٣i<"̟6Dq+ƃp  2v5ŀ=A#Cj<Ń \JVa3N{86wU|`ֲ/Arx99ȗ F|=rzd0;#$2&xMgpUC'_ sb2|ۑPI<*T]IdG s߳!YLUNUUBmё.R 2Y3!ۖ]'g"5ԬkX7 H+H !-"˲+cr"8<(oﮆԞkwhδj ٿ) s8_7.exL@T0za̓'ן#7`Az xi <ݞ`<5Zẋq:DZ2?( < Ot5@{z׶g:V= j̞`00 ^xCs\(|!{= _W{N&ire<6Y)͑<۳֧ft2sBxF]m4iSQyjžcu"L]*@\ZzwwVk4iYa͢" zYV9,-zCeI OF-J'Py'GoS˫0EWCMԵȀ2PL &LZU?nh6ۤQ'lxѶ3[aqj ر ke endstream endobj 501 0 obj << /Type /Page /Contents 502 0 R /Resources 500 0 R /MediaBox [0 0 595.276 841.89] /Parent 473 0 R /Annots [ 499 0 R 498 0 R ] >> endobj 499 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 498 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [336.714 426.898 343.19 440.615] /A << /S /GoTo /D (Hfootnote.3) >> >> endobj 503 0 obj << /D [501 0 R /FitH 778.724] >> endobj 90 0 obj << /D [501 0 R /FitH 739.268] >> endobj 504 0 obj << /D [501 0 R /FitH 692.282] >> endobj 505 0 obj << /D [501 0 R /FitH 693.528] >> endobj 506 0 obj << /D [501 0 R /FitH 647.251] >> endobj 507 0 obj << /D [501 0 R /FitH 629.18] >> endobj 508 0 obj << /D [501 0 R /FitH 606.604] >> endobj 509 0 obj << /D [501 0 R /FitH 559.978] >> endobj 510 0 obj << /D [501 0 R /FitH 561.224] >> endobj 94 0 obj << /D [501 0 R /FitH 486.469] >> endobj 98 0 obj << /D [501 0 R /FitH 384.841] >> endobj 511 0 obj << /D [501 0 R /FitH 317.052] >> endobj 512 0 obj << /D [501 0 R /FitH 318.151] >> endobj 513 0 obj << /D [501 0 R /FitH 163.389] >> endobj 500 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F61 278 0 R /F60 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 517 0 obj << /Length 2350 /Filter /FlateDecode >> stream xڵZr۶}WQ:cHSz$3McwL,1H_ B][Hn+ww}b 18B!8JS'yIb-HRHLQ})aQVi I&d! _a=pW֝@IW_ V(7[]}9\{ 8;W^|p_j5G]X{(@`xVQTu:lYUZK<"J4“B=R/SfM+_,z}.d̔FFi[ <2q[dOwZnJajȔG36WG21lōsEŐE8A) ~[)AY$ˈOK :8lJGygw[2H8[G:D4wb= CBC|A0v\? Ȕp}`BpV 8Db6Od&BxLaj N#rc3s >|'v9DzH[+SV$nQGqp:ð0A:UMJa__SER. MB~wWz{Ns w:)`c9CXws*m J3 wdY6ZY .LgBk{Re*OSQ A5E|QkX `GaJ Sc[RgcRo5T[n|[|"zz"!Ǡ)+pו[%Zդ,J=;:|U]b 2sj+T4՛$S!\t[՞oϳ(6YŔYj1|Vl2G=w&Vn> [~/lm52/Qyarn^iⳬ'oDUmI)Z- h>i_YbV˰j?SXBi$n%9gCTuτT%``X ˆ;pce>yYEu.>􇾣)%}z1+h6%L|/謘;9g:3chx9bؑ f-Y$ F釣lIO6 6C3 L B 81\|Іr]Y?nO?p^ [fj#g8ϐux:<1y >7ώtd>9w͍\|,z04.rI8[& ;Ny,fCh.QsKxIG냑Ks|rŧ(M*@F 99g9BC(!եhB蘻 =uޟ jdǡ:#-20-"/rAJb>9B>!ĺڧwY5~"p1DHdrB!pr4 ]L%x,D:Phy|94%1?JË=r V.4.ho|tԠ@}XqMpWlRʥ~p5-C'.qZKlX-ñm?PX'[h۬ endstream endobj 516 0 obj << /Type /Page /Contents 517 0 R /Resources 515 0 R /MediaBox [0 0 595.276 841.89] /Parent 473 0 R /Annots [ 514 0 R ] >> endobj 514 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 518 0 obj << /D [516 0 R /FitH 778.724] >> endobj 102 0 obj << /D [516 0 R /FitH 739.268] >> endobj 519 0 obj << /D [516 0 R /FitH 692.282] >> endobj 520 0 obj << /D [516 0 R /FitH 693.528] >> endobj 521 0 obj << /D [516 0 R /FitH 555.457] >> endobj 522 0 obj << /D [516 0 R /FitH 554.45] >> endobj 523 0 obj << /D [516 0 R /FitH 540.901] >> endobj 524 0 obj << /D [516 0 R /FitH 527.351] >> endobj 106 0 obj << /D [516 0 R /FitH 377.05] >> endobj 525 0 obj << /D [516 0 R /FitH 309.114] >> endobj 526 0 obj << /D [516 0 R /FitH 310.36] >> endobj 527 0 obj << /D [516 0 R /FitH 296.81] >> endobj 515 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 531 0 obj << /Length 1746 /Filter /FlateDecode >> stream xڵYr8+x, mx'VjI4 Ip.q$.M>D@7~nQ@ ]|]_͖2RjCV_/$O K!Ew^Wj akYI(7[Wݻ ˆ;G_?_@uڤ?wV>sl;vbx $pn11S8uWXqP8S68)ϏaـkzՙHC{`g8bB $K]L˺H:R \RɊQOaYIv3S_%:m-mB}ȋ e[MvFMz~8fmUo@M ˰eods+V,&In##64K<~Dq@BB2( D+jUq m4SFߕ`:ipqLa!:GYizȥqrD0WM0 Jsa>y i=`STFMDԦah!*JFI.dd27jxIMd\ ]9ܛϼ[s72YX*UDFZ|7L\ͱҦ >¥Vwk o%ˢj2⢽1&dod#@zh V. .v cf7&<ʰ1.ǂ:#9 p)o/Yn8^bZ,LefgW$GEr4 bۤ9μo؂(c/dc0| Nlxk#@SggxHPUw2:Ps*GYY%A"9 8k8&T iV/Un 9ޡ(Sgb+WD}߸*c^i'~>g&VAYíe'qeɗX+pD{dcp9|  {~I$N-f,R/oB ('C!^BS٤1*B_o*sPbYJ[͆Ljlmc9YQjD%껺ٌVVmRM`n:6Crh 8="|#m7a֡1tBc6d63MRs p7kz-kPl^%˳vk`O# &K >Т$*W4r]B;˫YP 8ưSCdgmMQ)dxG8x4Њ@u}/g*N,6iW35^tGϮ6c/a=%.hnKelj݀ c d崐" |>XJু٩/$TP$<~zb9JbIˉNK, /0ა?1OOj:1~ Ť>4u}~RmOiP 4m= \u*euN,ɨ4l/ 9gWDj̮zufq'W_(zZ3֫xPm=ZL%mh<8m4[J.& ;%65-h{ٿEIqAʛŋ >z7 endstream endobj 530 0 obj << /Type /Page /Contents 531 0 R /Resources 529 0 R /MediaBox [0 0 595.276 841.89] /Parent 473 0 R /Annots [ 528 0 R ] >> endobj 528 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 532 0 obj << /D [530 0 R /FitH 778.724] >> endobj 110 0 obj << /D [530 0 R /FitH 739.268] >> endobj 114 0 obj << /D [530 0 R /FitH 545.345] >> endobj 533 0 obj << /D [530 0 R /FitH 397.792] >> endobj 534 0 obj << /D [530 0 R /FitH 398.891] >> endobj 535 0 obj << /D [530 0 R /FitH 299.214] >> endobj 536 0 obj << /D [530 0 R /FitH 300.46] >> endobj 118 0 obj << /D [530 0 R /FitH 237.001] >> endobj 529 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F38 444 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R /F15 445 0 R >> /ProcSet [ /PDF /Text ] >> endobj 540 0 obj << /Length 1070 /Filter /FlateDecode >> stream xڭWK6W(kHJ:AhPۮm 5CVZ0E| "vvcH%8! E=D1 _&HYfMImgj} P) M2'=/wTy] 4y{ALN=yvab\HWLH] }0ѹ,!@?8 ?ݏ~$%cpbx2\R,h},P>$ &ѧ'Iڐa}L.2,aʩ` rbcv&arI4#D dH3g@ČO(c}{rT/%)q̜& e Vf'{ݦr*󠝞@PCĖVUݕ㘻Г}xفBrpE@ }-uߴmܦ'*@7?e^eW`Kk~HQ. [U(Tx9MNn-XJAFՕJ{I7l4$/4ԗOp ~F|kUwX΋ GYӨkQyeW Oϵo(YIRtz∂A/=? endstream endobj 539 0 obj << /Type /Page /Contents 540 0 R /Resources 538 0 R /MediaBox [0 0 595.276 841.89] /Parent 544 0 R /Annots [ 537 0 R ] >> endobj 537 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 541 0 obj << /D [539 0 R /FitH 778.724] >> endobj 542 0 obj << /D [539 0 R /FitH 739.268] >> endobj 543 0 obj << /D [539 0 R /FitH 732.374] >> endobj 538 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R /F27 195 0 R /F15 445 0 R /F26 197 0 R /F38 444 0 R >> /ProcSet [ /PDF /Text ] >> endobj 548 0 obj << /Length 1956 /Filter /FlateDecode >> stream xڵXYs6~ׯԉP9mnL ^!%ʱ!1Eo٫ {[(0ezίo^XRkY-1_A K!1E~-ve6 |.:)rp$D|~J hzYlY~Z>GBpcQ6V=0]> P#%"a|k֋? *+$з-0]Sԍk)V>@1Pz>";`aZ,)b&|- 2M6>XJ}.x&rqSRVrD#-~Gk֊)iMXoI| nlNy@4jtoJu)*o $ Z,QNLS9HgE_UfUmtJ>_D`co]vg 0POǤrڀb_l膭1BlG~05GK"k~>Wi\0jjA?՚1Eq|ؔ 9r!QU8w~Tf?")D:mu9||'ї(MY mrMfnP c(I|1Q7|?2y*CY{ ƞ9nO,{a;S88;2!BTq 5Lrz& _8IOf˿ ϗL5, ϩfn/ $9qr*v} 7QMR񝮒й{ ā,F4lGKž6J.90?@́ .s`gρS`tr5jQ!G6b[J+P t1I7*/t/[mM!wrVBkI4?GG&J9eP(cGX6B%YQΎ+[ u%FbQr7o;=+AzQإ1$qxCtk# s>t`p;8 ;F !U}]tTݴ+xG&ܸpǓIiOLCj\lMΦBR7RcSt;v[!m`BEptPږL9mejo,TEP =:6<$~ R'j7e2$Θ=`%5wnuݫzE[.xJm p);uQJ,NI{`C$"/RK$BS &!}v_xvumdeIiۛ 0} 0%*rʜEY |6&RxD팫7Wws~w;}!L\iy6Ȗ%7;L  D.+ς֦.^v*JH.La 4X/'{$֦L;mBHH:wlC^via^/Qt9A@37n)jI1*B{TI0uɪ,RjU .+E(yV;%ORRz.F endstream endobj 547 0 obj << /Type /Page /Contents 548 0 R /Resources 546 0 R /MediaBox [0 0 595.276 841.89] /Parent 544 0 R /Annots [ 545 0 R ] >> endobj 545 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 549 0 obj << /D [547 0 R /FitH 778.724] >> endobj 122 0 obj << /D [547 0 R /FitH 739.268] >> endobj 126 0 obj << /D [547 0 R /FitH 450.369] >> endobj 550 0 obj << /D [547 0 R /FitH 389.756] >> endobj 551 0 obj << /D [547 0 R /FitH 391.002] >> endobj 546 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 555 0 obj << /Length 2722 /Filter /FlateDecode >> stream xڵ[]o6}ϯd/I>e0lL7 Eش#@\nR$9JL$:$ϥ+l\}\}b`8`!n,VίϿ/(óo yz}LV|'@q($]79'l"vqIfwZAa;_n_rKW?Bθ( ܞ;vVp'@py.Kny?t>|!THCH$~|q>dNΝh (z ED9̞ȧZ" qP2 gJ Z=5oj :Pk0phB4hMS=ź6 "@?F=~ 2zC[UC剱 QH&?|_nx%1dg[u\;U0NSyMx/S'OQB&| ,58L~ ߧ)HfBp`WiXY!BY $-P<_}-)yv ׷._=O~r@e{Mx͑ \ñzMq\JAj{elxkʭ*Pm,+>,P<ڒEdX#́e'҆cam>lolhg}Sns$Cu9nW@p7-dlYDQHnT$3ew8 jAp7- ?q, "Dpcjd6jJ_(eeP@ tVՙ9X֙}+mXx8i/6W1wn3pndMp*P-,:;5eG52=Iӷ&E+-EPGL=/\g_Re%NsP!~Z<>S$ @ʿlLQ z~ 4ە7>S6{_R;XO;FT C8lDAz*tɅ]|dq!NI\ݗmZ+!y%-ӔknmŖiwF4EbT4 IYsSvT`+Aq*d#6{w׷ EAP% 1e1aMQ¨D-PTZW͔?bϪtݗ_l;OUKSgm+5xQ)Z"EekWr'Zm™= a5p\G}OԈ]ЪHc T6ۡPR e}Bi(Zkha:SE4Gd? tcdmO<+D|^ R:vB'Hy0k> yVO(\Zg .<7La\>!umZQgW<)b{vݨW KHhs`wq1zI`Xr}gJ`K̠Ͱ =ѯ3h~'^mīs$%S<._k?:F#!4Kk/.[8.Pm.Yλ9X_u):.5ف6IU>$@-PV!kNͥZ ,^5NBˋ7~Qp*[q)>4  &FnH(|;|uk}h |́ "O* u B8R-P<p`4ϥ5 o]i@CN!Zxl(#Bˡ`J(F(! >xq;!j}*7S&Q d  *q51G26#>-P<:VfSnC{v?Ň7<!vC.+SUQRn ,L\xl#FNˑcJ(Փ$uQ"M$n$ on75~#S-p-OjFy J5?ży^mڜYwnk7A6(rW"^l~6vvl7,29)M]~joP/0Y endstream endobj 554 0 obj << /Type /Page /Contents 555 0 R /Resources 553 0 R /MediaBox [0 0 595.276 841.89] /Parent 544 0 R /Annots [ 552 0 R ] >> endobj 552 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 556 0 obj << /D [554 0 R /FitH 778.724] >> endobj 557 0 obj << /D [554 0 R /FitH 739.268] >> endobj 558 0 obj << /D [554 0 R /FitH 732.374] >> endobj 559 0 obj << /D [554 0 R /FitH 718.825] >> endobj 560 0 obj << /D [554 0 R /FitH 705.275] >> endobj 561 0 obj << /D [554 0 R /FitH 691.726] >> endobj 562 0 obj << /D [554 0 R /FitH 678.177] >> endobj 563 0 obj << /D [554 0 R /FitH 664.628] >> endobj 564 0 obj << /D [554 0 R /FitH 651.079] >> endobj 565 0 obj << /D [554 0 R /FitH 637.53] >> endobj 566 0 obj << /D [554 0 R /FitH 623.98] >> endobj 567 0 obj << /D [554 0 R /FitH 610.431] >> endobj 568 0 obj << /D [554 0 R /FitH 596.882] >> endobj 569 0 obj << /D [554 0 R /FitH 583.333] >> endobj 570 0 obj << /D [554 0 R /FitH 569.784] >> endobj 130 0 obj << /D [554 0 R /FitH 492.776] >> endobj 571 0 obj << /D [554 0 R /FitH 358.208] >> endobj 572 0 obj << /D [554 0 R /FitH 357.201] >> endobj 573 0 obj << /D [554 0 R /FitH 291.398] >> endobj 574 0 obj << /D [554 0 R /FitH 292.644] >> endobj 575 0 obj << /D [554 0 R /FitH 279.094] >> endobj 576 0 obj << /D [554 0 R /FitH 265.545] >> endobj 577 0 obj << /D [554 0 R /FitH 251.996] >> endobj 578 0 obj << /D [554 0 R /FitH 238.447] >> endobj 579 0 obj << /D [554 0 R /FitH 224.898] >> endobj 553 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F4 275 0 R /F63 316 0 R /F61 278 0 R /F27 195 0 R /F41 266 0 R /F60 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 583 0 obj << /Length 1101 /Filter /FlateDecode >> stream xڵW[6~WtEKF]J$CaX%Lwy`,[:;;7A4^^q((JbZ7} BCJ¾N$/7wPŰ/9 6yd`8›h݆(,`uu1n9rπ:9ñ ZU=7Ve_b<+>uEMEk64Lբa+1 PZ(w&/t9 |靈jq޵ؠIx6cz;7:UV@_~4fx68CuΓ{_ILlXڦ,P1O[V5k~`oD7a]BnN'f]'. ]uUXdo+1IS:d][ˁ(逯e;'NBN&uY[KE/_(Q(! }0T`W3Qp.A2O<\ =D%K+qw: ̀ɖXoL"FUx81B~RYX;:dl @=#(یJD@M3hK̷vQɡPSHLN\(^,tOk gUXTEcXamD㭫cfR:3w9_}[:ZKmL;ʕ.Ҹ[/PǠQPt}E_ᐴ"\볶a*B=4QxkH̏638R0Xpf&KBr6}폆ngÖ*8kUPaVKޜ4xʤ*t"%O:,DP`7TxdLA1)+i<'D&?Ƃ`0pJUgt;tb߲$FYwkȿ^r4H{I(\%\FG`*r̂y~M[+o3{PŸуPh2*uj=U\{U8 endstream endobj 582 0 obj << /Type /Page /Contents 583 0 R /Resources 581 0 R /MediaBox [0 0 595.276 841.89] /Parent 544 0 R /Annots [ 580 0 R ] >> endobj 580 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 584 0 obj << /D [582 0 R /FitH 778.724] >> endobj 586 0 obj << /D [582 0 R /FitH 618.351] >> endobj 587 0 obj << /D [582 0 R /FitH 619.597] >> endobj 581 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F15 445 0 R /F39 585 0 R /F26 197 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 592 0 obj << /Length 1335 /Filter /FlateDecode >> stream xڽWMs6W(D0odl%M팓@$,aL ZտR"M+9hHb۷K,&ok:&Y;%q:QKeM7n@+fN+wQL̾.? K\lx`*T%XB|U=MK "0p|[amąs^e_( F)HlвB76wh8`X} ;]*74JJe }} C]8C(be58\!HjWZ@AغKyRdRlKybka*²뭩3`zR*N6[1t Ѩ6sʗtQR XzCAty~'%IJ.z<RK^L-g1dńYW4nJs9Vu_yUkbgPڊ.guXnw2VDAH7"}@qLzz{uVGN7}尩(eSR_cy4zYxRl@w vuq>6*Ur&0~1(N GR;61Ѿe-9%g H!PAk~T;Vq M\+vQXASGqy xȮ8t5MEU_(yQCY[$7egZ+ 'S!W ~GƢ~R\PbZߊ7WȘō1A"5PzvJpQ(Ր=QFfTV d;A;ԙoۍ{$+-: ?*liOm -ENOS)1A'E _K|#Q* endstream endobj 591 0 obj << /Type /Page /Contents 592 0 R /Resources 590 0 R /MediaBox [0 0 595.276 841.89] /Parent 544 0 R /Annots [ 589 0 R 588 0 R ] >> endobj 589 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 588 0 obj << /Type /Annot /Border[0 0 0]/H/N/C[0 1 1] /Rect [73.503 398.386 278.404 409.728] /Subtype/Link/A<> >> endobj 593 0 obj << /D [591 0 R /FitH 778.724] >> endobj 134 0 obj << /D [591 0 R /FitH 739.268] >> endobj 594 0 obj << /D [591 0 R /FitH 493.818] >> endobj 595 0 obj << /D [591 0 R /FitH 473.494] >> endobj 596 0 obj << /D [591 0 R /FitH 453.17] >> endobj 597 0 obj << /D [591 0 R /FitH 378.65] >> endobj 598 0 obj << /D [591 0 R /FitH 358.326] >> endobj 599 0 obj << /D [591 0 R /FitH 338.002] >> endobj 590 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 603 0 obj << /Length 2417 /Filter /FlateDecode >> stream x\]o6}ϯP{1fDJ(0dShI"Pm9Ɩt^J$-*rbQTE6uH_^^=xw}ϱw"Ōy w~]߼|A?ys![_9A! ~c:K}VEpLg?T~.#W¨[𦝜/0 :N&@|o`0m6e83 tO/m\r];VR^+XD缘:{ 8JVOO&bbbX*YZy:FYh,h9["w%JL}v2KԚ,QWjdյK_Yd:C^ N_5e2̈Jc1H%MƻDѓ;M:x=uɧ~Vux>K52ydKI2)嬏jP`:Lsc_襢GQ-ňr6`w:zAn,|(Aa{b?E*3XN79vxGoVybFVekJ`sәd3:Y!笴!uHnO@w5@u]J|=!_ V?R@lG]CaEk(vO=YU6މN4Q= 99#/ZDnʹkwH5arM@d.(:mBBPL4py.C8~%$ע|3җg>gIʾ"|x-youeYq)m3Ed ,rִ5A)kj5auJ3@8=ѐ/5C= HkWNkv"i.˓JYз}5 Pߛyd!/\iu(Uyet_sQG+K͛TbQukW˴vYa6)M^$ Vk ^zGs4ZC%7.杔Yh˳>H}mК=SC{Ћkv̞UGX2 pMaQ9  /)ZFMj%E!{/%-iÁ[/9봗$Ń^]=r?,%qpZTJz8@I8{ P<|9A qǪl0@8֘sr,k B̌ j%Rָc<h K9Z鵆:} N(C,5MM Ǻg%2MToRSyLPHnrX t@=V#v'0@>g/F,('(kp59pYk9G&/,Wn1_{40G౲4P&e`-Ec`8&GBc z> endobj 600 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 604 0 obj << /D [602 0 R /FitH 778.724] >> endobj 138 0 obj << /D [602 0 R /FitH 739.268] >> endobj 605 0 obj << /D [602 0 R /FitH 648.776] >> endobj 606 0 obj << /D [602 0 R /FitH 648.953] >> endobj 607 0 obj << /D [602 0 R /FitH 635.404] >> endobj 608 0 obj << /D [602 0 R /FitH 621.855] >> endobj 609 0 obj << /D [602 0 R /FitH 608.306] >> endobj 610 0 obj << /D [602 0 R /FitH 594.757] >> endobj 611 0 obj << /D [602 0 R /FitH 581.208] >> endobj 142 0 obj << /D [602 0 R /FitH 536.25] >> endobj 612 0 obj << /D [602 0 R /FitH 435.125] >> endobj 613 0 obj << /D [602 0 R /FitH 436.371] >> endobj 614 0 obj << /D [602 0 R /FitH 309.596] >> endobj 615 0 obj << /D [602 0 R /FitH 310.842] >> endobj 616 0 obj << /D [602 0 R /FitH 297.293] >> endobj 617 0 obj << /D [602 0 R /FitH 283.744] >> endobj 618 0 obj << /D [602 0 R /FitH 270.194] >> endobj 619 0 obj << /D [602 0 R /FitH 256.645] >> endobj 620 0 obj << /D [602 0 R /FitH 243.096] >> endobj 621 0 obj << /D [602 0 R /FitH 229.547] >> endobj 622 0 obj << /D [602 0 R /FitH 215.998] >> endobj 623 0 obj << /D [602 0 R /FitH 202.449] >> endobj 624 0 obj << /D [602 0 R /FitH 188.899] >> endobj 625 0 obj << /D [602 0 R /FitH 175.35] >> endobj 601 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F61 278 0 R /F4 275 0 R /F60 277 0 R /F63 316 0 R /F41 266 0 R >> /ProcSet [ /PDF /Text ] >> endobj 629 0 obj << /Length 2864 /Filter /FlateDecode >> stream xڵ[ks۸_~: oj{M\Gi0dq"$C+QTfQ"x\ bQCWQQ:S!)B}K1mXaM+$ * \ݿS|o""REtF ɽ= }ÿ/0FˡՍ` Ы3 ,6% ,0p\xwkb}H1zM7yR]KQL}.b\eǷR5ZOqNm=VěmYfk CGa(8#1y9c9pVM^?:AF5S.Beدz(IYp *5`@k! P0n~TyKGrP\g؃9OBo۪[;r皚JyhNZ!y }=q$`0.!HNzHCQ9☟Siy#i`dZhּpxWTdsûKcq uAbԭ J-I6#Sw|-FxW<*DqyxY>[:m F[.p[/Y.R/B &PgfmTjoHj1l4m2]0'PJ+emT^oH^1l4mB)G Clr-rc+PLYEqr0g`{*6t$[Ll<^񷄢zC%sݖT)mi3ۍ~굲,\\N3׃-OtF08b-Uf.J߸RpIqZK+agD7cƨ)BfC\RZ^{4+U(Iި\smC%Tпd+0YVwu %|BV]5Asa03 ]&Ѡ] 4\&0i?n%>T Z\e8 QQܑBt2+o`- 7aK} д|ͅ^btl$쀴,ÌغL۹zdf#9`\eszπ qYK1|oF/+?3z߭+Rn\PSFq;6TVzɛ B C*|űiױI[_;N/)dl>Vss$֮VG|xrAc3SPz{;׃NSS>%^gEӨ4wPQv9^gɲ6+3Uޚ^Vn!h2BRn nOA\ţm!sӢ@@[ٻW߶G.UQD_`Wxz>XPVU: Sm_lW(D״j'^hVm*m.Uz0)ܟ@ V N0JG']<eKj%{(c5|4*aXQ^pd֋iy0L !0!YXdƔ%ףn5&N`1OԘ,ɉ6j3lt@3x'!~|suKJU}{?]-2ԹpP!,XB>sy~\:~TǕaPpجr :PN*@IQİ[etRT^a?xa-r4Q Z':[Mz݊2T֚ h&`ѶhAm^1[{~'UҤ Ȓ!'4Эu`hx!rB 'X:m `zΌ> endobj 626 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 630 0 obj << /D [628 0 R /FitH 778.724] >> endobj 631 0 obj << /D [628 0 R /FitH 720.072] >> endobj 632 0 obj << /D [628 0 R /FitH 721.318] >> endobj 633 0 obj << /D [628 0 R /FitH 707.769] >> endobj 634 0 obj << /D [628 0 R /FitH 694.22] >> endobj 635 0 obj << /D [628 0 R /FitH 680.67] >> endobj 636 0 obj << /D [628 0 R /FitH 667.121] >> endobj 637 0 obj << /D [628 0 R /FitH 653.572] >> endobj 638 0 obj << /D [628 0 R /FitH 640.023] >> endobj 639 0 obj << /D [628 0 R /FitH 626.474] >> endobj 146 0 obj << /D [628 0 R /FitH 581.669] >> endobj 640 0 obj << /D [628 0 R /FitH 494.196] >> endobj 641 0 obj << /D [628 0 R /FitH 495.442] >> endobj 642 0 obj << /D [628 0 R /FitH 382.42] >> endobj 643 0 obj << /D [628 0 R /FitH 383.666] >> endobj 644 0 obj << /D [628 0 R /FitH 175.8] >> endobj 645 0 obj << /D [628 0 R /FitH 177.046] >> endobj 646 0 obj << /D [628 0 R /FitH 163.497] >> endobj 627 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R /F63 316 0 R /F27 195 0 R /F41 266 0 R /F26 197 0 R >> /ProcSet [ /PDF /Text ] >> endobj 651 0 obj << /Length 2543 /Filter /FlateDecode >> stream xڽ[o8+MJrccȴhFLozEUT@:0jERU^ۯ|! 0>qu* 2vA @ V뛫/矪ty%~^m}3W*!i i.>$v vn¡!|*l﬩2@;Eq0@FX(#3p O^ɒ3Ϝ7Xbw6h,C b*w% CXz*_S6@@L#"; 3k d!B\_?Vn//n[ n.8_U>Sώ'Z,Nx*JxFؿ;k lĀR$~MwY!jx@Dʧ!GHwW. wSAW3 pzxUK Y'<3{%KL,v:$(!&"ldg`|"JoJ'h&I;RV"Ꝯ" 2?_s6 0h^]HM iWt7*0Fe>s¡es&m\"q)^7$_5T?dEi)/ɍ1;ri]r6}el_bE<d>Զ.L77w)mM)P|\/WtT,Uu1F[U.ualtSeAɹlڦįL5kؤkZX0h$ _woy%$lKPAQTITBq# \z7rncr %3#>0`&bI-1y*:xچZAHQ_>܀Mqb&w#<cmW Yv6#]L0JC>amh.!7bt/cS~."/]ŋFj84{WLǀVeZ/WbY+I [4D:\Gꇁi+)>@ab}x[[\+F:7'n%ȡ/Dg fUgWDVؤo̓ʳ2,e{!w۔O͜9юfm[#4?6TE!1H_մJR6ksֶ~0jr?9棐`b> endobj 648 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 652 0 obj << /D [650 0 R /FitH 778.724] >> endobj 653 0 obj << /D [650 0 R /FitH 741.858] >> endobj 654 0 obj << /D [650 0 R /FitH 728.309] >> endobj 655 0 obj << /D [650 0 R /FitH 714.76] >> endobj 656 0 obj << /D [650 0 R /FitH 701.211] >> endobj 657 0 obj << /D [650 0 R /FitH 687.662] >> endobj 658 0 obj << /D [650 0 R /FitH 674.112] >> endobj 659 0 obj << /D [650 0 R /FitH 660.563] >> endobj 660 0 obj << /D [650 0 R /FitH 647.014] >> endobj 661 0 obj << /D [650 0 R /FitH 633.465] >> endobj 662 0 obj << /D [650 0 R /FitH 619.916] >> endobj 663 0 obj << /D [650 0 R /FitH 606.366] >> endobj 664 0 obj << /D [650 0 R /FitH 592.817] >> endobj 665 0 obj << /D [650 0 R /FitH 579.268] >> endobj 666 0 obj << /D [650 0 R /FitH 565.719] >> endobj 667 0 obj << /D [650 0 R /FitH 552.17] >> endobj 668 0 obj << /D [650 0 R /FitH 538.621] >> endobj 669 0 obj << /D [650 0 R /FitH 525.071] >> endobj 670 0 obj << /D [650 0 R /FitH 511.522] >> endobj 671 0 obj << /D [650 0 R /FitH 497.973] >> endobj 672 0 obj << /D [650 0 R /FitH 484.424] >> endobj 673 0 obj << /D [650 0 R /FitH 470.875] >> endobj 674 0 obj << /D [650 0 R /FitH 457.325] >> endobj 675 0 obj << /D [650 0 R /FitH 443.776] >> endobj 676 0 obj << /D [650 0 R /FitH 430.227] >> endobj 677 0 obj << /D [650 0 R /FitH 416.678] >> endobj 678 0 obj << /D [650 0 R /FitH 403.129] >> endobj 150 0 obj << /D [650 0 R /FitH 288.953] >> endobj 679 0 obj << /D [650 0 R /FitH 160.045] >> endobj 649 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F63 316 0 R /F61 278 0 R /F60 277 0 R /F4 275 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 683 0 obj << /Length 1573 /Filter /FlateDecode >> stream xX]o6}У=,I=kdp, m1(%OR"U9mhL{x?vVvW7.vFK̗/ QW:05ST:"x+NP>B$EL`$.2"|:y1qχ7``$p®k_oveθ4*g\$=,6o+}!_qwgzÑ~G .9XW0_YQ(cڐ ,T9Ӏqj:3wjnr`= K̩P|:V3&$7Ak]#?nSN6Tv*HW1%!\>i#YT S f D|jEI մ3&N'@pjכ@~1iT!CS(ep 8q!O 1"2D'kT;̑H *4bQcY+[ɩmQg]8O֟u1`m&eUQm:{*ʎġ{rFsb`.6B!o3>Gs&FYA{{Ql(β{LY)|" L#敋V@P4y_l}0Kw2Gjigh4vpo 7 06-O2I݋"Ux`&Y}ۚe(4[I$z-<Dj O Ii-<攔yLn>mu.HT>S&tdL49W&]`+mt2I89F&DŽt렱:L+ja0EptDmhmiRֲzrMAjYR|I{O㪗u0oj񠳗&sۉcڲhRE.\FG/;xVll^gBðA@?Es8>))f\j˾߁IK\gRKd(yac_qrn& v-nUvиr~ Cr<fXZǫVdYm,.,jԛ5߬dݣH0Y{Tq$<\`KRThwiSv-ȐB{ ^ܩԮ:p2I7ۮ{6otDB714U|@]B1A{OUAUO>nF YKJ`ɶW.;$5LaϵSs$Jí,HFK8T}Xtê{w> }I-O88$+{IyAڶzjg ' M.@}P|:y>&4( ղԺ+=Ztl:~vW J%PbYR%#%MzΒ .#O*ALH ϭbYc?\̉YĽHh^@Uk~[V'ܾ endstream endobj 682 0 obj << /Type /Page /Contents 683 0 R /Resources 681 0 R /MediaBox [0 0 595.276 841.89] /Parent 647 0 R /Annots [ 680 0 R ] >> endobj 680 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 684 0 obj << /D [682 0 R /FitH 778.724] >> endobj 685 0 obj << /D [682 0 R /FitH 741.858] >> endobj 686 0 obj << /D [682 0 R /FitH 676.054] >> endobj 687 0 obj << /D [682 0 R /FitH 677.3] >> endobj 688 0 obj << /D [682 0 R /FitH 550.525] >> endobj 689 0 obj << /D [682 0 R /FitH 551.771] >> endobj 690 0 obj << /D [682 0 R /FitH 538.222] >> endobj 681 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F60 277 0 R /F61 278 0 R /F4 275 0 R /F41 266 0 R /F63 316 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 694 0 obj << /Length 1650 /Filter /FlateDecode >> stream xڭXM6WVX3ԷK6An @KEXCCMҢ9y;zػ]~z*Ğ|eIIpWmAۍBXA7߀pl(JB87uk E,^ߩwH?SW%Fk+:՗Lvig Xwد(Q)+_\Pz$JP:%9Kw=ӈ]JG{8Aq J,lMI+O#4谆IF*AFg~0q){T"&a+}Mu1K{"X]K4J ZL-%&&isC"D "/B^A`(//x mjc[?E16@b9Qߘ6^w/ ̀ױ &mXok7?V}Ez aob~辏]mn03sNj:5yJ#>x)UIXs3N3m<(.Bښ+(^8V֖@աBB o,I[ǚ=YktYZ^_1!WE^9t&jA|Yl\fY6Is+ȁ d RiD'T~5/ad <='a+<7J`ٛW%)޼mQ u@:O7p8ŒV(*z]VG6DآE}0Tu7v_7{Sh,ʳi$BYS٨\-I{qN]Ŷ6bhǖK;o~QwefqMn y˅yB$!hVlDYSαBxwhb=YFj@LfUFX\R;$%O6fls*&v6}ƽ˞'ֽr$H)Ɇj |N Xk3ޡ߀]Nda1)ND]S v\\E⺊ 7|*&:2 o-MQ&LC-V/̯k6kY[t3w@y{,$aeA]G9zCI:5!pZ[g`[Ѭ@hO /m!ELRPl/bhnbqp`\:t ><_  `0*zƐ5Pg4P7{ޛ{43J\z$L>[A$3_7K&BT-}Kt .Y77=qی8]x3BE٘$*rf~NԕeZg3--s'5E5.) endstream endobj 693 0 obj << /Type /Page /Contents 694 0 R /Resources 692 0 R /MediaBox [0 0 595.276 841.89] /Parent 647 0 R /Annots [ 691 0 R ] >> endobj 691 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 695 0 obj << /D [693 0 R /FitH 778.724] >> endobj 154 0 obj << /D [693 0 R /FitH 739.268] >> endobj 158 0 obj << /D [693 0 R /FitH 449.538] >> endobj 162 0 obj << /D [693 0 R /FitH 214.671] >> endobj 692 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R >> /ProcSet [ /PDF /Text ] >> endobj 699 0 obj << /Length 1923 /Filter /FlateDecode >> stream xڍX˲6߯`vRgv7)q*O+eg\0AA,K@t3.QyyI|HitD%$}twzǛR?NJ!}' h~Zfb8/L9-jY!vX1~"NbPp_dJSI͹re]™q<^5he+JRx$ I/nOVfㅓ cIAx {֪L IӨ|zD SN$п Q=8Sl%gDca^$a]Y;BK%\ҕSF< I[tk3. \Q!=G1j@$YQ+@R2QK Cт A͏HѠY}]qJUޞ9jm(MƼ-@]J(!o7u1z~!O3߼՜[vxഒ |B^I ;T%Xsuc=l(0OL0Lxn{T ^:E |4>l6* 9NKiA!O/Or\1xK"'\Vl}t40G 9hl4jqSʪſd6~_`QY[,͈T'P gkJ+$ CYt^+:O]6DL%CL04h񵖆;\11IUrYBoeF%8 $Q:iA וϚ _WkYZ@``a?BA2Ϊ,ۆCL [G!%P-2'@;$r SC@\з`YjI;2@CfYg80З:Mܽh/+1bmZ9n*.U6 Q 3T*gZS T3IBZ75?fq"ͬx? |7I PÏ+C=65A@}jbVX/{HHul֯<xI1)Ap6p$ݮeTPY}Z/R L~l]ސхnSRMYST&MaУ<-#`o'bmrqҶ`S _v|8;_Jm>6rgP GP-Rc.eDXo4ey+57v}䌘|a%A8zj!a QXr"L`\܏/"'K>ǿET`|8*12+J5-%~Mmj)fi&ԏꐝ릾?D!|FVi'"T5u4(IbggP=I|R 5>îgFgOwP.BѴ7Ϧ׏hUǐRKQٶʠ Fk59ݷ*xŃ:6fD`I/z*q$CMԯ^&g;ڪuA:ļP?@> Ջrj$E8pcqit7k7=_m|a[/>,S,~{o{z`/"j d,B?Kɤth'Hg?@\k_↋}C:| endstream endobj 698 0 obj << /Type /Page /Contents 699 0 R /Resources 697 0 R /MediaBox [0 0 595.276 841.89] /Parent 647 0 R /Annots [ 696 0 R ] >> endobj 696 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 700 0 obj << /D [698 0 R /FitH 778.724] >> endobj 166 0 obj << /D [698 0 R /FitH 621.923] >> endobj 170 0 obj << /D [698 0 R /FitH 454.713] >> endobj 701 0 obj << /D [698 0 R /FitH 235.8] >> endobj 702 0 obj << /D [698 0 R /FitH 217.729] >> endobj 703 0 obj << /D [698 0 R /FitH 195.153] >> endobj 697 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 707 0 obj << /Length 2349 /Filter /FlateDecode >> stream xڽZYs6~`ޤ-ɼf2NvRT&EHEjy~Cǖ}ų`WW߾g8 %8!jDBeIʂ?~z|C9^zIѧ{F26z}]˴u$kսiH0^cf \c쪃tEOip`LOStK[}_QeNI~$(T(c ~Cm2d[K<9hPN#$hXG0Ɂ j5 o"LA0>e+Mqg;/CP^`$"/LA~*}VZSU^s'$#xΝS߾vY].y>UJVwE82@.4oi9gX =e\7Q˶59P>RӥcuA -8sAʽ~R3Nӭײi4 |af'z[l{J#[UWd3l(,̨ ۝,;un#/ ^喓ޘF0 Ad9j't(;;+}7;A[i9Vv!7[ΥыVQBf:iCLU<$a˳9O^gs }hR"UQPF_gg!>1</Klߢ16sK ʓ"{ oyi783q)Cp*/&cW!JtxE%O!#^f 6* eG!vP* yħ1%@͞!di:;48֔g'گ: Y366So"bEarN { "vn@gΖUrWrRJ.QK"0NYJ u[ͺP<ERIxR,6^g:}h$] C6ik|4%y2BVfz@c{'wqB1yicяF ZL$@{ADRP=>o$՚zf_  G_!>1}+l{K@|}!?xqWzr,U e xVndlr7p5aزe`rASIrme7iu& _[֗wݡv|@NGE}ӒLhnxD+WkٸoRX[6 -frCOz{8[R ]fh:B|f)3gw5,V{:<.fk~2HenoW”H%j:t?[:vm=fAͦ?Df7nV?o|z77Sߢ-#i{]X&\ݳ{%IWW:3F'J?nNE }`=Q](;{kxBnlwZ;>(bSx endstream endobj 706 0 obj << /Type /Page /Contents 707 0 R /Resources 705 0 R /MediaBox [0 0 595.276 841.89] /Parent 647 0 R /Annots [ 704 0 R ] >> endobj 704 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 708 0 obj << /D [706 0 R /FitH 778.724] >> endobj 174 0 obj << /D [706 0 R /FitH 695.216] >> endobj 709 0 obj << /D [706 0 R /FitH 632.917] >> endobj 710 0 obj << /D [706 0 R /FitH 634.163] >> endobj 711 0 obj << /D [706 0 R /FitH 521.084] >> endobj 712 0 obj << /D [706 0 R /FitH 522.183] >> endobj 713 0 obj << /D [706 0 R /FitH 368.456] >> endobj 714 0 obj << /D [706 0 R /FitH 369.555] >> endobj 705 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F61 278 0 R /F60 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 720 0 obj << /Length 2656 /Filter /FlateDecode >> stream xڵ\r}W0΋HRڱ6kk+uYe= BC.HîB>}ރ{7g_ޝ|(SmGIyq +B /ވ7|.~P! N t'|M^+Ͽ"^q3E_ ^ T'Cg^BT}0Jcvg?{k@{y!  Å?5X߂R$$ArK0ˆ jmf@   Ks(Hӣ {ߏ;&'#I0x`20|bD/!#4NbsҹD?})R_1Y^d)E2 ( QuO.uΆ$M;HM>/W^5 Jjkju^_f*Lj`| K5ld)b*vO֞cO|Cy-(QR/ $;)8p+X/8DBg=R#YX/(8c%Yan%_}͛Ίޗ}s ; P W"?΋ >a, ;Bꁗ=e!8.$k;x>($֑$ B)KKeid)KDztO`-Hz)t/ՙ=L=Z(udA 0Rwf+SEu\Rg"]JɎz/Hv0m=`azy:@S~,ZW JNx.,uirX Zr@|ו4 P%v[l-TE(qzKjdVjuOV`Y^)%$]2k K8֘sr,;H;"A(!|[-.DEH JR&E`--:Ӑ(H ??\_-}o% ')/U=M+=Z(uD$E8N.۱?^-3ƈ<1^g{$K=8ֳ{P<눞1Twqog`2O\x|g wā[`%9:"_ ?Hv|]^c8LSr%Kjd)VbuO`Y]&9 Rg&u` ǚ%b(UjrTHQSu_ʟ(ir Kld)`vOc|WSHElIS$.w q݂}X7 Rc;~z L^Vn-}:ۉ7Mխz,eYr+K6'd ˞e/-\V}x`r M.Ӫ,\l&18W5σr#/S(~fY=fA01eՊn<TnjaMYRo'@áFe1=-<+429| TMi#SeSKbo;/CYvSMSCO^eͧ'RO_N:;!y#hX~vwc'Z)> endobj 717 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 715 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [115.317 293.809 130.945 305.559] /A << /S /GoTo /D (section.8.5) >> >> endobj 716 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [271.064 146.59 286.693 158.34] /A << /S /GoTo /D (figure.8.1) >> >> endobj 721 0 obj << /D [719 0 R /FitH 778.724] >> endobj 722 0 obj << /D [719 0 R /FitH 739.268] >> endobj 723 0 obj << /D [719 0 R /FitH 732.374] >> endobj 724 0 obj << /D [719 0 R /FitH 718.825] >> endobj 725 0 obj << /D [719 0 R /FitH 705.275] >> endobj 726 0 obj << /D [719 0 R /FitH 691.726] >> endobj 727 0 obj << /D [719 0 R /FitH 678.177] >> endobj 728 0 obj << /D [719 0 R /FitH 664.628] >> endobj 729 0 obj << /D [719 0 R /FitH 651.079] >> endobj 730 0 obj << /D [719 0 R /FitH 637.53] >> endobj 731 0 obj << /D [719 0 R /FitH 623.98] >> endobj 732 0 obj << /D [719 0 R /FitH 610.431] >> endobj 733 0 obj << /D [719 0 R /FitH 596.882] >> endobj 734 0 obj << /D [719 0 R /FitH 583.333] >> endobj 735 0 obj << /D [719 0 R /FitH 569.784] >> endobj 736 0 obj << /D [719 0 R /FitH 556.234] >> endobj 737 0 obj << /D [719 0 R /FitH 542.685] >> endobj 738 0 obj << /D [719 0 R /FitH 529.136] >> endobj 739 0 obj << /D [719 0 R /FitH 515.587] >> endobj 740 0 obj << /D [719 0 R /FitH 502.038] >> endobj 741 0 obj << /D [719 0 R /FitH 488.489] >> endobj 742 0 obj << /D [719 0 R /FitH 474.939] >> endobj 178 0 obj << /D [719 0 R /FitH 264.879] >> endobj 718 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F4 275 0 R /F60 277 0 R /F61 278 0 R /F27 195 0 R /F38 444 0 R >> /ProcSet [ /PDF /Text ] >> endobj 749 0 obj << /Length 2375 /Filter /FlateDecode >> stream xڵZK6ׯ`Y>K ]'3'9N&S}HlG =@X:|_ߧ+ޫ{~Gڋ|3E,F$/0ԼZc-f+'BRP x_}Uh w+/H#*zo@6I8ҿ#x;CPQo}/[@Iboߍz!%ÿ8!U~_|.T~x'\ҥ[H?o^y#3fXi6i@JMS)ͅq߲ɊWtDYdˍl;= {.#ʊh`Gf/UZ@n=aHP& 2oxT,rer7r4״M&YIse g ҶmdHH/UG4,SAjЦJp2o H(D~韂`wU*^tzY%fEj̱kEԑR%Je,%VGDWԡlG^Ų1< &1b?ď¤oP?b+]pPGA됁ЀxPcU[JiGBL$9B/A Lje( !?v!ɂH)Jv58±p|pBǐ24-SZ$]v C!HYB|.3YJ *GMnj|_SBDɗeE=b(B[ڂ)aUݣ@"$RlDId>8_WVj1q9 ce`Bf=mڪP˧O lՈؤ]Af Y$n= P\Yl[p!K*i#XvcW=e!7. ;y_/KmDas+U[:1Q<ހ.Dd"nÝ_)\?pKl>5Ͽ̫r˰UnR bi! [_M:ذRimj^.zɚ*CᏆ(NZi7;e tNu);\ )YW$5gOnkD@@}˲ay:GuR6 &*=dzV!2Ϸ1w2VzDvm^Wg겛X-d$7Yy&Rk _7ҏ(@S; gC ^}fu X@v-, w|,b(@!-XeyjNjB ͈햯a>}tĈ!mr/򍾉fcƄY&By^YMyDI1_q力a| $3F;<3vhMN&gdjmolIHH=G$ݔ]U6;z]m1 h8]Kv) KciEײ`G4H &asE  3H |}{6m¤|0a#>q_=B<3M4^H] !\}^ۊu#lR}]o$3zɋ;Z_:kCOKu2: c/$\׌[`om}&`9ʗ'wJHxf_8O={?]֥]߽yO m767ԸۈM5Q44vUH-nJw*[-L{WRovT&t| _4#*s U~p~\g|K%lJ}]gf52Dؤ<;' H.6t'jkH.Og]qnqp 4e{[ Y3uQz$vLv\ nOVD=1Jqrޑ 'Wt)\}T,Z5 ;^j[ONV$B`DE)RSm븨9ٰЭ3[\^6VkjuQwH P endstream endobj 748 0 obj << /Type /Page /Contents 749 0 R /Resources 747 0 R /MediaBox [0 0 595.276 841.89] /Parent 743 0 R /Annots [ 746 0 R 745 0 R ] >> endobj 746 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 745 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [101.08 324.453 116.709 336.203] /A << /S /GoTo /D (figure.8.2) >> >> endobj 750 0 obj << /D [748 0 R /FitH 778.724] >> endobj 751 0 obj << /D [748 0 R /FitH 645.449] >> endobj 752 0 obj << /D [748 0 R /FitH 646.695] >> endobj 753 0 obj << /D [748 0 R /FitH 580.891] >> endobj 754 0 obj << /D [748 0 R /FitH 582.137] >> endobj 755 0 obj << /D [748 0 R /FitH 516.333] >> endobj 756 0 obj << /D [748 0 R /FitH 517.579] >> endobj 757 0 obj << /D [748 0 R /FitH 390.804] >> endobj 758 0 obj << /D [748 0 R /FitH 392.05] >> endobj 747 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F38 444 0 R /F27 195 0 R /F4 275 0 R /F61 278 0 R /F60 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 763 0 obj << /Length 1625 /Filter /FlateDecode >> stream xڽ[KoFWQB>k AN8F%ŧ-\`Po8~h.`Nj'/@0)xA ez v<~Z|wٮXޔǷWՇmHoV,7ۛZf&;ܔ< -\[bC(ۻ߅ďU ;8 {<+´nt5ܡmrm@+:ÅХ'.ܜ]^=Cg {gwt}s Vqp2zV¢Wް}l2 Ж jd\]I+ Fj\"b{!\sǫm0vhTp:i=?Fx\4"k|[QYM5Q]Uǃ c(- X6lN{q^'O܃ i0@D ciƭgtrGDx@kkһ2vf~s-r"[+0+RW_z0<1Qk?@n%.wΓ,~}=Bƺ[~# fTA 㬴E0"Te;2㡍<#R%BMVFl0Ņ98:( ӱI5 \}~.76kY~p_8C lN. XCS]3QbR3"dIj:TI-BzJz7xM34^seuj a1iGٍh,JZg44Np'M#-Y*(WY2{lm'(˅o5{> endobj 760 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 764 0 obj << /D [762 0 R /FitH 778.724] >> endobj 765 0 obj << /D [762 0 R /FitH 658.187] >> endobj 766 0 obj << /D [762 0 R /FitH 666.436] >> endobj 767 0 obj << /D [762 0 R /FitH 625.908] >> endobj 768 0 obj << /D [762 0 R /FitH 634.157] >> endobj 769 0 obj << /D [762 0 R /FitH 620.608] >> endobj 770 0 obj << /D [762 0 R /FitH 580.08] >> endobj 771 0 obj << /D [762 0 R /FitH 588.329] >> endobj 744 0 obj << /D [762 0 R /FitH 555.747] >> endobj 772 0 obj << /D [762 0 R /FitH 396.005] >> endobj 773 0 obj << /D [762 0 R /FitH 404.254] >> endobj 774 0 obj << /D [762 0 R /FitH 390.705] >> endobj 775 0 obj << /D [762 0 R /FitH 350.177] >> endobj 776 0 obj << /D [762 0 R /FitH 358.426] >> endobj 777 0 obj << /D [762 0 R /FitH 317.898] >> endobj 778 0 obj << /D [762 0 R /FitH 326.147] >> endobj 779 0 obj << /D [762 0 R /FitH 312.598] >> endobj 780 0 obj << /D [762 0 R /FitH 272.07] >> endobj 781 0 obj << /D [762 0 R /FitH 280.319] >> endobj 782 0 obj << /D [762 0 R /FitH 266.77] >> endobj 783 0 obj << /D [762 0 R /FitH 253.22] >> endobj 759 0 obj << /D [762 0 R /FitH 220.639] >> endobj 761 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F61 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 787 0 obj << /Length 2603 /Filter /FlateDecode >> stream xڽ[KϯoRyƃIo[v9ƞl84b-EE*T{ăQ;5?ޣw7|a`x/( D(Oo?.(Nj/ ^!Y?֔B"|!AKr_$y(XFBxŏR`%#a{uw7 EzYo!VU/(jw[ýAB|ՄS9qB4/h!" B! ~ :~yVKߚ[Kޒ{L *Zs{e:S);S6}IsNҬi?]pRTVď@zKB oJ֤l&+Y1YZscZ؇wc^ Tnc39IS 2)~ǘe?XJ) ;_ zoIV:V5ܰH ?Y5G;dX 0H`Maw #N C0yߟ0CB6ضU*Uh\|jq(CE 8s( k[K0F}ϲۆ)wy0ƄYK( a`9o*=-ajp?b}C}s0}J{ަaK?r2\Diɐ(d|/BBG!&`IPÁ/@FpG4@Q$:@4x~pPCpZ%Z}P$DPG>X+!!*f  :*U,0}~3!X\K:^H15eiePB*xeYxMk*!6оm `SCgfoJd"'[c]Sy+۝PQPy }-<:<rŮfGRiԉ:ќrL~紈N},XX ͌ Dqhs =oMV\ 3vVT:IlKZV) #ԱJ;6ٴᵃ&d8D`_: :hovæ EqFZO,p|>(m\جF2R搦/=f|=O^EM""_bA`GָBuT1Hξci33+ԼBIėL9L:P{y=`|ZEBXYO_sSXW! )qAZ $DC!mHm>e} 2& Ĭ_JFĜ`G .CRBD^|+|)/K63r~fx^@W 8t<WtU^*}3BG|)yKI63w~fx3UTaγKȊ[9xuܤPGé|!'HGR [tYg $63b2axւ/xI#`f Ou:e] 3R7 k|)/K63r~fx,ܼh&{( h85:pfo1]PQ̟PQ$ίO/vo^H{'#^XՄ7ޙJO> 2j^"-lGH{^1oN!mh#!fy([9y7TszNu&z;HgH&%_yN#7`}%($&9E{TJu*;}QN x[9GV#*ɍWmz}v4^6+ K:ۺ8> endobj 784 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 788 0 obj << /D [786 0 R /FitH 778.724] >> endobj 182 0 obj << /D [786 0 R /FitH 739.268] >> endobj 789 0 obj << /D [786 0 R /FitH 613.834] >> endobj 790 0 obj << /D [786 0 R /FitH 615.08] >> endobj 791 0 obj << /D [786 0 R /FitH 601.531] >> endobj 792 0 obj << /D [786 0 R /FitH 470.234] >> endobj 793 0 obj << /D [786 0 R /FitH 469.227] >> endobj 794 0 obj << /D [786 0 R /FitH 455.678] >> endobj 795 0 obj << /D [786 0 R /FitH 442.129] >> endobj 796 0 obj << /D [786 0 R /FitH 428.58] >> endobj 797 0 obj << /D [786 0 R /FitH 415.031] >> endobj 798 0 obj << /D [786 0 R /FitH 401.482] >> endobj 799 0 obj << /D [786 0 R /FitH 387.932] >> endobj 800 0 obj << /D [786 0 R /FitH 337.93] >> endobj 801 0 obj << /D [786 0 R /FitH 336.924] >> endobj 802 0 obj << /D [786 0 R /FitH 323.374] >> endobj 803 0 obj << /D [786 0 R /FitH 309.825] >> endobj 785 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F38 444 0 R /F4 275 0 R /F61 278 0 R /F60 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 807 0 obj << /Length 2609 /Filter /FlateDecode >> stream xڵ[Ys8~Ueap$3I%Jx*5ڢELhyDq)[`nth|n@{OF Nw"00F%}u% u^-凶@ J! E~ȠN>/HpWuKyh$oY,I(0_Z.pY"S&z`Uo CIx^>޾{_('bS1j6Uf o8/UǶw13yW;y<- >ؤ?^m壼m^C뤗UpcoeV43BzPP6rZ܋.OsYSF􈤏 ޢ[kdh-=HGרJA[ݾG2]G0Mծ)?zU CO)XoMɪ,iU7ʪPyP+:Q 8u/̦@q!iWvkLeJO¶ֈ5EY|?&c)m[M%6c#dAr& ƞC 2+yU VvRowzUZHU~k^Kj>&z\iwvc@}8{t^ moʓ>jx[)AGx3"נּᛁ# G2Kuړ6i]3>b0F!vMŠw\ќ ?6ߤ%[0ᥡ_B4>$8&($Udxȴ݉C1#kC}?$( ̃4*փe7`1":!.IB\KPPj>QgT|-q|J|=j4JpԪ21"_C %DcK![nyI'P(0 "I0 <8'ÜXpbbI3<%VN  P\c7 )f&& *|x^a?tӛu9؍V-8l&>"\y y[͊3B"D0|%[ESZ0J"Qx`'b2$T/T5)ժz0LĊt\?rۦ 8(80^neS(1iM-JJDDV^Aq_`arFnMD=׃WwX(B fc vJ \;&Tq=遢҄}'g A/ 4I[k|Np"G0-1UO^}6cu"!`?@{"YR .KV7ATg*A~8kIBJ} V~rϘK7_Wxeֵz0'erȁ $h֚x Q[CN}u[b2jAD \nǟR]#p_ #Im5%$AU dڦyie27c=x-ov=^ωM$PaK8-Y"&2{ d6EnGwڛdZTƒ.rw6#fq]bTCm.6}m^VVoMNT<9`=Ϭ endstream endobj 806 0 obj << /Type /Page /Contents 807 0 R /Resources 805 0 R /MediaBox [0 0 595.276 841.89] /Parent 743 0 R /Annots [ 804 0 R ] >> endobj 804 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 808 0 obj << /D [806 0 R /FitH 778.724] >> endobj 809 0 obj << /D [806 0 R /FitH 537.242] >> endobj 810 0 obj << /D [806 0 R /FitH 538.488] >> endobj 811 0 obj << /D [806 0 R /FitH 505.107] >> endobj 812 0 obj << /D [806 0 R /FitH 508.176] >> endobj 813 0 obj << /D [806 0 R /FitH 408.871] >> endobj 814 0 obj << /D [806 0 R /FitH 410.117] >> endobj 815 0 obj << /D [806 0 R /FitH 270.165] >> endobj 816 0 obj << /D [806 0 R /FitH 271.411] >> endobj 817 0 obj << /D [806 0 R /FitH 238.03] >> endobj 818 0 obj << /D [806 0 R /FitH 241.099] >> endobj 805 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F4 275 0 R /F61 278 0 R /F60 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 822 0 obj << /Length 2508 /Filter /FlateDecode >> stream xڵ]6Wh/ј巨{v)"uiQ(<#T#e%`}I>,{LXG<0x{;A#wA<Dz|\r\rj޾=dB*(€r" ޼o~ERVi7`.W wC|AķJ@Rֺoo6t UmcBln>@"pr/+'?doے8BF$90DY`A Ҧ(:jQw3 "qU 7Q8.p(JϹѫA(qZ-*DS{Дwy#=,`*o.WR5;$ w"!\&2 ]Vx.J=̩-],uU;>ɗKTÉrαV;3Y^`×k5"y@Fjbkeom'7.LI09STJ?9klX*͡pV,!]3aOx>,2"@Bj\E%/c+ I%,GM9ǔ(82g=ƪf=TSEF2O͛$U;d%gWigbvE9N9`7o~ *^CX+Djy5&e̜Ɗy1un?"T g*e  yZ=QL2oOEĥMO&gy]*I.Y3 6JnRP\:_bYݹ3)g!G z,uzϡ"f!=XlIa7*7 [&" mGx&x+latKݾm1̐.f+<Lw%G0xӿ&O:V\TM;K.B_Vx.J\=̥-K,5¥Z_Parm&`I3ÎsDs~*q\Vx.J(=-~,52\6vcw:jo Z; Ә&L.n2tL7rZg3$ѼiF v.[\+9r3 ,yxZ Mq-mR}WX=B׿οC~[h+93 8zx֙p1I# LNPrcr_&`ȇӵN=y\ E+p ]ɑ˾oeɃӵNnʏt|~LdlE0xq5q@+<]ɑoeуӵH;}gWx <{5+i 'JAzNf?):cѥ<墷EY/CH쥍![Qv[7贈yUaXuߞG@\17J#zucX*u8.:VxD߃ܥvo9T(&I8:݆cZ"u&>T/{yF*,*I?3]^A dx%}6dI+ʧjP> endobj 819 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 823 0 obj << /D [821 0 R /FitH 778.724] >> endobj 824 0 obj << /D [821 0 R /FitH 739.268] >> endobj 825 0 obj << /D [821 0 R /FitH 732.374] >> endobj 826 0 obj << /D [821 0 R /FitH 718.825] >> endobj 827 0 obj << /D [821 0 R /FitH 705.275] >> endobj 828 0 obj << /D [821 0 R /FitH 621.401] >> endobj 829 0 obj << /D [821 0 R /FitH 620.394] >> endobj 830 0 obj << /D [821 0 R /FitH 606.845] >> endobj 831 0 obj << /D [821 0 R /FitH 593.295] >> endobj 832 0 obj << /D [821 0 R /FitH 579.746] >> endobj 833 0 obj << /D [821 0 R /FitH 566.197] >> endobj 834 0 obj << /D [821 0 R /FitH 552.648] >> endobj 835 0 obj << /D [821 0 R /FitH 539.099] >> endobj 836 0 obj << /D [821 0 R /FitH 525.55] >> endobj 837 0 obj << /D [821 0 R /FitH 512] >> endobj 838 0 obj << /D [821 0 R /FitH 498.451] >> endobj 839 0 obj << /D [821 0 R /FitH 484.902] >> endobj 840 0 obj << /D [821 0 R /FitH 434.9] >> endobj 841 0 obj << /D [821 0 R /FitH 433.893] >> endobj 842 0 obj << /D [821 0 R /FitH 420.344] >> endobj 843 0 obj << /D [821 0 R /FitH 406.795] >> endobj 844 0 obj << /D [821 0 R /FitH 393.246] >> endobj 186 0 obj << /D [821 0 R /FitH 289.139] >> endobj 845 0 obj << /D [821 0 R /FitH 185.395] >> endobj 820 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F4 275 0 R /F61 278 0 R /F60 277 0 R /F38 444 0 R /F27 195 0 R >> /ProcSet [ /PDF /Text ] >> endobj 849 0 obj << /Length 565 /Filter /FlateDecode >> stream xmSMo0+|)8cqlf(RӄMb`ChHc{xޛ@h}ν; #(Q8c),CygRQ IV"x ۢ(f O@/Q8 BH8 #0a9><2$}ɽ1Q_ YQzW@y7,KylQDXg N]hL#́s 2hr?o(-[l\RO>>`8f|x(i,s}bB2R#F JҽnLm֮=ZͧPu{llU}z[.HUfE 56j_\ PRGkuF$gu}ҧ}{,|J J\m7SG;=*ъNqqJYvUP>Sxl)݂Ed¤pXߎ=l'<6($sO6-2``bj.BdWט8Phև;faqՈAt` 7+QE[Y' endstream endobj 848 0 obj << /Type /Page /Contents 849 0 R /Resources 847 0 R /MediaBox [0 0 595.276 841.89] /Parent 851 0 R /Annots [ 846 0 R ] >> endobj 846 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.39) >> >> endobj 268 0 obj << /D [848 0 R /FitH 778.724] >> endobj 850 0 obj << /D [848 0 R /FitH 739.268] >> endobj 847 0 obj << /Font << /F30 196 0 R /F33 204 0 R /F27 195 0 R /F41 266 0 R >> /ProcSet [ /PDF /Text ] >> endobj 852 0 obj [939.8 644.7] endobj 853 0 obj [777.8 277.8 333.3 277.8 500 500 500 500 500 500 500] endobj 854 0 obj [750 758.5 714.7 827.9 738.2 643.1 786.2 831.3 439.6 554.5 849.3 680.6 970.1 803.5 762.8 642 790.6 759.3 613.2 584.4 682.8 583.3 944.4 828.5 580.6 682.6 388.9 388.9 388.9 1000 1000 416.7 528.6 429.2 432.8 520.5 465.6 489.6 477 576.2 344.5 411.8 520.6 298.4 878 600.2 484.7 503.1 446.4 451.2 468.7 361.1 572.5] endobj 856 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 857 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 858 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 859 0 obj [800 800 800 800] endobj 860 0 obj [1062.5] endobj 861 0 obj [333 556 556 167 333 611 278 333 333 0 333 564 0 611 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 180 250 333 408 500 500 833 778 333 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444 480 200 480 541 0 0 0 333 500 444 1000 500 500 333 1000 556 333 889 0 0 0 0 0 0 444 444] endobj 862 0 obj [777.8 277.8 777.8 500 777.8 500 777.8 777.8 777.8 777.8 777.8 777.8 777.8 1000 500 500] endobj 863 0 obj [500 167 333 556 278 333 333 0 333 675 0 556 389 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 214 250 333 420 500 500 833 778 333 333 333 500 675 250 333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 675 675 675 500 920 611 611 667 722 611 611 722 722 333 444 667 556 833 667 722 611 722 611 500 556 722 611 833 611 556 556 389 278 389 422 500 333 500 500 444 500 444 278 500 500 278 278 444 278 722 500 500 500 500 389 389 278 500 444 667 444 444] endobj 864 0 obj [556 556 167 333 667 278 333 333 0 333 570 0 667 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 278 250 333 555 500 500 1000 833 333 333 333 500 570 250 333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 570 570 570 500 930 722 667 722 722 667 611 778 778 389 500 778 667 944 722 778 611 778 722 556 667 722 722 1000 722 722 667 333 278 333 581 500 333 500 556 444 556 444 333 500 556 278 333 556 278 833 556 500 556 556 444 389 333 556 500 722 500 500 444] endobj 865 0 obj << /Length1 1679 /Length2 10168 /Length3 0 /Length 11246 /Filter /FlateDecode >> stream xڍT.L7HK3tww4 0CwttwwH4H#!]w]=o?o|kz*i 1AlBiUUEN76j[F rqCe!Be2@賡*fp q qp886d`K*@ rE8ymy~0X08YpH:\@G*jrxhhA, `B=<<؀lk1Fj\Aߔj@_6`?Z+x؃-@.n sv @ ʟ,dO; 88+=. g;l46t @NR|f?W ԕl#0mu88h,p!>#+onN:`g7_6"d (C[r<-l'r-~qX=@_h>@w''lhDw{ 9׏' 8{cLju_6P`RRO+7#~8_ )~xnLZ ) 0F8[z? ?z/v>*DTE,nUDyY9y8x] `͟4s؃A!/g/=ߞyfχc1YG ]\^h+x>k cl  {|vߢ?]` AH%sп 7_n/\_Pn/(`w>/0s(PT5n...{7y, ¡7"'7\&(AiӍ$EJr&}jR7>[M^ds/a Ҥ(\a^Gc[Zjѽ}8-ك\_)[<[LP&|D{Uwtw"hIuã#8G)o .b+s\O`cMڙc*~~C[re| Kmb׮`5"”g)+N2&>Voĺ[uOْe&f< )Yb2Ȱ+] tg`#y,<핢_tvō^oZ}W\pw"!FaʷsXeRW{>PV %b댢YyIQ ` S_uwDy Í^s;S7bka>kAt8St@%IMֹ&^B-\A0jʖ ?V%8`|nhƙ#r 6֤$٢XOOSRdkwCcȭgzԔGp[9Yցg9WDДbKK˟(K9oR8m jC˱8{;*f6e=ބXsئlԇF˰!j +G uzd>3LIyu5McAuMLp޾iz`6qƸ,p5Wx|w?:Pca_H-kw[!?ʯRAߏ6#9Z~w}ܲ&&լmrnfC-" q~չGN/4?_Ix ]ݙJa@ҜOz+enҽ҉M׏#6˞_]W!Y映+pZzicC#-LO ƅ%G ͔ɺD_8[1HjCtO1|q?E]lcv!/mȔh1^;'<$L 2`i`c`QN)Λ' ]Ezx>SU(he``Jڏp.c 0pIKfR {_oo݌z/O9Tp+yi,N*)rX#iU@›!Ow<-9V,,s|*o; Msp0־mq;-5+$̋'[I,3ʆFT]ᱠz LPi'70}z9Ch_a D.0o2;M/jÐqQVm畻r\'ڱ'^b|.m 5uM卮A!~8۸-]c`#`JBoMpNzU&@5N[lq+#Hghk$r[H7儯1%8skԻ#hE>$EDK8 "w mio7ve8xy+>O|rT/F`&&%T_o _Zmk=z2Z_w+S"1S ǭ2qV ETq gO+j+k[X b)r( )0h\%k^hM]jx?!Jg)1%Ty-2'9;e1 ʧ?I=>C'rf"OLX+Sf]L{^ai DAb]}z"TV'3s(g.w;oa:aN2dϚe%:7$!Þ*2$3޶< DDe[ yp0;7.e/c+'*b\1cC߱SVW?^b텔ymǻ"8X-DWc+.Ex ['͝t0v5 BKH}י@ȓVưSǮ#w(ͮdK!zEbմX|AL?. &aV&?g(t$dIl^5aL"^tvbiRd/yq||k׳ff[Bp/a uJHJl$/&lu 1WJmf=:%c?]t؆}*H RdllFQ}"u|-#o8"Q2?-?:Oe/ie+b`^s#VC4YtvTҙB]~v*SG0E?T|;` $HbK GyH:AmݦrLZIRUJsQ7#@ ;NHNJB{كhZ}EYC.=FK?=}Aܓ6:],_:Ne[} @jCr =C* ̧fX0V"y`T3U=~e(E7lL7c*ǘ[ɟp6e.a=fJ;emf BEx뵤f9T# dv&w_+:ᬲS$aɐ.m+}[um}zRzŪ=J?BkNEr&Jup41+U_4 ]/sg=mQݐv5s5KȍYxpm7MvfKݔ }$*8zH H!PalD]4"uՓ{_t#LxF$L/[P0WmXO}_s># *J+3; pHxj=T $k"/4a<NDCmB3wh-RU&vr(F%:C# Ppt@grP/j-09hEvǼ7pqr uQ_{|qH^J ^" bjKqyqIJ  d+ؘ@)^j-׿խtHoJsڵ.V2^3^vrv8~eVzw%syޟ!Ld{Gu6!e%I.~?c,Z̒ǃACtIn^:Av ϿHZFH>v뿞d^:pqP2卟l'IB7ͮfӕ"ʕߞdcܬ5K1Ԇ~jcXwYRG`uz|_eyM%&{CFDɶhڂ-+>yaڽdu|g5C\:]pW6JǙHKoD㋮$Lg;0peHsR8˦8ӮOMb3ΰ p^k=Q*<(fe71Grǰ{9qF9 ,Pq-^#04<I`rr Ŕ-+3p`>LqM # ]hSBS%@$+1;E(k7P= xU4lS>j~GOT)ErN⃼8J%'A%BC#6^+͏r"o=j[Cfw{(;h~=\|e_Mg}ﺛ,ZZG٨ulG\Tq:`Îf%"IB+W B ߏ%e]G\F1p,ĸ88gR}/8ai)^mxEü aW%o5#BCLbM؍R DoS:`6")E1\i.>KlfDU#?ħmg\}DǀDL5pFNS09ƖKz6t"F/b~+5}J~`NV'*0B2y"iJ+O%VjqS@o3BcHY,9p9N?vzTsN\P2Q,5xCxCFJ,eG! ts4~\2ƀ wi+&,1/Awr6NCɦ{z&yWY (s4QA.KB~ҕ~i#xV:GhW,$ y;3i]Yܢb))qXKMH5~*֬9"$-0cO-a T$a}cv bZvU^ydd)}g۰ b%Lw#\6{'ln4^]3Vkh 3BI%Jm2) Y W]D3֔S-\|:nwo;²#H\C4vgfVWđ|Tz?&d Z;NnXF>Nxe-D'*9;vt-lr V:>`ҌE*Ɓ cCmfz&? S߉}e82d8qB}-DƆK:f.rdqtӪ|:&!bc]T=J@H+ >2'd&uɔd.Z,f=/#Sd;[2R68O8 `D)h{ 1RϹe5=mdK&޿BbTR$&E(\xง~ZL`}IZ2\(J*y@_T@W$51AZԽ,3B3!aɜZVwXN(Xppouz?vJJ7` }zkH2$dpK_[ 4ع>P [ճ0` ݵ4֘V7QnQsK˙?"k$~иdoU0Q"N eGMRL񈑰$wJ5\4A47]YħwunNrK,M?5 Cқ=Kq\>vDnb,;&ѐUȎU˚uuD'"ן_|c졯b$-ƒc("E Qn:.3ÉXۃf/Q-<W|5%D+@C=E/AS|t,0hM%kzIԒy.ԥ-M?Two6gUu(!{2/Ǫu,7$"8}PM9J$yDL9?Cܘ6I6%ؙJltleaJA@;l1eve$A-Li,,B0D u'r1Wߴ!>A!i*LUÏ]YU%_?GS|IjxnJB^9JѠԭQoasV k$Wc;ro'QڶĻܞ*V~$V؆Zv@YK#ZNH:_\ yĭx~ͧɤ%b_E`iP0#%oKG"`>hި&'yUS6R$2Kpdk:vM@tK@c:ƴޝa.n2!WO$ h?m4Xr7EѯKyWut>,;rb]o"  ;2$#]z7_Dbu 4/d>Fy=trW7{){؛K[۰k@5[GAosՂ {<xoꤕjx./Bs 9OMOo.Ȑr`C8&bjlvfJӗ,6wZ;LuF=;V7T*#!]w [TQSM=vb|`Ne,9X-9}Ia* #v^ `y"]-E$s][L%e8K¤ln^VEq2jvEղP0':?*/D/k5Vc"g>8a2ω_)mΐ ehK`sl^)HYTx E5~Zvs>GHe-|x:chGlIyEnnTKx1q\;y%n:n+gb< LW.G@I~R8+%uX{b7[*Ycb8qmr̆7."'uwpqZ禉efK Bsǂh<-5 Ӫ'Z22at%@egwy=Y5A1oȡZS6@/=^ xQ k)'t7x~ZOXб;ZL`UKD}"a4  a)j4k]xl"N~VGȌAb>mg o#yB|d]XٱDcfUG$ WoR&nZr~ކ=K$ lڧح ]: +܀ް>Sv.VR2Yse啯o bEeN_-AN/[ZUʕUqq,0?bLQ6[;4"&OaXLE=@6?0n y}ȦnNrGhwUZbKF%M'Qֱv->u.Ҍ@.Qy\՞}+0$wQEcuƎ4Cd򵆩qՂD\If[ > $V7(#\Q6O o,u[w}\khKA.TZ_-E]sQPaOƾXda4d0n d͛ŝB0-2;'6k#+G` &~ggWmzSk~( &QWӴ J;tCɸ4;ԻLc5gyT-Xܥ 5IZ–4w6A^k~gnj2_Q@1$?!L&JaOdG1”w{\J]wi} Ů|>= |muoRu -n7S0Q0]@#k}y$.vcו(w* }u'{WjxW&)q,֏6^y6O "`J0aa=y~:f_CbOBUX|ĝ59K:Cq7EݐWQ8H=StT!??Ʉo歲 > /(AJ%a\sIy;GX#)60?jE:.y-qcVE Ad ew]v(MN79P8<]ܠ-z̮w/Lf -Ah2M̘l$o1SR5> endobj 867 0 obj << /Length1 1423 /Length2 6396 /Length3 0 /Length 7361 /Filter /FlateDecode >> stream xڍtTk/HI9CIwHwJ  0CKw (% ] ) -! -z{޻ֽkϳ{;!=Bb I8ٍ/51  G!% !6 D$$$vDyH!^p{@ٕPnpG' G; C!H6sVBC+&)(-qE <epyxt ?FNp!   CH{[`u!8kqu7? BQn/p#`]U-Ar (l< G@;T,ࡡp7 Z G(+ UJ(WW&՟2^ɺ QH8{O7Ac$ VE `IWz#_7o# p`?b4 xx1 C1;#IOvGxr d= |4tuy MQ `0=;.oz_́ɨt@Y~@_; w 0?ܷ{~߈+ݐ'!p_X.{b{n]MavYfto:#`= 1P?L{8B=9(lص`4vbL4v1Ka} (_($*xx@|J0voa> @0sAk`p]X "*?0 J<3J;o[_ys%- f4{Fwey*\l a)3rE{ô?X"3l#͹o&~CI'3 67۾RLAcl 0+;Ko_eje> Xhlt}@o8l֪=pxksdb;8^)/p;iР֜nu- ҄U^>l'JW" : 8u;ŸG7lHHšuԵl~xp{(K{Dͤ_ 2;)/=/ yBO2N>yJr80Tz$}N!M؛b aQ7O'ٯHt)Xzxi<̒fZqn \hاqox;"a^kׄE_U^.i? =v]ۚ7/p\cqNP~7ؐ#tu._m3]mR' ΣOKxj4_F2݌֛ 4juLs.?0ҟ[OaK{>H-u]FܪS4θТ mh(xwT-#>gZ w9IO2)N˫7~ *0ykz !+Hgy}q0Bf٬M[;dgS]){T8A HnέP;Qe[ZIg'/#JldW;de&nwQ5t]=8h&>xF'YH,cYrz4VaMON=SM7_0})Cy`]pԊOA;۝ ~jE 7 lh'㠢{}4FՇ.S8(-ϓo͹rE_;{Q86v^ۀ 2VIʽ=$Z@AeWk_~Sp2/Z5Ij T[eI/\iCڗ;?/nNQW0> {rV!9e "i~믓8{[)t-5)+]_ ~/Tc5֒wXd J^@17zqXAXHP_QnYOP}R&: BËiy~\:֩JmBi=ºM9}%nd@G mOL[&ϧVȤ;535W. `>z+rtjK)|TW7Xw!Op.*o]Hw6&-*GoS0}_wXX@<}7p0j5MW4*q s򤇏gWjJą'2MPf=@qױި0I0SL:Nx?JZke7ĵlH&1C~F=!Dڊ4*Inۡ7%>9/bQFB/:wn#qg÷0݇PK^ƕq}Ӳ:'>32֗6ŭ;)FGid$dD$ʹMaBuN➔SdyI ӥo󃚈0IC~9~N(tinYQ8ߞՏA:E4^ط/dJbg*tDqB9^I=WL=m֟p&kuxv},g7k*ĄD~oD ;,g k.#:xūi@7XO%ހsdrHs-+;;_#6. 0gi=N(j9yY'Sǥrt\ܢD7 P/HY>7fQP"}|w3{wA{x@T@"U~k?~zZ;YL-jjiCٌn`k9IXYDVJXzkŵ5G\ZMB^%_8t.jN}qp7/M ѱ܋vDh} O׆彚X_GSk 'p%RfE4 9xg\&Hť35_X$wʉbo>I JN+wsl( \p"MZ\ @X+^ܘBBǍy%S `ƛ{pݴ>ҙ ?A|i~m@"Y]B6 j< QCW7yq*P%^)T}t5([0N$(r㕔S.K`\FJbﺉSc(biopR뼗Cu׻Hc+C {;uٱuO2')[h:C + >o-gz79]bKDP?7ju/aG[*ROB`gbiD*퍳ܩB&f+f;OdٴWU|E.%T  .qj+/e)aI̬4: .zg4vpx O−*џl|^GdP޻\7o (s[QW_zۙa vd{"*Rq ,;䚈`C+7eU.zP~H٠/.j{Ӂ(Y\y+&WѺ'/:v5CQ_c>vdB5IhʿaLqA4\K? ݬP쩍}vT)\ot|U! 3Vj6v"zNP /1>U %ٻߺ0Q"\mph\aZJ8c}7CYTF!0L1eV|c츋Ǐ}˔Tk|.@dlfLϐ]uD[|gʢ1 D'Ϟ$hiSXmCaO^DplfI]L5.FSƨn+;9|IrP_砹 _we.wj.9b"ZHh_Aڭ8ŸmbǾ)#1aF+.t'mS_nԀ)x2Moqڗd̴sŗ">w+{gi x[DTO܉ʏne>Qej"{bkxT}2ik;5T"dcdqt$ fz'e`z >Sf)pGmVҵU'$$ 7~m߄Ounl7w/" "Jr:m40YBO=쾴gq#++; E^ʹՍL(6]w)Xgx|%%O SQLWݡdң']f=D7\qjLZ2?{|O5k^-x@xYwUW b]rW*.M-kt#zJO<뵱raoTh -ΟoVsëjh#h?Uڌoț:>-X(yg\c=uD17{z9hTV~m Nkҕ%]7itq:qᇈP_4dt~~Xt7|o.Gc&<4/B-͠'bpY۶|Wė.&IrGxsDoCG꽘3ەt3<1Ϣ"8+c^k/iYJ+(9 *^f[.;vGT,sl^t96-kxS^Ҋ~Q(ͭ8ɖ&}/@={ϗ)꣯1(v,xKsPC>Kc-!)̺A _Ʀ"yVAg.Ll[BM>hlPWv7z=otmBXSN^ rr9{/YkeR+N=J?G2)%t3:Ha.JTTd,3wbf)_qʤ$; ~6nma@9N'}r/ A[aw~>yY8osԹETc|M,' 8J d#6f1ādf g9o{@[~`^)`xՀkcm0-p^T)Kѳ`hYDD]Yqr 8jVSVtHZMο rCO18q΁`29ZWhE=ˊ5 CG7zQBbEtc$_:%zM|Zzkpxw>k`֕&3M!*Np/F+%C $B>O MnRẲ+;a°r6RY9| ,n N1"__\g^xS!8=q= fT(VB'n\L-d;09:ID#Fsa[u&!zԸסXP{=V\[a lGeŽv jI E>(LΟIj 0X\ep> endobj 869 0 obj << /Length1 1454 /Length2 7227 /Length3 0 /Length 8211 /Filter /FlateDecode >> stream xڍt4]׶"щ`{hQ1#c1:CDDh%^-D{&y-k\rlh̯쀰p @Uᄚ@HHT@HHA H(.U$`j =aaQ@DHH/")PyAzmAȮpEBQkpҒ|ʮ$ @(g+F00FBp9Pn2 WI E9C< H/W}+&P?pc#0 =0p` 0p A n /p ~A0@A) `C8c0!F^8 *Q6_L/".%2IG݀&5`W^ʂϕ}F?ҷc~ _Q7wB@O췙1\0? ){0k,?VYto Ye6B=P!vCCMC _ 3ax`fӿTOD\B"AcNă:@|~K (G0.LyGDEP1o@L y9cn0OL&(o?)H$fi_/N".O*{//@6y|]:rLY|U@߷UzN|^~ XL,~Oid1h@U>0|tTi<2kqtyuoR[5`y=}s'WNz^h 4ءx[G*zzJ&ՇlѢ7R!rvWx>_HR ޖxvsdc0oaa^9ۥ?ISoy;HpZpgZ@ؗI7a^||@LKmi':T:O`ˬ̴!N<ψyq#o&[%,]aeDņjavSdxӏ= R4cp Fnٳnx1Ajn"\x͇Rc,Y x8VF6X`wM'\X9FhEhhR& MUf*BA73LjNw/wS0Tq] (hVMSF8%$* YCGF5Gc?ǜYI/w*CFr?_ =`* HkXuݮ~:y{vlj0AM۷i=tvDxV/?Kʉ 0ˣhbMJ"u,y1[k}}]UqAչ +4P}e!T_b6i rIe?M0f#0CGYjD;EM@hU!|?fΪv}suNwC)ɾ/X.XTgBJvOjO!qG+qY<$j07헯?wPe ϿMֽٲU' F*0H3:|+_G?^6|֭"Typ,b;e<8 fo/4Ct,RQ JFF`<فW8y;H\N 7(_z[wR$F+͙{٨uV=h@ y-qƒ6stm+7yRF_:m.4.uf{Nla[P]$GLXEWpYM%NVTΛ=΀ɖi&b0O`!z.@nBõhkc|#zeN6{u/wQoZ"$Ҧd"P2^2%Պ2,I4:,/gp]K?}} ¿ECj+Cn0Wӌ;ƴq/g;uM .\taJ`V̢h+M ²O !ܮ&!=wŸCGli$DjLlfQvZ3b+^vٻ?A )3^13i"!&/70Ȝ5JI2m=pʒSbΝOLr_4 y9dL+a[A$|qy 3yP"=nVPah3y/fY|{~tD0/}1zlZ+Dq'p/v@=9[K}ϕi?{=I bis|r`)9W(DpEG*y>n*TWfH(6UO JXٳ qMX񸈽w/*҇ܥun%b,uż͌zyJ",d;\ʷa)<=y&Xdwz  >B=BFͅ>_W^\ck||k&3X=}k8I|xGRE)BLUvPb=.x9;{H6ym8<']-;᪴|;,Oc\ga˅p 4Gs\ bUu\繦vv*~`°}~,, 2(*xl(=&a!iPH4?O*:JzϤv;݆|&CD̛G6,bM{&s@:oŠ0sy`/Q孨$k@4Ԅz7vFp`gĘݤJ )VȂnM wH`c1g@lS܍g;C:a#8(`[)jM̡ӛ%9>^d;3nWҭZpOZkMv9 gSں9D\J~fH%,gNC J3Wrnh ]WϪKyQn}* اu*1 wzo*n.oMQnGߤxPFZCTt.11.ik]^p7zqA=웟([A#vT%;V (e}<~]bxr+E<6SN 53;_1,Q#imf#THZ}2rr$7hImiM`Mc:62ڕ.Jk>%Ua\Be?PM '>h}E? Dq1fOX՘^pcFHHhv0ݡ6%AW7}qIlKHtwwPfrٜePgiৎmEA//7ְN-tWui*Z郍CȜIz:-B#|A=C YF(PNKx@GM%2΂*g:pYUar`"W哰vY Vo q܎@4]sXJƚrx [7 ^p,) `=Jh>L׷qAfw2̜糃jUjA@/] ,de?9<o3=07 8y_g^kC<<Ŭq;@󚠧9imJy:w!Y &nI8UCSi/6mUJ,͸ *LQG?Y!̱^#޿aىp>pj/*/r [?o'Wޖw;<µxvrvLw <ғ1+rHI)_GT62TFs/ADW- dh}Zse_C&n_XfD5 Mf,Fڹ/*&u])NDÏ cJq!_.XO; r 3^hUk蝀^0J&R޶8U*p]HyR3!\xN|6Lt5;C8'R e{ϻvvfc8+~wj7n^CHV?߻kƢ}[HQ9tւ Y:ض4ygAHE3Deu~t%:Wi7?iuMtAzk ¬q|bݻ|ohq%_7}j836S~mnm,5#]^ ,hL߅mys7FtJujͤ`h'8ڪ?ݷyw[6@s{p@o(E/v.oLYGz<-!')ZǼLPSjɍ_w;w[N`W]j5KCSK?#x?~D܊xczopiͩ<γ="Fw]:sӈtt-@akXfj_n^Mˀ..  ܝ)LEeʒ,jO .:N= Ik=8Hp+NĝzyK1Q@}Mnm,I.&S)rWbo~*a}<8n; 8i*ոʟ+vnsԒ/\t[B7-glp=sdnLM{$ՇHߨ"i:MWi/q^%$E 5 Ǜd'Y{yl3pH6Vs}u{(ĵQk #n{YֺLLƽ2h{):vMA9[ H!t>7*pog< e#>ޱ3çQI-7j;`jV4TnԿ&ieFRy|?I̱Ŕx 1 ?c;(RNj@Ȃ(>ƯuhG5a8j⇸ c40\̀ 5]Jw$RN)\ٞ(Jh RXSlNux.q{'# g>sEI^ys8QDrspa-rET WJ Ր|R`4>[XyDTSD;G\ߴ*n1&irx?xn=]EXvo1I|qJEx3M'*yW۫O)^uחf __W[M3my sF"}֦~ô*Xt&Kh{zӊj̢}y;63oғng 6Ȳ6 '4WZvQ!.l ?/=t<}!:tc3K1}h ΰv3o"-4=_b}TצJ/7 gG"y\P2aUx<}ld$CYx?@q]%vN=Y{q|(YI]kVu «JN&QW5zU@.[1apmKXyb7]GRNjܤOcor)]:saaxq8:c#]&\GވD-g6y.MIxbCy$]:l %/5fkw!t@5ء+1ea|\>*<6(}nl`.oƐSƍ>}rօgܳ5 IhFEN(H OY '?e]& p:s)gOef"!ZyV9Ѹ z .9;{߳ܥIg1+3L_!n<ۨWW8&UR'nφh^ce= E$7Q3Ypx\<4}-RZbHczo';@to]p]h|R^솕4iݳﶹ̫2*6Lo4 ´H-jGt<&xp>t}xT]F* #v1s&OFSEٜX˃ʳul1NYbIRQiqkɝ#'Io}Z;ٹ;jwcLʄF4 y}|h5!l:1]Jap3G5E+cC/y~m{G`Aa?J/of],j^; mtPiX up/MR \;xE2Q:A| uu?DWl o~̯TB ߕ:]}%z3AV`bPH0׾hyd2䤢iJlDsjiVv%Er>#~#-dR#WxiؒJSv-yt+JR% 7z0ƣ) |p%o,rKC,X';IPXqA@gfhldSȨ)˫%%r| bDxqG5kR)' +:[qhyosؑ[ĖgZ~rV[2Lq:P;m)b飜Q, 2"ޠ:P zp\dNjR@]$G)Gc3y=O)JTg[6KQRro{elٲРn+;oB*}2+^k$I2r֝n$.SFs 83m67'{ikfRU$inGd16E+9$(Gb4ٛد~0p4G"`lW%wmE58EhiN./5L2@ endstream endobj 870 0 obj << /Type /FontDescriptor /FontName /CANSPV+CMR10 /Flags 4 /FontBBox [-40 -250 1009 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle 0 /StemV 69 /XHeight 431 /CharSet (/five/one/plus/two/zero) /FontFile 869 0 R >> endobj 871 0 obj << /Length1 1465 /Length2 6395 /Length3 0 /Length 7387 /Filter /FlateDecode >> stream xڍx4}ۿVmCԮkM DĦW)GQ{fQfjJik_&' Z26pk"u Pcfփ qc ;9[ 0;- h* =\+/E+(r@Q S(hPr8#<Wܠڬ;9aHޯ!`^{|>B`6ʰqsՇA\*tP޿1;0 ]`O=z^0?g3Ub F} ?<l $l; uF 0z08 o#җS򿄲pO7([T _ߨOvQf U{lֆp (K_^WwFnPo9_ pԆ[Bm nN-UAZvDf97cpB т Aqab@!0uV䈺[Qϸ 0 \]P @>|]{8GLpW_Zz=  (kN_? p"!Ψd~a ZBM{Axspxېjja啎xA$+{5L g6ҴfKƧ}9.G:Y$k} ( R%HS胗  |z3VӰ&|㸩FZ Gj7k*K)>x|<'(vQ .ϯ 5iu2O3&~$Co)Hu)XUqC .EpBhmwk.R4 ƃJ M2uO2́X{o'zM%rPn4,]fnrpX%-ا>'Lq11KJ$9sL<Ň[S"J.H8Hۨm Pyi7kT'7' CqC u_~  _8{*23wo.o*w굴Zmf9N$F%LyG5ăĒ(ע\҃MGO8. X{W#ۓf FshJz#%$=o{&FO)JX E`.cxvʵn$I|w 5ʌ6R2s^an?T4;7 g絺/S>eAḧe_rh3+A#VgRS\'/ȥIV~z;޷;[yNK ŸVgi}u8bT/#81˓y.:wm`x9J*jKmx{5r_k0#u@[CJoޅچ9 nH;t}LtNeW+p"j?P6ɬ'7oGB;jFoL=#ZuҸ"ۢ4t|8%qƘ & n)H')iH_ogͭ^fL`wSf KG;Aʄӄw-wDnE- $-r짉FNȃ;T﫞y:ra _rZUO=Vɂʫj`^4hqgm'Oƌۗ{|ѹ l ౩>reL?1q"8^[&:D}?\8\ ?Uж[q # ♎x9ҵ[f}9=Ƣg񭥖o!4T{c^[q5ۛ+tvkAi{g_k~<8Pbͥ)k1hpF2&3!Ha{[w9xx󖚓и n #qy`m&8'±c`رKu8T^"Xm4/o'ߵy壐H>X#pr%`e˞ }dxd۔wUE*i*}2tCy3=TUfF$J 9W4zI."?dH;adڟoTc}XşLu`:B?Rf>f堸q1 л;A>v<ő*wd=kOYYͿzĶVyާM.ȂXl>ݒ-笘r}q|hT~tV>՗li;@U*32M7Uq9+w\);*PwFBȔ}%֋U9gvJsٖ$5SlWY[kC\Y/74LzZn> K/+K_(~ӿblU ,o0 IRq 6ԙjuvآIٌU㣡|;6E)3,VՊ25_RjrOGpx&%!+&ŒOs'TR'^i%ZdñTgkkԙ6a ZDQx/Mn>LM1[Yo)k"3?\, yU ~G|SSa;u'+;g }'fbJO̿R'q%Nk*~7D>7؈,GkEE\*A sAqo&8Qb(罛DwQHI/0@k9^jך<(keoQ@<$a$M[\x x;Zݔ.ork:&*2 T%8T'CLjK+3e =4y^ wI VJk9+H +*] G#2Lymm $aF ^+ڭc ~d Of񭎫yT>+CWY 8͇gj4|9@D:WǴX:\ãMA[=m|d艎B_fq5Rakd&T#1K{ JȤ*SV}ϴUX;qN$;e 幙.nݲrq+trJE@Eό$`vg*[bR]x,]}PirMa@G+v!*ED]Oh|Q8|F Kg<:NGؐr*icdDD;5 wL:K^hCN= 8'ܙkCBKaE)-"ՓJƬvIQ/Gzbe-4Kwr vb05.Zjb>GnY(6oOz-8 Gj}Du:=u "Nܛ;;O/S814]eզ5O~jJ0'-}%@ϺcMQ5Zw(oG8U6 E%mSJc= gۖCr9VWsJF;[=Ƥ֜[5gU_X6Nܻ2Ƈnx DKΞjD +o_#RUBIszThKϙyT4El]]P(`s 'H$s>|)ҟoHԩm*XxcM- GUw_9pf_MzxQ:Z}D{<ۭgnKNzg55IW]A"+5i )N0Gb/HdaOYl}c~HGsLgݳ+FY_ro'Ꮀw0u3L :8{5$M w_~Sw9τ҄p+CBi` gy V>inai#뗑&ܩ ; M nAyNa3ՋPqM^~Dː"9O> endobj 873 0 obj << /Length1 1401 /Length2 5973 /Length3 0 /Length 6927 /Filter /FlateDecode >> stream xڍuT[6-  Ct483303t7" ȡA:$D ;Ykg߹}_.6#S!\ jV2@H\pq!.?fAr+@ `q6ugBu=\@Q)9Qi9(B!@B1.5ŵ J J( 4`᮸P E>*źɉxyy C\1(" u1p' x L4sD`~MQX/\P8@h 9TGhG s6@Qa+\ Hhp 5XA  qpOk1Fa1O"?NY SC‘X h8w>"'Dy!,HO07s$'gcsc Y)) Y :,oi!sCq {8@<@,^DE0 |w@ TǙ׸@0=Q /[`(?+bgh-|(o8($+) JK]?7_V#@TAڣ1ohG2|wq6 I#-_)7oH嗛pC\.>pTda‰ߡR6BpPA:(.$*! mG`4p uMG@P:3Vlj}5P$4H&c(N0/~E(,.G?NJD491O/_h4Nkpo803ʇ; o:Ra:HsKLUW${깟L1wiF%C6m!ϰx]B}'{m[0ðtZ"cD`'+-ku+-H%e ֊3 e<5ac>|A?Rmcw^RZD+@V;D>_b:NgY $6%.NLaEemIݫϿv܎ksz_s쿖z[8u-_^eM v )BAJ|G:?EVo*7L ̿ T] &f&'ȡ]%W$EݠQaljS݀'e3OيW^Hz) :!ʎpac<")59{}O:}mUs_{j"tncRhΝr2QRjݝ-RwUu 5t,ϣ I'k Sj>\Tuj0KD%P46.5g=w"#?]wW'Vc3c47]?>{JtNȟ+­\_ 4Q ]rO6l?J6~i8E]v ZJ`p(5wӁ8R,7=v՟L rrd +apa&0靑, 蟘JUM>" #2Pe9[*`BeˉbbW_Ӹre5fXl|07GKTc>,}_ZL39 a~͝UzT!2,F4$wu)Sէ*@GӣV;Ϩ9f+rvfLCz ~\l3DZ?אx^x0+ua.&w1{I—0{yjKKG#<*Gd~!YhF=Mxf#QˈR@HTC9 nlVЫ9OK IWcbg'ul_, &v]\e6lDX/h)O35ڑ<Ɣ7dmڽܧ=z6rtJ`Ydlũ PZd'3}(9YEċ4cK/߾dgmd3j!. az*$1r)Scʜ=ȻH(it[̥M\UY/nd}ڄf鞾{MtTQnޭWi𦧶Xe6sΨ6J, M$*6,c1R{Y}/ma^u D#탩kWGPHi#& ݅Tgb/)rca'P@c}R&7I 7VBElL=̯ fQwX^탺 ܠyЧzlYf.aV )ub]^:zT7#<ִ.62ϛTa}tY_v2 FN"9)yie+Ko+f~9.+5zeCsۀ*怍9&5[4A`{ G. ưm!vx;Eq$0.7q7Έ!x H16w{lR}mQ¡|e4ʲOg 8*re2-еoi<=4`f#RKWQ`Ŷn*Mj,I. ,I _btgogJayl(?7']!K)/qH ď,MR;$mnpAZJ} j-HeցbKtbuqpn<9uGCڭI`d(ɓFB˚@XriS3{{jܐֳQ6}P -_FGn.{zZ'uҢ#Yv:8nj6$gŞv;EQR\ݡmjწ7_n;g4UOo6 HK2SʜVpm<_m"Y _WJ9bMV"@娞6UWDfmpŌcR% g=x&fÀi4W4=klf><ʪyDKMzQsONENp'1&_ˆ$ЧLi]߿|q&^Hlr'Mc.N~"aZd:,|ژ!AwDrqziz;N9]drf?3%_`&^9g'\Ѝ[驃;4FBZE_0lM|P+#^h n]LB"\e\_]ʝA6ƫ˂s"jBSs9$QPdPeǜg$V qmu|H-Rh֜ LJ0#$ac?gF~D8/hU盝F}-O~xCFI=0B2&w =.s/6rktV5Z_ <P P ]~4yIEmFU(XCtVFm*y¾b9*_*~^7;ex{9װڍw=k!_z6c9EA҄w4)sJMZ ey)oUD'Le^HRo<oz VMJZ>aOpK5VGɡ7J_XS8K2w=sy=x J 8*O/9{[p>݇zSlFv"MĶPֹ/> endobj 875 0 obj << /Length1 1398 /Length2 1220 /Length3 0 /Length 2073 /Filter /FlateDecode >> stream xڍSiX  ^AWm$$Ha (0d&N& r+J"*JQы-W7@HI@'e99yw^槲xoHG !!ąFq!Ac0 B?1(\(DaaJ DT; pB Rİ)D8e0C 2p}Yt R$8”U7" RA%<r8 l̘R8TzTA FرLĴxBA`C!(t%DX {,7ese a%FBqgBAlx42R,r3Vi :Ø Na.`dE-BbJb*3M =0\J(Ni"MW Cr\Ʊ:T".ƀ/r}x]P#䘯I0iPKkvLr5(h2h@?F֣"uhNr @:ጁU"@rdͧWMN*֜ 2xHaAA>}Grx?Wc}M~PU+˅{>5蓑'|C A7 <0C}p(,)O *G7S,~@`52tǀ9hө?J(PӆcFT.(DٻI?Jdpnrx|I61 z]x|>“F˦'(:htTP$0>]O[~K@[~˗|-֠I҂4{ۢn5y 1>'yNkK*+G$=v_إ&㭇׏ni{?*)w{t7f [1im]_mkNޢؒwϛe5uqE~#3Cr"%t~yzE/ .M QeExaΡǥ j+彗$D3#s}ZtΚTIGuŁm~WkZ]T&;@-^Ij2k/N_ѶդKמϛ>oR͙\XDD^>nۋu]:]8^y~Ja[)\p`غ(*ڧ-Ϸ4ibOak()q9i̅cqv)Уձ] VwoYu4Y]jOΥ<խC_9k9fksoĬb|3HW!e/ыڱʴ=*}rraPԡn BYfq[JaCĜG_*zx{k?M'ԏ8yy+ՅsڦldS& cP"%&VͨT;fu(4tJ_ZM=|fjLlUqf(ix;l0|qc$wYM85&،V.ؠ^_elZNvU5O`o%y nWpYSeAf%Z?r}-'~,Z˾^ѣux6/vvwaq#sTy)WK8vxˊXYY[Oltb>A7Nw[v;gF&LnhdI~1|jӣ|HbdM#;p(AdUqk^uc{n/K : SB爧ǐcI'? !/o卫]ӊfx3RF9O[;Kzy\L|tYm!C{]cgo=?LȊ '9CW9.H]]ƅqF]#+G ^eR endstream endobj 876 0 obj << /Type /FontDescriptor /FontName /ZUTHPM+LCIRCLE10 /Flags 4 /FontBBox [-2000 -2000 2040 2040] /Ascent 0 /CapHeight 0 /Descent 0 /ItalicAngle 0 /StemV 40 /XHeight 0 /CharSet (/a4/a5/a6/a7) /FontFile 875 0 R >> endobj 877 0 obj << /Length1 1606 /Length2 8614 /Length3 0 /Length 9434 /Filter /FlateDecode >> stream xڭteXm6R-Hw7Ht0303t#)t(R}<>{uss]KMikH ApprNVp5(DCh xt `10@0"g @9 bB=a`[;YOۀ_?)+bI3~< [%8]x@" >f8=4p;#U5扰D ?PLk(OKaK0@<jY`cG0g/p0_ 0%?t~$}A!#xs8x<a!_0<,0en_?`!@-AXB@WQϿci ۧge Mș 86@?oTZ׆p6Mn\8tº;C!-җpCm7˼7 t^uX[wsBKۼjq%έ  1kh;l9q bR_&#<-`WhnBx۬Pb)XeV'LqkD bKPF ƷJx Y)|(&o FkN>a_zԲC3Z>ko{郆k:tS _!7 CݜEG"0ZG5X L7k^kb</j -ՏH*Q[lV\ YI?la ElTլnt Ka[ϖJ5ou۽O•] xĆY _-LxC_Jc |HX Cl!r?!&7)/ejLL;$.kʌ,uy~ wŏ`놳> &`DHiw;6?4,8oX#M؍HKR1>+wBVh^@^d(t)"ˇdU~3'M\ ׯ1_u[{V$ D>x~ (%q?DSRzwA`NLx^9?t3'2"? l#^3aHd [1\nrTUd.6|TI@_C;Ttxobn6𒂯TgLkQk݊x Ch5MW $6*`9og> Bοӈ{JDBǭYrW*?"#w^bw) '\C0-Ɲd+$W5A'{inLtN$Ɯ7AN]}ʛfH?aƌ I?Qd(uz5pқ+֓=oovC׎N XM<Wa< l#N|:Iw1pИph_ {\3B+h23}Ky2x'_ݐ i|묷ytwkdYt| t yآ 5]@9(&\Y$v[gxCU>w(5:ƤPjJP@徺1 ~;6j^̫ :7řb(oՌLOj-D9o7_WD9ay_j4KU{@X2;⮭ bJ6U]~dJ5=k]-l5?[mD3'%Ԙn2IdMςFR}qe~ҢqTNjhٕ#[͒ 准8dZ݈gDi~X귿r=?#R|_v ,R_߱Qݝ[)ŦoH3bgIV"vS^x=BH"74VԮ%FUf9m䧺Z".c$g_e64bkl^?OMdj{H$v ] 2OJk kWHUl)G~Mpo6덀'!F0Zw/5"&GU;D=13._QDqaRY0;8ۘϝHƑ,"T&Z[hDsr"& =L:e;󑻾1M9<6:Y%BZF.#7 X0-01E_bGhgΕo l-ĩ2;4P(P1-@*0OO!1dלQ N /<k>4J4@e?~ӷf~Q0z4RR%HqDU \Abp@e3|"=|S .ǹ8#T\'yoǐxL %E贅aX [=-`2*E lX~hJ.׆N= Q& OA%eюg]%U2IBx$8R7EiVЖ J3i3:I{0;f-~! ny3]ڌ%le8R h)5Рn˘{Xj׀5rdז][E9yJsT,%EmYɅQrUt0&CxO 3xзeVrlaYXw=W}NgRF_?}Qo}hi {m72-ھ}MA\caE @U&S dۉ{LuҞwئJ32xV PC }-*F|7#(zު(I/"K54_Bհ߉8FV?@E?5|ɇO+|a#ĴĐVR[utnOHT GԻqd䓵Y IpO̯j$O:y}Ϡ_2%["Gw^E{B80,t)\3)/!TD@deV,ɦJ!U}E}xnaF P(hK}|6v+u{Ĥ^bMп>MvrFfrLH3PɒS>7x+/jl7za-0CV4W*lyBߚsO`$؛d .?l/s@D Ůc:_i³ g\a7;C Mn:M8BI.dI$MvbGe*<KyQ <=?Y5HנQΗf'UT2tz68{ {D"B,ꈰ\N$?ʗ Ĕpړw[2]ꔛK>2ҺYPg>mLg%$bZư.CȨh`xl/N5r|LcTV7~M8n<`_* `|I&8Nݔ5$R8MfraLޫ{/$})q}H: ugNQ>V_ iYM^9YpM$ c0ӆɨ>!5 n7Y8N^))/V}0q\ 8^ZIӧxь_B.ZziRYXE׫u6?h c|+=s>@J8 TnJ˛`6Q"oT LL$ %6%侊+*g1eVZa.eл]2NlxsM0jMFS#1Ck0A%$zGT+E| h[^6-d#gbx鐚$X [l_eϯ\sElob2= I#VCeBID=RȔQ:Qyw%l #'g %)P7P<]ċyMњEIe6Ya S҃/iY6v3Z6<(#{Q惲(z0VED2uxM TF<|5A>͌6ltmW07bsz kc ruFd0by]д4=:Kd|gpJtδyL<# tW_aTIWPB;a4F,7iڋ #kPYʁyʆr7PeHYxjI,Ѩc2Z[%NMǴ t|lؓf*6vu(6~ gw{w$V} k,Ae_xeLx ŝ_H}.v4K'{5;DJ[.FGwk0CjK9!s;O$k~aLzp~֍+~8+P#BA] 8P鑚{b&E~ʷ7 9uKX,(U}RPWGhY6hQӾWgB4# ylZXF|OXO(g A#.Lwǫr"--n[RUQLV_q"k˪&€ |U#O/ 2H 9ڡyeہhަGg:Ź*xϧ~o8Gk0SzC8)By/_/F 6NNXm/Ƣz ղ{pC$ƹv,OIt4W[]HR~! .Oxq>k W0rN+ ?}Kz>L}"3&YEDŽԌ̠`7 춬-s2>l~48sA+F\~=dsDojhtN (ksD됪F*!t $٨/uؓVhg뀲 [gAaOKI#H0'[v}#/͓yK̽DE7A&Oy#x|6o(x{ޑO<Ҁ&%a(W3.9|~6;{Kvq!-#F\R l.xJ4t$I;ͬƻa:7]Sޓ:S1F[A2:eڹ/A[xI9ψ('@Qg:4ԦFo'RjtIZ{UG߇b>ie(@O}U}mF),ӅGf'˕zz%)m,dUDVm ׮3\($WmZ~CdS,7qdk >6ii]$rDL$dO RοY-*~%[K.cXJ|8\έcCr"FNȐٝL:Y!Vd0m m:Sӌ/1ʴFo1f-W $<3}4Z`1L!Q="2ju7?Gk}>گ&/6}V嫗YJpyp uHDH'TcUˁ$_"L<昸d%_)%4 ' GH=gg48?syK(4w@btvfݹy 66R#*~7HuS6k=bV"yF)V{Oiϡ3ܘhD/\QI(yz~middzeİG䞝B9#"W'I;Y(Q2w|œ&oxZJr:}gV Ր$\(!Ewٶ,#f/*ӛ=b\f;5kЬ~jH8x_j8bS`U0t-}Z-_쭝Z׽y')lö0'3.njdv.6 hY36(Fk,MZS~0M|r$&CʗqL~RG'rNbtVlrvIAdX+9N5X@*lL}~ÀeB[T0~qrTl*k3RZuo&ZABԤIP8j Ud6! =G:^qKՄԗsĠxhل?C$-4Mh!LPhC)w53jQ^Nkt'3 VvCXOZט&7է:E齥Ar56s tۮ&^6FZĚY>~r.EfF^>^">Ouma:V^'S_ ,'H ZQ*V/V.2clΧ]sf7D7SiLblp>^厸Լ I =d~#P ?%;."0ԝ$^~V5u endstream endobj 878 0 obj << /Type /FontDescriptor /FontName /DWRYLS+NimbusMonL-Bold /Flags 4 /FontBBox [-43 -278 681 871] /Ascent 623 /CapHeight 552 /Descent -126 /ItalicAngle 0 /StemV 101 /XHeight 439 /CharSet (/a/b/c/d/e/f/g/h/i/l/m/n/numbersign/o/p/r/s/t/u/v/w/y) /FontFile 877 0 R >> endobj 879 0 obj << /Length1 1612 /Length2 16796 /Length3 0 /Length 17635 /Filter /FlateDecode >> stream xڬeT^%Ay !wwnsqn?}{j͚UڛDYA(`b`ad(Zٙ(83-\b@c1 āVV @Pբ/?!@ hhި@@- #(RHƶeW[+S)H0wp{0u74ƿX".c#6)=lg`p6`eojjvsrtvaLblͪ,.o Kc?]#L])_0 c+{' `fhk7_0Ggpu/g-/__um=_QhkΈ7)on +{Eo f/ c3{[I7%Ne>$oEF!{ZVa[cWajMGd"afdEhl2Կf@g[+{_EL 3-Lmi=ǿ]@{$WQgRє;_Q{8%?JQp0_0DE O +oBnCZl[23˿  FYQۛemWt",:Yf~ M@;ԫU;tmT|{ flhX8u|ߗ=N^x٠l;`2,AN;ӊ߂d<ؙPQ5,~!jgsz#s$cRՁ2` t>>]v <1O)I"}>@JHƳĖHΠH'PXW~5.EڬoL-u(ϏxQff`tOA\ieM l!~-^g(ֳs7l@঍Tڔܵ-6۷gd|]흼xOTmWwv, \Dr FvCkm,LN_7jSRroJ܏̟)( -ٞU5M](5?Dq5k{ڞJCȫ8S  U%ȏQ#Qy ҏ+;G\_ᮈ@~Qo ?$)-aBkVENd)ج{3*N'>N6 ~h:,E~q3*:Nk3ƃ s`OK~ӽoTlRUWF&k]m]d?&ޏPԽұ6NuV;>՛@]r&cďkhQѓ̍ӨP}JjojdzrfjE.\"cQhJ&kWga@pN~3>њBӽk?&bGW pGobB: ?LP'{cXFѰ߀MSg[] (!WЯo@1桐kUerN_ WjcRZddj9cS+!?r>V;9=5.q bcxȷ_,/X>װAƙ?($Q5k>K:7{,L̚Sk†68Rby,f6>|Ҭajb oc֧\Ζ6#oͼE݀CfGhq%0.}X4M 4ߜ 9&^/ @:g4 Wn Fm$5Nuw4S]}ynT>"i&+ww/&Af䲼 ʮ)NW]DC嘧ZatG =xDoe2zRM)WS;H15FiZ$/4F:Kkzkr*o/W*azK$?*dشNg G0+FOGO+B,qe >J.B'M$f>EW6 bli,LJZnKf ɍ/az(Vr O夓r*Ajk-?3[ 6 Ddzzә%^TBYԧ0RA+_^mԜ'?Hg ׂEN ~p;X32Joz<jd= \fCڅWZ G.e]Gj6ԞaxQ1AZo*)sssP I9ӣ`!X'Z"'2] h6=vR]`9]6 >oʃ}2ضOGG{1gͭ^(hń-=5CmOT(0qKmszT%ǫ=uO1$ڤd+@VJ&{m] ΁0 p{{fX >{s1ږG [0*5f3)ȋF4~M=[O M 2ȫβdڵ*ˈaKe^"}֤J\ö@J`YgyM]! 3]Nم % 2.Ќ~l\ʪ&Xa5R 8\CKg.xa?UK GBsRB\OoZ zRU<KG'"|7<7 Xt+}}h~0w"g6iBJE{E=1C1~2Ǔ ?>LeEߴP; C 3C%4~|'T/ ݣ[-eVm7iynzdN1H=̚VW#PvV_ЦZxk-gx}DՉF)Z G^]ck"SyTў"b }i@LȜ)$W2*m.CJd_SĠbDudGR;BA*5в6>4+m.#{xYI"]+7~~L2"iauh VEGrWKm{ݛ[`2Qy, L5ZoK8oU\ǂ(I ˸|E "%Z+[ӗ1Wx;EWS r#˽Yޛc*BgFJH&wVnIq.OܗS]Y440;ϣ_ox2??њZ%] pfor!0TtŎ :9MX7"sп#XiFiC @fIn~B2)؊l0 si6nX_hIF{N;ǶK n(yp%݄=E9'u t?),i1ÓޓPd1Lv^(8>>_c |47jS Y6vaiv_\zنd<1i>ܼMc\cVFXѠs sv0M2,e0ccۗ{Mmixોة$s#Gd@P^٤bnO V՚kv䃙7Z שij&sN udFPDC"=~#&Gĕo*Kvhy(̺*%BUg}g|aJnx•IE~rނkc4 'OQҖF oa b;H$CazWdw#4$: C2ḵYSs},g& *Hcxpy?ee &TP-(?5>Nkեﲳd9tpƛ\BwţjNz_^հ" t74kF-NP%AP+aQjdxZϰK FH rn CDsa# 9șB}M3!| VXE\ɞM_ |X UIbY\!ʳhAWJV_4gQ]}gєHB9,4Cȉ#Sw#ud4VOpEJ[ |Ok 6ؑu{T4>VCR} U Ic{9HYr]Q,g6yF|WrdguQn5vⱕ83*f؁auV:ixȜ$cZ;&8Jڵ9EM 7"/UyUfRwwt{89=.6{Q0;r )"T+r*bYJwz_tL D2jG8 e4ɤ>OiPec.R81*+g4g4S%;vG-"JF+"9 EseRW 2h`}V㈑UU\koʕ2N)€ĥL$Jer)^hV- lLJm&}# {Ou.aq~ʪ(/iö[۱%_cD7ل'88 9 P!(:g;I9򹦠5v@TveE^8CH2$Hty%渀QzN O1E&R1/6_$MدޱpGIp?^RZV%mN}AfF,_ OpDR Y m̍õWDgm7s׽ó'OƖ#:CZ|Q 9e K*#Vcwm V@^>չJ<}'Ikg?}9]\y (JAkNLX8[vJGZ <vͯMO#s>47]5Y})uٖDC"YPXgn:T['_﴾_BQѥ{i&0Cvn\>)(PdF-S\)4ϕQbK{\]y;NLd(+Ne|Owy;: h7VWqŊެ^lTK3M5"4W3 jIU>Bvk(+CVоϨidk`1~n,2MJz}.| & y-Mo$M!Hk΀S4ɛʬ ͚5LYgrG}c.V=R6bzV| =+j 9,}/m +۔2w#w=Ѭd ENV?sskM@p^orTNvޭ|*\PmaCULPSU#i[`r(2j!`{*Dت ejVO_F-Do^G+!v/ LiyaWg}JH-=0Lo(rȠ;o{x;DSpiB]Rvx&NKVq1gRk_X0ukGQ1%/?"JG91Ql"\-)I^VK,. çu1+Ic]\:A,Zy߻+E=b*Pz s 'Q`~nz^` CRg/TUx~L mo(zlkP8ٚ,Äa5_]eltgh]ˋ !CcĉBUMr& O#{ ^lKwf(!R.k5ǖJ~c]|25Gce1MԻ EFl|'mR0MYcN~ϭÌ&ǘ߸pD$"*V6[7xV JbJ# ZWA NPꃷ4%(-4[pC78zF`nl]t)=IoC>Q+ల^[>MRN11܃nBL_|*׹- c#RabCkQ !Gtk6I*D-%[p}'<,9%Xp2b srl]f8F',RSw>cuvӚs )[u.gƏk}?g yaR)LNمkϒJXѨewn仞G/%=[;[d<& #?6>L/Ʌ`>W4ԕ`{{6FD޴zzH˻Yځ1\g&`50:ߠxWƺ"ƚuۋUN89,}^mI[^sU to7H;jrF\?yoI&i0v|?'!:!\7TޒVBЏ|vrߟ?@J]aMI"KU48lEp~q.aC!80xQx4"1QGpPzȽ1&P>s2>Wp4@ၿj*)jx|Ou%7 P}CzWP(:`5; 5`o m9\n!C+|J{h6v y׉Nk*!d)R#_^Jhget.o  r6 4j'}{KᏟJ$nig&"}}kF`NXdiF9~A գYކ}m?uװKY?հQx<ȴ%F3Pq߳G@pj&w R)Ẍr8Fr$3:=|I &R4UG&J6 h}T<,,hn12qy/!^9uw}>yѬ?|C v,L=覷#J=Լ`$k,?\iwp ܟjmi%?(I4Ҭ~, fm]G^ݱΣ8w-]maW4*x ?TyüZ}N0n hVYІ~2νv9YXk4A;KG.RyV_j ԈD.%~yY^$Nk$8$"ndҳ?`ߪېO>FJUJ*S˜#iHY\/(t'"$"bmg'B)lc*c_{nz]-1o8E܋2XyDʖϦ~muw- ~,Al`b5)PJ0=3q 4)u[ƾ7;t^Wɑ}[v6wʕҒMȃMuKMX C Ccgd9L6'}ċ~$]tÏ 1q\v0k25q▤|FB.y}n$8ij/vfzHե5KȗLgK jXR7Dt 'J/]9ЖαJ.}3_3~kpGh2fB++G: lw5zEMLH]wyH#b8c!.:rbq8-:uijHWB @/|呎L>[̒}~ڼiMD)2dYni-`Et GA}W5X^rq~'1!Ul|4$>$Wkkx7=hE9(!/:_C뵿bٙ@_žrZc%g("eQ *~UP%TժƪzQ4&[Ge(묗4vÅ)݌8"t;ڬVtA23F~!E-ױtg ֟/fsO ;#4m@mce=T>sL$ ۼi"]GJXMׇ?&Ch[6ʘ^lUHlZM?Wκe8sJq)@FJ/KMXY 4K zGpݺ;EeyČb&coSRca{u}M]u1^ .7s|CJIO∃ ]kQD5ZVx.Q$E\]0-菉,#hO8yni_Hc9{ ]`yU^Y=˻[}yv4:o#(oJK=:||e(!fQxJ˚!_oѾ>^M';[}.v,'氷JD෌VXdAoa]:+32!J5QXaizÇk#0pf;k :PVNpB~R@2!@n,Z!Ѡ T5g &QK jBCDa-@M4KjlwsmX;PRYʝc wWya)P^} p{S9j4N:_b\Rc]}S0BLQrkyj'Z]TUc͙J{B4 }77jx,G:֮XrDw-L"Iԓ>5\ B B"S|*<3s=ً3K1z`͟8<4)"ݤGJ3-oJbk7.G`29ZHf[hEbx PLO9E_ܳa0i săOpH_mA,SgOa^wmP: `-^Åt-=>W9\>~6ҫr:Iw% pWU0e v TE$)nN#j#P,F*Hgs?=SuX) _ i-: *xT{ĕz!m.ӂ )& ugx>=1($~qi'>`7 XttXJ #{Xonw> ZSB#ii ySفOwJW9P?;n(уߗ6}kkA)ez9vP[e/6Ḋ[V g~8(O?6(nMWU)?* ٓQ0C.b+T@yA\m/?N|}(,v#'+Nk'*thlm/"bvae+*9;?]%\V kQ;s N\Qbp;JHubp5ԶPlpcʜ)ΎLN@T5A<.;aBu;Er[Se[d'aGV. ~JζTI ٛ ^՝H COsQ& ubB$͎J{9 q~e$PV>bƥ?;S**6q C ]q"bځGv/I, qe1*Tg gU13heQ^JKsU-}#/Oo\&w&A\NF)_+*[w Fh𼔫i*rcXP,HmMWC#@l# ea<La!`D!̋P ss t'#6\&=-Z&Qftޔfv(JwrF"%@\.1\`Ϳp l JX@ύn⧻1s|6_z8H,}[E| ǢDG:.?mslAM_9WoԬgi#R3nrDcH+F=~h<K{ծ$czn탼9Kou> )bOf%p0w4nXjpEEtVp>t6qR.~@O{*dΜOV&ŐuGLVޥB@wa\؉FLbՔޣ^VJtRbgPkPtV_[m :~+w>7%Mp$jc>1!eE q`T/rh=T%ofǢ_ݶfUh2Rf<~h!T (أr1W)p o^ #;3@S3\]tk| /yRuKa@w 1"zJ"BP̗buWa2Oiv ~? ۘ M͟:<6ܷCbi1֖\,tFB/ZU1qƑI"~ʎiĀrtqFVe4c4\  R$rFy"hstmS^q_ּ@(~?ԋq _DoRQ9{/㝞L>,ڦtn#890zŊs)Y3VAq X5m} N a dnuh vGNy,JrȬy磙ή\GliЖ:S6/vqFVa!A+5䡶hoCߴ\EG)5naZ)Kgإ?DWC3 Y酩3A\9~_3Q*]F!PoM W+>O=RWo'0߲y-p!P:u]mw4[k9JC6A_c!LQ!ȢS?Qm)q y(? jgἳBwY ;:􀙾,^ՉpĆ@3kao>dQpJB&+T[_ҕt L$1U<;'0@<^fhb>7yxi#\fCG-:АDi:UX60%TC@ôG_ fg!~$$T+u՛ W}N{pWn=u3_IӅ'(GCtGndi=4`!Zܔt(g]h^  endstream endobj 880 0 obj << /Type /FontDescriptor /FontName /THAVHJ+NimbusMonL-Regu /Flags 4 /FontBBox [-12 -237 650 811] /Ascent 625 /CapHeight 557 /Descent -147 /ItalicAngle 0 /StemV 41 /XHeight 426 /CharSet (/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/R/S/T/U/V/W/X/Y/a/ampersand/asterisk/b/backslash/bar/braceleft/braceright/bracketleft/bracketright/c/colon/comma/d/e/equal/exclam/f/g/greater/h/hyphen/i/j/k/l/less/m/n/numbersign/o/one/p/parenleft/parenright/period/plus/quotedbl/quoteright/r/s/semicolon/slash/t/three/two/u/underscore/v/w/x/y/z/zero) /FontFile 879 0 R >> endobj 881 0 obj << /Length1 1630 /Length2 11346 /Length3 0 /Length 12185 /Filter /FlateDecode >> stream xڭveT\5wkqww.A[KnAwwwK >Ν;~kf~tԮ%γRME $a`e\X>T7rBҦ @d89(@ /_.3"o`+ۃ;yj@5` T>ʫпW9\Ljno W`Wko\S491@.`W׷g`byv0s798yؿaodjWsUMZuBM!vG7O GsZ{yC!`W +`vu3zF 7Wտ*`L],@o4oM_}KNNv^G;5! ;KVη搷V`E?1wkgފ0ptX,QT!o)3YD?DywF%߾N-fgbjdo#@ =cgqva`;&u@(? EMNV`Obn 4{v- c} bg7Lln<@^\ϦQSJE鿻aT{it-'sp7Y賳shd- ۲/My{A O9꒣PMzV+AЄ~_PSifQA`㷀mJ0)?m^N/ #=vtRA~ X|LlFg:>W J[pz;JȦ:\ qi~;7OlZxzFt|n`txh}8d))e2;ǎzf,YrkDPD0_A !0cV= gR9ZH$0cު⚮89?BDufU*Gu&Bb:,r\`*# Pb >GXf¸? 57!D0i?(ow,sX[QQ3 xs 43cBĭ8*vDŽsB6>N,7̩AΑ.m_µċ5l OLGMO$q#-fsRSϠ&wr̲sGגJ(8BqP6(֗g|Mɖ܏?\o鈴P7g(foyv̦xЧXYSZ씶 Ppx}AEb JMۇ~ @飯0b_8EfϔMļPݘX^.*Xv xRRk: e'B /7xXjC)W_OꪹLJɸIҕ"H”'+AGrʧkv OfĦډ73`B=d-SrW Eo.C>m0`TX:kz"0 W8O\.2w-jlH4]ma#rg#?MkDY`$vL=lŨ*d)瑮 ޛ_Wt!IBxc&t`CXfys`CPQ b5E$#QWs?Ƀ}2uZm}0BRF{9Z(LȌ5ĩld`?t_Tɴ; T*Cl Qi{} 7sxbg.f%WOni.d IA:W qƾO#P[=F9/r׭_);9U;fWl`v}L;b0j\l==oB]-op:Ƽ{#j p>%oVѽ):7~f 66%sGhA' ˲)AJ"R(*#Dpz̅tpܷoLOhzZ9sOFMTrߧ17$ʍ>.K^J%4mڴT{=C%P}heٿh*>祏OKȆ#&rz@wJuhL#(FpaeGB9'&+XW%yS[lIPge՟%zLKrBN9 0JR4I6+']%h8+qC=TdL#=p> =|X\C*a/B1~-\ʒ\NՕtĵ>j~adΫawm *+Ic`I>?w\ryU F#sϯEvӊeejd{d u8tpaZ'T;}b+"EV敜_ ]D*3Ia?04>m6f ۵$5;Їgw Jq'3e;yrTȧՒ{^{s[ۈ*$uneJ} j}^=sgъӬ;%*L/z xG3E3I;xKҼdpAxVRtCs<*1ǵ?շSUߧY)U;Fr#0u q~hl<fbfQ3aMHfky/^>}3U ^ ]W_yo6JpGg Ƌz`Pa V+dS༰D#\ ?VDɡy=7hm0GciKh|EC F!D#Iܼ&F1*M~Km~uOmcq⊔*cܝ{-DX> 9@*'e[޸%=IVٝf-K#t͔ñ֑Lp@̖w#14L^.Zȍkk^6wg9W!FPWIt!m 0q 3$oJʈîޣ>U/'d ?rqd8ǹ#DbT0~1tԪQng.^ :}fJՃ]톤WS('h7hOlQ&b|*ch.T3qfP1s/B~jBq2b moe,ďPCL0ZE"&EG#t;RtGD,w__[zW J{2ң4C1A?cZ6]4菘s1H^V,yi@H c.dm.DւHauXL=Ը4ٍT`&T3ay(o]@p_>>TuWZ,܄pi YXkte\ u) 6&3=k!h:2/#FGg0οAAͳvnɸWCOm?ryΜXǒhUDMunsr./PsӺOE~ܣ$*[d52(*GqNh1j?y]+2iq"VvK91;fbjZW2fΊ` ȱZTcNo}ċP-e? ή(?$i9Yk~)y-gf۪(Zjb߶qyWYI-7\(;hˤcu ˟*>ߒ _B8H77MmGA؇ ຠlpumKu Rrfvn?4(:]snarf}$['՗ /k#fX,8E:U7pac3 ` qo'ms2ůYB]A8tj3skcF0NFu{Ε`r%4 6`(l&@sۋmD #ɝ%V# yC='e%'/W|ylH&gχ k?mJE7c=XY_c~YHΆ_&YFMУPQ #!{Q=>tL{ 'A4ςN wY'8N`O3Ƴ Aʡ+ &OJ/B i5Αˤ4>j~E䰩lE7.:7ܪBď0d5Sᦚ#غ\%xf 8Ҡv,Q1:d+6Ov:*]sȕ_Sd&M޵ǒ7YiZQ$ %,~OkGTӝI'3z 0U\",a;tʉI,`}%5r#K/8;u:Is>YȁC+N~Av73D8! OP 26$ tU*_F%(\cg'{رoǘؤ<}hwC]P==!GkG_Eڗ+hD"4qXUg}>{~-֤o+Mu7>VlIG]ڛ "z1oWDg[nCq=@*X3 }hV*Ra#P-0<>Ae#M6՗o%NFssxٸVנh~ĐFc }6`>luCks#R7rYJ{>H1Bׅ+Â!lskLч/.q C^q _ZG;hIy.z87Y^.]z*"gX^dSou1k0XX]SyW"fҽ@[?x 9.TEo-^Lbw <ˣBy՗]j^/zK8҃R ˇ) k=rCNJ3Zp(;R4YBU< /ձ{u]xhO#>ҾgP]C?E#vG@Տ=J_o"d*K1YriF 6p+Zf~gҎbk@5dAY>nA̔@dVPrd.5Y]|/>TǕsJ胓eLHN :O~&w:/yÑaj g8s]'T.δ16'#"< ꑃ%Q#j՚ux9OzEd5cP{։얞;f"NʷjA᩸IR'Huu{8{ߗ1~WHJ0MjII0_-Pv13ssNS"1~}H(OnUgj#uXnri lW L:{\h6Pੌi?*4lczJD]f: W??쎧l_FLLB?纝yW:v4`^=`ꛣ|א2Nu"3_ db(.M:2CϏ*)lŌLmЃu' "@D*A|X+c{)˨> RJZGI ӗEEo CYm2eґ扶k7)@нqbͽ.m t;X':ZJ`zRk-˔^J\Qfnuifz*(^$Y9WrWf쭍 |r- vp_~no_mȸ i v6`;!TrPYX#aݴ|Np>Ļ\_'Bm/V?H JDצF2y{%8Bn3D>Ur/δ,?nj [Q3{F:vFE퀏^P8$vV1E>6)>[|~8/CStD4 M{eHdϩZ>bv&i/0<X Ub'ˍ'>xߚn³1#X=^ e྾<QjX7KXWiI|E{d#f V2\-'z+\+cGjߋ>=f k#V䨈(]9T D_V,6׆wz9R+EB6q͝k<ՋBO 'tɛJ@)x)v+H}`{Yps7m)m;VMcq\$|mӼ'@Y(pAUR9P_i J~^@z7 5^a=u 4 ]%WaoQz'_ D³x۽H1 +%Th'/BQ),|/ط 1򘧯[A*]ǒ|zq@dGmdCԓu{_1d^(}~Uvij|#:ϑ7MUV qgrdkD {IMzKv2,PFDb*17^MZȧ̙\V~[&-O"؛X;y_ .W4A|oUnqU|`KQ^wETR' SLL(UH`120&>՚0XԿ@$ ÍƙK&6JP}y//⪹v.+%'"gV_)v&uݪ+$փt1:4n;]Ÿ㾶=+TofG^Erpp‡aa#7ҔI.TѱʊM5)/a܈ʎc9;Cߍu٨ 9'D_A6JEiLݹ''sYoAϴ I)Q"]MP4 =,oNۛ*)xO""گh)"|X<*3[[y>ѿiqcwB F4'_`͂+O@[B{CQE$E?%<_QȾsQ5[NGTTI]Dr~((kF䃗`=Hd"#VG W"֬5UD7963ܲάm# k@9 XJ(Q8)6maеcwPz $p~˶d$ e],*d&ǘlY`X2ܱv5f2kTWwR&&j<\UiL*}ݍ ~쏼()$-F<E2痤Z3⠑ut0 3:^(~~i? 5fawH&I8Fѩ"BnA-s}" y3i_Z1Ml%-u {̢2SࡡRүHv#= ǽzhJR[lِS5ܿU$!N^<&)Fs]#* _okGǖ 嚿9m?您9yɧN{~ 琸%vw$ja.W cA4ap ;[aQAg :~5{8b1Xvt/αUۄ hf{;} AT>HGO5">q&C1PAiELė%yL]EцN|_e%n7ԈNfk */?W*ZdvAjƿbp(&෭d-5/jYA o`PFe<^{F}>Blf&O_c*q3) UPU˼U)jϜhH>?3YKۍZa]J.+fR[OΜc\fxBwP2_ϲ/"T]Vn8!n汬8䊴;\n;4>#)s$-XFǔA.FhL)zeu{LlYw𯶵=\ s6MM8{ NALD D&(#ax>eaR,xS|R!7klNTJ \k) UF7/JنHeyD&WDk8^Lʈ[j^յvlY+&y2'I&S|$F+Ka Lq\#HuE xi|9.t 蝘/KYN,:rMAzۉLXy N]Yu:yAE|3(4D 2i)*VQ2kHrWIjܙ{2V^%r]HE: ^zqwv)c푄Z3_@ @rѾA^$Q 엫ח쎰|VI~~ᗝWc&ˤ38YmӋlϙ }/Ӂ!vKӸъPlS6kQMPl_4 {6Va [*U|1yz۲n.() JD -cłt턟G]QB y 3KUR ˚( j1ZyejT48޷.urφ-w/>=A kf kۖK7F=?UUⁿq q/=\Q+-/t7?Z|BJ=m\FZ!`(0NRPK(,IRL|)uY۠6!7y! -#[f.1R!QωNOʈ*{y(T? ܣ6yt&rvf3]_^O_k_;sehXi*R=+3VpL21mZ<25oźHN%a"z' xN!)wn;eL͢C\Rxyɂ\y9gGkYijy91F 9bMߵk? ڰCUVѓ߇_{jO5@d2(]@zMi|ðKڝ&۷8X=TP){PnHt'o48xT|lNlي9x]+4Tz J揎J;Z?JP\)!;/_U Aolo7lnږHP$]{/,TIT`9xæD/dA #lx:&f=%,LYy%íOJ@ URa}KgHGn^fP,ѝN/OtJѯZk ?Ӡ|%C-D` ޾+vi=F$ ;Mŀu0cwqQ(9^Jl5v@.'T\U,~1AF*!cXo'm"bGj:'Ȉ$4ƦӨ!pyg5.!)qpm )Lݪk}4gOCr܁p'LlF}/U=n6) endstream endobj 882 0 obj << /Type /FontDescriptor /FontName /PYTCNQ+NimbusMonL-ReguObli /Flags 4 /FontBBox [-61 -237 774 811] /Ascent 625 /CapHeight 557 /Descent -147 /ItalicAngle -12 /StemV 43 /XHeight 426 /CharSet (/B/C/E/F/G/I/L/M/N/O/P/R/S/T/U/V/W/a/b/c/comma/d/e/exclam/f/g/greater/h/hyphen/i/k/l/less/m/n/o/p/parenleft/parenright/period/r/s/slash/t/u/v/w/x/y/z) /FontFile 881 0 R >> endobj 883 0 obj << /Length1 1626 /Length2 15248 /Length3 0 /Length 16094 /Filter /FlateDecode >> stream xڭeP\m& w`Mpwwwn% ><;g3s~tվ^k]^wUS)(3~73قYXr6FN %;9;^FYCΉHI)4[ي|u @h `c"RD-U%uZzzc0r͇'@ ڂ?B_;*9`ja +hJIh$T@[5@ ca ivv&b0n@Wc?*=xXfN& ͇݇# 2v>*'OnŇ`gaibgOI}Ђ -lA0O.# dom#ſ`8,lhfhb >|;Y'_v_, )"+GNcGn3 [DfEo蜁j?3C `4Ed߱G-Fw3ǒ1| Edq1vs6:)GKۚ}oHh`66Z_rU[-_t*Vo_Ee_ CVq?K3_ ۹<Yxw/!Yh _tK1[c;Flhk1iK]]ƈKv) QOC?U |}RBy ^25L񽵺-ؿ;NyalPs3Q8_قbQ;ؙPT+z%jgw?%wŦG6N@o?CtG=0:<4} ӻOH@oxBv3p7~yr涇Pu*kؖ&kZAO_X]uwm#!lsW$T}4W+<0H QFV s=Cfd^QBjփz H ]"3.ƙ8]Wk)"hv==Ls_A3]+( I)о?I'ûNs9b4) lFTHݗl>ƪ5K7D)%ԃ$ ƍwGHYS7q4`9-˳q8/N6(o*}:3BUN4fpc)}d;EۈIyՕtk 7T&o3砚x t' :i7EF\]=z޺}ӊm̈2@.g-K? 7f=l\1fVtSxqƨ~øғp>l֨݅ޅW=o-6ka qi K%]go-kǠ,b.[^7};exmdH;ۍ MɲOu_p Lb %|zO6*>C*[p ?Ƽ .1Z%Rدmlvh#73ka5o 8Cm|?5g2_{I+?hc8,s} {F/6ioW'-> XŹ wvLХRtmװ#̍U]݋i2(T/ !z>O,?\'.">#K #R<&/ثuBob'I'7wjS=I [+L:Ks|Y-οjX6|2";/G͟-w?s6{X\ jsrZ/rd%M>` i(T>=vtq9I DD"LhŽU1dT&}J@ʈj"/c<I[{7ta3{csG/F\R0!|5Jx7ZOD-]r'ə-?D)A!و%?ORyڝ^JK eO{:6K<֑ UR4(jY[anVNC"Dؠcղ{f,Ug{Im-RGS"h#a{ifeq/ʨ|IU TL_&zt$߳H9.%_Dtp920ihE22M3 Em%/mPWj&^Nc< 6N5>M\ 5 *w4j. yfۼhm `W,{%u୚ l3Il:o-0wZ >hC3;{+7MfsdC2.v稚d!0Ny |_0җJV,qX>s[8OO6. ]ȫN*4RyT _WD?m ۖLuQ6?PVNƇ쇍ο(ͨ`@m] Gmu?-_ޑ׌(s駓4C SOK2شU6>[bo#Pzki}'w5KgVNUyzY#Y5!_΢YqRAW"@divN:!!љ&WfMXy;At,:Dh-އy}>#<-,y]MSZB ? yZ}\g+N(5)RYVؠ9nXjR%7%|H\AVxr 7^ʹͿN*)#jMwPd_>A5\ ȧ]ON'V"4ۣ r"C&9yN=FrH r7I XRlF[?VsQ(,]/')Yy H4"0 xG+Bw'rO+dT` x:@9HM_afJxPq瘗4]$< gZ";/ I&tpuɭ bKTQraH$G>0XxSϜ&dϱ' A(ǓAHRy uÞ[٥eG6٘eE+7ElvSXx/<.֋WuP/1SVpsZpX#6sƟuWj`I!;ͥhܐ(^uy]RH/k4_&氩+ :;-ߵsBuu+1ݰ]AC,% d~f"8v| *NELVI3`XfcFSQfl?t4Tr?ϭ'CQ̵}~?y._K6@nuamT!w_"P)gzC)GLkǂ'~mt*)+!Z^A"* ڮ5<{89DP[{8x7 AqȢDy77i1yu)Z@-cLWc>1WYU}M3|[tƋ$hE~ 8vvYS  vH$Iwu4mD ՝n]d@]W3lN1>hRBjmSRC M; ybkT E!n7Lۦ{P^M,S D3}#`{=Ud97XDƔ!<($1[OI.v\EBuu&4M^dI ⷳFMċ8cô MsBa6C}Fc)=[x҂=z_DPR]?p9X,˱^Yzǧ(JްXќ\os^j1!"μRA1t9Ue~S$MCfѦWʌȟwvc5v87A1y7,} ICM- ^ Ι_r :` gx pv,\Z^}?#M="Y[ؖ qr2SN> jߦ6 Ho3︥K,ˇcob &r33ҡ%B6σo( >;<@>J&.Zv:Ϊ4T݌ ^:/IKevRgVG9?\ƭzW( 78?X2 ZQ8R<=?Q]`(!XZG,[Œ=Z39rS2Eulh4̵U&i2;oە7_[/_ؒf%4`v" UvKpec)1W8*" M8ݝiTV;^ CR/y֕G'+j xpt<,2d|~qJճgiP;C^D|[sro/p ڔl) >4CQj ]\@ CS)]Lְʷ'o7 k #Gih}طa]UD5W Y]P0] (cjr~1&FķzҌkj y4|&/M\?/Ғn6h0Ap*kW^ kaHT-dJy:RӀȖ"ĢJf)O_яD=?KA~hV htj~YxhX^%54 .s̶ k}_΀m)̹1lpߩWCm+/&S)mjM$ezc$qAP ~_hV6l 'V{x`xB $fcb[glѣ6Ne/I/k<~!X)C՘_MU;<>g[ӲP5g \d1; VxVرOUZF01U> U1}~郊(ʧN-2#!g0GZkcVdCsU(x4c5p,~ZBym~~FapmmQ? Ĥv2z#&?mumBx].6qQ-YPkleҸqc P"6( #i!5߾Wf}B'ϟ78ʋ]6 0M`QI+s&ঊdubr.wz T+- rc쯸*5gz;c}L0HВ(1 ~kQH_,6"*٣fc*db]JbXeE_!~ϗ3z-VZU5oC_+Sl}VY{aIJ`EApձۢW%L@2^-ik l?"@_͏C.`U/BK6ܨ;=dEEhA^٥w{ v҃yO@~6z]g7. rlPP3(vXX}_fv?yݿYfM\FG`O89辀|I73߼?mJ~Hfէ`KV]?@#(#lQX_ҽ|Z$jv8cӍlgs;r!p$|ȘůFy.iE(!@!T{U0Qe.njxH2JC(4Hk!(k,=}z7DfWbHQX=u3/)İO퓵*13U)US`e#{6r3Dosݑ/@Υ}ppﺸV!jRi"rTmN* O$Hrewtßj[FMc4-(.҂[ħ-9jF u /q,`Ӫ|Jp6٪@xh4n/ͼ/>xQh8R-P(:Cy"x<ju&N- K]"XkdO6yUIRR9&=Em RsNQ:lN*'y)R`b!*CL\b_i _e ڥFTt Б)jT`fjGԕR6}赃 ,ӽL%WGY@WL$mTŪLW/v#r34*~ `Chl 2(:pZͺ<pgT?jFB=YKH}ʂ.x1Y?TI4s)Tde®~7k zl2K!"=1O_Ew.E4,TO.p#rċ 1yi,]Z˯iN 1ZdQ *Dv9jXv_J^nDoQ$kxuBk8h$~nF4?]-C7vH44i-,za>Ui%yC>0ʟɲ\gV!A/_/w -|m2>}1"Nul}s"P"=t+bBWy@vLi04H:{,oM"}UwPj#4[w^a`$+[sj }pweh JsNl/^(ƒ;>gZ8@lSdjFMy''ZS|Xx,~c|ƳȐ,V6G||rqZf-LYO%,/ \}H7gRLJ߫9UrE 3B8f$?|%8G4W`1=,(o-ɿ2Vߌ~F\ZqO$o@\f6 "*V5*M@mzL o9@!opp ŌgtEUUV½Z}^s%01+Nz*caM4Oãp Ck{zxM;/BDcjH#[=NV8|qV/4UP}ֳ1 _u`k##ݵiWC-L2 %I!bg1c7(RkO9ùUۅVGγz ƦPޠS7U߂+We' `tt W\@9wEozs_HCKu6,ؐ4 {w\1vƐό%1 $v`H?d)AK  B3c/miӣ7pZ8l|ĺz%qS]ZTHQm2;9Z/0k\-65iC=rO~ ^NIp]Ύ"{Σ@oEzM Ϯq (3ƀi.fVFלar\FY+Z:8Bʰ`;, 7 7FNEAcV!}11ݦ0/' R><[(u1 _LyUB4?sYٿ,Ø+赛e{|M8? s=' ]&mBw}[Fdh9G4(nh|ad-{Z9>.EGܟ"McXϩtH"|t%2I,h̓c|=Qexa\oZ&z=N<(O#v({𱈔BrY]όA !4Њ$iUr0&ul"e;ñ_T97zRvGY@.?^Ib' 0r}#}\% dɱB<N4≺fm^d4GtnGQgxW𵶑V(DD14t7g}'3)%2?8ޟ4;n8ʠ$܏`ź![{҉]ۂaşch NȺ:WɮpX .l6aJBk VZa+n\+xˌaXdh|n|L{B6%l?: qI΂#nS {KNdf4Y57Ϣ/({"u6;~`|ȘVeȔi/a ))q(`+1_NvYw \x$GS5VύۄqD6 ?- "3 {vi <+÷c0rE=:=vDŽF\r!GgY9\?>2.Dl9s J/Q=ki*-c?ʚţbd|3F!N1OT|7HB_ڹgО )aF Bzd7zyfzecH{JPaUj;7bQu σVZT]DONiԿf+( H_lDRwc6*YENgӭG1/?Ω>=O%ԥ2_In,!.'Բ,b%*[x7\Ql,e F~ 6IEG$JzmX&K턺YA6yVB4/zo"f[[Zr?uvt(3%uZ]#w=S0~)[&3&\BGWf8&xe:w bCߵ([]\g2s禳f:+,+JXu6, /t ԈJkLU~6X$YeB1hI&0,پ +t@]"V^#[#L e:|:h ZW֎.{dK~7/Z,4٢ rq i.pA祻xPGD:m1jGhG8%ڱGUT{A@ y!vO*y7 Jyd=-t]?xeLUz,*nX[ث߫㏚/ØƠ$C(!IU0hix ߂G80@̋xI0?#70dQSN7R-|hMZsϞ#CM.)YW㑉{ޟ`{Tpzҵs 12$gL7VEJLuQv#Tɉ’-iDe`Z]Rq ~($ *,Tp@_۸6g@|7X ?XTJK"e~Ԭrws3apgJm/7ٷՑyZ$2_\8 J5Lt U(o氁GfLI  f4"GJ ԨxX" *cf 9zTHrRdgm¨ =>>SN ܳ4Wk/?"q5{Dh5Cq䥴1Kڥv TB?vĐ|#-yiPYFtZgU]<`lT؇$BP N5^槵b Î{aX`#U2Q Ά1d٫a}*UY#Ynr@o]'ŸIzEX۾xgNWT'5u9J_7yfcoy4P ›ɩYU䳼ˆrV,>Vglސhp|s^Y'ht3{h%Hr4YJΒN+'mzrA>"vub$VnB|ъ/%"͎&6l \A/GE)`mfx2^ 71|cqh(Ċ0)Q] BLb#L{-ҔdaObE ʀlm$+WwӇg@ ۉ,9ߡ_=gZm6VucGP 2gb|6V1ĵŗ׃Z0 "S-4Ȭ& t))Y1f̈\,n⟵k|eĚx@|&"%`$‡#nUv2*g%Y;剋ѓECS;F@㪿,Q*!,9oh|?7:Lsi s&w\*ZZ11Aξ\dY;9i^ P;i-^$V`SJ *K3N0ҵnz09|aߗYg9ElDa%OU}1g7̋MC;Y&7n U"dr8o9-/c~tx\%(fKQ΅KҡS^(^ݭ! 'wHV-γc:[{#1UozQbI干AqGCю);>۩v@d|Fa_j[RPݜHo.0'W5is H٨Ψl)covw85]lA^țԭC,&O+l+ =!6V_]h-$/O7_>FRcиA$ Ò104﹂E7I 5ߊ Qv`? ~=ҟ)_>M#>%el^@>1 7l| Cܮ.9%S'!=r%xĆ+%tXա0EMbQI4$m535]d [/RlП62+G-#`5M|NQxvٮ*DcX{ \ d9(නn2+*j ޶m'ODy^ZFX+U'<KD(dB$ـ^LqHժMqJWʟJ%p-C2DKFw̴{HiO(ip m|R_8(Bb!dt&Cy{#o/pO uE: 3daZ+=wKq0Ƃ%!\.KMc5+$٦ʽ]djt5JdiRC<n϶hV(6ҿ1_ v(inlyg{у m_i#ĶSVb Tic=e<%7 Ƞmd!fqdtB26zJ-=>M!1&պ)$M~KD;ϗﶔ ZCON nw S`B6!F}yog:x~IrѶ*Ťv}iUhվgqRX^(^[/28PMͯ9vr._Z3l"M*QIE6NS.“q0u Jh4h&BJԅkߑ b+; endstream endobj 884 0 obj << /Type /FontDescriptor /FontName /FCIWLQ+NimbusRomNo9L-Medi /Flags 4 /FontBBox [-168 -341 1000 960] /Ascent 690 /CapHeight 690 /Descent -209 /ItalicAngle 0 /StemV 140 /XHeight 461 /CharSet (/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/a/b/c/colon/d/e/eight/f/fi/five/four/g/h/hyphen/i/j/k/l/m/n/o/one/p/period/question/r/s/seven/six/t/three/two/u/v/w/x/y/z/zero) /FontFile 883 0 R >> endobj 885 0 obj << /Length1 1630 /Length2 18985 /Length3 0 /Length 19831 /Filter /FlateDecode >> stream xڬct&vVl۶mgŪضmV슝m;|ݧOu>?5q{. e5sGS+ #3/@E^ёGAh瀣sZ;:yZ@s8 `ၣ9:y9[[Z5ThS ?,#]-?܁vN@׿ׁj@ ĔudR)fjgm6:i 3GsZsa%08ͬ=̀NN@g{kk:)_99;k bl UY\uZhퟖe jbpz0vq3/psv @Kgs;_L?/ݛ89y+_^kW# ߜfs[Z;1+2ݜt׀E;:ýpLSXf#[#r<_%M.o 1q3y?cbomZq5;˿032[i"i 4Wv5Xٿ@g;k_n5V 3[Y:CǿM@_U?4Q"{9th?`DE=> ,VnoA<~bOYofu?~) 3GVGO?f37g$?= 4[[v4 rm.g s^ZXSc^:2w .??$';6: o?n;,YlD_"˦ rWɂb겆2竜/y3msVyᏚc2J9>Q5stÓ̥5QTt4cf($bǫSw \`zAj3ΕFX<3 ؄Ӟ>AV づo6cVO|YlAڧ`{Í@޴o&捕)O3l͔F\2=h+߅1#{ R)+XϞ{hZ?LsS)͹Gxfڣt(J@ EZn@}4bd;ӆmuY4EK؃%ȿOo@ K(ppڇuwYJ,,$!ZuoI֙+w1hUjj;fVG>-أ"_Yn$2Њ뫕2'n*G 4 ltDyr q`y,VfQLP(n`5\wQF i!?PVaԜ|C;` vazKf dSAl2s9wH*peOx_R GnF:, )rJ*og$Z6ۥ~5),\|7o oR9-Ӡ4.l,g~M`Q6pVc~5pqإdpfGJK8 #YLԩ(jYj8|eC3נY|xY؞%ԝ,Ih)&H8zLPH>՚K@syWط4F4i` |:#&6QIy~+ճN85g\4}iZ:a82A-xx"As LD lzrj[@*b5.,Z[[0ׯ֍E7JU)}wWrf8Ft'@7eOH?Q |7R$G},!Z YyJڭ24֯㲒 ۺ;oꋿ, `iqƺa2͛S?2bq9mt~NsH B7K.ixjgϷxk U oBW][7&e$pG~Ƚz$H;32w5I`4wg*.E*9,<&RU]?eeZjI t71wWFۛBum"F0e/{ !:p-G/27}y4f] ɇ6ou><@koؕ;jm,b&Zl[+˛xT{%WO$:I63%'Qnu{3uΚ {ڔW1AvAVr.^Shv&~C?h ے Ӗr(^H:Zlvtp-=[*0!l 1ӧ1ɣ^Y6h\$)w<,Ol7BD٥A v-65X%,X;~Fg+ǟPT=7l~iЬQ&檿J?+n>W63^Y+S2R%NzZ\Yg4Y۫J=E;ȌohD__9q|1k, aM;ݟS[ MX$PzivGRzP$u K}{5M0z[gەc-#.{{NׅZyO/$)'y4WN+e= AB18NFcѭuQ;uhTLxa/+Il[.lpl.,d4(nXUi>A"aq.qKoHEnW){ %d}XA"+ܜSX*>"B'w.BKsKx%LlzT:dqnO&+'0C~\'-qߧ&SnTbGLCU蜌d0KX>Mאd`q;7'&RoY.Ng{YWHyԾ|lq O)4׫mĿD(HY3~7m["hnDyPcda!;|s($6(? l } i;.MĢh 2*?=TT/ы|GHKJQXXGbAּ J 7eY+N&  à(١psM|V!F-ZrU|TnT Mri,SȮ7s zӏogpφA_M~z;vKW()7];SOoUV+ۃk|3H0~rBh΃lhI&y4#6O {[#!lɧN"\xpк)+ Dx`[OćBj˦-]b>qkBl5-0Krl'ﶁwx][} { N A ̤S"Pn$ /޸4B*l˵tti Ej/E'ϲ5Ԇ&LR suS_j< hvx:Bf lrLfg(ΐd&1/.v;,MoE:="ʿ Лy !.hgUݪTbM ˑg=nCB o03C7Yhn TaɃb4PYeoR ֕ŞғwV %(7凸s^Q I\=x^>y|:>s,tl6B/=| !MAdt&ۊ(*%BpuV Ȣ^[G*gW&%o?>0,"동觙LӳjG  8#i:,LHJ"8{5vP' c$Z!JL+>|A$|gBU Z`EmEOf$2&y CM~rU+75qEvZ%Jc/fc9 ˙mOKN䌒U?彼(#L n v^ <:230D(0eIf~V>}2dOޱYXG|呡bLw uteITJ>aFFKro٧:X |vd{8;1*ڝsv$N7-5+d06G&GnFA9(BjT=K癳|}Z)tώ{^a킲W}85R jP%ϗ1?r]y^- ^11k[aƲ35DžlVOE!*Φ<:N}.ȩ1Z$/~`NE(փzbQE^ O3~[O:Ipf(Ӷ{o2/]?Ͻ'<a\j/uYskJ4Td4Q%Qǵ}E ,-Ta>HWEY%,_?? k߱#ь79Xԗ͗YD/ V~r0f3BM\Fo(UO(Q-yDA'\ITڂ:F6ԤP!F-E+X§/xxJb0{8/锘ܵs$6~"ȏ4з~4xW [J%9k4w=Puso 5[*ߦ3d+?Ղ&w 6d7T4HFq:L' wae&Yֲӧif,ݺbtۺSR{O~ cF/\Y&ŋhkCmuqb'5G!hM7AZ~ʶL&z\cn1 ?fjT z Q$܇"ž'_?ߥ絩r&"DᴛxٚBD .eT ? &[na]/=9|v̉a.\z0W4D$,&jp (>tS ac*d:X1{Nv*Ѫ5D5g#D.Lrtϵ*xl*x9 asY]kI5Ypϣ32]dJk\~e[1 t` 5/G`1l"ޜ¥Y?ء0Ek> *3w IS6}b,H7/ɍglra# eۭ__|1u5IP+λ[bz]N("$굥),c=Vm GQ\:479B5*Uǣ+ڻm5ŷ%yFUiOHUZT0Q?T`#3 Gʹ`6vQ)AE}k!U~(]DuUB@!2o]أDfct HJi* jtFZpF'*z(-yëF2Pڦ{wڡɍԀЫ_vnBUX"G 0hD*, `ZP%풱a43)ԯ;AxmKV|5 +ץB*Dh%^OqIBGN[vZoid&9,7Y}ϵih}&t8L]pbo l/ _NM>XY @w TS`ktquU;n_.\O.zhL .w蚦epMX@2:;38j<Zy?} ۜ"eQm88_U}~XLJtvJ_"m(]I⴨/pɇb'*T)i{: `5>7C,N)*t8?k/DrjlUw/g7H-CI72{[yɐҔ:lu7k✠gI`Qa=~4ƽ)1>>1-GpӢpU>zT<-.['n !7‚FV[um%7rEBnK5Ojqqz=X1 /ypAKIR6sƶ9G7'A&|˖gf[]9:P0逆Gom)"d[,KCe: 5$xӫvģ'bM%X^6p1 ,?BmwU_gG&]uY{ 7 ?|ei9Yr qQ6>( jF56Ɵ`"_%una98H"Fn6DNq7EoUĻ2/X ӹBET rMuUxSEI?oXjΖ`K]a]P3!u#Ia ًe}'u`g$A&<º >q?O~~G^ثL؎%-ǟ Շpq4گa}{bdxox>0F@ . Qq>[uP,c{p#x_"0iK3>@q1wZU l<09'no7U9)C 2ZdjlQhV?RCfiJdk6<}vL^{{Im oQ5/"L(ivf(fS]%L"M;sH-][=m F{3C~R鸘r Tgž^p~ ,&;b9bmи46լU3fOz' ;)W$T8&Lx Y+CsO,@s2U|u|RF_4uJa#L¥ hq(lDrwLɐWOp#U-Va5J#Ƹ4}d!+>и5>v>D 2ֻ{%$yX2MoZ *ala~) QRR${|ɓ;R*]~'B"2M6~{Ҙg1IO>b}yw`o.Աio{vgP>9t5ԬyK^r೏gb|u89ց047}C7hjzرxn t%13!:h(Xo8 ō%v[G)RX6”}6 EDFQ?L؉Џ7IPs^Q|?Ye,=eCF賛+|V7Jklq6/k³ o3' QlcZhqNB?ڐ\ѮuVH:M*Vo/)˽v-|KPU|mӡ_G܈#Ѡpݝ%{6 09?[z)~lP9/` S 8CX}!ٗ:Va0Sb]Iu01\f#֖JHn]}$-HP\'ڽ Yu>.*uX߇p ~NRXr.)\s3Hz?ڪ^dN{PVlx jS„8is-nP9e=ذ޻?JP.C/ȆD `‹R;zݬwJ~8 dinC*r&& 엁yL 2ZqR?lTQ ޹sr.2yqPd6R~stT4"X)ٚ딥HOVmҩђ3aloȐk]D钦(Y3;-.mDc/"lNݗ'zP6V"2UPZfG$n/lLsKZWv4y-A O0d% Ql+/zk$4ތ& Еa8z"u¶,{-IEyG+%-:ϳ4}2`ʵq"I"-a#6@;pK/Ciḩ{.OקK܅g5"(b>N+u[=.?e"AStc,;%a.nhlvxneCZ{yQyՉé{Y=VGr/SxIx0B6g'(5O"["fnY'mKd; 5ga%ivX3As40_Nss{(m@ׂSizgf|Ima4qd{[d)(zSUb_ҥǝ{Ȇn#L١—ϫqvP+fjMr&u- O=jdm5]';.UW<2%4S|VMX4ta5}@$Sx]|-g(oaA}Z0_%Ui?t1(@X ~`~F y 7ZbjNe֞eQ8{"'iXPA%Tme}YdC-_Gs)ӝ1=M@2펍)sߵ6guA Z[s;?&RO $+\u[Av7QA2K.[*;ukO anŻ{HSGbn-uD\_-1 |9:z-$# {Ni[tal;gCpi0U~qb0B1CW-;K JZH3^e: w:0NI3[E (Go`.#>qڰk-7stfb!!G$B_p0ThVHcM2!@lenXzpgDRfzӒ!tH;W|Rr؅62L#7P=Tҍ__@U9\1.Kg"0F(|b"f!:R E{gJ!оb)JW,_20֣i9O\@-[Ro^~ЉLb D=%EJBC@OTRuF\.3͠`ȊGur~>EgxQ3؈) .ѝ4;"0nS[^S7%^HlF"Bz:3kᳲApۧ|F"$~gLSa V9uLmʪv {_mKc':?.dfKGH=[L}srh +{E2j _EːFOd { M-;TYH_M,S-I?KMDY@A9ij=YVK U۹o2BU LMF~ze隊ʬb!`,[ 0ZW"O T6G1`B%A)maD}{$~ tԾ%} y8NUȅWp`A5AmL%4e>cxF>X.ⴽ>\}j`⣱N_ٹ=W t1Ǹ4]z2 i7Ò?Iw~"^bo^`2j^O9 9 FH\8h9J+FjgըQ%=pΕnKՈR}[m)Z K0R]|V̊%=a=c7?1'n,n"Wx d]ٺ=H]aw nX>6'FbcAzfTi/Ed"f0TUPT~qIe\+VY)4^ ӄHvwV95 J@n 5\ hvS2WJ{>;Ix-e]ݠA|gʐJ=iK#=>ԓ^G!z bo#Ihd?ϟT^5 tF-*@7o=hFZPgo1F;FDFTC7A»UL-p4x+VQ?mbx+̚h|cLH݇^/Q'C:)j(S&S߷2o+ 9 '#|ɽ(?)%?aN!Sq4HW{ۦ-lb~ dՓPiPzjrΖbsf̀L\p I]s5C")ӷtU8U*Kl8m_w@$:Ȣl3YB@+6^|Jإ17 Hi':\ud ^ܮ-)낎vZLi5! u P}bv>0F ܩ 6o#R^:i f׺#)Ipl rkm4Of9 #g.أGHŔ'$$CWTFaB|kUge u[<̩ET%b?N :k,CB%Zl;1޹”_"M94~T,Ĉc՟l7F%tm)_L9̶mʁTboUCSx҄QvU ZB (9Y9vDSq}f O>eɸ-&OIKXa.f숮o6/\)ުf]- 3F~h6UWxR(Et[HAlmB s&} C>Ʌ{*r h_0-iց,4 Vb2=iRònHCB;ύ}<@ki7l.D۰"LndփVTД}ӊ{2 p+-e"E'xGйM1'2qHNU[.GEQ &9FytIay.;*ؚ=B>c/C'[ v]lW#ۥ6^+FK|Ipc=N yf(%%AY!Y$= Q2x.qf!J7Pj`rSPHn0- ]L$^4 oƖi`Z.R<4jB:/Z@U*csatWMUUGU`Rx@PT, TϦsOh+)f >3bD;[ԗ0l6F3ʇRQTvuiSm}?u?8[暡,o)/aWp4JZRΈ5DToű%أw_&;E2@1zF-Ǝ~󾁭q> {Lu&y#16DQ/[ oeز4UHӥ?Xo< }ׁ+XYlORQ)K-U\.Ku '#F' kS%LddU S@"Co:üF͔4# UUg RPDmTdv}q)*K[ZTĊo<. Ubsڼ#2>nй~N&@Wwc?[eE\D-X/{-ٰh*L׾k;xW1xz>Яybk˙A (s[rx;nE^$'[jy?lG܆*Hc? 0qǵP+Ax6'WshՅ4ۇݫQnƭֈMPڳ%gs%1ai2ɜm>$E$09P#βV0H|\o!\ d3zWsmj&Y4|ѓGՄwyYi"u]lj|'Vs;\Aޢ>{^ hOP9mƓGc>^r&iF"$:X4Nh14ƶ/clR*~Bij1m34};i3[k):)+_ʼ,:Mvt=~hR/}F!Ş[$V=5K>.ӽsIÙC7ri+ L~N]&e-=CSfFsA%b ~8Q?dgְ1w]󉞃4N7zW<`+ْeiRE֫h 0!(Gܒc) ױ[ LZs(}LT>'"Jg!|fyqP)wkհtHU ZVf'w5Y8tXNsFTոӆ~Z{z0P`0ITUފ{GbLn7t,{-պfߐ mJ.G0믲c*Y% Hax~¡ާ :d]xݠ}㙊 {jҀlz 6B `0*j8rlb'0eW.JD!+mTZ[V/ɏԷ*ĸzt)=C a9sX4=v}u/P(N.]{PAQ'>&$R7m&[r:+0o}Bש:Ȭt.R|t b ·QUX"J.@w)#4y:QvlL;X3VZTY㲶-j<14ǥ~<(1a/$ҲܶصAO5zǔboC&ٙfgrxcgYRz꽬ҙ5g99N)GvT3`-..aCZuH+b7NCDWP zd'z#9}a5'$[q][}}O SGP HꏞJ>MqV$K@Y2BEz_Oko~o~ ^` IrB|7ŤX_'Aե/2k(Z^AxwUjb50͕5$(Cg*jQ3H>3lsҒV,_^@]}=R!S3U%ݽKyKR 0xѹhL bބ[)︃[4Zu+2G5c^ZfHYX8ݩ?6CVdvJ5R]Yςb{ǘBt ȇ>}ΙPfcNAϗ)nRbG8˷MctrZҪDӎ/ރcm5:-|r\AUv&x^#KS=Hk)K? AƴXD*5Xsg@ ōTp6[eÂ1(u XwFKh1-"RMU@8HpDnI).CMKGQ>ܞ3uw&g"%-qeuY)TXK2Rй[pRⲺ)ÞIo5- Jp30NJ߽֒Ζ{/3cH?BVHY&;͜Φʏ38:5TaL!pAbaaSZĞj)Q-+jE,~Q1noM 춭V^w0"+a!gag;cp`Z"O{:zmB8RSPChkIvԶ 'SdBKUUn#.kb@b xH>eesI!Ls$kL^1+4t?1?a .4&Ib` {6٣D~jb lv] 2Xildw2%gܛ|5*cLh]8ElI}׮_gD3~e:df Kdqc'(ޕ?4˙7ePh ɞCBt M_`AnJ -n+5VţQme ޮMG0Dm}bQv%A%XSI%; endstream endobj 886 0 obj << /Type /FontDescriptor /FontName /OZCCIH+NimbusRomNo9L-Regu /Flags 4 /FontBBox [-168 -281 1000 924] /Ascent 678 /CapHeight 651 /Descent -216 /ItalicAngle 0 /StemV 85 /XHeight 450 /CharSet (/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/a/b/c/colon/comma/d/dotaccent/e/eight/equal/exclam/f/fi/five/fl/four/g/h/hyphen/i/j/k/l/m/n/nine/o/one/p/parenleft/parenright/percent/period/q/question/quotedblleft/quotedblright/quoteleft/quoteright/r/s/semicolon/seven/six/slash/t/three/two/u/underscore/v/w/x/y/z/zero) /FontFile 885 0 R >> endobj 887 0 obj << /Length1 1647 /Length2 11947 /Length3 0 /Length 12795 /Filter /FlateDecode >> stream xڭweT\.NNp =4ҸCpw.wwww|ߙ3gֹw̝k%OUOUUM@F@  oam 2)Vw'=l3@`El]-Z5e :I2S`af~pZl6w V@7iyI@h/B ka qLA Js`~vln@c_*F-`071r4+w)lAw0E x(&Ƀ!3H_zwCK8ZYZ7? }w @ײ2p,/WCk +߭5?0]6f 1r2sCl a4QL /o No:Us 6kx >ii)J37ocICd򟇿DD@.w&V.^70#/#@:-\,,,u7qc_}61yo6vgm^?4FZLNKWfd -Uux'7hS]. 5 59?K,*/!܊8*5{`d́wDV|-\qޗ*WA`h@x@~{l/\bIz)r!Ɯ[kT3sSW'GŧFֆ\1=_x%\\PqBO J;0Qf:1Uײ)̸MFecsAD&rI?CP Zȧ,!  q9֐?Dϊ!Vu{Ikh/Aamd~Fˬ(!?MoyIJ&/ KU"@K{ba~_u djQuXoWE'~3*/4PBF7X*`YnkMhܜ OxWZ6Ma)Îuy]h i=6eLG4/s]N[/_'bJ p&UҢ+k9r,7by]OKAwP"Iyd  M?.J2([DZ+m/nG$)S nOR y;'4 7R4^-Oج9y5tGfZ?f7&;1/~a;`N;tKrP?`uvvw[C׎6|f}C0A]6 js<=xVdJD4!j@mcBC /r0׌{Q0w܈;ajˆjCu6EB>R:7 ؗ{b٧";9)AOBnSiIm: ڃiU1A(m?Vt}3L lag sQ%G 'nstBu.6IIc솵,c1bN]=I6IAmGpZa|:Zz4A?Ιhyk{hɹVǩ~B?pu xP/鎕rf9䐺JD% -֭p:POi$CN8gml`Qݔ!?dB4Qbیp 2P4 obt9%>&a7~,X1WӇÝ(h? |ĨN2)E xrxB8qAnDdŒ,\h$3ڶmR,>pQ,p߶TQ}=TE#g8E5⯔U2ϘKz>S}z{$12Xx3Bljm7Ξ\Uuߝk:>+A>1t>)?Lؽtc!T8/YUC *qy#b"rT;Gh |$=Ŧd󳂷*;OՌ\aI|[45>WMouuŕk;F~w|)P^ޡ>x WiI)9BKVʄ  bMKCtZ:)dfб`a.Gq])CIf.qv^>WRAaql~U$ps R/햝YďQ˖OlF/?IJ!A -t?l=ugC7*@ΉsJsCaQ8m> EԒY.w++l(i ^`^TlCE䯞yDb84/ZLOrޙQaOŧMAں†)V06bV=Y"EFj:Sw jbBJfJ2R p߻^O s]Ϝ?ëw4Y4vwF9112~̺rG*z}Ѩ %maJ9mFJXN N*!` !ͼ$ݮ*yPQd]w4frIjϨ:ATNcVHNq>!rAPܬiX9%&QQ(9v,$tۧEڎ]qBj=! p7hr-JI(F nq՟܄ΟKmqus('PӷC̄ׄn>3) s߫#+M*FQ.&/B$##f]  ݬjs7U'I9-な2HRTC_,b,_k4Y ƶ@Ntv80>qd+oћNꏴ; J-ZXE8(&˝C/o$yKg#  TLnq6|F+"k=~c?h1#ZT_<4!m}#[/#h/}9R[j!? Iwm sCRO"~-S &dr [4C^.a7!{̅dD\{K?3)<7m^S !"|R|ft]eGm yMN.*7Ƒи mjG$z5OIy a}K_mX#擵H μ &|p.i˺:+^ ^ɺ*(}">D:dQ/g΍ThF/~-T`}y(#*>V9JgziQߚLOoC7/[~M =X|Q-?ONj(!#4* \ȕ/l lr2.:U)\Oa|5Jg2'yF\Nz%UG,N, @&'4)`DB^[VW@&ڼ+ eǩeJ>}DŽpYIIcf_MԖvڂA,<;Cu5_'$Tݒha{ N,ncQ{?U- E?li>8?  |"32NكQ`)z*uRAM]cd=Wl\hRl_{]E# ݮ9VUp8XqrQa0%teKe8vbF/AR_3!#,LYe8\WRhV汋 4~F ®F1sxREL\7e׷lJM2VIwܤJY=J3^H^XS`7f%a`ۘآ tLKp 8}Ti^ 4 Tvt ͆{yǙen"J!EE(}^DŽbRgQU'k(R#~f~diR FBˤu`(g6f{ԄQeIǛ&e֚+\Zh}`jOTby[n&*491c*9"dñXYlA%~]tt ًAvn|}& t^y҆֌Y-ҏǺF:vi&1EŽ@=H>F"PЗL /_]xV`Hco%m3&ND `0,5h)g r_u Y_ǦdUM Dgc ߦb?st/SS*m2)`P\L;WKr7mB ?-_ |Ov3Ia)[!o˞IZԚD8Li. v,{E9 ֹXD%3@O]Αeʺ$I;},013WWqtƦo~> Ble>y'!B]$N[&.ۯb<^2݆OdᰄZ2R'C#F1 -d&CQ47 %VaZ~ uW=I3~׎#,DJvD058FTA'e7~\Q?Hu` p}>Silo@O\r *4tG]+ ODiE^RxyOG|Oޣy^/(^T lCN8B^6 [jpeliv> O챾}S,#-6v_qӌ:*. ۵bMO= dK^Qu[bL6g}&_0 U{\w[8Yč*鑹/C3G!bu}3yےW3j_WH2u7T53@ TjȋMWj ՏoBIRjַctqDNr\AȼevǙ {p\Ob^!%w;z2NrјNm{oİݛ'85S=6j%&rO^+B>rJ<5=G8EK'-L'7:̎u>[Y ȤSN,EydUjϨK+kfzqri-,./ch]dwoDrޭ0ðp}1S?s?Zm^"},蟻?U|ԝ?Kk<:jy>5u'%0dev?ճG$f>tMKaj?Y HU\ ~Z}]>DEÇ+&ФgBXĚd-YRe.#>_;RZzô'gb!*h^ ji^~)Zz'@" e;ŒF~,#vENyaWzy&[=QrD:r'ѳ}sjLc@@Șw> +΃%8!zvifqcݓ!}wwv-˜"鐔8mDMӯژ%Uu&q֏3PRk0eKVr"\zP+nI /ĻEW-%lߘ$[[:5(_k-_곘HM-OpפG5RК`:4?zO)@G/Sa># ~zI%1Xb-.YD DeKZ: g^_RFfȂxQ?R33{}Q9~A#|kV(2WvGv .lQyu(y|Z} wN*|8>/M,&ɒRK*DȼF_tY||13O'w>߈$MTIQhO{Q@ӗUB PZ{,FԘa]| <1 B|Bpv9r)J~#Ee8{^WeObOR욭)*̘]wn R*|&໵hoqf=ַh_~wTd6`\da3,p}zcYXKEk|mj bF!( z|:}\}h|4vv ]nr<{fXR+,+@JqU_G(WFO\P{ ֘CJJ z^:!Chӟi%Tt6^J%M~E#㻏$9jvDTI8t~lx>Qк †k,4s,9ס=Eb:?ӊ/`’ 9|X8a b] RAõUEC:,Db~LAzfd]Nb IG{k͎:co=2E5w㢠hRRvKxI f `[8 ng 5.bGS(G-`%7 U7dOU3}GÂVЄܐ+ z殻M^j v򑓇׫>}*KPrP>,ҁ8}FV<}uhQ%9cn'{J^9*7f{Ł8F8Q9Sa8xɪZ۾Co69  r*SQh i)-#b;{`,2O3=1VM}XRGMh ȜQNCڥ ΙK/1?#q@@] Qz:cf&EW@ = C8raehFKNfoÀgazK?e ct56A!A;E<}Bc:67dxfV 1Äj4wf޿F Cl!4"&L390"q|Z}@;__ϟ“w{VX>tGY. ШSD2}M4 ?/H40q8ėD '_]B)5Ϋն.' zqNbG'g]L5muPzW#2MM[P䀀B4@%jksmbH6jDSŻ_W.UGBՙa_mKJ0 z+}MYm l G|Y- 78Цm֠]8j.;VU 7YG*!J~ } ͵/fB]Qy?oakt6мY(-hDa>{N鶼4Gl@a)c |zK9yzmSҷ?QUݼWV-֤Lt:)hO3/J_{*I;*3mDFl 'E o ZϹQh`#xk! 0AgA30+e⳿4ԣ`A u^z4z M ur* |HfLl x6_a -< (n#lw<ב~1^>.>i㕞 f,ǩ@%7Ǹ 膈]z+:)Hn{h/8a84o7)کiD(X6|[EXXO0mg$Gi| u84xpBb|oTrp u/S~8bq' pKZz tk("I{z"خŦG! TX̫a9$kׅ5o9*>\[)No1{gXv𾈐3VvxZ}n1Ǵ01ɨ~Bݶ:W؝yq׷Ru<MYH1TYgV.Yd[!Ȃ7;[uB||]Oosru[XKHWN4Xۻ񝽿.&&: ȢWKAcd~XsDg 12\s(ԨB5U/| w-(:fzm^rvYZhFdTqkw.cq?gyթ}Z<0K0aN:"6U hƚ`JnJ9SbOWg"_%c*G >O[M n8,#ޖfsPlU^-Ua$tg:f٫1;ۡ% q\_+gBVf'RBZOyQ"zb!цŖpo)Ae/3ܞ!~d:>J.tg#ad%3dZչ̝aݮϨ, E/vp+1%QtnTF9^)MEnTyi.k4ݩGF@EOކڷRN:ۗx|_IFNcEjJ l[u\e\; LThQļ}뉓o؀0<(G/{1TO6:pӄJvXo5CNɳQ ckL2]MhO p!g|5 #J#V/6 a\Λ6D 0r˿]7W}twhfΪ9g౎BJEa;lDcLuw#sf| 2z{uE{#D]Ƙ Xd9C$Laþ ̓rzX2P*{.-7 5|co |Bn Hzwm1n` ǟ!вK!U]JYz-qWA%N_H{ge(Mw+R%z懈kJ̈M=dFFôq y h[^ն>er p!um4Y>"MPv rLPf7`옼z[-L]'AtTJy uX!G{,dɽfaUBYPdRs>G" yIǹO,L16qgwϝAhov*FĹ Wh Oa_iOPYǘQKKpX UHSAdҢ q_G vPI=-^f#SwM~XRt6쥵 %wZBXF%lҧJ봼O2sSS,h5h?laz7<΄$xs.H 7]cHɱ;W'+\w^kd=~xWb6w~g׌ߣ=eŖBV"F þ/!lP[[jWFᅏЈ|Rqϟ;5@!ݫcѸ4/FVboNk/ wޗگhc'3 kdv7F[hޓ endstream endobj 888 0 obj << /Type /FontDescriptor /FontName /XMZPGN+NimbusRomNo9L-ReguItal /Flags 4 /FontBBox [-169 -270 1010 924] /Ascent 668 /CapHeight 668 /Descent -193 /ItalicAngle -15 /StemV 78 /XHeight 441 /CharSet (/A/D/F/G/I/L/M/N/O/P/R/U/W/a/b/c/comma/d/e/f/fl/g/h/i/j/k/l/m/n/o/one/p/r/s/t/two/u/v/w/x/y/zero) /FontFile 887 0 R >> endobj 855 0 obj << /Type /Encoding /Differences [1/dotaccent/fi/fl 33/exclam/quotedbl/numbersign 37/percent/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question 65/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright 95/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright 147/quotedblleft/quotedblright] >> endobj 444 0 obj << /Type /Font /Subtype /Type1 /BaseFont /VPPZQH+CMMI10 /FontDescriptor 866 0 R /FirstChar 65 /LastChar 117 /Widths 854 0 R >> endobj 585 0 obj << /Type /Font /Subtype /Type1 /BaseFont /GJOBMO+CMMI8 /FontDescriptor 868 0 R /FirstChar 109 /LastChar 110 /Widths 852 0 R >> endobj 445 0 obj << /Type /Font /Subtype /Type1 /BaseFont /CANSPV+CMR10 /FontDescriptor 870 0 R /FirstChar 43 /LastChar 53 /Widths 853 0 R >> endobj 197 0 obj << /Type /Font /Subtype /Type1 /BaseFont /NPUAAT+CMSY10 /FontDescriptor 872 0 R /FirstChar 0 /LastChar 15 /Widths 862 0 R >> endobj 266 0 obj << /Type /Font /Subtype /Type1 /BaseFont /AQKOUH+CMSY8 /FontDescriptor 874 0 R /FirstChar 13 /LastChar 13 /Widths 860 0 R >> endobj 275 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ZUTHPM+LCIRCLE10 /FontDescriptor 876 0 R /FirstChar 4 /LastChar 7 /Widths 859 0 R >> endobj 277 0 obj << /Type /Font /Subtype /Type1 /BaseFont /DWRYLS+NimbusMonL-Bold /FontDescriptor 878 0 R /FirstChar 35 /LastChar 121 /Widths 858 0 R /Encoding 855 0 R >> endobj 278 0 obj << /Type /Font /Subtype /Type1 /BaseFont /THAVHJ+NimbusMonL-Regu /FontDescriptor 880 0 R /FirstChar 33 /LastChar 125 /Widths 857 0 R /Encoding 855 0 R >> endobj 316 0 obj << /Type /Font /Subtype /Type1 /BaseFont /PYTCNQ+NimbusMonL-ReguObli /FontDescriptor 882 0 R /FirstChar 33 /LastChar 122 /Widths 856 0 R /Encoding 855 0 R >> endobj 195 0 obj << /Type /Font /Subtype /Type1 /BaseFont /FCIWLQ+NimbusRomNo9L-Medi /FontDescriptor 884 0 R /FirstChar 2 /LastChar 122 /Widths 864 0 R /Encoding 855 0 R >> endobj 204 0 obj << /Type /Font /Subtype /Type1 /BaseFont /OZCCIH+NimbusRomNo9L-Regu /FontDescriptor 886 0 R /FirstChar 1 /LastChar 148 /Widths 861 0 R /Encoding 855 0 R >> endobj 196 0 obj << /Type /Font /Subtype /Type1 /BaseFont /XMZPGN+NimbusRomNo9L-ReguItal /FontDescriptor 888 0 R /FirstChar 3 /LastChar 121 /Widths 863 0 R /Encoding 855 0 R >> endobj 198 0 obj << /Type /Pages /Count 6 /Parent 889 0 R /Kids [190 0 R 200 0 R 236 0 R 258 0 R 264 0 R 271 0 R] >> endobj 296 0 obj << /Type /Pages /Count 6 /Parent 889 0 R /Kids [284 0 R 299 0 R 329 0 R 357 0 R 365 0 R 370 0 R] >> endobj 408 0 obj << /Type /Pages /Count 6 /Parent 889 0 R /Kids [382 0 R 412 0 R 418 0 R 428 0 R 450 0 R 455 0 R] >> endobj 473 0 obj << /Type /Pages /Count 6 /Parent 889 0 R /Kids [466 0 R 476 0 R 489 0 R 501 0 R 516 0 R 530 0 R] >> endobj 544 0 obj << /Type /Pages /Count 6 /Parent 889 0 R /Kids [539 0 R 547 0 R 554 0 R 582 0 R 591 0 R 602 0 R] >> endobj 647 0 obj << /Type /Pages /Count 6 /Parent 889 0 R /Kids [628 0 R 650 0 R 682 0 R 693 0 R 698 0 R 706 0 R] >> endobj 743 0 obj << /Type /Pages /Count 6 /Parent 890 0 R /Kids [719 0 R 748 0 R 762 0 R 786 0 R 806 0 R 821 0 R] >> endobj 851 0 obj << /Type /Pages /Count 1 /Parent 890 0 R /Kids [848 0 R] >> endobj 889 0 obj << /Type /Pages /Count 36 /Parent 891 0 R /Kids [198 0 R 296 0 R 408 0 R 473 0 R 544 0 R 647 0 R] >> endobj 890 0 obj << /Type /Pages /Count 7 /Parent 891 0 R /Kids [743 0 R 851 0 R] >> endobj 891 0 obj << /Type /Pages /Count 43 /Kids [889 0 R 890 0 R] >> endobj 892 0 obj << /Type /Outlines /First 3 0 R /Last 155 0 R /Count 33 >> endobj 187 0 obj << /Title 188 0 R /A 185 0 R /Parent 155 0 R /Prev 183 0 R >> endobj 183 0 obj << /Title 184 0 R /A 181 0 R /Parent 155 0 R /Prev 179 0 R /Next 187 0 R >> endobj 179 0 obj << /Title 180 0 R /A 177 0 R /Parent 155 0 R /Prev 175 0 R /Next 183 0 R >> endobj 175 0 obj << /Title 176 0 R /A 173 0 R /Parent 155 0 R /Prev 171 0 R /Next 179 0 R >> endobj 171 0 obj << /Title 172 0 R /A 169 0 R /Parent 155 0 R /Prev 159 0 R /Next 175 0 R >> endobj 167 0 obj << /Title 168 0 R /A 165 0 R /Parent 159 0 R /Prev 163 0 R >> endobj 163 0 obj << /Title 164 0 R /A 161 0 R /Parent 159 0 R /Next 167 0 R >> endobj 159 0 obj << /Title 160 0 R /A 157 0 R /Parent 155 0 R /Next 171 0 R /First 163 0 R /Last 167 0 R /Count -2 >> endobj 155 0 obj << /Title 156 0 R /A 153 0 R /Parent 892 0 R /Prev 135 0 R /First 159 0 R /Last 187 0 R /Count 6 >> endobj 151 0 obj << /Title 152 0 R /A 149 0 R /Parent 147 0 R >> endobj 147 0 obj << /Title 148 0 R /A 145 0 R /Parent 135 0 R /Prev 143 0 R /First 151 0 R /Last 151 0 R /Count -1 >> endobj 143 0 obj << /Title 144 0 R /A 141 0 R /Parent 135 0 R /Prev 139 0 R /Next 147 0 R >> endobj 139 0 obj << /Title 140 0 R /A 137 0 R /Parent 135 0 R /Next 143 0 R >> endobj 135 0 obj << /Title 136 0 R /A 133 0 R /Parent 892 0 R /Prev 123 0 R /Next 155 0 R /First 139 0 R /Last 147 0 R /Count 3 >> endobj 131 0 obj << /Title 132 0 R /A 129 0 R /Parent 123 0 R /Prev 127 0 R >> endobj 127 0 obj << /Title 128 0 R /A 125 0 R /Parent 123 0 R /Next 131 0 R >> endobj 123 0 obj << /Title 124 0 R /A 121 0 R /Parent 892 0 R /Prev 111 0 R /Next 135 0 R /First 127 0 R /Last 131 0 R /Count 2 >> endobj 119 0 obj << /Title 120 0 R /A 117 0 R /Parent 111 0 R /Prev 115 0 R >> endobj 115 0 obj << /Title 116 0 R /A 113 0 R /Parent 111 0 R /Next 119 0 R >> endobj 111 0 obj << /Title 112 0 R /A 109 0 R /Parent 892 0 R /Prev 47 0 R /Next 123 0 R /First 115 0 R /Last 119 0 R /Count 2 >> endobj 107 0 obj << /Title 108 0 R /A 105 0 R /Parent 95 0 R /Prev 103 0 R >> endobj 103 0 obj << /Title 104 0 R /A 101 0 R /Parent 95 0 R /Prev 99 0 R /Next 107 0 R >> endobj 99 0 obj << /Title 100 0 R /A 97 0 R /Parent 95 0 R /Next 103 0 R >> endobj 95 0 obj << /Title 96 0 R /A 93 0 R /Parent 47 0 R /Prev 75 0 R /First 99 0 R /Last 107 0 R /Count -3 >> endobj 91 0 obj << /Title 92 0 R /A 89 0 R /Parent 75 0 R /Prev 87 0 R >> endobj 87 0 obj << /Title 88 0 R /A 85 0 R /Parent 75 0 R /Prev 83 0 R /Next 91 0 R >> endobj 83 0 obj << /Title 84 0 R /A 81 0 R /Parent 75 0 R /Prev 79 0 R /Next 87 0 R >> endobj 79 0 obj << /Title 80 0 R /A 77 0 R /Parent 75 0 R /Next 83 0 R >> endobj 75 0 obj << /Title 76 0 R /A 73 0 R /Parent 47 0 R /Prev 55 0 R /Next 95 0 R /First 79 0 R /Last 91 0 R /Count -4 >> endobj 71 0 obj << /Title 72 0 R /A 69 0 R /Parent 55 0 R /Prev 67 0 R >> endobj 67 0 obj << /Title 68 0 R /A 65 0 R /Parent 55 0 R /Prev 63 0 R /Next 71 0 R >> endobj 63 0 obj << /Title 64 0 R /A 61 0 R /Parent 55 0 R /Prev 59 0 R /Next 67 0 R >> endobj 59 0 obj << /Title 60 0 R /A 57 0 R /Parent 55 0 R /Next 63 0 R >> endobj 55 0 obj << /Title 56 0 R /A 53 0 R /Parent 47 0 R /Prev 51 0 R /Next 75 0 R /First 59 0 R /Last 71 0 R /Count -4 >> endobj 51 0 obj << /Title 52 0 R /A 49 0 R /Parent 47 0 R /Next 55 0 R >> endobj 47 0 obj << /Title 48 0 R /A 45 0 R /Parent 892 0 R /Prev 27 0 R /Next 111 0 R /First 51 0 R /Last 95 0 R /Count 4 >> endobj 43 0 obj << /Title 44 0 R /A 41 0 R /Parent 27 0 R /Prev 39 0 R >> endobj 39 0 obj << /Title 40 0 R /A 37 0 R /Parent 27 0 R /Prev 35 0 R /Next 43 0 R >> endobj 35 0 obj << /Title 36 0 R /A 33 0 R /Parent 27 0 R /Prev 31 0 R /Next 39 0 R >> endobj 31 0 obj << /Title 32 0 R /A 29 0 R /Parent 27 0 R /Next 35 0 R >> endobj 27 0 obj << /Title 28 0 R /A 25 0 R /Parent 892 0 R /Prev 7 0 R /Next 47 0 R /First 31 0 R /Last 43 0 R /Count 4 >> endobj 23 0 obj << /Title 24 0 R /A 21 0 R /Parent 7 0 R /Prev 19 0 R >> endobj 19 0 obj << /Title 20 0 R /A 17 0 R /Parent 7 0 R /Prev 15 0 R /Next 23 0 R >> endobj 15 0 obj << /Title 16 0 R /A 13 0 R /Parent 7 0 R /Prev 11 0 R /Next 19 0 R >> endobj 11 0 obj << /Title 12 0 R /A 9 0 R /Parent 7 0 R /Next 15 0 R >> endobj 7 0 obj << /Title 8 0 R /A 5 0 R /Parent 892 0 R /Prev 3 0 R /Next 27 0 R /First 11 0 R /Last 23 0 R /Count 4 >> endobj 3 0 obj << /Title 4 0 R /A 1 0 R /Parent 892 0 R /Next 7 0 R >> endobj 893 0 obj << /Names [(Doc-Start) 194 0 R (Hfootnote.1) 267 0 R (Hfootnote.2) 425 0 R (Hfootnote.3) 513 0 R (Item.1) 305 0 R (Item.10) 598 0 R] /Limits [(Doc-Start) (Item.10)] >> endobj 894 0 obj << /Names [(Item.11) 599 0 R (Item.12) 701 0 R (Item.13) 702 0 R (Item.14) 703 0 R (Item.15) 845 0 R (Item.16) 850 0 R] /Limits [(Item.11) (Item.16)] >> endobj 895 0 obj << /Names [(Item.2) 306 0 R (Item.3) 506 0 R (Item.4) 507 0 R (Item.5) 508 0 R (Item.6) 594 0 R (Item.7) 595 0 R] /Limits [(Item.2) (Item.7)] >> endobj 896 0 obj << /Names [(Item.8) 596 0 R (Item.9) 597 0 R (chapter*.1) 203 0 R (chapter*.2) 239 0 R (chapter.1) 2 0 R (chapter.2) 6 0 R] /Limits [(Item.8) (chapter.2)] >> endobj 897 0 obj << /Names [(chapter.3) 26 0 R (chapter.4) 46 0 R (chapter.5) 110 0 R (chapter.6) 122 0 R (chapter.7) 134 0 R (chapter.8) 154 0 R] /Limits [(chapter.3) (chapter.8)] >> endobj 898 0 obj << /Names [(figure.8.1) 744 0 R (figure.8.2) 759 0 R (lstlisting.2.-1) 274 0 R (lstlisting.2.-2) 279 0 R (lstlisting.2.-3) 287 0 R (lstlisting.2.-4) 292 0 R] /Limits [(figure.8.1) (lstlisting.2.-4)] >> endobj 899 0 obj << /Names [(lstlisting.2.-5) 294 0 R (lstlisting.2.-6) 302 0 R (lstlisting.2.-7) 307 0 R (lstlisting.3.-10) 375 0 R (lstlisting.3.-11) 377 0 R (lstlisting.3.-12) 385 0 R] /Limits [(lstlisting.2.-5) (lstlisting.3.-12)] >> endobj 900 0 obj << /Names [(lstlisting.3.-13) 387 0 R (lstlisting.3.-14) 389 0 R (lstlisting.3.-15) 391 0 R (lstlisting.3.-16) 406 0 R (lstlisting.3.-17) 421 0 R (lstlisting.3.-18) 423 0 R] /Limits [(lstlisting.3.-13) (lstlisting.3.-18)] >> endobj 901 0 obj << /Names [(lstlisting.3.-19) 431 0 R (lstlisting.3.-20) 433 0 R (lstlisting.3.-21) 440 0 R (lstlisting.3.-22) 446 0 R (lstlisting.3.-8) 360 0 R (lstlisting.3.-9) 373 0 R] /Limits [(lstlisting.3.-19) (lstlisting.3.-9)] >> endobj 902 0 obj << /Names [(lstlisting.4.-23) 458 0 R (lstlisting.4.-24) 460 0 R (lstlisting.4.-25) 462 0 R (lstlisting.4.-26) 469 0 R (lstlisting.4.-27) 471 0 R (lstlisting.4.-28) 479 0 R] /Limits [(lstlisting.4.-23) (lstlisting.4.-28)] >> endobj 903 0 obj << /Names [(lstlisting.4.-29) 481 0 R (lstlisting.4.-30) 483 0 R (lstlisting.4.-31) 485 0 R (lstlisting.4.-32) 492 0 R (lstlisting.4.-33) 494 0 R (lstlisting.4.-34) 496 0 R] /Limits [(lstlisting.4.-29) (lstlisting.4.-34)] >> endobj 904 0 obj << /Names [(lstlisting.4.-35) 504 0 R (lstlisting.4.-36) 509 0 R (lstlisting.4.-37) 511 0 R (lstlisting.4.-38) 519 0 R (lstlisting.4.-39) 521 0 R (lstlisting.4.-40) 525 0 R] /Limits [(lstlisting.4.-35) (lstlisting.4.-40)] >> endobj 905 0 obj << /Names [(lstlisting.5.-41) 533 0 R (lstlisting.5.-42) 535 0 R (lstlisting.5.-43) 542 0 R (lstlisting.6.-44) 550 0 R (lstlisting.6.-45) 557 0 R (lstlisting.6.-46) 571 0 R] /Limits [(lstlisting.5.-41) (lstlisting.6.-46)] >> endobj 906 0 obj << /Names [(lstlisting.6.-47) 573 0 R (lstlisting.6.-48) 586 0 R (lstlisting.7.-49) 605 0 R (lstlisting.7.-50) 612 0 R (lstlisting.7.-51) 614 0 R (lstlisting.7.-52) 631 0 R] /Limits [(lstlisting.6.-47) (lstlisting.7.-52)] >> endobj 907 0 obj << /Names [(lstlisting.7.-53) 640 0 R (lstlisting.7.-54) 642 0 R (lstlisting.7.-55) 644 0 R (lstlisting.7.-56) 679 0 R (lstlisting.7.-57) 686 0 R (lstlisting.7.-58) 688 0 R] /Limits [(lstlisting.7.-53) (lstlisting.7.-58)] >> endobj 908 0 obj << /Names [(lstlisting.8.-59) 709 0 R (lstlisting.8.-60) 711 0 R (lstlisting.8.-61) 713 0 R (lstlisting.8.-62) 722 0 R (lstlisting.8.-63) 765 0 R (lstlisting.8.-64) 767 0 R] /Limits [(lstlisting.8.-59) (lstlisting.8.-64)] >> endobj 909 0 obj << /Names [(lstlisting.8.-65) 770 0 R (lstlisting.8.-66) 751 0 R (lstlisting.8.-67) 753 0 R (lstlisting.8.-68) 755 0 R (lstlisting.8.-69) 757 0 R (lstlisting.8.-70) 772 0 R] /Limits [(lstlisting.8.-65) (lstlisting.8.-70)] >> endobj 910 0 obj << /Names [(lstlisting.8.-71) 775 0 R (lstlisting.8.-72) 777 0 R (lstlisting.8.-73) 780 0 R (lstlisting.8.-74) 789 0 R (lstlisting.8.-75) 792 0 R (lstlisting.8.-76) 800 0 R] /Limits [(lstlisting.8.-71) (lstlisting.8.-76)] >> endobj 911 0 obj << /Names [(lstlisting.8.-77) 809 0 R (lstlisting.8.-78) 811 0 R (lstlisting.8.-79) 813 0 R (lstlisting.8.-80) 815 0 R (lstlisting.8.-81) 817 0 R (lstlisting.8.-82) 824 0 R] /Limits [(lstlisting.8.-77) (lstlisting.8.-82)] >> endobj 912 0 obj << /Names [(lstlisting.8.-83) 828 0 R (lstlisting.8.-84) 840 0 R (lstnumber.-1.1) 276 0 R (lstnumber.-10.1) 376 0 R (lstnumber.-11.1) 378 0 R (lstnumber.-12.1) 386 0 R] /Limits [(lstlisting.8.-83) (lstnumber.-12.1)] >> endobj 913 0 obj << /Names [(lstnumber.-13.1) 388 0 R (lstnumber.-14.1) 390 0 R (lstnumber.-15.1) 392 0 R (lstnumber.-15.10) 401 0 R (lstnumber.-15.11) 402 0 R (lstnumber.-15.12) 403 0 R] /Limits [(lstnumber.-13.1) (lstnumber.-15.12)] >> endobj 914 0 obj << /Names [(lstnumber.-15.13) 404 0 R (lstnumber.-15.14) 405 0 R (lstnumber.-15.2) 393 0 R (lstnumber.-15.3) 394 0 R (lstnumber.-15.4) 395 0 R (lstnumber.-15.5) 396 0 R] /Limits [(lstnumber.-15.13) (lstnumber.-15.5)] >> endobj 915 0 obj << /Names [(lstnumber.-15.6) 397 0 R (lstnumber.-15.7) 398 0 R (lstnumber.-15.8) 399 0 R (lstnumber.-15.9) 400 0 R (lstnumber.-16.1) 407 0 R (lstnumber.-17.1) 422 0 R] /Limits [(lstnumber.-15.6) (lstnumber.-17.1)] >> endobj 916 0 obj << /Names [(lstnumber.-18.1) 424 0 R (lstnumber.-19.1) 432 0 R (lstnumber.-2.1) 280 0 R (lstnumber.-20.1) 434 0 R (lstnumber.-20.2) 435 0 R (lstnumber.-20.3) 436 0 R] /Limits [(lstnumber.-18.1) (lstnumber.-20.3)] >> endobj 917 0 obj << /Names [(lstnumber.-20.4) 437 0 R (lstnumber.-20.5) 438 0 R (lstnumber.-20.6) 439 0 R (lstnumber.-21.1) 441 0 R (lstnumber.-21.2) 442 0 R (lstnumber.-21.3) 443 0 R] /Limits [(lstnumber.-20.4) (lstnumber.-21.3)] >> endobj 918 0 obj << /Names [(lstnumber.-22.1) 447 0 R (lstnumber.-23.1) 459 0 R (lstnumber.-24.1) 461 0 R (lstnumber.-25.1) 463 0 R (lstnumber.-26.1) 470 0 R (lstnumber.-27.1) 472 0 R] /Limits [(lstnumber.-22.1) (lstnumber.-27.1)] >> endobj 919 0 obj << /Names [(lstnumber.-28.1) 480 0 R (lstnumber.-29.1) 482 0 R (lstnumber.-3.1) 288 0 R (lstnumber.-3.2) 289 0 R (lstnumber.-3.3) 290 0 R (lstnumber.-3.4) 291 0 R] /Limits [(lstnumber.-28.1) (lstnumber.-3.4)] >> endobj 920 0 obj << /Names [(lstnumber.-30.1) 484 0 R (lstnumber.-31.1) 486 0 R (lstnumber.-32.1) 493 0 R (lstnumber.-33.1) 495 0 R (lstnumber.-34.1) 497 0 R (lstnumber.-35.1) 505 0 R] /Limits [(lstnumber.-30.1) (lstnumber.-35.1)] >> endobj 921 0 obj << /Names [(lstnumber.-36.1) 510 0 R (lstnumber.-37.1) 512 0 R (lstnumber.-38.1) 520 0 R (lstnumber.-39.1) 522 0 R (lstnumber.-39.2) 523 0 R (lstnumber.-39.3) 524 0 R] /Limits [(lstnumber.-36.1) (lstnumber.-39.3)] >> endobj 922 0 obj << /Names [(lstnumber.-4.1) 293 0 R (lstnumber.-40.1) 526 0 R (lstnumber.-40.2) 527 0 R (lstnumber.-41.1) 534 0 R (lstnumber.-42.1) 536 0 R (lstnumber.-43.1) 543 0 R] /Limits [(lstnumber.-4.1) (lstnumber.-43.1)] >> endobj 923 0 obj << /Names [(lstnumber.-44.1) 551 0 R (lstnumber.-45.1) 558 0 R (lstnumber.-45.10) 567 0 R (lstnumber.-45.11) 568 0 R (lstnumber.-45.12) 569 0 R (lstnumber.-45.13) 570 0 R] /Limits [(lstnumber.-44.1) (lstnumber.-45.13)] >> endobj 924 0 obj << /Names [(lstnumber.-45.2) 559 0 R (lstnumber.-45.3) 560 0 R (lstnumber.-45.4) 561 0 R (lstnumber.-45.5) 562 0 R (lstnumber.-45.6) 563 0 R (lstnumber.-45.7) 564 0 R] /Limits [(lstnumber.-45.2) (lstnumber.-45.7)] >> endobj 925 0 obj << /Names [(lstnumber.-45.8) 565 0 R (lstnumber.-45.9) 566 0 R (lstnumber.-46.1) 572 0 R (lstnumber.-47.1) 574 0 R (lstnumber.-47.2) 575 0 R (lstnumber.-47.3) 576 0 R] /Limits [(lstnumber.-45.8) (lstnumber.-47.3)] >> endobj 926 0 obj << /Names [(lstnumber.-47.4) 577 0 R (lstnumber.-47.5) 578 0 R (lstnumber.-47.6) 579 0 R (lstnumber.-48.1) 587 0 R (lstnumber.-49.1) 606 0 R (lstnumber.-49.2) 607 0 R] /Limits [(lstnumber.-47.4) (lstnumber.-49.2)] >> endobj 927 0 obj << /Names [(lstnumber.-49.3) 608 0 R (lstnumber.-49.4) 609 0 R (lstnumber.-49.5) 610 0 R (lstnumber.-49.6) 611 0 R (lstnumber.-5.1) 295 0 R (lstnumber.-50.1) 613 0 R] /Limits [(lstnumber.-49.3) (lstnumber.-50.1)] >> endobj 928 0 obj << /Names [(lstnumber.-51.1) 615 0 R (lstnumber.-51.10) 624 0 R (lstnumber.-51.11) 625 0 R (lstnumber.-51.2) 616 0 R (lstnumber.-51.3) 617 0 R (lstnumber.-51.4) 618 0 R] /Limits [(lstnumber.-51.1) (lstnumber.-51.4)] >> endobj 929 0 obj << /Names [(lstnumber.-51.5) 619 0 R (lstnumber.-51.6) 620 0 R (lstnumber.-51.7) 621 0 R (lstnumber.-51.8) 622 0 R (lstnumber.-51.9) 623 0 R (lstnumber.-52.1) 632 0 R] /Limits [(lstnumber.-51.5) (lstnumber.-52.1)] >> endobj 930 0 obj << /Names [(lstnumber.-52.2) 633 0 R (lstnumber.-52.3) 634 0 R (lstnumber.-52.4) 635 0 R (lstnumber.-52.5) 636 0 R (lstnumber.-52.6) 637 0 R (lstnumber.-52.7) 638 0 R] /Limits [(lstnumber.-52.2) (lstnumber.-52.7)] >> endobj 931 0 obj << /Names [(lstnumber.-52.8) 639 0 R (lstnumber.-53.1) 641 0 R (lstnumber.-54.1) 643 0 R (lstnumber.-55.1) 645 0 R (lstnumber.-55.10) 660 0 R (lstnumber.-55.11) 661 0 R] /Limits [(lstnumber.-52.8) (lstnumber.-55.11)] >> endobj 932 0 obj << /Names [(lstnumber.-55.12) 662 0 R (lstnumber.-55.13) 663 0 R (lstnumber.-55.14) 664 0 R (lstnumber.-55.15) 665 0 R (lstnumber.-55.16) 666 0 R (lstnumber.-55.17) 667 0 R] /Limits [(lstnumber.-55.12) (lstnumber.-55.17)] >> endobj 933 0 obj << /Names [(lstnumber.-55.18) 668 0 R (lstnumber.-55.19) 669 0 R (lstnumber.-55.2) 646 0 R (lstnumber.-55.20) 670 0 R (lstnumber.-55.21) 671 0 R (lstnumber.-55.22) 672 0 R] /Limits [(lstnumber.-55.18) (lstnumber.-55.22)] >> endobj 934 0 obj << /Names [(lstnumber.-55.23) 673 0 R (lstnumber.-55.24) 674 0 R (lstnumber.-55.25) 675 0 R (lstnumber.-55.26) 676 0 R (lstnumber.-55.27) 677 0 R (lstnumber.-55.28) 678 0 R] /Limits [(lstnumber.-55.23) (lstnumber.-55.28)] >> endobj 935 0 obj << /Names [(lstnumber.-55.3) 653 0 R (lstnumber.-55.4) 654 0 R (lstnumber.-55.5) 655 0 R (lstnumber.-55.6) 656 0 R (lstnumber.-55.7) 657 0 R (lstnumber.-55.8) 658 0 R] /Limits [(lstnumber.-55.3) (lstnumber.-55.8)] >> endobj 936 0 obj << /Names [(lstnumber.-55.9) 659 0 R (lstnumber.-56.1) 685 0 R (lstnumber.-57.1) 687 0 R (lstnumber.-58.1) 689 0 R (lstnumber.-58.2) 690 0 R (lstnumber.-59.1) 710 0 R] /Limits [(lstnumber.-55.9) (lstnumber.-59.1)] >> endobj 937 0 obj << /Names [(lstnumber.-6.1) 303 0 R (lstnumber.-6.2) 304 0 R (lstnumber.-60.1) 712 0 R (lstnumber.-61.1) 714 0 R (lstnumber.-62.1) 723 0 R (lstnumber.-62.10) 732 0 R] /Limits [(lstnumber.-6.1) (lstnumber.-62.10)] >> endobj 938 0 obj << /Names [(lstnumber.-62.11) 733 0 R (lstnumber.-62.12) 734 0 R (lstnumber.-62.13) 735 0 R (lstnumber.-62.14) 736 0 R (lstnumber.-62.15) 737 0 R (lstnumber.-62.16) 738 0 R] /Limits [(lstnumber.-62.11) (lstnumber.-62.16)] >> endobj 939 0 obj << /Names [(lstnumber.-62.17) 739 0 R (lstnumber.-62.18) 740 0 R (lstnumber.-62.19) 741 0 R (lstnumber.-62.2) 724 0 R (lstnumber.-62.20) 742 0 R (lstnumber.-62.3) 725 0 R] /Limits [(lstnumber.-62.17) (lstnumber.-62.3)] >> endobj 940 0 obj << /Names [(lstnumber.-62.4) 726 0 R (lstnumber.-62.5) 727 0 R (lstnumber.-62.6) 728 0 R (lstnumber.-62.7) 729 0 R (lstnumber.-62.8) 730 0 R (lstnumber.-62.9) 731 0 R] /Limits [(lstnumber.-62.4) (lstnumber.-62.9)] >> endobj 941 0 obj << /Names [(lstnumber.-63.1) 766 0 R (lstnumber.-64.1) 768 0 R (lstnumber.-64.2) 769 0 R (lstnumber.-65.1) 771 0 R (lstnumber.-66.1) 752 0 R (lstnumber.-67.1) 754 0 R] /Limits [(lstnumber.-63.1) (lstnumber.-67.1)] >> endobj 942 0 obj << /Names [(lstnumber.-68.1) 756 0 R (lstnumber.-69.1) 758 0 R (lstnumber.-7.1) 308 0 R (lstnumber.-7.10) 318 0 R (lstnumber.-7.11) 319 0 R (lstnumber.-7.12) 320 0 R] /Limits [(lstnumber.-68.1) (lstnumber.-7.12)] >> endobj 943 0 obj << /Names [(lstnumber.-7.13) 321 0 R (lstnumber.-7.14) 322 0 R (lstnumber.-7.15) 323 0 R (lstnumber.-7.16) 324 0 R (lstnumber.-7.17) 325 0 R (lstnumber.-7.18) 326 0 R] /Limits [(lstnumber.-7.13) (lstnumber.-7.18)] >> endobj 944 0 obj << /Names [(lstnumber.-7.19) 332 0 R (lstnumber.-7.2) 309 0 R (lstnumber.-7.20) 333 0 R (lstnumber.-7.21) 334 0 R (lstnumber.-7.22) 335 0 R (lstnumber.-7.23) 336 0 R] /Limits [(lstnumber.-7.19) (lstnumber.-7.23)] >> endobj 945 0 obj << /Names [(lstnumber.-7.24) 337 0 R (lstnumber.-7.25) 338 0 R (lstnumber.-7.26) 339 0 R (lstnumber.-7.27) 340 0 R (lstnumber.-7.28) 341 0 R (lstnumber.-7.29) 342 0 R] /Limits [(lstnumber.-7.24) (lstnumber.-7.29)] >> endobj 946 0 obj << /Names [(lstnumber.-7.3) 310 0 R (lstnumber.-7.30) 343 0 R (lstnumber.-7.31) 344 0 R (lstnumber.-7.32) 345 0 R (lstnumber.-7.33) 346 0 R (lstnumber.-7.34) 347 0 R] /Limits [(lstnumber.-7.3) (lstnumber.-7.34)] >> endobj 947 0 obj << /Names [(lstnumber.-7.35) 348 0 R (lstnumber.-7.36) 349 0 R (lstnumber.-7.37) 350 0 R (lstnumber.-7.38) 351 0 R (lstnumber.-7.39) 352 0 R (lstnumber.-7.4) 311 0 R] /Limits [(lstnumber.-7.35) (lstnumber.-7.4)] >> endobj 948 0 obj << /Names [(lstnumber.-7.40) 353 0 R (lstnumber.-7.5) 312 0 R (lstnumber.-7.6) 313 0 R (lstnumber.-7.7) 314 0 R (lstnumber.-7.8) 315 0 R (lstnumber.-7.9) 317 0 R] /Limits [(lstnumber.-7.40) (lstnumber.-7.9)] >> endobj 949 0 obj << /Names [(lstnumber.-70.1) 773 0 R (lstnumber.-70.2) 774 0 R (lstnumber.-71.1) 776 0 R (lstnumber.-72.1) 778 0 R (lstnumber.-72.2) 779 0 R (lstnumber.-73.1) 781 0 R] /Limits [(lstnumber.-70.1) (lstnumber.-73.1)] >> endobj 950 0 obj << /Names [(lstnumber.-73.2) 782 0 R (lstnumber.-73.3) 783 0 R (lstnumber.-74.1) 790 0 R (lstnumber.-74.2) 791 0 R (lstnumber.-75.1) 793 0 R (lstnumber.-75.2) 794 0 R] /Limits [(lstnumber.-73.2) (lstnumber.-75.2)] >> endobj 951 0 obj << /Names [(lstnumber.-75.3) 795 0 R (lstnumber.-75.4) 796 0 R (lstnumber.-75.5) 797 0 R (lstnumber.-75.6) 798 0 R (lstnumber.-75.7) 799 0 R (lstnumber.-76.1) 801 0 R] /Limits [(lstnumber.-75.3) (lstnumber.-76.1)] >> endobj 952 0 obj << /Names [(lstnumber.-76.2) 802 0 R (lstnumber.-76.3) 803 0 R (lstnumber.-77.1) 810 0 R (lstnumber.-78.1) 812 0 R (lstnumber.-79.1) 814 0 R (lstnumber.-8.1) 361 0 R] /Limits [(lstnumber.-76.2) (lstnumber.-8.1)] >> endobj 953 0 obj << /Names [(lstnumber.-80.1) 816 0 R (lstnumber.-81.1) 818 0 R (lstnumber.-82.1) 825 0 R (lstnumber.-82.2) 826 0 R (lstnumber.-82.3) 827 0 R (lstnumber.-83.1) 829 0 R] /Limits [(lstnumber.-80.1) (lstnumber.-83.1)] >> endobj 954 0 obj << /Names [(lstnumber.-83.10) 838 0 R (lstnumber.-83.11) 839 0 R (lstnumber.-83.2) 830 0 R (lstnumber.-83.3) 831 0 R (lstnumber.-83.4) 832 0 R (lstnumber.-83.5) 833 0 R] /Limits [(lstnumber.-83.10) (lstnumber.-83.5)] >> endobj 955 0 obj << /Names [(lstnumber.-83.6) 834 0 R (lstnumber.-83.7) 835 0 R (lstnumber.-83.8) 836 0 R (lstnumber.-83.9) 837 0 R (lstnumber.-84.1) 841 0 R (lstnumber.-84.2) 842 0 R] /Limits [(lstnumber.-83.6) (lstnumber.-84.2)] >> endobj 956 0 obj << /Names [(lstnumber.-84.3) 843 0 R (lstnumber.-84.4) 844 0 R (lstnumber.-9.1) 374 0 R (page.1) 193 0 R (page.10) 414 0 R (page.11) 420 0 R] /Limits [(lstnumber.-84.3) (page.11)] >> endobj 957 0 obj << /Names [(page.12) 430 0 R (page.13) 452 0 R (page.14) 457 0 R (page.15) 468 0 R (page.16) 478 0 R (page.17) 491 0 R] /Limits [(page.12) (page.17)] >> endobj 958 0 obj << /Names [(page.18) 503 0 R (page.19) 518 0 R (page.2) 273 0 R (page.20) 532 0 R (page.21) 541 0 R (page.22) 549 0 R] /Limits [(page.18) (page.22)] >> endobj 959 0 obj << /Names [(page.23) 556 0 R (page.24) 584 0 R (page.25) 593 0 R (page.26) 604 0 R (page.27) 630 0 R (page.28) 652 0 R] /Limits [(page.23) (page.28)] >> endobj 960 0 obj << /Names [(page.29) 684 0 R (page.3) 286 0 R (page.30) 695 0 R (page.31) 700 0 R (page.32) 708 0 R (page.33) 721 0 R] /Limits [(page.29) (page.33)] >> endobj 961 0 obj << /Names [(page.34) 750 0 R (page.35) 764 0 R (page.36) 788 0 R (page.37) 808 0 R (page.38) 823 0 R (page.39) 268 0 R] /Limits [(page.34) (page.39)] >> endobj 962 0 obj << /Names [(page.4) 301 0 R (page.5) 331 0 R (page.6) 359 0 R (page.7) 367 0 R (page.8) 372 0 R (page.9) 384 0 R] /Limits [(page.4) (page.9)] >> endobj 963 0 obj << /Names [(page.i) 202 0 R (page.ii) 238 0 R (page.iii) 260 0 R (section.2.1) 10 0 R (section.2.2) 14 0 R (section.2.3) 18 0 R] /Limits [(page.i) (section.2.3)] >> endobj 964 0 obj << /Names [(section.2.4) 22 0 R (section.3.1) 30 0 R (section.3.2) 34 0 R (section.3.3) 38 0 R (section.3.4) 42 0 R (section.4.1) 50 0 R] /Limits [(section.2.4) (section.4.1)] >> endobj 965 0 obj << /Names [(section.4.2) 54 0 R (section.4.3) 74 0 R (section.4.4) 94 0 R (section.5.1) 114 0 R (section.5.2) 118 0 R (section.6.1) 126 0 R] /Limits [(section.4.2) (section.6.1)] >> endobj 966 0 obj << /Names [(section.6.2) 130 0 R (section.7.1) 138 0 R (section.7.2) 142 0 R (section.7.3) 146 0 R (section.8.1) 158 0 R (section.8.2) 170 0 R] /Limits [(section.6.2) (section.8.2)] >> endobj 967 0 obj << /Names [(section.8.3) 174 0 R (section.8.4) 178 0 R (section.8.5) 182 0 R (section.8.6) 186 0 R (subsection.4.2.1) 58 0 R (subsection.4.2.2) 62 0 R] /Limits [(section.8.3) (subsection.4.2.2)] >> endobj 968 0 obj << /Names [(subsection.4.2.3) 66 0 R (subsection.4.2.4) 70 0 R (subsection.4.3.1) 78 0 R (subsection.4.3.2) 82 0 R (subsection.4.3.3) 86 0 R (subsection.4.3.4) 90 0 R] /Limits [(subsection.4.2.3) (subsection.4.3.4)] >> endobj 969 0 obj << /Names [(subsection.4.4.1) 98 0 R (subsection.4.4.2) 102 0 R (subsection.4.4.3) 106 0 R (subsection.7.3.1) 150 0 R (subsection.8.1.1) 162 0 R (subsection.8.1.2) 166 0 R] /Limits [(subsection.4.4.1) (subsection.8.1.2)] >> endobj 970 0 obj << /Names [(table.3.1) 362 0 R (table.3.2) 409 0 R] /Limits [(table.3.1) (table.3.2)] >> endobj 971 0 obj << /Kids [893 0 R 894 0 R 895 0 R 896 0 R 897 0 R 898 0 R] /Limits [(Doc-Start) (lstlisting.2.-4)] >> endobj 972 0 obj << /Kids [899 0 R 900 0 R 901 0 R 902 0 R 903 0 R 904 0 R] /Limits [(lstlisting.2.-5) (lstlisting.4.-40)] >> endobj 973 0 obj << /Kids [905 0 R 906 0 R 907 0 R 908 0 R 909 0 R 910 0 R] /Limits [(lstlisting.5.-41) (lstlisting.8.-76)] >> endobj 974 0 obj << /Kids [911 0 R 912 0 R 913 0 R 914 0 R 915 0 R 916 0 R] /Limits [(lstlisting.8.-77) (lstnumber.-20.3)] >> endobj 975 0 obj << /Kids [917 0 R 918 0 R 919 0 R 920 0 R 921 0 R 922 0 R] /Limits [(lstnumber.-20.4) (lstnumber.-43.1)] >> endobj 976 0 obj << /Kids [923 0 R 924 0 R 925 0 R 926 0 R 927 0 R 928 0 R] /Limits [(lstnumber.-44.1) (lstnumber.-51.4)] >> endobj 977 0 obj << /Kids [929 0 R 930 0 R 931 0 R 932 0 R 933 0 R 934 0 R] /Limits [(lstnumber.-51.5) (lstnumber.-55.28)] >> endobj 978 0 obj << /Kids [935 0 R 936 0 R 937 0 R 938 0 R 939 0 R 940 0 R] /Limits [(lstnumber.-55.3) (lstnumber.-62.9)] >> endobj 979 0 obj << /Kids [941 0 R 942 0 R 943 0 R 944 0 R 945 0 R 946 0 R] /Limits [(lstnumber.-63.1) (lstnumber.-7.34)] >> endobj 980 0 obj << /Kids [947 0 R 948 0 R 949 0 R 950 0 R 951 0 R 952 0 R] /Limits [(lstnumber.-7.35) (lstnumber.-8.1)] >> endobj 981 0 obj << /Kids [953 0 R 954 0 R 955 0 R 956 0 R 957 0 R 958 0 R] /Limits [(lstnumber.-80.1) (page.22)] >> endobj 982 0 obj << /Kids [959 0 R 960 0 R 961 0 R 962 0 R 963 0 R 964 0 R] /Limits [(page.23) (section.4.1)] >> endobj 983 0 obj << /Kids [965 0 R 966 0 R 967 0 R 968 0 R 969 0 R 970 0 R] /Limits [(section.4.2) (table.3.2)] >> endobj 984 0 obj << /Kids [971 0 R 972 0 R 973 0 R 974 0 R 975 0 R 976 0 R] /Limits [(Doc-Start) (lstnumber.-51.4)] >> endobj 985 0 obj << /Kids [977 0 R 978 0 R 979 0 R 980 0 R 981 0 R 982 0 R] /Limits [(lstnumber.-51.5) (section.4.1)] >> endobj 986 0 obj << /Kids [983 0 R] /Limits [(section.4.2) (table.3.2)] >> endobj 987 0 obj << /Kids [984 0 R 985 0 R 986 0 R] /Limits [(Doc-Start) (table.3.2)] >> endobj 988 0 obj << /Dests 987 0 R >> endobj 989 0 obj << /Type /Catalog /Pages 891 0 R /Outlines 892 0 R /Names 988 0 R /PageMode/UseOutlines/PageLabels<>1<>4<>]>> /OpenAction 189 0 R >> endobj 990 0 obj << /Author(Marcus Geelnard)/Title(GLFW Users Guide)/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.10)/Keywords(GLFW,OpenGL,guide,manual) /CreationDate (D:20110812142101+02'00') /ModDate (D:20110812142101+02'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian) kpathsea version 5.0.0) >> endobj xref 0 991 0000000000 65535 f 0000000015 00000 n 0000018385 00000 n 0000289303 00000 n 0000000060 00000 n 0000000092 00000 n 0000020700 00000 n 0000289183 00000 n 0000000137 00000 n 0000000172 00000 n 0000020748 00000 n 0000289111 00000 n 0000000219 00000 n 0000000259 00000 n 0000020996 00000 n 0000289025 00000 n 0000000307 00000 n 0000000354 00000 n 0000024692 00000 n 0000288939 00000 n 0000000402 00000 n 0000000445 00000 n 0000028344 00000 n 0000288866 00000 n 0000000493 00000 n 0000000563 00000 n 0000035187 00000 n 0000288743 00000 n 0000000609 00000 n 0000000647 00000 n 0000035236 00000 n 0000288669 00000 n 0000000695 00000 n 0000000743 00000 n 0000041372 00000 n 0000288582 00000 n 0000000791 00000 n 0000000839 00000 n 0000051808 00000 n 0000288495 00000 n 0000000887 00000 n 0000000925 00000 n 0000052057 00000 n 0000288421 00000 n 0000000973 00000 n 0000001016 00000 n 0000057694 00000 n 0000288296 00000 n 0000001062 00000 n 0000001097 00000 n 0000057743 00000 n 0000288222 00000 n 0000001145 00000 n 0000001181 00000 n 0000057792 00000 n 0000288098 00000 n 0000001229 00000 n 0000001266 00000 n 0000060962 00000 n 0000288024 00000 n 0000001319 00000 n 0000001353 00000 n 0000063951 00000 n 0000287937 00000 n 0000001406 00000 n 0000001446 00000 n 0000064100 00000 n 0000287850 00000 n 0000001499 00000 n 0000001534 00000 n 0000064248 00000 n 0000287776 00000 n 0000001587 00000 n 0000001631 00000 n 0000067058 00000 n 0000287652 00000 n 0000001679 00000 n 0000001713 00000 n 0000067106 00000 n 0000287578 00000 n 0000001766 00000 n 0000001805 00000 n 0000067355 00000 n 0000287491 00000 n 0000001858 00000 n 0000001896 00000 n 0000070298 00000 n 0000287404 00000 n 0000001949 00000 n 0000001985 00000 n 0000073457 00000 n 0000287330 00000 n 0000002038 00000 n 0000002086 00000 n 0000073855 00000 n 0000287218 00000 n 0000002134 00000 n 0000002171 00000 n 0000073904 00000 n 0000287142 00000 n 0000002224 00000 n 0000002271 00000 n 0000077008 00000 n 0000287051 00000 n 0000002325 00000 n 0000002368 00000 n 0000077357 00000 n 0000286973 00000 n 0000002422 00000 n 0000002464 00000 n 0000079855 00000 n 0000286843 00000 n 0000002511 00000 n 0000002539 00000 n 0000079905 00000 n 0000286764 00000 n 0000002588 00000 n 0000002633 00000 n 0000080154 00000 n 0000286685 00000 n 0000002682 00000 n 0000002711 00000 n 0000084505 00000 n 0000286554 00000 n 0000002758 00000 n 0000002804 00000 n 0000084555 00000 n 0000286475 00000 n 0000002853 00000 n 0000002892 00000 n 0000088693 00000 n 0000286396 00000 n 0000002941 00000 n 0000002978 00000 n 0000093090 00000 n 0000286265 00000 n 0000003025 00000 n 0000003071 00000 n 0000096398 00000 n 0000286186 00000 n 0000003120 00000 n 0000003162 00000 n 0000096798 00000 n 0000286093 00000 n 0000003211 00000 n 0000003248 00000 n 0000101439 00000 n 0000285975 00000 n 0000003297 00000 n 0000003347 00000 n 0000106271 00000 n 0000285910 00000 n 0000003401 00000 n 0000003460 00000 n 0000111041 00000 n 0000285793 00000 n 0000003507 00000 n 0000003544 00000 n 0000111091 00000 n 0000285675 00000 n 0000003593 00000 n 0000003641 00000 n 0000111141 00000 n 0000285596 00000 n 0000003695 00000 n 0000003746 00000 n 0000113644 00000 n 0000285517 00000 n 0000003800 00000 n 0000003855 00000 n 0000113694 00000 n 0000285424 00000 n 0000003904 00000 n 0000003954 00000 n 0000116758 00000 n 0000285331 00000 n 0000004003 00000 n 0000004043 00000 n 0000121688 00000 n 0000285238 00000 n 0000004092 00000 n 0000004148 00000 n 0000131624 00000 n 0000285145 00000 n 0000004197 00000 n 0000004269 00000 n 0000140203 00000 n 0000285066 00000 n 0000004318 00000 n 0000004386 00000 n 0000004855 00000 n 0000005074 00000 n 0000004439 00000 n 0000004974 00000 n 0000005024 00000 n 0000283298 00000 n 0000283644 00000 n 0000282353 00000 n 0000283821 00000 n 0000006160 00000 n 0000005941 00000 n 0000005172 00000 n 0000006060 00000 n 0000006110 00000 n 0000283471 00000 n 0000007711 00000 n 0000007861 00000 n 0000008010 00000 n 0000008163 00000 n 0000008316 00000 n 0000008468 00000 n 0000008621 00000 n 0000008771 00000 n 0000008924 00000 n 0000009077 00000 n 0000009225 00000 n 0000009377 00000 n 0000009527 00000 n 0000009680 00000 n 0000009833 00000 n 0000009992 00000 n 0000010151 00000 n 0000010310 00000 n 0000010469 00000 n 0000010622 00000 n 0000010781 00000 n 0000010938 00000 n 0000011097 00000 n 0000011256 00000 n 0000011409 00000 n 0000011568 00000 n 0000011727 00000 n 0000011886 00000 n 0000012036 00000 n 0000013519 00000 n 0000012288 00000 n 0000007348 00000 n 0000006258 00000 n 0000012189 00000 n 0000012239 00000 n 0000013672 00000 n 0000013822 00000 n 0000013975 00000 n 0000014128 00000 n 0000014278 00000 n 0000014431 00000 n 0000014584 00000 n 0000014737 00000 n 0000014896 00000 n 0000015046 00000 n 0000015199 00000 n 0000015358 00000 n 0000015517 00000 n 0000015670 00000 n 0000015822 00000 n 0000015973 00000 n 0000016126 00000 n 0000016328 00000 n 0000013244 00000 n 0000012373 00000 n 0000016278 00000 n 0000018232 00000 n 0000018083 00000 n 0000018483 00000 n 0000017936 00000 n 0000016413 00000 n 0000282495 00000 n 0000018433 00000 n 0000141386 00000 n 0000020501 00000 n 0000021045 00000 n 0000020362 00000 n 0000018607 00000 n 0000020650 00000 n 0000020796 00000 n 0000282637 00000 n 0000020846 00000 n 0000282781 00000 n 0000282952 00000 n 0000020896 00000 n 0000020946 00000 n 0000024140 00000 n 0000023991 00000 n 0000024841 00000 n 0000023844 00000 n 0000021207 00000 n 0000024292 00000 n 0000024342 00000 n 0000024392 00000 n 0000024442 00000 n 0000024492 00000 n 0000024542 00000 n 0000024592 00000 n 0000024642 00000 n 0000024741 00000 n 0000024791 00000 n 0000283938 00000 n 0000027897 00000 n 0000029341 00000 n 0000027758 00000 n 0000024990 00000 n 0000028046 00000 n 0000028096 00000 n 0000028146 00000 n 0000028196 00000 n 0000028245 00000 n 0000028295 00000 n 0000028393 00000 n 0000028443 00000 n 0000028492 00000 n 0000028542 00000 n 0000028592 00000 n 0000028642 00000 n 0000028692 00000 n 0000028742 00000 n 0000028792 00000 n 0000283123 00000 n 0000028842 00000 n 0000028892 00000 n 0000028942 00000 n 0000028992 00000 n 0000029042 00000 n 0000029091 00000 n 0000029141 00000 n 0000029191 00000 n 0000029241 00000 n 0000029291 00000 n 0000031493 00000 n 0000032790 00000 n 0000031354 00000 n 0000029503 00000 n 0000031642 00000 n 0000031692 00000 n 0000031742 00000 n 0000031792 00000 n 0000031841 00000 n 0000031891 00000 n 0000031941 00000 n 0000031991 00000 n 0000032041 00000 n 0000032091 00000 n 0000032141 00000 n 0000032191 00000 n 0000032241 00000 n 0000032291 00000 n 0000032341 00000 n 0000032391 00000 n 0000032440 00000 n 0000032490 00000 n 0000032540 00000 n 0000032590 00000 n 0000032640 00000 n 0000032690 00000 n 0000032740 00000 n 0000034985 00000 n 0000034836 00000 n 0000035383 00000 n 0000034689 00000 n 0000032939 00000 n 0000035137 00000 n 0000035284 00000 n 0000035333 00000 n 0000038064 00000 n 0000037865 00000 n 0000038114 00000 n 0000037726 00000 n 0000035519 00000 n 0000038014 00000 n 0000040874 00000 n 0000041421 00000 n 0000040735 00000 n 0000038212 00000 n 0000041023 00000 n 0000041073 00000 n 0000041123 00000 n 0000041173 00000 n 0000041222 00000 n 0000041272 00000 n 0000041322 00000 n 0000044397 00000 n 0000044248 00000 n 0000045747 00000 n 0000044101 00000 n 0000041570 00000 n 0000044549 00000 n 0000044599 00000 n 0000044649 00000 n 0000044699 00000 n 0000044749 00000 n 0000044799 00000 n 0000044849 00000 n 0000044899 00000 n 0000044948 00000 n 0000044998 00000 n 0000045048 00000 n 0000045098 00000 n 0000045148 00000 n 0000045197 00000 n 0000045247 00000 n 0000045297 00000 n 0000045347 00000 n 0000045397 00000 n 0000045447 00000 n 0000045497 00000 n 0000045547 00000 n 0000045597 00000 n 0000045647 00000 n 0000045697 00000 n 0000284055 00000 n 0000048406 00000 n 0000048207 00000 n 0000048455 00000 n 0000048068 00000 n 0000045883 00000 n 0000048356 00000 n 0000051606 00000 n 0000051457 00000 n 0000052156 00000 n 0000051310 00000 n 0000048553 00000 n 0000051758 00000 n 0000051857 00000 n 0000051907 00000 n 0000051957 00000 n 0000052007 00000 n 0000052106 00000 n 0000054719 00000 n 0000055667 00000 n 0000054580 00000 n 0000052305 00000 n 0000054868 00000 n 0000054918 00000 n 0000054968 00000 n 0000055018 00000 n 0000055068 00000 n 0000055118 00000 n 0000055168 00000 n 0000055218 00000 n 0000055268 00000 n 0000055318 00000 n 0000055367 00000 n 0000055417 00000 n 0000055467 00000 n 0000055517 00000 n 0000281923 00000 n 0000282211 00000 n 0000055567 00000 n 0000055617 00000 n 0000057495 00000 n 0000057841 00000 n 0000057356 00000 n 0000055855 00000 n 0000057644 00000 n 0000060763 00000 n 0000061310 00000 n 0000060624 00000 n 0000057965 00000 n 0000060912 00000 n 0000061011 00000 n 0000061060 00000 n 0000061110 00000 n 0000061160 00000 n 0000061210 00000 n 0000061260 00000 n 0000063752 00000 n 0000064297 00000 n 0000063613 00000 n 0000061459 00000 n 0000063901 00000 n 0000064000 00000 n 0000064050 00000 n 0000064149 00000 n 0000064198 00000 n 0000284172 00000 n 0000066759 00000 n 0000067503 00000 n 0000066620 00000 n 0000064433 00000 n 0000066908 00000 n 0000066958 00000 n 0000067008 00000 n 0000067155 00000 n 0000067205 00000 n 0000067255 00000 n 0000067305 00000 n 0000067404 00000 n 0000067453 00000 n 0000069999 00000 n 0000070547 00000 n 0000069860 00000 n 0000067639 00000 n 0000070148 00000 n 0000070198 00000 n 0000070248 00000 n 0000070347 00000 n 0000070397 00000 n 0000070447 00000 n 0000070497 00000 n 0000073254 00000 n 0000073105 00000 n 0000074103 00000 n 0000072958 00000 n 0000070683 00000 n 0000073407 00000 n 0000073506 00000 n 0000073556 00000 n 0000073606 00000 n 0000073656 00000 n 0000073705 00000 n 0000073755 00000 n 0000073805 00000 n 0000073953 00000 n 0000074003 00000 n 0000074053 00000 n 0000076809 00000 n 0000077554 00000 n 0000076670 00000 n 0000074239 00000 n 0000076958 00000 n 0000077058 00000 n 0000077108 00000 n 0000077158 00000 n 0000077208 00000 n 0000077257 00000 n 0000077307 00000 n 0000077406 00000 n 0000077456 00000 n 0000077505 00000 n 0000079656 00000 n 0000080204 00000 n 0000079517 00000 n 0000077690 00000 n 0000079805 00000 n 0000079955 00000 n 0000080005 00000 n 0000080055 00000 n 0000080105 00000 n 0000081656 00000 n 0000081955 00000 n 0000081517 00000 n 0000080366 00000 n 0000081805 00000 n 0000081855 00000 n 0000081905 00000 n 0000284289 00000 n 0000084306 00000 n 0000084705 00000 n 0000084167 00000 n 0000082130 00000 n 0000084455 00000 n 0000084605 00000 n 0000084655 00000 n 0000087796 00000 n 0000089193 00000 n 0000087657 00000 n 0000084854 00000 n 0000087945 00000 n 0000087995 00000 n 0000088045 00000 n 0000088095 00000 n 0000088145 00000 n 0000088195 00000 n 0000088245 00000 n 0000088295 00000 n 0000088345 00000 n 0000088395 00000 n 0000088444 00000 n 0000088493 00000 n 0000088543 00000 n 0000088593 00000 n 0000088643 00000 n 0000088743 00000 n 0000088793 00000 n 0000088843 00000 n 0000088893 00000 n 0000088943 00000 n 0000088993 00000 n 0000089043 00000 n 0000089093 00000 n 0000089143 00000 n 0000090676 00000 n 0000090975 00000 n 0000090537 00000 n 0000089355 00000 n 0000090825 00000 n 0000282067 00000 n 0000090875 00000 n 0000090925 00000 n 0000092862 00000 n 0000092713 00000 n 0000093438 00000 n 0000092566 00000 n 0000091150 00000 n 0000093040 00000 n 0000093140 00000 n 0000093190 00000 n 0000093240 00000 n 0000093289 00000 n 0000093338 00000 n 0000093388 00000 n 0000096199 00000 n 0000097546 00000 n 0000096060 00000 n 0000093562 00000 n 0000096348 00000 n 0000096448 00000 n 0000096498 00000 n 0000096548 00000 n 0000096598 00000 n 0000096648 00000 n 0000096698 00000 n 0000096748 00000 n 0000096847 00000 n 0000096897 00000 n 0000096947 00000 n 0000096997 00000 n 0000097047 00000 n 0000097097 00000 n 0000097147 00000 n 0000097197 00000 n 0000097247 00000 n 0000097297 00000 n 0000097347 00000 n 0000097397 00000 n 0000097447 00000 n 0000097497 00000 n 0000100792 00000 n 0000101836 00000 n 0000100653 00000 n 0000097708 00000 n 0000100941 00000 n 0000100991 00000 n 0000101041 00000 n 0000101091 00000 n 0000101141 00000 n 0000101190 00000 n 0000101239 00000 n 0000101289 00000 n 0000101339 00000 n 0000101389 00000 n 0000101489 00000 n 0000101539 00000 n 0000101589 00000 n 0000101638 00000 n 0000101688 00000 n 0000101736 00000 n 0000101786 00000 n 0000284406 00000 n 0000104774 00000 n 0000106371 00000 n 0000104635 00000 n 0000102011 00000 n 0000104923 00000 n 0000104973 00000 n 0000105023 00000 n 0000105073 00000 n 0000105122 00000 n 0000105172 00000 n 0000105222 00000 n 0000105272 00000 n 0000105322 00000 n 0000105372 00000 n 0000105422 00000 n 0000105472 00000 n 0000105522 00000 n 0000105572 00000 n 0000105622 00000 n 0000105672 00000 n 0000105721 00000 n 0000105771 00000 n 0000105821 00000 n 0000105871 00000 n 0000105921 00000 n 0000105971 00000 n 0000106021 00000 n 0000106071 00000 n 0000106121 00000 n 0000106171 00000 n 0000106221 00000 n 0000106321 00000 n 0000108313 00000 n 0000108810 00000 n 0000108174 00000 n 0000106520 00000 n 0000108462 00000 n 0000108512 00000 n 0000108562 00000 n 0000108612 00000 n 0000108660 00000 n 0000108710 00000 n 0000108760 00000 n 0000110842 00000 n 0000111191 00000 n 0000110703 00000 n 0000108972 00000 n 0000110991 00000 n 0000113445 00000 n 0000113892 00000 n 0000113306 00000 n 0000111302 00000 n 0000113594 00000 n 0000113744 00000 n 0000113792 00000 n 0000113842 00000 n 0000116559 00000 n 0000117108 00000 n 0000116420 00000 n 0000113990 00000 n 0000116708 00000 n 0000116808 00000 n 0000116858 00000 n 0000116908 00000 n 0000116958 00000 n 0000117008 00000 n 0000117058 00000 n 0000120285 00000 n 0000120439 00000 n 0000120136 00000 n 0000121738 00000 n 0000119981 00000 n 0000117244 00000 n 0000120590 00000 n 0000120640 00000 n 0000120690 00000 n 0000120740 00000 n 0000120790 00000 n 0000120840 00000 n 0000120890 00000 n 0000120940 00000 n 0000120990 00000 n 0000121040 00000 n 0000121089 00000 n 0000121138 00000 n 0000121188 00000 n 0000121238 00000 n 0000121288 00000 n 0000121338 00000 n 0000121388 00000 n 0000121438 00000 n 0000121488 00000 n 0000121538 00000 n 0000121588 00000 n 0000121638 00000 n 0000284523 00000 n 0000127782 00000 n 0000124639 00000 n 0000124490 00000 n 0000125240 00000 n 0000124343 00000 n 0000121887 00000 n 0000124791 00000 n 0000124841 00000 n 0000124891 00000 n 0000124941 00000 n 0000124991 00000 n 0000125041 00000 n 0000125091 00000 n 0000125141 00000 n 0000125191 00000 n 0000128429 00000 n 0000127234 00000 n 0000128479 00000 n 0000127095 00000 n 0000125389 00000 n 0000127383 00000 n 0000127433 00000 n 0000127483 00000 n 0000127533 00000 n 0000127583 00000 n 0000127633 00000 n 0000127683 00000 n 0000127732 00000 n 0000127832 00000 n 0000127882 00000 n 0000127932 00000 n 0000127982 00000 n 0000128032 00000 n 0000128082 00000 n 0000128132 00000 n 0000128182 00000 n 0000128232 00000 n 0000128281 00000 n 0000128331 00000 n 0000128380 00000 n 0000131425 00000 n 0000132421 00000 n 0000131286 00000 n 0000128602 00000 n 0000131574 00000 n 0000131674 00000 n 0000131724 00000 n 0000131773 00000 n 0000131823 00000 n 0000131873 00000 n 0000131923 00000 n 0000131973 00000 n 0000132023 00000 n 0000132072 00000 n 0000132122 00000 n 0000132172 00000 n 0000132222 00000 n 0000132271 00000 n 0000132321 00000 n 0000132371 00000 n 0000135399 00000 n 0000136097 00000 n 0000135260 00000 n 0000132570 00000 n 0000135548 00000 n 0000135598 00000 n 0000135648 00000 n 0000135698 00000 n 0000135748 00000 n 0000135798 00000 n 0000135848 00000 n 0000135898 00000 n 0000135948 00000 n 0000135998 00000 n 0000136047 00000 n 0000138961 00000 n 0000140303 00000 n 0000138822 00000 n 0000136233 00000 n 0000139110 00000 n 0000139160 00000 n 0000139210 00000 n 0000139260 00000 n 0000139310 00000 n 0000139360 00000 n 0000139410 00000 n 0000139460 00000 n 0000139510 00000 n 0000139560 00000 n 0000139610 00000 n 0000139660 00000 n 0000139710 00000 n 0000139760 00000 n 0000139809 00000 n 0000139855 00000 n 0000139905 00000 n 0000139955 00000 n 0000140003 00000 n 0000140053 00000 n 0000140103 00000 n 0000140153 00000 n 0000140253 00000 n 0000141237 00000 n 0000141486 00000 n 0000141098 00000 n 0000140452 00000 n 0000141436 00000 n 0000284640 00000 n 0000141597 00000 n 0000141628 00000 n 0000141699 00000 n 0000281412 00000 n 0000142026 00000 n 0000142405 00000 n 0000142796 00000 n 0000143163 00000 n 0000143198 00000 n 0000143224 00000 n 0000143791 00000 n 0000143897 00000 n 0000144364 00000 n 0000144841 00000 n 0000156208 00000 n 0000156466 00000 n 0000163947 00000 n 0000164170 00000 n 0000172501 00000 n 0000172741 00000 n 0000180248 00000 n 0000180503 00000 n 0000187550 00000 n 0000187782 00000 n 0000189975 00000 n 0000190203 00000 n 0000199757 00000 n 0000200037 00000 n 0000217793 00000 n 0000218351 00000 n 0000230657 00000 n 0000231038 00000 n 0000247253 00000 n 0000247658 00000 n 0000267610 00000 n 0000268163 00000 n 0000281079 00000 n 0000284717 00000 n 0000284835 00000 n 0000284920 00000 n 0000284990 00000 n 0000289374 00000 n 0000289559 00000 n 0000289729 00000 n 0000289891 00000 n 0000290066 00000 n 0000290250 00000 n 0000290469 00000 n 0000290707 00000 n 0000290949 00000 n 0000291188 00000 n 0000291430 00000 n 0000291672 00000 n 0000291914 00000 n 0000292156 00000 n 0000292398 00000 n 0000292640 00000 n 0000292882 00000 n 0000293124 00000 n 0000293366 00000 n 0000293608 00000 n 0000293844 00000 n 0000294082 00000 n 0000294319 00000 n 0000294553 00000 n 0000294786 00000 n 0000295020 00000 n 0000295254 00000 n 0000295483 00000 n 0000295717 00000 n 0000295951 00000 n 0000296183 00000 n 0000296422 00000 n 0000296656 00000 n 0000296890 00000 n 0000297124 00000 n 0000297357 00000 n 0000297593 00000 n 0000297827 00000 n 0000298061 00000 n 0000298298 00000 n 0000298540 00000 n 0000298781 00000 n 0000299023 00000 n 0000299257 00000 n 0000299491 00000 n 0000299724 00000 n 0000299966 00000 n 0000300205 00000 n 0000300439 00000 n 0000300673 00000 n 0000300906 00000 n 0000301140 00000 n 0000301373 00000 n 0000301607 00000 n 0000301839 00000 n 0000302071 00000 n 0000302299 00000 n 0000302533 00000 n 0000302767 00000 n 0000303001 00000 n 0000303233 00000 n 0000303467 00000 n 0000303704 00000 n 0000303938 00000 n 0000304138 00000 n 0000304308 00000 n 0000304477 00000 n 0000304647 00000 n 0000304816 00000 n 0000304986 00000 n 0000305148 00000 n 0000305330 00000 n 0000305526 00000 n 0000305725 00000 n 0000305927 00000 n 0000306142 00000 n 0000306378 00000 n 0000306619 00000 n 0000306725 00000 n 0000306844 00000 n 0000306970 00000 n 0000307097 00000 n 0000307223 00000 n 0000307348 00000 n 0000307473 00000 n 0000307599 00000 n 0000307724 00000 n 0000307849 00000 n 0000307973 00000 n 0000308090 00000 n 0000308203 00000 n 0000308318 00000 n 0000308437 00000 n 0000308558 00000 n 0000308633 00000 n 0000308722 00000 n 0000308760 00000 n 0000308937 00000 n trailer << /Size 991 /Root 989 0 R /Info 990 0 R /ID [<4987BFBFFC7628FF21E924187A7FAF99> <4987BFBFFC7628FF21E924187A7FAF99>] >> startxref 309318 %%EOF glfw-2.7.2/docs/glfwug.tex0000644000175000017500000024260111614045512016424 0ustar elmindredaelmindreda%------------------------------------------------------------------------- % GLFW Users Guide % API Version: 2.7 %------------------------------------------------------------------------- % Document class \documentclass[a4paper,11pt,oneside]{report} % Document title and API version \newcommand{\glfwdoctype}[1][0]{Users Guide} \newcommand{\glfwapiver}[1][0]{2.7} % Common document settings and macros \input{glfwdoc.sty} % PDF specific document settings \hypersetup{pdftitle={GLFW Users Guide}} \hypersetup{pdfauthor={Marcus Geelnard}} \hypersetup{pdfkeywords={GLFW,OpenGL,guide,manual}} %------------------------------------------------------------------------- % Document body %------------------------------------------------------------------------- \begin{document} \pagestyle{plain} % Title page \glfwmaketitle % Summary, trademarks and table of contents \pagenumbering{roman} \setcounter{page}{1} %------------------------------------------------------------------------- % Summary and Trademarks %------------------------------------------------------------------------- \chapter*{Summary} This document is a users guide for the \GLFW\ API that gives a practical introduction to using \GLFW . For a more detailed description of the \GLFW\ API you should refer to the \textit{GLFW Reference Manual}. \vspace{5cm} \large Trademarks \small OpenGL and IRIX are registered trademarks of Silicon Graphics, Inc.\linebreak Microsoft and Windows are registered trademarks of Microsoft Corporation.\linebreak Mac OS is a registered trademark of Apple Computer, Inc.\linebreak Linux is a registered trademark of Linus Torvalds.\linebreak FreeBSD is a registered trademark of Wind River Systems, Inc.\linebreak Solaris is a trademark of Sun Microsystems, Inc.\linebreak UNIX is a registered trademark of The Open Group.\linebreak X Window System is a trademark of The Open Group.\linebreak POSIX is a trademark of IEEE.\linebreak Truevision, TARGA and TGA are registered trademarks of Truevision, Inc.\linebreak IBM is a registered trademark of IBM Corporation.\linebreak All other trademarks mentioned in this document are the property of their respective owners. \normalsize %------------------------------------------------------------------------- % Table of contents %------------------------------------------------------------------------- \tableofcontents \pagebreak % Document chapters starts here... \pagenumbering{arabic} \setcounter{page}{1} \pagestyle{fancy} %------------------------------------------------------------------------- % Introduction %------------------------------------------------------------------------- \chapter{Introduction} \thispagestyle{fancy} \GLFW\ is a portable API (Application Program Interface) that handles operating system specific tasks related to \OpenGL\ programming. While \OpenGL\ in general is portable, easy to use and often results in tidy and compact code, the operating system specific mechanisms that are required to set up and manage an \OpenGL\ window are quite the opposite. \GLFW\ tries to remedy this by providing the following functionality: \begin{itemize} \item Opening and managing an \OpenGL\ window. \item Keyboard, mouse and joystick input. \item High precision time input. \item Multi-threading support. \item Support for querying and using \OpenGL\ extensions. \item Rudimentary image file loading support. \end{itemize} \vspace{18pt} All this functionality is implemented as a set of easy-to-use functions, which makes it possible to write an \OpenGL\ application framework in just a few lines of code. The \GLFW\ API is operating system and platform independent, making it very simple to port \GLFW\ based \OpenGL\ applications between the supported platforms. Currently supported platforms are: \begin{itemize} \item Microsoft Windows\textsuperscript{\textregistered} \item Unix\textsuperscript{\textregistered} or Unix-like systems running the X Window System\texttrademark with GLX version 1.3 or later \item Mac OS X\textsuperscript{\textregistered} 10.5 and later, using Cocoa\footnote{Support for joysticks missing at the time of writing.} \end{itemize} There is also deprecated support for Mac OS X versions 10.3 and 10.4, using the Carbon API. %------------------------------------------------------------------------- % Getting Started %------------------------------------------------------------------------- \chapter{Getting Started} \thispagestyle{fancy} In this chapter you will learn how to write a simple \OpenGL\ application using \GLFW . We start by initializing \GLFW , then we open a window and read some user keyboard input. %------------------------------------------------------------------------- \section{Initializing GLFW} Before using any of the \GLFW\ functions, it is necessary to call \textbf{glfwInit}. It initializes the parts of \GLFW\ that are not dependent on a window, such as threading, timer and joystick input. The C syntax is: \begin{lstlisting} int glfwInit( void ) \end{lstlisting} \textbf{glfwInit} returns GL\_TRUE if initialization succeeded, or GL\_FALSE if it failed. When your application is done using \GLFW , typically at the very end of the program, you should call \textbf{glfwTerminate}. The C syntax is: \begin{lstlisting} void glfwTerminate( void ) \end{lstlisting} This releases any resources allocated by GLFW, closes the window if it is open and kills any secondary threads created by \GLFW\. After this call, you must call \textbf{glfwInit} again before using any \GLFW\ functions). %------------------------------------------------------------------------- \section{Opening An OpenGL Window} Opening an \OpenGL\ window is done with the \textbf{glfwOpenWindow} function. The function takes nine arguments, which are used to describe the following properties of the requested window: \begin{itemize} \item Window dimensions (width and height) in pixels. \item Color and alpha buffer bit depth. \item Depth buffer (Z-buffer) bit depth. \item Stencil buffer bit depth. \item Whether to use fullscreen or windowed mode. \end{itemize} The C language syntax for \textbf{glfwOpenWindow} is: \begin{lstlisting} int glfwOpenWindow( int width, int height, int redbits, int greenbits, int bluebits, int alphabits, int depthbits, int stencilbits, int mode ) \end{lstlisting} \textbf{glfwOpenWindow} returns GL\_TRUE if the window was opened correctly, or GL\_FALSE if \GLFW\ failed to open the window. \GLFW\ tries to open a window that best matches the requested parameters. Some parameters may be omitted by setting them to zero, which will result in \GLFW\ either using a default value, or the related functionality to be disabled. For instance, if \textit{width} and \textit{height} are both zero, \GLFW\ will use a window resolution of 640x480. If \textit{depthbits} is zero, the opened window may not have a depth buffer. The \textit{mode} argument is used to specify if the window is to be a fullscreen window or a regular window. If \textit{mode} is GLFW\_FULLSCREEN, the window will cover the entire screen and no window border or decorations will be visible. If possible, the video mode will be changed to the mode that closest matches the \textit{width}, \textit{height}, \textit{redbits}, \textit{greenbits}, \textit{bluebits} and \textit{alphabits} arguments. Furthermore, the mouse pointer will be hidden, and screensavers are prohibited. This is usually the best mode for games and demos. If \textit{mode} is GLFW\_WINDOW, the window will be opened as a normal, decorated window on the desktop. The mouse pointer will not be hidden and screensavers are allowed to be activated. To close the window, you can either use \textbf{glfwTerminate}, as described earlier, or you can use the more explicit approach by calling \textbf{glfwCloseWindow}, which has the C syntax: \begin{lstlisting} void glfwCloseWindow( void ) \end{lstlisting} Note that you do not need to call \textbf{glfwTerminate} and \textbf{glfwInit} before opening a new window after having closed the current one using \textbf{glfwCloseWindow}. %------------------------------------------------------------------------- \section{Using Keyboard Input} \GLFW\ provides several means for receiving user input, which will be discussed in more detail in chapter \ref{par:inputhandling}. One of the simplest ways of checking for keyboard input is to use the function \textbf{glfwGetKey}: \begin{lstlisting} int glfwGetKey( int key ) \end{lstlisting} It queries the current status of individual keyboard keys. The argument \textit{key} specifies which key to check, and it can be either an uppercase printable ISO 8859-1 (Latin 1) character (e.g. `A', `3' or `.'), or a special key identifier (see the \textit{GLFW Reference Manual} for a list of special key identifiers). \textbf{glfwGetKey} returns GLFW\_PRESS if the key is currently held down, or GLFW\_RELEASE if the key is not being held down. For example: \begin{lstlisting} A_pressed = glfwGetKey( 'A' ); esc_pressed = glfwGetKey( GLFW_KEY_ESC ); \end{lstlisting} In order for \textbf{glfwGetKey} to have any effect, you need to poll for input events on a regular basis. This can be done in one of two ways: \begin{enumerate} \item Implicitly by calling \textbf{glfwSwapBuffers} often. \item Explicitly by calling \textbf{glfwPollEvents} often. \end{enumerate} In general you do not have to care about this, since you will normally call \textbf{glfwSwapBuffers} to swap front and back rendering buffers every animation frame anyway. If, however, this is not the case, you should call \textbf{glfwPollEvents} in the order of 10-100 times per second in order for \GLFW\ to maintain an up to date input state. %------------------------------------------------------------------------- \section{Putting It Together: A Minimal GLFW Application} Now that you know how to initialize \GLFW , open a window and poll for keyboard input, let us exemplify this with a simple \OpenGL\ program: \begin{lstlisting} #include #include int main( void ) { int running = GL_TRUE; // Initialize GLFW if( !glfwInit() ) { exit( EXIT_FAILURE ); } // Open an OpenGL window if( !glfwOpenWindow( 300,300, 0,0,0,0,0,0, GLFW_WINDOW ) ) { glfwTerminate(); exit( EXIT_FAILURE ); } // Main loop while( running ) { // OpenGL rendering goes here... glClear( GL_COLOR_BUFFER_BIT ); // Swap front and back rendering buffers glfwSwapBuffers(); // Check if ESC key was pressed or window was closed running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); } // Close window and terminate GLFW glfwTerminate(); // Exit program exit( EXIT_SUCCESS ); } \end{lstlisting} The program opens a 300x300 window and runs in a loop until the escape key is pressed, or the window was closed. All the \OpenGL\ ``rendering'' that is done in this example is to clear the window. %------------------------------------------------------------------------- % Window Operations %------------------------------------------------------------------------- \chapter{Window Operations} \thispagestyle{fancy} In this chapter, you will learn more about window related \GLFW\ functionality, including setting and getting window properties, buffer swap control and video mode querying. %------------------------------------------------------------------------- \section{Setting Window Properties} In the previous chapter the \textbf{glfwOpenWindow} function was described, which specifies the sizes of the color, alpha, depth and stencil buffers. It is also possible to request a specific minimum OpenGL version, multisampling anti-aliasing, an accumulation buffer, stereo rendering and more by using the \textbf{glfwOpenWindowHint} function: \begin{lstlisting} void glfwOpenWindowHint( int target, int hint ) \end{lstlisting} The \textit{target} argument can be one of the constants listed in table~ \ref{tab:winhints}, and \textit{hint} is the value to assign to the specified target. %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|l|p{7.0cm}|} \hline \raggedright \textbf{Name} & \textbf{Default} & \textbf{Description} \\ \hline GLFW\_REFRESH\_RATE & 0 & Vertical monitor refresh rate in Hz (only used for fullscreen windows). Zero means system default.\\ \hline GLFW\_ACCUM\_RED\_BITS & 0 & Number of bits for the red channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_GREEN\_BITS & 0 & Number of bits for the green channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_BLUE\_BITS & 0 & Number of bits for the blue channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_ALPHA\_BITS & 0 & Number of bits for the alpha channel of the accumulation buffer.\\ \hline GLFW\_AUX\_BUFFERS & 0 & Number of auxiliary buffers.\\ \hline GLFW\_STEREO & GL\_FALSE & Specify if stereo rendering should be supported (can be GL\_TRUE or GL\_FALSE).\\ \hline GLFW\_WINDOW\_NO\_RESIZE & GL\_FALSE & Specify whether the window can be resized by the user (not used for fullscreen windows).\\ \hline GLFW\_FSAA\_SAMPLES & 0 & Number of samples to use for the multisampling buffer. Zero disables multisampling.\\ \hline GLFW\_OPENGL\_VERSION\_MAJOR & 1 & Major number of the desired minimum OpenGL version.\\ \hline GLFW\_OPENGL\_VERSION\_MINOR & 1 & Minor number of the desired minimum OpenGL version.\\ \hline GLFW\_OPENGL\_FORWARD\_COMPAT & GL\_FALSE & Specify whether the OpenGL context should be forward-compatible (i.e. disallow legacy functionality). This should only be used when requesting OpenGL version 3.0 or above.\\ \hline GLFW\_OPENGL\_DEBUG\_CONTEXT & GL\_FALSE & Specify whether a debug context should be created.\\ \hline GLFW\_OPENGL\_PROFILE & 0 & The OpenGL profile the context should implement, or zero to let the system choose. Available profiles are GLFW\_OPENGL\_CORE\_PROFILE and GLFW\_OPENGL\_COMPAT\_PROFILE.\\ \hline \end{tabular} \end{center} \caption{Targets for \textbf{glfwOpenWindowHint}} \label{tab:winhints} \end{table} %------------------------------------------------------------------------- For a hint to have any effect, the \textbf{glfwOpenWindowHint} function must be called before opening the window with the \textbf{glfwOpenWindow} function. To request an accumulation buffer, set the GLFW\_ACCUM\_x\_BITS targets to values greater than zero (usually eight or sixteen bits per component). To request auxiliary buffers, set the GLFW\_AUX\_BUFFERS target to a value greater than zero. To request a stereo rendering capable window, set the GLFW\_STEREO target to GL\_TRUE. If you want to enable fullscreen antialiasing, set the GLFW\_FSAA\_SAMPLES target to a value greater than zero. If the windowing system is unable to fulfil the request, \GLFW\ will degrade gracefully and disable FSAA if necessary. The GLFW\_REFRESH\_RATE target should be used with caution, since it may result in suboptimal operation, or even a blank or damaged screen. If you want to create a forward-compatible \OpenGL\ context, set the GLFW\_OPENGL\_FORWARD\_COMPAT hint to GL\_TRUE. Note that such contexts are only available for \OpenGL\ version 3.0 and above, so you will need to specify a valid minimum version using the GLFW\_OPENGL\_VERSION\_MAJOR and GLFW\_OPENGL\_VERSION\_MINOR hints. If you want to create a context using the core profile as available in \OpenGL\ version 3.2 and above, set the GLFW\_OPENGL\_PROFILE hint accordingly. Note that as above you have to set a valid minimum version for this to work. Note that versions of Mac OS X before 10.7 does not support \OpenGL\ 3.0 or later, and that at the time of this release, Mac OS X 10.7 only supports forward-compatible \OpenGL\ 3.2 core profile contexts. Due to the way default values work in \GLFW\, you do not need to specify either GLFW\_FORWARD\_COMPAT or GLFW\_OPENGL\_PROFILE for this to work. Besides the parameters that are given with the \textbf{glfwOpenWindow} and \textbf{glfwOpenWindowHint} functions, a few more properties of a window can be changed after the window has been opened, namely the window title, window size, and window position. To change the window title of an open window, use the \textbf{glfwSetWindowTitle} function: \begin{lstlisting} void glfwSetWindowTitle( const char *title ) \end{lstlisting} \textit{title} is a null terminated ISO~8859-1 (8-bit Latin~1) string that will be used as the window title. It will also be used as the application name (for instance in the application list when using \texttt{Alt+Tab} under Windows, or as the icon name when the window is iconified under the X Window System). The default window name is ``GLFW Window'', which will be used unless \textbf{glfwSetWindowTitle} is called after the window has been opened. To change the size of a window, call \textbf{glfwSetWindowSize}: \begin{lstlisting} void glfwSetWindowSize( int width, int height ) \end{lstlisting} Where \textit{width} and \textit{height} are the new dimensions of the window. To change the position of a window, call \textbf{glfwSetWindowPos}: \begin{lstlisting} void glfwSetWindowPos( int x, int y ) \end{lstlisting} Where \textit{x} and \textit{y} are the new desktop coordinates of the window. This function does not have any effect when in fullscreen mode. %------------------------------------------------------------------------- \section{Getting Window Properties} When opening a window, the opened window will not necessarily have the requested properties, so you should always check the parameters that your application relies on (e.g. number of stencil bits) using \textbf{glfwGetWindowParam}, which has the C syntax: \begin{lstlisting} int glfwGetWindowParam( int param ) \end{lstlisting} The argument \textit{param} can be one of the tokens listed in table \ref{tab:winparams}, and the return value is an integer holding the requested value. %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|p{9.5cm}|} \hline \raggedright \textbf{Name} & \textbf{Description} \\ \hline GLFW\_OPENED & GL\_TRUE if window is opened, else GL\_FALSE.\\ \hline GLFW\_ACTIVE & GL\_TRUE if window has focus, else GL\_FALSE.\\ \hline GLFW\_ICONIFIED & GL\_TRUE if window is iconified, else GL\_FALSE.\\ \hline GLFW\_ACCELERATED & GL\_TRUE if window is hardware accelerated, else GL\_FALSE.\\ \hline GLFW\_RED\_BITS & Number of bits for the red color component.\\ \hline GLFW\_GREEN\_BITS & Number of bits for the green color component.\\ \hline GLFW\_BLUE\_BITS & Number of bits for the blue color component.\\ \hline GLFW\_ALPHA\_BITS & Number of bits for the alpha buffer.\\ \hline GLFW\_DEPTH\_BITS & Number of bits for the depth buffer.\\ \hline GLFW\_STENCIL\_BITS & Number of bits for the stencil buffer.\\ \hline GLFW\_REFRESH\_RATE & Vertical monitor refresh rate in Hz. Zero indicates an unknown or a default refresh rate.\\ \hline GLFW\_ACCUM\_RED\_BITS & Number of bits for the red channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_GREEN\_BITS & Number of bits for the green channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_BLUE\_BITS & Number of bits for the blue channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_ALPHA\_BITS & Number of bits for the alpha channel of the accumulation buffer.\\ \hline GLFW\_AUX\_BUFFERS & Number of auxiliary buffers.\\ \hline GLFW\_STEREO & GL\_TRUE if stereo rendering is supported, else GL\_FALSE.\\ \hline GLFW\_WINDOW\_NO\_RESIZE & GL\_TRUE if the window cannot be resized by the user, else GL\_FALSE.\\ \hline GLFW\_FSAA\_SAMPLES & Number of multisampling buffer samples. Zero indicated multisampling is disabled.\\ \hline GLFW\_OPENGL\_VERSION\_MAJOR & Major number of the actual version of the context.\\ \hline GLFW\_OPENGL\_VERSION\_MINOR & Minor number of the actual version of the context.\\ \hline GLFW\_OPENGL\_FORWARD\_COMPAT & GL\_TRUE if the context is forward-compatible, else GL\_FALSE.\\ \hline GLFW\_OPENGL\_DEBUG\_CONTEXT & GL\_TRUE if the context is a debug context.\\ \hline GLFW\_OPENGL\_PROFILE & The profile implemented by the context, or zero.\\ \hline \end{tabular} \end{center} \caption{Window parameters for \textbf{glfwGetWindowParam}} \label{tab:winparams} \end{table} %------------------------------------------------------------------------- Another useful function is \textbf{glfwSetWindowSizeCallback}, which specifies a user function that will be called every time the window size has changed. The C syntax is: \begin{lstlisting} void glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ) \end{lstlisting} The user function \textit{fun} should be of the type: \begin{lstlisting} void GLFWCALL fun( int width, int height ) \end{lstlisting} The first argument passed to the user function is the width of the window, and the second argument is the height of the window. Here is an example of how to use a window size callback function: \begin{lstlisting} int windowWidth, windowHeight; void GLFWCALL WindowResize( int width, int height ) { windowWidth = width; windowHeight = height; } int main( void ) { ... glfwSetWindowSizeCallback( WindowResize ); ... } \end{lstlisting} Using a callback function for getting the window size is mostly useful for windowed applications, since the window size may be changed at any time by the user. It can also be used to determine the actual fullscreen resolution. An alternative to using a callback function for getting the window size, is to use the function \textbf{glfwGetWindowSize}: \begin{lstlisting} void glfwGetWindowSize( int *width, int *height ) \end{lstlisting} The variables pointed to by \textit{width} and \textit{height} are set to the current window dimensions. Note that either of these may be NULL; that argument is then ignored. %------------------------------------------------------------------------- \section{Buffer Swapping} \GLFW\ windows are always double buffered. That means that you have two rendering buffers; a front buffer and a back buffer. The front buffer is the buffer that is being displayed, and the back buffer is not displayed. \OpenGL\ lets you select which of these two buffers you want to render to (with the \textbf{glDrawBuffer} command), but the default (and preferred) rendering buffer is the back buffer. This way you will avoid flickering and artifacts caused by graphics being only partly drawn at the same time as the video raster beam is displaying the graphics on the monitor. When an entire frame has been rendered to the back buffer, it is time to swap the back and the front buffers in order to display the rendered frame, and begin rendering a new frame. This is done with the command \textbf{glfwSwapBuffers}. The C syntax is: \begin{lstlisting} void glfwSwapBuffers( void ) \end{lstlisting} After swapping the front and back rendering buffers, \textbf{glfwSwapBuffers} by default calls \textbf{glfwPollEvents}\footnote{This behavior can be disabled by calling \textbf{glfwDisable} with the argument GLFW\_AUTO\_POLL\_EVENTS.}. This is to ensure frequent polling of events, such as keyboard and mouse input, and window reshaping events. Even if a given application does not use input events, without frequent polling of events (at \emph{least} once every few seconds), most modern window systems will flag the application as unresponsive and may suggest that the user terminate it. Sometimes it can be useful to select when the buffer swap will occur. With the function \textbf{glfwSwapInterval} it is possible to select the minimum number of vertical retraces the video raster line should do before swapping the buffers: \begin{lstlisting} void glfwSwapInterval( int interval ) \end{lstlisting} If \textit{interval} is zero, the swap will take place immediately when \textbf{glfwSwapBuffers} is called, without waiting for a vertical retrace (also known as ``vsync off''). Otherwise at least \textit{interval} retraces will pass between each buffer swap (also known as ``vsync on''). Using a swap interval of zero can be useful for benchmarking purposes, when it is not desirable to measure the time it takes to wait for the vertical retrace. However, a swap interval of 1 generally gives better visual quality. It should be noted that not all \OpenGL\ implementations and hardware support this function, in which case \textbf{glfwSwapInterval} will have no effect. ATI Radeon cards under Microsoft Windows are especially notorious in this regard. Sometimes it is only possible to affect the swap interval through driver settings (e.g. the display settings under Windows, or as an environment variable setting under Unix). %------------------------------------------------------------------------- \section{Querying Video Modes} Although \GLFW\ generally does a good job at selecting a suitable video mode for you when you open a fullscreen window, it is sometimes useful to know exactly which modes are available on a certain system. For example, you may want to present the user with a list of video modes to select from. To get a list of available video modes, you can use the function \textbf{glfwGetVideoModes}: \begin{lstlisting} int glfwGetVideoModes( GLFWvidmode *list, int maxcount ) \end{lstlisting} The argument \textit{list} is a vector of GLFWvidmode structures, and \textit{maxcount} is the maximum number of video modes that your vector can hold. \textbf{glfwGetVideoModes} will return the number of video modes detected on the system, up to \textit{maxcount}. The GLFWvidmode structure looks like this: \begin{lstlisting} typedef struct { int Width, Height; // Video resolution int RedBits; // Red bits per pixel int GreenBits; // Green bits per pixel int BlueBits; // Blue bits per pixel } GLFWvidmode; \end{lstlisting} Here is an example of retrieving all available video modes: \begin{lstlisting} int nummodes; GLFWvidmode list[ 200 ]; nummodes = glfwGetVideoModes( list, 200 ); \end{lstlisting} The returned list is sorted, first by color depth ($RedBits + GreenBits + BlueBits$), and then by resolution ($Width\times Height$), with the lowest resolution, fewest bits per pixel mode first. To get the desktop video mode, use the function \textbf{glfwGetDesktopMode}: \begin{lstlisting} void glfwGetDesktopMode( GLFWvidmode *mode ) \end{lstlisting} The function returns the resolution and color depth of the user desktop in the mode structure. Note that the user desktop mode is independent of the current video mode if a \GLFW\ fullscreen window has been opened. %------------------------------------------------------------------------- % Input Handling %------------------------------------------------------------------------- \chapter{Input Handling} \label{par:inputhandling} \thispagestyle{fancy} In this chapter you will learn how to use keyboard, mouse and joystick input, using either polling or callback functions. %------------------------------------------------------------------------- \section{Event Polling} The first thing to know about input handling in \GLFW\ is that all keyboard and mouse input is collected by checking for input events. This has do be done manually by calling either \textbf{glfwPollEvents} or \textbf{glfwSwapBuffers} (which implicitly calls \textbf{glfwPollEvents} for you). Normally this is not a cause for concern, as \textbf{glfwSwapBuffers} is called every frame, which should be often enough (about 10-100 times per second for a normal \OpenGL\ application) that the window will feel responsive. One exception is when an application is updating its view only in response to input. In this case the \textbf{glfwWaitEvents} is useful, as it blocks the calling thread until an event arrives. The refresh callback, set with \textbf{glfwSetWindowRefreshCallback}, may also be useful for such applications, especially on unbuffered window systems. If it is not desirable that \textbf{glfwPollEvents is} called implicitly from \textbf{glfwSwapBuffers}, call \textbf{glfwDisable} with the argument GLFW\_AUTO\_POLL\_EVENTS. Note that event polling is not needed for joystick input, since all relevant joystick state is gathered every time a joystick function is called. %------------------------------------------------------------------------- \section{Keyboard Input} \GLFW\ provides three mechanisms for getting keyboard input: \begin{itemize} \item Manually polling the state of individual keys. \item Automatically receive new key state for any key, using a callback function. \item Automatically receive characters, using a callback function. \end{itemize} Depending on what the keyboard input will be used for, different methods may be preferred. The main difference between the two last methods is that while characters are affected by modifier keys (such as shift), key state is independent of any modifier keys. Also, special keys (such as function keys, cursor keys and modifier keys) are not reported to the character callback function. %------------------------------------------------------------------------- \subsection{Key state} To check if a key is held down or not at any given moment, use the function \textbf{glfwGetKey}: \begin{lstlisting} int glfwGetKey( int key ) \end{lstlisting} It queries the current status of individual keyboard keys. The argument \textit{key} specifies which key to check, and it can be either an uppercase ISO~8859-1 character, or a special key identifier. \textbf{glfwGetKey} returns GLFW\_PRESS (or 1) if the key is currently held down, or GLFW\_RELEASE (or 0) if the key is not being held down. In most situations, it may be useful to know if a key has been pressed and released between two calls to \textbf{glfwGetKey} (especially if the animation is fairly slow, which may allow the user to press and release a key between two calls to \textbf{glfwGetKey}). This can be accomplished by enabling sticky keys, which is done by calling \textbf{glfwEnable} with the argument GLFW\_STICKY\_KEYS, as in the following example: \begin{lstlisting} glfwEnable( GLFW_STICKY_KEYS ); \end{lstlisting} When sticky keys are enabled, a key will not be released until it is checked with \textbf{glfwGetKey}. To disable sticky keys, call \textbf{glfwDisable} witht the argument GLFW\_STICKY\_KEYS. Then all keys that are not currently held down will be released and future key releases will take place immediately when the user releases the key without waiting for \textbf{glfwGetKey} to check the key. By default sticky keys are disabled. Sticky keys are often very useful and should be used in most cases where \textbf{glfwGetKey} is used. There is however a danger involved with enabling sticky keys, and that is that keys that are pressed by the user but are not checked with \textbf{glfwGetKey}, may remain ``pressed'' for a very long time. A typical situation where this may be dangerous is in a program that consists of two or more sections (e.g. a menu section and a game section). If the first section enables sticky keys but does not check for keys which the second section checks for, there is a potential of recording many key presses in the first section that will be detected in the second section. To avoid this problem, always disable sticky keys before leaving a section of a program. A usually better alternative to using \textbf{glfwGetKey} is to register a keyboard input callback function with \textbf{glfwSetKeyCallback}: \begin{lstlisting} void glfwSetKeyCallback( GLFWkeyfun cbfun ) \end{lstlisting} The argument \textit{fun} is a pointer to a callback function. The callback function shall take two integer arguments. The first is the key identifier, and the second is the new key state, which can be GLFW\_PRESS or GLFW\_RELEASE. To unregister a callback function, call \textbf{glfwSetKeyCallback} with \textit{fun} = NULL. Using the callback function, you can be sure not to miss any key press or release events, regardless of how many may have occurred during the last frame. It also encourages event-based design, where the application responds only to actual events instead of having to poll for every supported event. %------------------------------------------------------------------------- \subsection{Character input} If the keyboard is to be used as a text input device (e.g. in a user dialog) rather than as a set of independent buttons, a character callback function is more suitable. To register a character callback function, use \textbf{glfwSetCharCallback}: \begin{lstlisting} void glfwSetCharCallback( GLFWcharfun cbfun ) \end{lstlisting} The argument \textit{fun} is a pointer to a callback function. The callback function shall take two integer arguments. The first is a Unicode code point, and the second is GLFW\_PRESS if the key that generated the character was pressed, or GLFW\_RELEASE if it was released. To unregister a callback function, call \textbf{glfwSetCharCallback} with \textit{fun} = NULL. The Unicode character set is an international standard for encoding characters. It is much more comprehensive than seven or eight bit character sets (e.g. US-ASCII and Latin~1), and includes characters for most written languages in the world. It should be noted that Unicode character codes 0 to 255 are the same as for ISO~8859-1 (Latin~1), so as long as a proper range check is performed on the Unicode character code, it can be used just as an eight bit Latin~1 character code (which can be useful if full Unicode support is not possible). %------------------------------------------------------------------------- \subsection{Key repeat} By default, \GLFW\ does not report key repeats when a key is held down. To activate key repeat, call \textbf{glfwEnable} with the argument GLFW\_KEY\_REPEAT: \begin{lstlisting} glfwEnable( GLFW_KEY_REPEAT ); \end{lstlisting} This will let a registered key or character callback function receive key repeat events when a key is held down. %------------------------------------------------------------------------- \subsection{Special system keys} On most systems there are some special system keys that are normally not intercepted by an application. For instance, under Windows it is possible to switch programs by pressing \texttt{ALT+TAB}, which brings up a list of running programs to select from. In certain situations it can be desirable to prevent such special system keys from interfering with the program. With \GLFW\ it is possible to do by calling \textbf{glfwDisable} with the argument GLFW\_SYSTEM\_KEYS: \begin{lstlisting} glfwDisable( GLFW_SYSTEM_KEYS ); \end{lstlisting} By doing so, most system keys will have no effect and will not interfere with your program. System keys can be re-enabled by calling \textbf{glfwEnable} with the argument GLFW\_SYSTEM\_KEYS. By default, system keys are enabled. %------------------------------------------------------------------------- \section{Mouse Input} Just like for keyboard input, mouse input can be realized with either polling or callback functions. %------------------------------------------------------------------------- \subsection{Mouse position} To query the position of the mouse cursor, call \textbf{glfwGetMousePos}: \begin{lstlisting} void glfwGetMousePos( int *x, int *y ) \end{lstlisting} The variables pointed to by \textit{x} and \textit{y} will be updated with the current position of the mouse cursor relative to the upper-left corner of the client area of the \GLFW\ window. An alternative is to use a callback function, which can be set with \textbf{glfwSetMousePosCallback}: \begin{lstlisting} void glfwSetMousePosCallback( GLFWmouseposfun cbfun ) \end{lstlisting} The function that \textit{fun} points to will be called every time the mouse cursor moves. The first argument to the callback function is the cursor x-coordinate and the second the cursor y-coordinate, both relative to the upper-left corner of the client area of the \GLFW\ window. Note that while the \textbf{glfwGetMousePos} function only reports the final position after cursor movement events have been processed, using a callback function lets the application see each and every such event. %------------------------------------------------------------------------- \subsection{Mouse buttons} To query the state of a mouse button, call \textbf{glfwGetMouseButton}: \begin{lstlisting} int glfwGetMouseButton( int button ) \end{lstlisting} The argument \textit{button} can be any \GLFW\ mouse button token, i.e. GLFW\_MOUSE\_BUTTON\_1 through GLFW\_MOUSE\_BUTTON\_8 or one of GLFW\_MOUSE\_BUTTON\_LEFT, GLFW\_MOUSE\_BUTTON\_RIGHT or GLFW\_MOUSE\_BUTTON\_MIDDLE. \textbf{glfwGetMouseButton} will return GLFW\_PRESS (which is a non-zero value) if the corresponding mouse button is held down, otherwise it will return GLFW\_RELEASE (which is equal to zero). Just as it is possible to make keys ``sticky'', it is also possible to make each mouse button appear as held down until it is checked with \textbf{glfwGetMouseButton}. To enable sticky mouse buttons, call \textbf{glfwEnable} with the argument GLFW\_STICKY\_MOUSE\_BUTTONS. When sticky mouse buttons are enabled, a mouse button will not be released until it is checked with \textbf{glfwGetMouseButton}. To disable sticky mouse buttons, call \textbf{glfwDisable} with the argument GLFW\_STICKY\_MOUSE\_BUTTONS. Then all mouse buttons that are not currently held down will be released and future mouse button releases will take place immediately when the user releases the mouse button without waiting for \textbf{glfwGetMouseButton} to check for the mouse button. By default sticky mouse buttons are disabled. There is also a callback function for mouse button activities, which can be set with \textbf{glfwSetMouseButtonCallback}: \begin{lstlisting} void glfwSetMouseButtonCallback( GLFWmousebuttonfun fun ) \end{lstlisting} The argument \textit{fun} specifies a function that will be called whenever a mouse button is pressed or released, or NULL to unregister a callback function. The first argument to the callback function is a mouse button identifier, and the second is either GLFW\_PRESS or GLFW\_RELEASE, depending on the new state of the corresponding mouse button. %------------------------------------------------------------------------- \subsection{Mouse wheel} Some mice have a mouse wheel, most commonly used for vertical scrolling. Also, most modern touchpads allow the user to scroll at least vertically, either by reserving an area for scrolling or through multi-finger gestures. To get the position of the mouse wheel, call \textbf{glfwGetMouseWheel}: \begin{lstlisting} int glfwGetMouseWheel( void ) \end{lstlisting} The function returns an integer that represents the position of the mouse wheel. When the user turns the wheel, the wheel position will increase or decrease. Note that since scrolling hardware has no absolute position, \GLFW\ simply sets the position to zero when the window is opened. It is also possible to register a callback function for mouse wheel events with the \textbf{glfwSetMouseWheelCallback} function: \begin{lstlisting} void glfwSetMouseWheelCallback( GLFWmousewheelfun fun ) \end{lstlisting} The argument \textit{fun} specifies a function that will be called whenever the mouse wheel is moved, or NULL to unregister a callback function. The argument to the callback function is the position of the mouse wheel. %------------------------------------------------------------------------- \subsection{Hiding the mouse cursor} It is possible to hide the mouse cursor with the function call: \begin{lstlisting} glfwDisable( GLFW_MOUSE_CURSOR ); \end{lstlisting} Hiding the mouse cursor has three effects: \begin{enumerate} \item The cursor becomes invisible. \item The cursor is guaranteed to be confined to the window. \item Mouse coordinates are not limited to the window size. \end{enumerate} To show the mouse cursor again, call \textbf{glfwEnable} with the argument GLFW\_MOUSE\_CURSOR: \begin{lstlisting} glfwEnable( GLFW_MOUSE_CURSOR ); \end{lstlisting} By default the mouse cursor is hidden if a window is opened in fullscreen mode, otherwise it is not hidden. %------------------------------------------------------------------------- \section{Joystick Input} \GLFW\ has support for up to sixteen joysticks, and an infinite\footnote{% There are of course actual limitations posed by the underlying hardware, drivers and operation system.} number of axes and buttons per joystick. Unlike keyboard and mouse input, joystick input does not need an opened window, and \textbf{glfwPollEvents} or \textbf{glfwSwapBuffers} does not have to be called in order for joystick state to be updated. %------------------------------------------------------------------------- \subsection{Joystick capabilities} First, it is often necessary to determine if a joystick is connected and what its capabilities are. To get this information the function \textbf{glfwGetJoystickParam} can be used: \begin{lstlisting} int glfwGetJoystickParam( int joy, int param ) \end{lstlisting} The \textit{joy} argument specifies which joystick to retrieve the parameter from, and it should be GLFW\_JOYSTICK\_\textit{n}, where \textit{n} is in the range 1 to 16. The \textit{param} argument specifies which parameter to retrieve. To determine if a joystick is connected, \textit{param} should be GLFW\_PRESENT, which will cause the function to return GL\_TRUE if the joystick is connected, or GL\_FALSE if it is not. To determine the number of axes or buttons that are supported by the joystick, \textit{param} should be GLFW\_AXES or GLFW\_BUTTONS, respectively. Note that \GLFW\ supports both D-pads and POVs, even though they are not explicitly mentioned in the API. D-pads are exposed as a set of four buttons and POVs are as two axes. %------------------------------------------------------------------------- \subsection{Joystick position} To get the current axis positions of the joystick, the \textbf{glfwGetJoystickPos} is used: \begin{lstlisting} int glfwGetJoystickPos( int joy, float *pos, int numaxes ) \end{lstlisting} As with \textbf{glfwGetJoystickParam}, the \textit{joy} argument specifies which joystick to retrieve information from. The \textit{numaxes} argument specifies how many axes to return positions for and the \textit{pos} argument specifies an array in which they are stored. The function returns the actual number of axes that were returned, which could be less than \textit{numaxes} if the joystick does not support all the requested axes, or if the joystick is not connected. For instance, to get the position of the first two axes (the X and Y axes) of joystick 1, the following code can be used: \begin{lstlisting} float position[ 2 ]; glfwGetJoystickPos( GLFW_JOYSTICK_1, position, 2 ); \end{lstlisting} After this call, the first element of the \textit{position} array will hold the X axis position of the joystick, and the second element will hold the Y axis position. In this example we do not use the information about how many axes were really returned. The position of an axis can be in the range -1.0 to 1.0, where positive values represent right, forward or up directions, while negative values represent left, back or down directions. If a requested axis is not supported by the joystick, the corresponding array element will be set to zero. The same goes for the situation when the joystick is not connected (all axes are treated as unsupported). %------------------------------------------------------------------------- \subsection{Joystick buttons} A function similar to the \textbf{glfwGetJoystickPos} function is available for querying the state of joystick buttons, namely the \textbf{glfwGetJoystickButtons} function: \begin{lstlisting} int glfwGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ) \end{lstlisting} The function works just like the \textbf{glfwGetJoystickAxis} function, except that it returns the state of joystick buttons instead of axis positions. Each button in the array specified by the \textit{buttons} argument can be either GLFW\_PRESS or GLFW\_RELEASE, indicating whether the corresponding button is currently held down or not. Unsupported buttons will have the value GLFW\_RELEASE. %------------------------------------------------------------------------- % Timing %------------------------------------------------------------------------- \chapter{Timing} \thispagestyle{fancy} %------------------------------------------------------------------------- \section{High Resolution Timer} In most applications, it is useful to know exactly how much time has passed between point $A$ and point $B$ in a program. A typical situation is in a game, where you need to know how much time has passed between two rendered frames in order to calculate the correct movement and physics etc. Another example is when you want to benchmark a certain piece of code. \GLFW\ provides a high-resolution timer, which reports a double precision floating point value representing the number of seconds that have passed since \textbf{glfwInit} was called. The timer is accessed with the function \textbf{glfwGetTime}: \begin{lstlisting} double glfwGetTime( void ) \end{lstlisting} The precision of the timer depends on which computer and operating system you are running, but it is almost guaranteed to be better than $10~ms$, and in most cases it is much better than $1~ms$ (on a modern PC you can get resolutions in the order of $1~ns$). It is possible to set the value of the high precision timer using the \textbf{glfwSetTime} function: \begin{lstlisting} void glfwSetTime( double time ) \end{lstlisting} The argument \textit{time} is the time, in seconds, that the timer should be set to. %------------------------------------------------------------------------- \section{Sleep} Sometimes it can be useful to put a program to sleep for a short time. It can be used to reduce the CPU load in various situations. For this purpose, there is a function called \textbf{glfwSleep}, which has the following C syntax: \begin{lstlisting} void glfwSleep( double time ) \end{lstlisting} The function will put the calling thread to sleep for the time specified with the argument \textit{time}, which has the unit seconds. When \textbf{glfwSleep} is called, the calling thread will be put in waiting state, and thus will not consume any CPU time. Note that there is generally a minimum sleep time that will be recognized by the operating system, which is usually coupled to the task-switching interval. This minimum time is often in the range $5~-~20 ms$, and it is not possible to make a thread sleep for less than that time. Specifying a very small sleep time may result in \textbf{glfwSleep} returning immediately, without putting the thread to sleep. %------------------------------------------------------------------------- % Image and Texture Import %------------------------------------------------------------------------- \chapter{Image and Texture Import} \thispagestyle{fancy} In many, if not most, \OpenGL\ applications you want to use pre-generated 2D images for surface textures, light maps, transparency maps etc. Typically these images are stored with a standard image format in a file, which requires the program to decode and load the image(s) from file(s), which can require much work from the programmer. To make life easier for \OpenGL\ developers, \GLFW\ has built-in support for loading images from files. %------------------------------------------------------------------------- \section{Texture Loading} To load a texture from a file, you can use the function \textbf{glfwLoadTexture2D}: \begin{lstlisting} int glfwLoadTexture2D( const char *name, int flags ) \end{lstlisting} This function reads a 2D image from a Truevision Targa format file (.TGA) with the name given by \textit{name}, and uploads it to texture memory. It is similar to the \OpenGL\ function \textbf{glTexImage2D}, except that the image data is read from a file instead of from main memory, and all the pixel format and data storage flags are handled automatically. The \textit{flags} argument can be used to control how the texture is loaded. If \textit{flags} is GLFW\_ORIGIN\_UL\_BIT, the origin of the texture will be the upper left corner (otherwise it is the lower left corner). If \textit{flags} is GLFW\_BUILD\_MIPMAPS\_BIT, all mipmap levels will be generated and uploaded to texture memory (otherwise only one mipmap level is loaded). If \textit{flags} is GLFW\_ALPHA\_MAP\_BIT, then any gray scale images will be loaded as alpha maps rather than luminance maps. To make combinations of the flags, or them together (e.g. like this: \texttt{GLFW\_ORIGIN\_UL\_BIT | GLFW\_BUILD\_MIPMAPS\_BIT}). Here is an example of how to upload a texture from a file to \OpenGL\ texture memory, and configure the texture for trilinear interpolation (assuming an \OpenGL\ window has been opened successfully): \begin{mysamepage}[10] \begin{lstlisting} // Load texture from file, and build all mipmap levels glfwLoadTexture2D( "mytexture.tga", GLFW_BUILD_MIPMAPS_BIT ); // Use trilinear interpolation for minification glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); // Use bilinear interpolation for magnification glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); // Enable texturing glEnable( GL_TEXTURE_2D ); \end{lstlisting} \end{mysamepage} As you can see, \textbf{glfwLoadTexture2D} is very easy to use. Since it can also automatically create mipmaps when required, it is also a very powerful function. %------------------------------------------------------------------------- \section{Image Loading} In certain cases it may be useful to be able to load an image into client memory (application memory), without directly uploading the image to \OpenGL\ texture memory. For example, one may wish to retain a copy of the texture in local memory for future use. Another example is when the image is not to be used as a texture at all, e.g. if it is to be used as a height map. \GLFW\ also offers the possibility to load an image to application memory, using the \textbf{glfwReadImage} function: \begin{lstlisting} int glfwReadImage( const char *name, GLFWimage *img, int flags ) \end{lstlisting} The function reads the image given by the argument \textit{name}, and upon success stores the relevant image information and pixel data in the GLFWimage structure \textit{img}. The GLFWimage structure is defined as: \begin{lstlisting} typedef struct { int Width, Height; // Image dimensions int Format; // OpenGL pixel format int BytesPerPixel; // Number of bytes per pixel unsigned char *Data; // Pointer to pixel data } GLFWimage; \end{lstlisting} \textit{Data} points to the loaded pixel data. If the function loaded the image successfully, GL\_TRUE is returned, otherwise GL\_FALSE is returned. Possible flags for the \textit{flags} argument are GLFW\_ORIGIN\_UL\_BIT, GLFW\_NO\_RESCALE\_BIT and GLFW\_ALPHA\_MAP\_BIT. GLFW\_ORIGIN\_UL\_BIT and GLFW\_ALPHA\_MAP\_BIT work as described for the \textbf{glfwLoadTexture2D} function. If the GLFW\_NO\_RESCALE\_BIT flag is set, the image will not be rescaled to the closest larger $2^m\times 2^n$ resolution, which is otherwise the default action for images with non-power-of-two dimenstions. When an image that was loaded with the \textbf{glfwReadImage} function is not used anymore (e.g. when it has been uploaded to texture memory), you should use the function \textbf{glfwFreeImage} to free the allocated memory: \begin{lstlisting} void glfwFreeImage( GLFWimage *img ) \end{lstlisting} %------------------------------------------------------------------------- % OpenGL Extension Support %------------------------------------------------------------------------- \chapter{OpenGL Extension Support} \thispagestyle{fancy} One of the benefits of \OpenGL\ is that it is extensible. Independent hardware vendors (IHVs) may include functionality in their \OpenGL\ implementations that exceed that of the \OpenGL\ standard. An extension is defined by: \begin{enumerate} \item An extension name (e.g. GL\_ARB\_multitexture). \item New OpenGL tokens (e.g. GL\_TEXTURE1\_ARB). \item New OpenGL functions (e.g. \textbf{glActiveTextureARB}). \end{enumerate} A list of official extensions, together with their definitions, can be found at the \textit{OpenGL Registry} (\url{http://www.opengl.org/registry/}). To use a certain extension, the following steps must be performed: \begin{enumerate} \item A compile time check for the support of the extension. \item A run time check for the support of the extension. \item Fetch function pointers for the extended \OpenGL\ functions (done at run time). \end{enumerate} How this is done using \GLFW\ is described in the following sections. Please note that this chapter covers some advanced topics, and is quite specific to the C programming language. For a much easier way to get access to \OpenGL\ extensions, you should probably use a dedicated extension loading library such as GLEW or GLee. This kind of library greatly reduces the amount of work necessary to use \OpenGL\ extensions. GLEW in particular has been extensively tested with and works well with \GLFW . %------------------------------------------------------------------------- \section{Compile Time Check} The compile time check is necessary to perform in order to know if the compiler include files have defined the necessary tokens. It is very easy to do. The include file \texttt{GL/gl.h} will define a constant with the same name as the extension, if all the extension tokens are defined. Here is an example of how to check for the extension GL\_ARB\_multitexture: \begin{lstlisting} #ifdef GL_ARB_multitexture // Extension is supported by the include files #else // Extension is not supported by the include files // Get a more up-to-date file! #endif \end{lstlisting} %------------------------------------------------------------------------- \section{Runtime Check} Even if the compiler include files have defined all the necessary tokens, a given machine may not actually support the extension (it may have a graphics card with a different \OpenGL\ implementation, or an older driver). That is why it is necessary to do a run time check for the extension support as well. This is done with the \GLFW\ function \textbf{glfwExtensionSupported}, which has the C syntax: \begin{lstlisting} int glfwExtensionSupported( const char *extension ) \end{lstlisting} The argument \textit{extension} is a null terminated ASCII string with the extension name. \textbf{glfwExtensionSupported} returns GL\_TRUE if the extension is supported, otherwise it returns GL\_FALSE. Let us extend the previous example of checking for support of the extension GL\_ARB\_multitexture. This time we add a run time check, and a variable which we set to GL\_TRUE if the extension is supported, or GL\_FALSE if it is not supported. \begin{lstlisting} int multitexture_supported; #ifdef GL_ARB_multitexture // Check if extension is supported at run time multitexture_supported = glfwExtensionSupported( "GL_ARB_multitexture" ); #else // Extension is not supported by the include files // Get a more up-to-date file! multitexture_supported = GL_FALSE; #endif \end{lstlisting} Now it is easy to check for the extension within the program, simply do: \begin{lstlisting} if( multitexture_supported ) { // Use multi texturing } else { // Use some other solution (or fail) } \end{lstlisting} %------------------------------------------------------------------------- \section{Fetching Function Pointers} Some extensions, though not all, require the use of new \OpenGL\ functions. These entry points are not necessarily exposed by your link libraries, making it necessary to find them dynamically at run time. You can retrieve these entry points using the \textbf{glfwGetProcAddress} function: \begin{lstlisting} void * glfwGetProcAddress( const char *procname ) \end{lstlisting} The argument \textit{procname} is a null terminated ASCII string holding the name of the \OpenGL\ function. \textbf{glfwGetProcAddress} returns the address to the function if the function is available, otherwise NULL is returned. Obviously, fetching the function pointer is trivial. For instance, if we want to obtain the pointer to \textbf{glActiveTextureARB}, we simply call: \begin{lstlisting} glActiveTextureARB = glfwGetProcAddress( "glActiveTextureARB" ); \end{lstlisting} However, there are many possible naming and type definition conflicts involved with such an operation, which may result in compiler warnings or errors. My proposed solution is the following: \begin{itemize} \item Do not use the function name for the variable name. Use something similar, perhaps by adding a prefix or suffix, and then use \texttt{\#define} to map the function name to your variable. \item The standard type definition naming convention for function pointers is \texttt{PFN\textit{xxxx}PROC}, where \texttt{\textit{xxxx}} is the uppercase version of the function name (e.g. \texttt{PFNGLACTIVETEXTUREARBPROC}). Either make sure your compiler uses a compatible \texttt{gl.h} and/or \texttt{glext.h} file and rely on it to define these types, or use define the types yourself using a different naming convention (for example \texttt{\textit{xxxx}\_T}) and do the type definitions yourself. \end{itemize} Here is a slightly longer example of how to use an extension, this time using our own function pointer type definition): \begin{lstlisting} // Type definition of the function pointer typedef void (APIENTRY * GLACTIVETEXTUREARB_T) (GLenum texture); // Function pointer GLACTIVETEXTUREARB_T _ActiveTextureARB; #define glActiveTextureARB _ActiveTextureARB // Extension availability flag int multitexture_supported; #ifdef GL_ARB_multitexture // Check if extension is supported at run time if( glfwExtensionSupported( "GL_ARB_multitexture" ) ) { // Get the function pointer glActiveTextureARB = (GLACTIVETEXTUREARB_T) glfwGetProcAddress( "glActiveTextureARB" ); multitexture_supported = GL_TRUE; } else { multitexture_supported = GL_FALSE; } #else // Extension is not supported by the include files multitexture_supported = GL_FALSE; #endif \end{lstlisting} Even this example leaves some things to be desired. First of all, the GL\_ARB\_multitexture extension defines many more functions than the single function used above. Secondly, checking if an extension is supported using \textbf{glfwExtensionSupported} is not enough to ensure that the corresponding functions will be valid. You also need to check that the all function pointers returned by \textbf{glfwGetProcAddress} are non-NULL. %------------------------------------------------------------------------- \subsection{Function pointer type definitions} To make a function pointer type definition, you need to know the function prototype. This can often be found in the extension definitions (e.g. at the \textit{OpenGL Registry}). All the entry points that are defined by an extension are listed with their C prototype definitions under the section \textit{New Procedures and Functions} in the extension definition. For instance, if we look at the definition of the GL\_ARB\_texture\_compression extension, we find a list of new functions. One of these is declared like this: \begin{lstlisting} void GetCompressedTexImageARB(enum target, int lod, void *img); \end{lstlisting} Like in most official \OpenGL\ documentation, all the \texttt{GL} and \texttt{gl} prefixes have been left out. In other words, the real function prototype would look like this: \begin{lstlisting} void glGetCompressedTexImageARB(GLenum target, GLint lod, void *img); \end{lstlisting} All we have to do to turn this prototype definition into a function pointer type definition, is to replace the function name with \texttt{(APIENTRY * \textit{xxxx}\_T)}, where \textit{xxxx} is the uppercase version of the name (according to the proposed naming convention). The keyword \texttt{APIENTRY} is needed to be compatible between different platforms. The \GLFW\ header file \texttt{GL/glfw.h} ensures that \texttt{APIENTRY} is properly defined on all supported platforms. In other words, for the function \textbf{glGetCompressedTexImageARB} we get: \begin{lstlisting} typedef void (APIENTRY * GLGETCOMPRESSEDTEXIMAGEARB_T) (GLenum target, GLint level, void *img); \end{lstlisting} %------------------------------------------------------------------------- % Multi Threading %------------------------------------------------------------------------- \chapter{Multi-threading} \thispagestyle{fancy} The initial intent of \GLFW\ was to provide only the basic functionality needed to create an \OpenGL\ application, but as \GLFW\ grew to be a platform for portable \OpenGL\ applications, it came to include a basic operating system independent multi-threading layer. However, this layer is fairly isolated from the rest of \GLFW\ and most of the rest of the API is \emph{not} thread-safe. This is important to keep in mind when using \GLFW\ in a multi-threaded application. %------------------------------------------------------------------------- \section{Why Use Multi-threading?} Most computers being sold today have at least two CPU cores and many have four or more. Even the cheapest netbooks have a semblance of multi-core in the form of hyper-threading. With the individual cores not getting much faster, increased performance can only be had by using the additional CPU cores. However, the \OpenGL\ API itself is single-threaded and a given context should only be used by a single thread at a time. This means that the primary use for multi-threading in the area of computer graphics isn't to distribute rendering across multiple threads, but rather to relieve the render thread from doing other kinds of work. Examples include collision and dynamics ticks, audio processing and playback, networking and even rendering steps that don't involve calling \OpenGL . The downside of using multi-threading is the added complexity that comes from making a program non-sequential and to ensure that one thread does not interfere with the data being used by another. Whether or not it is worth making a given application multi-threaded is a complex question and as always, there is no substitute for data and experience. Profile, measure and experiment. %------------------------------------------------------------------------- \subsection{Avoid unnecessary waiting} In many situations, an application is placed in a wait state, waiting for a task to complete. Examples of such situations are: waiting for a file to load from disk, waiting for a vertical retrace (when using a double buffered display, such as a \GLFW\ window), waiting for a display to be cleared or data to be sent to the graphics card. Some or all of these operations can be done asynchronously, if the conditions are right and the operating system supports it, but a simple and efficient way of avoiding unnecessary waits is to use multi threading. If there are several active threads in an application, a thread that was waiting for CPU time can start running as soon as another thread enters a wait state. This will speed up an application on both single and multi processor systems. %------------------------------------------------------------------------- \subsection{Improve real time performance} It is a known fact that an application becomes more responsive and exhibits less timing problems if different jobs are assigned to separate threads. A typical example is streaming audio: when an audio buffer is empty, it has to be filled with new sound again within a limited amount of time, or strange sound loops or clicks may be the result. If a program is displaying graphics, loading files and playing audio at the same time (a typical game), it is very difficult to guarantee that the program will update the audio buffers in time if everything is performed in a single thread. On the other hand, if the audio buffer is updated from a separate thread, it becomes a very simple task. %------------------------------------------------------------------------- \section{How To Use Multi Threading} In general, every process, i.e. instance of a program, has its own memory space and its own set of resources, such as opened files etc. As a consequence, each process is coupled with a fairly large set of state. When the processor changes the execution from one process to another process, all this state has to be changed too (this is often referred to as a context switch), which can be quite costly. Threads are sometimes referred to as ``lightweight processes'', which gives you a clue of what they are. In contrast to a process, a thread is a separate execution path within a process, which shares the same memory area and resources. This means that very little state has to be changed when switching execution between different threads (basically only the stack pointer and the processor registers). It also means that data exchange between threads is very simple, and there is little or no overhead in exchanging data, since program variables and data areas can be shared between threads. Writing threaded applications may be very awkward before you get used to it, but there are a few key rules that are fairly simple to follow: \begin{enumerate} \item ALWAYS assure exclusive access to data that is shared between threads! \item Make sure that threads are synchronized properly! \item NEVER busy wait! \end{enumerate} In the following sections you will learn how to use the functionality of \GLFW\ to create threads and meet these rules, and hopefully you will find that it is not very difficult to write a multi threaded application. %------------------------------------------------------------------------- \section{Creating Threads} Creating a thread in \GLFW\ is very simple. You just call the function \textbf{glfwCreateThread}: \begin{lstlisting} GLFWthread glfwCreateThread( GLFWthreadfun fun, void *arg ) \end{lstlisting} The argument \textit{fun} is a pointer to a function that will be executed by the new thread, and \textit{arg} is an argument that is passed to the thread. \textbf{glfwCreateThread} returns a positive thread ID number if the thread was created successfully, or a negative number if the thread could not be created. When the thread function returns, the thread will die. In most cases, you want to know when the thread has finished. A thread can wait for another thread to die with the command \textbf{glfwWaitThread}: \begin{lstlisting} int glfwWaitThread( GLFWthread ID, int waitmode ) \end{lstlisting} The argument \textit{ID} is the thread handle that was obtained when creating the thread. If \textit{waitmode} is GLFW\_NOWAIT, \textbf{glfwWaitThread} will return immediately with the value GL\_TRUE if the thread died, or GL\_FALSE if it is still alive. This can be useful if you only want to check if the thread is alive. If \textit{waitmode} is GLFW\_WAIT, \textbf{glfwWaitThread} will wait until the specified thread has died. Regardless of what \textit{waitmode} is, \textbf{glfwWaitThread} will return immediately if the thread does not exist (e.g. if the thread has already died or if ID is an invalid thread handle). In some situations, you may want to brutally kill a thread without waiting for it to finish. This can be done with \textbf{glfwDestroyThread}: \begin{lstlisting} void glfwDestroyThread( GLFWthread ID ) \end{lstlisting} It should be noted that \textbf{glfwDestroyThread} is a very dangerous operation, which may interrupt a thread in the middle of an important operation, which can result in lost data or deadlocks (when a thread is waiting for a condition to be raised, which can never be raised). In other words, do not use this function unless you really have to do it, and if you really know what you are doing (and what the thread that you are killing is doing)! To sum up what we have learned so far, here is an example program which will print ``Hello world!'' (error checking has been left out for brevity): \begin{mysamepage}[20] \begin{lstlisting} #include #include void GLFWCALL HelloFun( void *arg ) { printf( "Hello " ); } int main( void ) { GLFWthread thread; glfwInit(); thread = glfwCreateThread( HelloFun, NULL ); glfwWaitThread( thread, GLFW_WAIT ); printf( "world!\n" ); glfwTerminate(); return 0; } \end{lstlisting} \end{mysamepage} The program starts by initializing \GLFW , as always, and then it goes on by creating a thread that will execute the function \texttt{HelloFun}. The main thread then waits for the created thread to do its work and finish. Finally the main thread prints ``world!'', terminates \GLFW\ and exits. The result is that ``Hello world!'' will be printed in the console window. You may have noticed that we have already used a simple form of thread synchronization, by waiting for the child thread to die before we print ``world!''. If we would have placed the wait command after the print command, there would be no way of knowing which word would be printed first (``Hello'' or ``world!''). Our program would then suffer from a race condition, which is a term used to describe a situation where two (or more) threads are competing to complete a task first. In section \ref{par:condvar} you will learn how to do advanced thread synchronization using condition variables, which let threads wait for certain conditions before continuing execution. %------------------------------------------------------------------------- \section{Data Sharing Using Mutex Objects} In many situations you need to protect a certain data area while reading or modifying it, so that other threads do not start changing or reading the data while you are only half way through. For instance, consider that you have a vector \textit{vec}, and a variable \textit{N} telling how many elements there are in the vector. What happens if thread $A$ adds an element to the vector at the same time as thread $B$ is removing an element from the vector? Figure \ref{fig:nomutex} shows a possible scenario. \begin{figure}[p] \begin{center} \begin{tabular}{cc} \textbf{Thread A} & \textbf{Thread B}\\ \begin{minipage}{7cm} \lstset{backgroundcolor=\color{codeA}} \vspace{0.5\baselineskip} \begin{lstlisting} N ++; \end{lstlisting} \end{minipage} & \textit{waiting to exectue} \\ \textit{waiting to exectue} & \begin{minipage}{7cm} \vspace{0.5\baselineskip} \lstset{backgroundcolor=\color{codeB}} \begin{lstlisting} x = vec[ N-1 ]; N --; \end{lstlisting} \end{minipage} \\ \begin{minipage}{7cm} \vspace{0.5\baselineskip} \lstset{backgroundcolor=\color{codeA}} \begin{lstlisting} vec[ N-1 ] = y; \end{lstlisting} \end{minipage} & \textit{waiting to exectue} \end{tabular} \end{center} \caption{Data sharing without mutex protection} \label{fig:nomutex} \end{figure} We have created a possible race condition. The result in this case is that thread $B$ reads an invalid element from the vector, and thread $A$ overwrites an already existing element, which is not what we wanted. The solution is to only let one thread have access to the vector at a time. This is done with mutex objects (mutex stands for \textit{mutual exclusion}). The proper use of mutexes eliminates race conditions. To create a mutex object in \GLFW , you use the function \textbf{glfwCreateMutex}: \begin{lstlisting} GLFWmutex glfwCreateMutex( void ) \end{lstlisting} \textbf{glfwCreateMutex} returns NULL if a mutex object could not be created, otherwise a mutex handle is returned. To destroy a mutex object that is no longer in use, call \textbf{glfwDestroyMutex}: \begin{lstlisting} void glfwDestroyMutex( GLFWmutex mutex ) \end{lstlisting} Mutex objects by themselves do not contain any useful data. They act as a lock to any arbitrary data. Any thread can lock access to the data using the function \textbf{glfwLockMutex}: \begin{lstlisting} void glfwLockMutex( GLFWmutex mutex ) \end{lstlisting} The argument \textit{mutex} is the mutex handle that was obtained when creating the mutex. \textbf{glfwLockMutex} will block the calling thread until the specified mutex is available (which will be immediately, if no other thread has locked it). Once a mutex has been locked, no other thread is allowed to lock the mutex. Only one thread at a time can get access to the mutex, and only the thread that has locked the mutex may use or manipulate the data which the mutex protects. To unlock a mutex, the thread calls \textbf{glfwUnlockMutex}: \begin{lstlisting} void glfwUnlockMutex( GLFWmutex mutex ) \end{lstlisting} As soon as \textbf{glfwUnlockMutex} has been called, other threads may lock it again. Figure \ref{fig:withmutex} shows the scenario with the two threads trying to access the same vector, but this time they use a mutex object (\textit{vecmutex}). \begin{figure}[p] \begin{center} \begin{tabular}{cc} \textbf{Thread A} & \textbf{Thread B}\\ \begin{minipage}{7cm} \lstset{backgroundcolor=\color{codeA}} \vspace{0.5\baselineskip} \begin{lstlisting} glfwLockMutex( vecmutex ); N ++; \end{lstlisting} \end{minipage} & \textit{waiting to exectue} \\ \textit{waiting to exectue} & \begin{minipage}{7cm} \vspace{0.5\baselineskip} \lstset{backgroundcolor=\color{codeB}} \begin{lstlisting} glfwLockMutex( vecmutex ); \end{lstlisting} \end{minipage} \\ \begin{minipage}{7cm} \vspace{0.5\baselineskip} \lstset{backgroundcolor=\color{codeA}} \begin{lstlisting} vec[ N-1 ] = y; glfwUnlockMutex( vecmutex ); \end{lstlisting} \end{minipage} & \textit{waiting to exectue} \\ \textit{waiting to exectue} & \begin{minipage}{7cm} \vspace{0.5\baselineskip} \lstset{backgroundcolor=\color{codeB}} \begin{lstlisting} x = vec[ N-1 ]; N --; glfwUnlockMutex( vecmutex ); \end{lstlisting} \end{minipage} \end{tabular} \end{center} \caption{Data sharing with mutex protection} \label{fig:withmutex} \end{figure} In this example, thread $A$ successfully obtains a lock on the mutex and directly starts modifying the vector data. Next, thread $B$ \textit{tries} to get a lock on the mutex, but is placed on hold since thread $A$ has already locked the mutex. Thread $A$ is free to continue its work, and when it is done it unlocks the mutex. \textit{Now} thread $B$ locks the mutex and gains exclusive access to the vector data, performs its work, and finally unlocks the mutex. The race condition has been avoided, and the code performs as expected. %------------------------------------------------------------------------- \section{Thread Synchronization Using Condition Variables} \label{par:condvar} Now you know how to create threads and how to safely exchange data between threads, but there is one important thing left to solve for multi threaded programs: conditional waits. Very often it is necessary for one thread to wait for a condition that will be satisfied by another thread. For instance, a thread~$A$ may need to wait for both thread~$B$ and thread~$C$ to finish a certain task before it can continue. For starters, we can create a mutex protecting a variable holding the number of completed threads: \begin{lstlisting} GLFWmutex mutex; int threadsdone; \end{lstlisting} Now, thread~$B$ and $C$ will lock the mutex and increase the \textit{threadsdone} variable by one when they are done, and then unlock the mutex again. Thread~$A$ can lock the mutex and check if threadsdone is equal to 2. If we assume that \textit{mutex} has been created successfully, the code for the three threads ($A$, $B$ and $C$) could be the following: \begin{mysamepage}[8] Thread~$A$: Wait for both thread~$B$ and $C$ to finish. \lstset{backgroundcolor=\color{codeA}} \begin{lstlisting} do { glfwLockMutex( mutex ); done = (threadsdone == 2); glfwUnlockMutex( mutex ); } while( !done ); \end{lstlisting} \end{mysamepage} \begin{mysamepage}[4] Thread~$B$ and $C$: Tell thread~$A$ that I am done. \lstset{backgroundcolor=\color{codeB}} \begin{lstlisting} glfwLockMutex( mutex ); threadsdone ++; glfwUnlockMutex( mutex ); \end{lstlisting} \lstset{backgroundcolor=\color{code}} \end{mysamepage} The problem is that when thread~$A$ discovers that thread~$B$ and $C$ are not done, it needs to check \textit{threadsdone} over and over again until \textit{threadsdone} is 2. We have created a busy waiting loop! The method will work without a doubt, but thread~$A$ will consume a lot of CPU power doing nothing. What we need is a way for thread~$A$ to halt until thread~$B$ or $C$ tells it to re-evaluate the conditions again. This is exactly what condition variables do. \GLFW\ supports three condition variable operations: wait, signal and broadcast. One or more threads may wait to be woken up on a condition, and one or more threads may signal or broadcast a condition. The difference between signal and broadcast is that broadcasting a condition wakes up all waiting threads (in an unspecified order, which is decided by task scheduling rules), while signaling a condition only wakes up one waiting thread (again, which one is unspecified). An important property of condition variables, which separates them from other signaling objects such as events, is that only \textit{currently waiting} threads are affected by a condition. A condition is ``forgotten'' as soon as it has been signaled or broadcasted. That is why a condition variable is always associated with a mutex, which protects additional condition information, such as the ``done'' variable construct described above. This may all be confusing at first, but you will see that condition variables are both simple and powerful. They can be used to construct more abstract objects such as semaphores, events or gates (which is why \GLFW\ does not support semaphores natively, for instance). Before we go on by solving the busy waiting scenario, let us go through the \GLFW\ condition variable functions. Just like for mutexes, you can create and destroy condition variable objects. The functions for doing this are \textbf{glfwCreateCond} and \textbf{glfwDestroyCond}: \begin{lstlisting} GLFWcond glfwCreateCond( void ) \end{lstlisting} \begin{lstlisting} void glfwDestroyCond( GLFWcond cond ) \end{lstlisting} \textbf{glfwCreateCond} returns NULL if a condition variable object could not be created, otherwise a condition variable handle is returned. To destroy a condition variable that is no longer in use, call \textbf{glfwDestroyCond}. To wait for a condition variable, you use \textbf{glfwWaitCond}, which has the C syntax: \begin{lstlisting} void glfwWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ) \end{lstlisting} When \textbf{glfwWaitCond} is called, the locked mutex specified by \textit{mutex} will be unlocked, and the thread will be placed in a wait state until it receives the condition \textit{cond}. As soon as the waiting thread is woken up, the mutex \textit{mutex} will be locked again. If \textit{timeout} is GLFW\_INFINITY, \textbf{glfwWaitCond} will wait until the condition \textit{cond} is received. If \textit{timemout} is a positive time (in seconds), \textbf{glfwWaitCond} will wait until the condition cond is received or the specified time has passed. To signal or broadcast a condition variable, you use the functions \textbf{glfwSignalCond} and \textbf{glfwBroadcastCond}, respectively: \begin{lstlisting} void glfwSignalCond( GLFWcond cond ) \end{lstlisting} \begin{lstlisting} void glfwBroadcastCond( GLFWcond cond ) \end{lstlisting} \textbf{glfwSignalCond} will wake up one threads that is waiting for the condition \textit{cond}. \textbf{glfwBroadcastCond} will wake up all threads that are waiting for the condition cond. Now that we have the tools, let us see what we can do to solve the busy waiting situation. First, we add a condition variable to our data set: \begin{lstlisting} GLFWcond cond; GLFWmutex mutex; int threadsdone; \end{lstlisting} If we assume that \textit{mutex} and \textit{cond} have been created successfully, the code for the three threads ($A$, $B$ and $C$) could be the following: \begin{mysamepage}[12] Thread~$A$: Wait for both thread~$B$ and $C$ to finish. \lstset{backgroundcolor=\color{codeA}} \begin{lstlisting} glfwLockMutex( mutex ); do { done = (threadsdone == 2); if( !done ) { glfwWaitCond( cond, mutex, GLFW_INFINITY ); } } while( !done ); glfwUnlockMutex( mutex ); \end{lstlisting} \end{mysamepage} \begin{mysamepage}[6] Thread~$B$ and $C$: Tell thread~$A$ that I am done. \lstset{backgroundcolor=\color{codeB}} \begin{lstlisting} glfwLockMutex( mutex ); threadsdone ++; glfwUnlockMutex( mutex ); glfwSignalCond( cond ); \end{lstlisting} \lstset{backgroundcolor=\color{code}} \end{mysamepage} With the addition of a condition variable, the busy waiting loop turned into a nice condition waiting loop, and thread~$A$ no longer wastes any CPU time. Also note that the mutex locking and unlocking is moved outside of the waiting loop. This is because \textbf{glfwWaitCond} effectively performs the necessary mutex locking and unlocking for us. %------------------------------------------------------------------------- \section{Calling GLFW Functions From Multiple Threads} The current release of \GLFW\ is not 100\% thread safe. In other words, most \GLFW\ functions may cause conflicts and undefined behaviour if they are called from different threads. To avoid conflicts, only the following \GLFW\ API functions should be regarded as thread safe (i.e. they can be called from any thread at any time): \begin{enumerate} \item All functions that deal with threads, mutexes and condition variables (e.g. \textbf{glfwCreateThread}, \textbf{glfwLockMutex} etc). \item The timing function \textbf{glfwSleep}. \end{enumerate} All other \GLFW\ API function calls should be done from a single thread. This also makes for better future compatibility, since future versions of \GLFW\ may implement per thread window contexts (much in the same way as \OpenGL\ has per thread rendering contexts), for instance. %------------------------------------------------------------------------- % Index %------------------------------------------------------------------------- % ... \end{document} glfw-2.7.2/docs/readme.txt0000644000175000017500000000451410625531326016410 0ustar elmindredaelmindredaIntroduction ------------ The GLFW documentation is written in LaTeX, which I have found is a great tool for handling large and long-lived documents, where clumbsy s.c. WYSIWYG word processors (especially one from a major moneymaking company) fails in several aspects (document integrity being a serious Achilles heel). Besides being powerful, LaTeX is also very attractive since all the necessary tools for dealing with LaTeX documentation are both free and ported to a wide variety of platforms. Another advantage is that the LaTeX files are written in plain text, which means that version handling systems such as CVS handle them perfectly, without having to treat the documents as binary files. Ok, so much for the LaTeX glory. Now to the GLFW documentation... The Documents ------------- There are two main documents: glfwrm.tex - The GLFW Reference Manual glfwug.tex - The GLFW Users Guide In addition, there is a common LaTeX style file, which sets up things such as page formatting and useful macros: glfwdoc.sty - Common GLFW document styles and macros Requirements ------------ Of course you need LaTeX installed on your system in order to compile the GLFW documentation. The easiest way to get a full LaTeX system is to download/get the TeXLive CD from http://www.tug.org/texlive/. It has all the necessary software for Windows, Mac OS X and most popular Unix flavours (including Linux, FreeBSD, Solaris, IRIX etc). A number of LaTeX packages have to be installed in order to compile the GLFW documentation successfully: color fancyhdr hyperref lastpage listings needspace textcase times titling These packages are all available on the TeXLive CD. Just make sure that you have checked all these packages when installing TeXLive, or get them in some other way if you do not have the TeXLive CD. Build Files ----------- For convenience, I have created a Makefile that will build PDF documents from the LaTeX files. It is nothing fancy, but handles things like up-to-date TOC generation. It can also be used for cleaning up most (all?) of the files generated by the Makefile, by calling 'make clean' (Unix) or 'make clean-win' (Windows). Since Windows does not have a portable 'rm -f' counterpart, a special cleanup batch file was created, which is called 'cleanup.bat' (it is called when 'make clean-win' is run). Good luck! Marcus glfw-2.7.2/docs/glfwdoc.sty0000644000175000017500000000556111427307506016605 0ustar elmindredaelmindreda%------------------------------------------------------------------------- % Common document formatting and macros for GLFW manuals %------------------------------------------------------------------------- % Misc. document info \date{\today} % Packages \usepackage{fancyhdr} \usepackage{titling} \usepackage{lastpage} \usepackage{listings} \usepackage{color} \usepackage[overload]{textcase} \usepackage{needspace} \usepackage{times} % Logo macros \newcommand{\OpenGL}[1][0]{OpenGL\textsuperscript{\textregistered}} \newcommand{\GLFW}[1][0]{GLFW} % Encoding \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} % Page formatting \usepackage[hmargin=2.5cm]{geometry} \raggedright \raggedbottom \sloppy \usepackage{parskip} % Header and footer \pagestyle{fancy} %\lhead{\textit{GLFW Reference Manual}} \lhead{\textit{GLFW \glfwdoctype}} \chead{API version \glfwapiver} \rhead{Page \thepage/\pageref{LastPage}} \lfoot{} \cfoot{} \rfoot{} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.0pt} % Titlepage \newcommand{\glfwmaketitle}{\begin{titlepage}\ \\% \begin{center}% \vspace{7.0cm}{\Huge\textbf{GLFW}}\\% \rule{10.0cm}{0.5pt}\\% \vspace{0.5cm}{\LARGE\textbf{\glfwdoctype}}\\% \vspace{0.8cm}{\large\textbf{API version \glfwapiver}}\\% \textit{\today}\\% \vspace{1.5cm}\textbf{\textcopyright2002-2006 Marcus Geelnard}\\ \textbf{\textcopyright2006-2010 Camilla Berglund}\\% \end{center}\end{titlepage}\newpage} % Colors \definecolor{code}{rgb}{0.9,0.9,1.0} \definecolor{link}{rgb}{0.6,0.0,0.0} \definecolor{codeA}{rgb}{0.9,1.0,0.9} \definecolor{codeB}{rgb}{1.0,0.9,0.9} % Code listings \lstset{frame=single,frameround=tttt,backgroundcolor=\color{code},% language=C,basicstyle={\ttfamily},% breaklines,breakindent=0pt,postbreak=\space\space\space\space} % A simple hack for keeping lines together \newenvironment{mysamepage}[1][2]{\begin{samepage}\needspace{#1\baselineskip}}{\end{samepage}} % Macros for automating function reference entries \newenvironment{refparameters}[1][0]{\begin{mysamepage}\textbf{Parameters}\\}{\end{mysamepage}\bigskip} \newenvironment{refreturn}[1][0]{\begin{mysamepage}\textbf{Return values}\\}{\end{mysamepage}\bigskip} \newenvironment{refdescription}[1][0]{\begin{mysamepage}\textbf{Description}\\}{\end{mysamepage}\bigskip} \newenvironment{refnotes}[1][0]{\begin{mysamepage}\textbf{Notes}\\}{\end{mysamepage}\bigskip} % hyperref (bookmarks, links etc) - use this package last \usepackage[colorlinks=true,linkcolor=link,bookmarks=true,bookmarksopen=true,% pdfhighlight=/N,bookmarksnumbered=true,bookmarksopenlevel=1,% pdfview=FitH,pdfstartview=FitH]{hyperref} glfw-2.7.2/docs/Reference.pdf0000644000175000017500000133461711621215255017013 0ustar elmindredaelmindreda%PDF-1.4 % 1 0 obj << /S /GoTo /D (chapter.1) >> endobj 4 0 obj (1 Introduction) endobj 5 0 obj << /S /GoTo /D (chapter.2) >> endobj 8 0 obj (2 GLFW Operation Overview) endobj 9 0 obj << /S /GoTo /D (section.2.1) >> endobj 12 0 obj (2.1 The GLFW Window) endobj 13 0 obj << /S /GoTo /D (section.2.2) >> endobj 16 0 obj (2.2 The GLFW Event Loop) endobj 17 0 obj << /S /GoTo /D (section.2.3) >> endobj 20 0 obj (2.3 Callback Functions) endobj 21 0 obj << /S /GoTo /D (section.2.4) >> endobj 24 0 obj (2.4 Threads) endobj 25 0 obj << /S /GoTo /D (chapter.3) >> endobj 28 0 obj (3 Function Reference) endobj 29 0 obj << /S /GoTo /D (section.3.1) >> endobj 32 0 obj (3.1 GLFW Initialization and Termination) endobj 33 0 obj << /S /GoTo /D (subsection.3.1.1) >> endobj 36 0 obj (3.1.1 glfwInit) endobj 37 0 obj << /S /GoTo /D (subsection.3.1.2) >> endobj 40 0 obj (3.1.2 glfwTerminate) endobj 41 0 obj << /S /GoTo /D (subsection.3.1.3) >> endobj 44 0 obj (3.1.3 glfwGetVersion) endobj 45 0 obj << /S /GoTo /D (section.3.2) >> endobj 48 0 obj (3.2 Window Handling) endobj 49 0 obj << /S /GoTo /D (subsection.3.2.1) >> endobj 52 0 obj (3.2.1 glfwOpenWindow) endobj 53 0 obj << /S /GoTo /D (subsection.3.2.2) >> endobj 56 0 obj (3.2.2 glfwOpenWindowHint) endobj 57 0 obj << /S /GoTo /D (subsection.3.2.3) >> endobj 60 0 obj (3.2.3 glfwCloseWindow) endobj 61 0 obj << /S /GoTo /D (subsection.3.2.4) >> endobj 64 0 obj (3.2.4 glfwSetWindowCloseCallback) endobj 65 0 obj << /S /GoTo /D (subsection.3.2.5) >> endobj 68 0 obj (3.2.5 glfwSetWindowTitle) endobj 69 0 obj << /S /GoTo /D (subsection.3.2.6) >> endobj 72 0 obj (3.2.6 glfwSetWindowSize) endobj 73 0 obj << /S /GoTo /D (subsection.3.2.7) >> endobj 76 0 obj (3.2.7 glfwSetWindowPos) endobj 77 0 obj << /S /GoTo /D (subsection.3.2.8) >> endobj 80 0 obj (3.2.8 glfwGetWindowSize) endobj 81 0 obj << /S /GoTo /D (subsection.3.2.9) >> endobj 84 0 obj (3.2.9 glfwSetWindowSizeCallback) endobj 85 0 obj << /S /GoTo /D (subsection.3.2.10) >> endobj 88 0 obj (3.2.10 glfwIconifyWindow) endobj 89 0 obj << /S /GoTo /D (subsection.3.2.11) >> endobj 92 0 obj (3.2.11 glfwRestoreWindow) endobj 93 0 obj << /S /GoTo /D (subsection.3.2.12) >> endobj 96 0 obj (3.2.12 glfwGetWindowParam) endobj 97 0 obj << /S /GoTo /D (subsection.3.2.13) >> endobj 100 0 obj (3.2.13 glfwSwapBuffers) endobj 101 0 obj << /S /GoTo /D (subsection.3.2.14) >> endobj 104 0 obj (3.2.14 glfwSwapInterval) endobj 105 0 obj << /S /GoTo /D (subsection.3.2.15) >> endobj 108 0 obj (3.2.15 glfwSetWindowRefreshCallback) endobj 109 0 obj << /S /GoTo /D (section.3.3) >> endobj 112 0 obj (3.3 Video Modes) endobj 113 0 obj << /S /GoTo /D (subsection.3.3.1) >> endobj 116 0 obj (3.3.1 glfwGetVideoModes) endobj 117 0 obj << /S /GoTo /D (subsection.3.3.2) >> endobj 120 0 obj (3.3.2 glfwGetDesktopMode) endobj 121 0 obj << /S /GoTo /D (section.3.4) >> endobj 124 0 obj (3.4 Input Handling) endobj 125 0 obj << /S /GoTo /D (subsection.3.4.1) >> endobj 128 0 obj (3.4.1 glfwPollEvents) endobj 129 0 obj << /S /GoTo /D (subsection.3.4.2) >> endobj 132 0 obj (3.4.2 glfwWaitEvents) endobj 133 0 obj << /S /GoTo /D (subsection.3.4.3) >> endobj 136 0 obj (3.4.3 glfwGetKey) endobj 137 0 obj << /S /GoTo /D (subsection.3.4.4) >> endobj 140 0 obj (3.4.4 glfwGetMouseButton) endobj 141 0 obj << /S /GoTo /D (subsection.3.4.5) >> endobj 144 0 obj (3.4.5 glfwGetMousePos) endobj 145 0 obj << /S /GoTo /D (subsection.3.4.6) >> endobj 148 0 obj (3.4.6 glfwSetMousePos) endobj 149 0 obj << /S /GoTo /D (subsection.3.4.7) >> endobj 152 0 obj (3.4.7 glfwGetMouseWheel) endobj 153 0 obj << /S /GoTo /D (subsection.3.4.8) >> endobj 156 0 obj (3.4.8 glfwSetMouseWheel) endobj 157 0 obj << /S /GoTo /D (subsection.3.4.9) >> endobj 160 0 obj (3.4.9 glfwSetKeyCallback) endobj 161 0 obj << /S /GoTo /D (subsection.3.4.10) >> endobj 164 0 obj (3.4.10 glfwSetCharCallback) endobj 165 0 obj << /S /GoTo /D (subsection.3.4.11) >> endobj 168 0 obj (3.4.11 glfwSetMouseButtonCallback) endobj 169 0 obj << /S /GoTo /D (subsection.3.4.12) >> endobj 172 0 obj (3.4.12 glfwSetMousePosCallback) endobj 173 0 obj << /S /GoTo /D (subsection.3.4.13) >> endobj 176 0 obj (3.4.13 glfwSetMouseWheelCallback) endobj 177 0 obj << /S /GoTo /D (subsection.3.4.14) >> endobj 180 0 obj (3.4.14 glfwGetJoystickParam) endobj 181 0 obj << /S /GoTo /D (subsection.3.4.15) >> endobj 184 0 obj (3.4.15 glfwGetJoystickPos) endobj 185 0 obj << /S /GoTo /D (subsection.3.4.16) >> endobj 188 0 obj (3.4.16 glfwGetJoystickButtons) endobj 189 0 obj << /S /GoTo /D (section.3.5) >> endobj 192 0 obj (3.5 Timing) endobj 193 0 obj << /S /GoTo /D (subsection.3.5.1) >> endobj 196 0 obj (3.5.1 glfwGetTime) endobj 197 0 obj << /S /GoTo /D (subsection.3.5.2) >> endobj 200 0 obj (3.5.2 glfwSetTime) endobj 201 0 obj << /S /GoTo /D (subsection.3.5.3) >> endobj 204 0 obj (3.5.3 glfwSleep) endobj 205 0 obj << /S /GoTo /D (section.3.6) >> endobj 208 0 obj (3.6 Image and Texture Loading) endobj 209 0 obj << /S /GoTo /D (subsection.3.6.1) >> endobj 212 0 obj (3.6.1 glfwReadImage) endobj 213 0 obj << /S /GoTo /D (subsection.3.6.2) >> endobj 216 0 obj (3.6.2 glfwReadMemoryImage) endobj 217 0 obj << /S /GoTo /D (subsection.3.6.3) >> endobj 220 0 obj (3.6.3 glfwFreeImage) endobj 221 0 obj << /S /GoTo /D (subsection.3.6.4) >> endobj 224 0 obj (3.6.4 glfwLoadTexture2D) endobj 225 0 obj << /S /GoTo /D (subsection.3.6.5) >> endobj 228 0 obj (3.6.5 glfwLoadMemoryTexture2D) endobj 229 0 obj << /S /GoTo /D (subsection.3.6.6) >> endobj 232 0 obj (3.6.6 glfwLoadTextureImage2D) endobj 233 0 obj << /S /GoTo /D (section.3.7) >> endobj 236 0 obj (3.7 OpenGL Extension Support) endobj 237 0 obj << /S /GoTo /D (subsection.3.7.1) >> endobj 240 0 obj (3.7.1 glfwExtensionSupported) endobj 241 0 obj << /S /GoTo /D (subsection.3.7.2) >> endobj 244 0 obj (3.7.2 glfwGetProcAddress) endobj 245 0 obj << /S /GoTo /D (subsection.3.7.3) >> endobj 248 0 obj (3.7.3 glfwGetGLVersion) endobj 249 0 obj << /S /GoTo /D (section.3.8) >> endobj 252 0 obj (3.8 Threads) endobj 253 0 obj << /S /GoTo /D (subsection.3.8.1) >> endobj 256 0 obj (3.8.1 glfwCreateThread) endobj 257 0 obj << /S /GoTo /D (subsection.3.8.2) >> endobj 260 0 obj (3.8.2 glfwDestroyThread) endobj 261 0 obj << /S /GoTo /D (subsection.3.8.3) >> endobj 264 0 obj (3.8.3 glfwWaitThread) endobj 265 0 obj << /S /GoTo /D (subsection.3.8.4) >> endobj 268 0 obj (3.8.4 glfwGetThreadID) endobj 269 0 obj << /S /GoTo /D (section.3.9) >> endobj 272 0 obj (3.9 Mutexes) endobj 273 0 obj << /S /GoTo /D (subsection.3.9.1) >> endobj 276 0 obj (3.9.1 glfwCreateMutex) endobj 277 0 obj << /S /GoTo /D (subsection.3.9.2) >> endobj 280 0 obj (3.9.2 glfwDestroyMutex) endobj 281 0 obj << /S /GoTo /D (subsection.3.9.3) >> endobj 284 0 obj (3.9.3 glfwLockMutex) endobj 285 0 obj << /S /GoTo /D (subsection.3.9.4) >> endobj 288 0 obj (3.9.4 glfwUnlockMutex) endobj 289 0 obj << /S /GoTo /D (section.3.10) >> endobj 292 0 obj (3.10 Condition Variables) endobj 293 0 obj << /S /GoTo /D (subsection.3.10.1) >> endobj 296 0 obj (3.10.1 glfwCreateCond) endobj 297 0 obj << /S /GoTo /D (subsection.3.10.2) >> endobj 300 0 obj (3.10.2 glfwDestroyCond) endobj 301 0 obj << /S /GoTo /D (subsection.3.10.3) >> endobj 304 0 obj (3.10.3 glfwWaitCond) endobj 305 0 obj << /S /GoTo /D (subsection.3.10.4) >> endobj 308 0 obj (3.10.4 glfwSignalCond) endobj 309 0 obj << /S /GoTo /D (subsection.3.10.5) >> endobj 312 0 obj (3.10.5 glfwBroadcastCond) endobj 313 0 obj << /S /GoTo /D (section.3.11) >> endobj 316 0 obj (3.11 Miscellaneous) endobj 317 0 obj << /S /GoTo /D (subsection.3.11.1) >> endobj 320 0 obj (3.11.1 glfwEnable/glfwDisable) endobj 321 0 obj << /S /GoTo /D (subsection.3.11.2) >> endobj 324 0 obj (3.11.2 glfwGetNumberOfProcessors) endobj 325 0 obj << /S /GoTo /D (appendix.A) >> endobj 328 0 obj (A GLFW Compatibility) endobj 329 0 obj << /S /GoTo /D (section.A.1) >> endobj 332 0 obj (A.1 ICCCM and EWMH Conformance) endobj 333 0 obj << /S /GoTo /D (section.A.2) >> endobj 336 0 obj (A.2 GLX Extensions) endobj 337 0 obj << /S /GoTo /D (section.A.3) >> endobj 340 0 obj (A.3 WGL Extensions) endobj 341 0 obj << /S /GoTo /D (section.A.4) >> endobj 344 0 obj (A.4 OpenGL 3.0+ on Mac OS X) endobj 345 0 obj << /S /GoTo /D [346 0 R /FitH ] >> endobj 348 0 obj << /Length 343 /Filter /FlateDecode >> stream xڕRKK@W13f9b#ڴ҈ѿfZD$oW` ӄ~yt"@,C%Z@A#%TKӫC6.*yN0XT> endobj 349 0 obj << /D [346 0 R /FitH 778.724] >> endobj 350 0 obj << /D [346 0 R /FitH 740.862] >> endobj 347 0 obj << /Font << /F27 351 0 R /F30 352 0 R /F26 353 0 R >> /ProcSet [ /PDF /Text ] >> endobj 357 0 obj << /Length 654 /Filter /FlateDecode >> stream xڥUn0+t::mpREDD%R ŴR&)/&9q7ofqg˵#Wwvc  Ğm(tOf]H7;56s_1fF"o}M)'g7>a ؃H4|ve J endstream endobj 356 0 obj << /Type /Page /Contents 357 0 R /Resources 355 0 R /MediaBox [0 0 595.276 841.89] /Parent 354 0 R >> endobj 358 0 obj << /D [356 0 R /FitH 778.724] >> endobj 359 0 obj << /D [356 0 R /FitH 598.545] >> endobj 355 0 obj << /Font << /F27 351 0 R /F33 360 0 R /F30 352 0 R >> /ProcSet [ /PDF /Text ] >> endobj 394 0 obj << /Length 911 /Filter /FlateDecode >> stream xMS0VwemSeD꬟~ÛbJZz ӒOtoq  oap FC/ܸ6(QZ08x%ln0lF ܲ%h`FYbAaYQr5*᪋v}PQފgW(0-e]L@>rm#N Pͼ1n>9dfİ!v(9կw+Fveh[@\MDzz /rVG(Q8R AMY/c08]!*!w.:e$ҟđ?Sli43\Y=Gs.Rͤ&Uab-~^FAa0U?_K~]lepgQH0n4G!^~E 72[j$%: ҭ%۔0Nes6F 4DCՠ/d\aw=f>dd.g@ҬEAB2AzU |f2ft&Xs'o$XE=(1(Xp4BI  4MKu·|(d$O{mG⋧_<,r h"x spwͩ4d#Cm ]9D PP/-e\֒s dؠueܪ+,U^|l:p]/sZ>Ԋ꟡@İ r8*)AG? endstream endobj 393 0 obj << /Type /Page /Contents 394 0 R /Resources 392 0 R /MediaBox [0 0 595.276 841.89] /Parent 354 0 R /Annots [ 361 0 R 362 0 R 363 0 R 364 0 R 365 0 R 366 0 R 367 0 R 368 0 R 369 0 R 370 0 R 371 0 R 372 0 R 373 0 R 374 0 R 375 0 R 376 0 R 377 0 R 378 0 R 379 0 R 380 0 R 381 0 R 382 0 R 383 0 R 384 0 R 385 0 R 386 0 R 387 0 R 388 0 R 389 0 R 390 0 R ] >> endobj 361 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 577.991 147.429 587.631] /A << /S /GoTo /D (chapter.1) >> >> endobj 362 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 551.449 219.516 563.173] /A << /S /GoTo /D (chapter.2) >> >> endobj 363 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 540.006 203.502 549.504] /A << /S /GoTo /D (section.2.1) >> >> endobj 364 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 524.204 217.684 535.954] /A << /S /GoTo /D (section.2.2) >> >> endobj 365 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 512.907 197.861 522.405] /A << /S /GoTo /D (section.2.3) >> >> endobj 366 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 499.358 148.455 508.856] /A << /S /GoTo /D (section.2.4) >> >> endobj 367 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 474.878 179.218 484.518] /A << /S /GoTo /D (chapter.3) >> >> endobj 368 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 461.351 277.082 470.848] /A << /S /GoTo /D (section.3.1) >> >> endobj 369 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 445.549 183.375 457.299] /A << /S /GoTo /D (subsection.3.1.1) >> >> endobj 370 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 432 212.294 443.75] /A << /S /GoTo /D (subsection.3.1.2) >> >> endobj 371 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 418.45 217.301 430.201] /A << /S /GoTo /D (subsection.3.1.3) >> >> endobj 372 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 404.901 193.509 416.652] /A << /S /GoTo /D (section.3.2) >> >> endobj 373 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 391.352 228.713 403.102] /A << /S /GoTo /D (subsection.3.2.1) >> >> endobj 374 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 377.803 248.109 389.553] /A << /S /GoTo /D (subsection.3.2.2) >> >> endobj 375 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 364.254 229.934 376.004] /A << /S /GoTo /D (subsection.3.2.3) >> >> endobj 376 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 350.704 282.657 362.455] /A << /S /GoTo /D (subsection.3.2.4) >> >> endobj 377 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 337.155 239.25 348.906] /A << /S /GoTo /D (subsection.3.2.5) >> >> endobj 378 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 323.606 237.81 335.357] /A << /S /GoTo /D (subsection.3.2.6) >> >> endobj 379 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 310.057 234.789 321.807] /A << /S /GoTo /D (subsection.3.2.7) >> >> endobj 380 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 296.508 239.621 308.258] /A << /S /GoTo /D (subsection.3.2.8) >> >> endobj 381 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 282.958 276.592 294.709] /A << /S /GoTo /D (subsection.3.2.9) >> >> endobj 382 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 269.409 236.589 281.16] /A << /S /GoTo /D (subsection.3.2.10) >> >> endobj 383 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 255.86 238.411 267.611] /A << /S /GoTo /D (subsection.3.2.11) >> >> endobj 384 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 242.311 248.545 254.061] /A << /S /GoTo /D (subsection.3.2.12) >> >> endobj 385 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 228.762 224.796 240.512] /A << /S /GoTo /D (subsection.3.2.13) >> >> endobj 386 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 215.212 226.007 226.963] /A << /S /GoTo /D (subsection.3.2.14) >> >> endobj 387 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 201.663 291.733 213.414] /A << /S /GoTo /D (subsection.3.2.15) >> >> endobj 388 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 190.367 171.745 199.865] /A << /S /GoTo /D (section.3.3) >> >> endobj 389 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 174.565 239.676 186.315] /A << /S /GoTo /D (subsection.3.3.1) >> >> endobj 390 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 161.016 245.785 172.766] /A << /S /GoTo /D (subsection.3.3.2) >> >> endobj 395 0 obj << /D [393 0 R /FitH 778.724] >> endobj 396 0 obj << /D [393 0 R /FitH 603.28] >> endobj 392 0 obj << /Font << /F27 351 0 R /F33 360 0 R >> /ProcSet [ /PDF /Text ] >> endobj 442 0 obj << /Length 1038 /Filter /FlateDecode >> stream xMSP juѴ..Pʈ!_\՛."C 399 p 3`ɊKӋx1:;Gpa#Y\8t]oI2_IGɽs|^͹]Pl8)K.o?bb(_JisQ*Q'Dy7vL=ym:P s/:qnlO ӞpΦji\qapC(Dfl C¬B'1¼%5:hIVj Yg[-8 nr l+ 00`ۚCu:/g]=B#,J.~]NHdJ4)AlfK,ԃ}hNA*>z>˖q6 f)6S⧯akJ=]*Y;3F{0WY3׳1b] 0=71?״׃4 |=7,'A7Cx4f!(j>l endstream endobj 441 0 obj << /Type /Page /Contents 442 0 R /Resources 440 0 R /MediaBox [0 0 595.276 841.89] /Parent 354 0 R /Annots [ 391 0 R 397 0 R 398 0 R 399 0 R 400 0 R 401 0 R 402 0 R 403 0 R 404 0 R 405 0 R 406 0 R 407 0 R 408 0 R 409 0 R 410 0 R 411 0 R 412 0 R 413 0 R 414 0 R 415 0 R 416 0 R 417 0 R 418 0 R 419 0 R 420 0 R 421 0 R 422 0 R 423 0 R 424 0 R 425 0 R 426 0 R 427 0 R 428 0 R 429 0 R 430 0 R 431 0 R 432 0 R 433 0 R 434 0 R 435 0 R 436 0 R 437 0 R 438 0 R ] >> endobj 391 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 726.545 179.676 738.296] /A << /S /GoTo /D (section.3.4) >> >> endobj 397 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 712.996 215.338 724.746] /A << /S /GoTo /D (subsection.3.4.1) >> >> endobj 398 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 699.447 218.087 711.197] /A << /S /GoTo /D (subsection.3.4.2) >> >> endobj 399 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 685.897 201.713 697.648] /A << /S /GoTo /D (subsection.3.4.3) >> >> endobj 400 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 672.348 243.374 684.099] /A << /S /GoTo /D (subsection.3.4.4) >> >> endobj 401 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 658.799 229.432 670.55] /A << /S /GoTo /D (subsection.3.4.5) >> >> endobj 402 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 645.25 227.621 657] /A << /S /GoTo /D (subsection.3.4.6) >> >> endobj 403 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 631.701 242.141 643.451] /A << /S /GoTo /D (subsection.3.4.7) >> >> endobj 404 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 618.152 240.33 629.902] /A << /S /GoTo /D (subsection.3.4.8) >> >> endobj 405 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 604.602 238.683 616.353] /A << /S /GoTo /D (subsection.3.4.9) >> >> endobj 406 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 591.053 242.152 602.804] /A << /S /GoTo /D (subsection.3.4.10) >> >> endobj 407 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 577.504 280.344 589.254] /A << /S /GoTo /D (subsection.3.4.11) >> >> endobj 408 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 563.955 266.403 575.705] /A << /S /GoTo /D (subsection.3.4.12) >> >> endobj 409 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 550.406 279.112 562.156] /A << /S /GoTo /D (subsection.3.4.13) >> >> endobj 410 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 536.856 247.334 548.607] /A << /S /GoTo /D (subsection.3.4.14) >> >> endobj 411 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 523.307 235.388 535.058] /A << /S /GoTo /D (subsection.3.4.15) >> >> endobj 412 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 509.758 253.574 521.508] /A << /S /GoTo /D (subsection.3.4.16) >> >> endobj 413 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 496.209 145.062 507.959] /A << /S /GoTo /D (section.3.5) >> >> endobj 414 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 482.66 206.622 494.41] /A << /S /GoTo /D (subsection.3.5.1) >> >> endobj 415 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 469.11 204.811 480.861] /A << /S /GoTo /D (subsection.3.5.2) >> >> endobj 416 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 455.561 192.462 467.312] /A << /S /GoTo /D (subsection.3.5.3) >> >> endobj 417 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 442.012 233.872 453.762] /A << /S /GoTo /D (section.3.6) >> >> endobj 418 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 428.463 217.902 440.213] /A << /S /GoTo /D (subsection.3.6.1) >> >> endobj 419 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 414.914 255.472 426.664] /A << /S /GoTo /D (subsection.3.6.2) >> >> endobj 420 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 401.364 214.869 413.115] /A << /S /GoTo /D (subsection.3.6.3) >> >> endobj 421 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 387.815 236.971 399.566] /A << /S /GoTo /D (subsection.3.6.4) >> >> endobj 422 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 374.266 274.541 386.016] /A << /S /GoTo /D (subsection.3.6.5) >> >> endobj 423 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 360.717 264.232 372.467] /A << /S /GoTo /D (subsection.3.6.6) >> >> endobj 424 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 347.168 235.127 358.918] /A << /S /GoTo /D (section.3.7) >> >> endobj 425 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 333.618 256.705 345.369] /A << /S /GoTo /D (subsection.3.7.1) >> >> endobj 426 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 320.069 239.719 331.82] /A << /S /GoTo /D (subsection.3.7.2) >> >> endobj 427 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 306.52 230.752 318.27] /A << /S /GoTo /D (subsection.3.7.3) >> >> endobj 428 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 295.224 148.455 304.721] /A << /S /GoTo /D (section.3.8) >> >> endobj 429 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 279.422 227.589 291.172] /A << /S /GoTo /D (subsection.3.8.1) >> >> endobj 430 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 265.872 233.545 277.623] /A << /S /GoTo /D (subsection.3.8.2) >> >> endobj 431 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 252.323 219.451 264.074] /A << /S /GoTo /D (subsection.3.8.3) >> >> endobj 432 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 238.774 226.378 250.525] /A << /S /GoTo /D (subsection.3.8.4) >> >> endobj 433 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 227.347 150.56 236.975] /A << /S /GoTo /D (section.3.9) >> >> endobj 434 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 211.676 225.014 223.426] /A << /S /GoTo /D (subsection.3.9.1) >> >> endobj 435 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 198.126 230.971 209.877] /A << /S /GoTo /D (subsection.3.9.2) >> >> endobj 436 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 184.577 218.96 196.328] /A << /S /GoTo /D (subsection.3.9.3) >> >> endobj 437 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 171.028 228.658 182.779] /A << /S /GoTo /D (subsection.3.9.4) >> >> endobj 438 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 159.732 200.283 169.229] /A << /S /GoTo /D (section.3.10) >> >> endobj 443 0 obj << /D [441 0 R /FitH 778.724] >> endobj 440 0 obj << /Font << /F33 360 0 R >> /ProcSet [ /PDF /Text ] >> endobj 458 0 obj << /Length 550 /Filter /FlateDecode >> stream xo0Wh/<,aeZRڃC@t[9!YF4}@g|w`=ww#.B8s  p+a:UeJK#7!2L _iC vlhYGKL gzQEç6،˅ݕy`!0Q¾_ܪ޷*qma>k&K"yk`S\+c c m*d.$C2Qc^w)qZE]D&VeyjqݱCDx]F!նW\e, UY#A:ծq]Mʵahx43t~KQOL 6-Ox6b6?t9$ I_ gOWJiIirEf9-nGw> endobj 439 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 726.545 220.334 738.296] /A << /S /GoTo /D (subsection.3.10.1) >> >> endobj 444 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 712.996 226.291 724.746] /A << /S /GoTo /D (subsection.3.10.2) >> >> endobj 445 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 699.447 212.196 711.197] /A << /S /GoTo /D (subsection.3.10.3) >> >> endobj 446 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 685.897 219.745 697.648] /A << /S /GoTo /D (subsection.3.10.4) >> >> endobj 447 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 672.348 235.487 684.099] /A << /S /GoTo /D (subsection.3.10.5) >> >> endobj 448 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 661.052 176.338 670.55] /A << /S /GoTo /D (section.3.11) >> >> endobj 449 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 645.25 254.872 657] /A << /S /GoTo /D (subsection.3.11.1) >> >> endobj 450 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [111.324 631.701 277.89 643.451] /A << /S /GoTo /D (subsection.3.11.2) >> >> endobj 451 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [69.87 607.39 189.145 619.113] /A << /S /GoTo /D (appendix.A) >> >> endobj 452 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 595.946 266.326 605.444] /A << /S /GoTo /D (section.A.1) >> >> endobj 453 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 582.397 186.342 591.895] /A << /S /GoTo /D (section.A.2) >> >> endobj 454 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 568.848 188.763 578.345] /A << /S /GoTo /D (section.A.3) >> >> endobj 455 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 553.046 237.025 564.796] /A << /S /GoTo /D (section.A.4) >> >> endobj 459 0 obj << /D [457 0 R /FitH 778.724] >> endobj 456 0 obj << /Font << /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 470 0 obj << /Length 615 /Filter /FlateDecode >> stream xݗo0>::eB6mh=t;`!A`ώMЌMZ`8`0~.#) 0ʤ3ݓrc Eh0&10#~t痱[1@0XK  1 $%5aMXoѬBf;GPwFQ-vVIem&㡟m5[AI*0~MI$7|HHaH=&ugf}a)Bq} M$AI(Q* O1"+3+*3 1 sS;9 c꽻põ>Tȷf1{P 6+hNK#sOҋ([NFT#q&>`쵙#图=i꧔iwIC2Bvl-:WM>/"2/b|s6gtnYW?]jXu{{n2󗪡G}Wką<y>\%u&*}fs/1._KWs+Iǡ)S! ^MGۂ endstream endobj 469 0 obj << /Type /Page /Contents 470 0 R /Resources 468 0 R /MediaBox [0 0 595.276 841.89] /Parent 354 0 R /Annots [ 460 0 R 461 0 R 462 0 R 463 0 R 464 0 R 465 0 R 466 0 R 467 0 R ] >> endobj 460 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 586.67 268.912 598.54] /A << /S /GoTo /D (table.3.1) >> >> endobj 461 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 573.12 326.391 584.991] /A << /S /GoTo /D (table.3.2) >> >> endobj 462 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 559.571 210.003 571.322] /A << /S /GoTo /D (table.3.3) >> >> endobj 463 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 548.275 244.312 557.773] /A << /S /GoTo /D (table.3.4) >> >> endobj 464 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 532.473 324.1 544.343] /A << /S /GoTo /D (table.3.5) >> >> endobj 465 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 518.924 338.281 530.674] /A << /S /GoTo /D (table.3.6) >> >> endobj 466 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 505.374 248.468 517.245] /A << /S /GoTo /D (table.3.7) >> >> endobj 467 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [86.233 491.972 272.937 503.696] /A << /S /GoTo /D (table.3.8) >> >> endobj 471 0 obj << /D [469 0 R /FitH 778.724] >> endobj 472 0 obj << /D [469 0 R /FitH 603.28] >> endobj 468 0 obj << /Font << /F27 351 0 R /F33 360 0 R >> /ProcSet [ /PDF /Text ] >> endobj 486 0 obj << /Length 1558 /Filter /FlateDecode >> stream xڵXMs6W(̈́A7ۭ=II$9$!H wA2euu%Rbݷ 8rr8vPZAQXa!re}_]_~^خ?5+$,a j.-߃)7cy+gߩ7~.?gyn(\ؘ?(mvg ,9_ .?]ttX,g?fBd]@šo%ٗoރGc||OZZs Jnhp=/BQҢt (lq,EwYU.p4WuRI0&0W3ˊާꯎEZp,MIw`zRqnW[Zo[RW Vl.^TLKWqm!C1`@W!,[r`u T?CC80ROy,<4(.r=v桯'S & k{BcAM[n<&>r!w^~g3ڰ POߨKF~i-t &o]&-5I^#_Gf|WФ2+Be:Iv,b'iGKmd?j^F0\]s:Y&4;F!J>l/\8$\m]W%7%i)َI{}\*Ojy4ɀqq64U~/)j@qAA"X$=K#]Hڥ|ncڂ&9HW5rjB d?GBi0W\qrrKv?UlP*Qs moX3wu}wy~gg3lףh7b۳ 4${  W endstream endobj 485 0 obj << /Type /Page /Contents 486 0 R /Resources 484 0 R /MediaBox [0 0 595.276 841.89] /Parent 490 0 R /Annots [ 483 0 R 481 0 R 482 0 R ] >> endobj 483 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 481 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [506.933 230.206 513.409 243.923] /A << /S /GoTo /D (Hfootnote.1) >> >> endobj 482 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [212.461 196.333 218.937 210.05] /A << /S /GoTo /D (Hfootnote.2) >> >> endobj 2 0 obj << /D [485 0 R /FitH 740.862] >> endobj 488 0 obj << /D [485 0 R /FitH 173.652] >> endobj 489 0 obj << /D [485 0 R /FitH 162.502] >> endobj 484 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F26 353 0 R >> /ProcSet [ /PDF /Text ] >> endobj 495 0 obj << /Length 1385 /Filter /FlateDecode >> stream xXKs6W(Xߤzs;Ǚd1 0hW]KApvݥ]ͻu<ܝN4$N}|]}xBɚ[1kq*o0NƋ֤~Gfq?wuoޕbEnӀ/w+Pv~c< .Z}:9{]* 1# e_A 7Ԕ'' "d,8{4Uey m-]!cOtP +\诱0[PYhIHingՏ3`CN*0L)v[TXַGn3_,< IQH$kam-J+;$A>.z<;"?*m(C @뙷 XcB[a9HAF#>\&Wbf'bhMoBL!d:t5ɤY˴e%~iꌱZj3/g˓s4ݙٿ>9'q 'IpMgY\RNfgs[_ꆟ\UF=ۈ2-4m{3ψ=prL$\8]zm[\۰K$ՌLIL4p~SffCFE`25|ע.W "023t|c>U^f 9!$o/dد{͹c\|ȺaS[R=&i[eѿ endstream endobj 494 0 obj << /Type /Page /Contents 495 0 R /Resources 493 0 R /MediaBox [0 0 595.276 841.89] /Parent 490 0 R /Annots [ 492 0 R ] >> endobj 492 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 496 0 obj << /D [494 0 R /FitH 778.724] >> endobj 6 0 obj << /D [494 0 R /FitH 739.268] >> endobj 10 0 obj << /D [494 0 R /FitH 545.345] >> endobj 14 0 obj << /D [494 0 R /FitH 278.047] >> endobj 493 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R >> /ProcSet [ /PDF /Text ] >> endobj 500 0 obj << /Length 2110 /Filter /FlateDecode >> stream xڵZ[8~Ѯj+BB-$]&< T0xյ}tΧ\${+{wɛ{>F1}o8FQz<ȼ?6_R3ʧLϤ%oE 0By~gSQ7yUܧaĦde;(0>~ytqƭ.!bμt3/e7@qȍ0X -;8ȓw3!"DX$O=>b^- 8>r::b$caTK'\19 $qp G2hV~grD"e掸Kk\|{Sl|;Ѕ`鿍F~O.a@PJ,>S&Mb+v616/>/jFOٕ>" oHjE|@Xgt"28 Cr]ߨ+.倃Zc2 `bqH]n¤TCmsLy|5d*ˑ.i;;i݁Ȕ&ZYj(׫:ٮZц1_𭢽B9hO(t-%]K Y^c* }5,3}V_,wb@I?,61XwXTKKjHRBUb q'haM1kK*VnvXe+$mcv[iUiuN zV9ˬ/"닽Z4#GbUX*(ǾadD"pcс>CfYͶH5xnҴ+5u&k̈};>j})b^+N:GI=/`EURBم:Bo^"kj慦MʶxlDL=  x0Rzb+h̀Ll*{M$hz-JZ ad$3ҝ\cHJ c [2 EAtzIQ<%`|ܕ^B9ODY:dQU#sZE*tr}eI+, Djڈ.!uI=^!mm"^ۅ~rKVEf2o!&%iiyGBsi@p;RQWFkWc \;zY[z5ֹEXt]J_Rl)&(l+*2?dC1t1dLy91XOv˥L#dO,pS*|J;-RW63* (Fb@fMiꢀb;%>t 6jݎ>]7 :.t#뜨fTi1Iaٵ]ar}s[\1g>G]ަՙ5*ko'EUZ 'ˏKGmMl| 2l\LID}[4],(jƶi&Y lM2N˒-˗=ȪGю'fXK$> -F%OL0@\h 1Z,$`Q2lm`VHW8F~䪁hS4iDZN,%g u ɥ蠓@nrwaHUm|W|̛< ͣmTT*kohThCpBe1fi i*juZdv< v<#(E 72stŽbHد{pY{/3ؚ}1 pB endstream endobj 499 0 obj << /Type /Page /Contents 500 0 R /Resources 498 0 R /MediaBox [0 0 595.276 841.89] /Parent 490 0 R /Annots [ 497 0 R ] >> endobj 497 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 501 0 obj << /D [499 0 R /FitH 778.724] >> endobj 502 0 obj << /D [499 0 R /FitH 739.268] >> endobj 504 0 obj << /D [499 0 R /FitH 732.374] >> endobj 506 0 obj << /D [499 0 R /FitH 718.825] >> endobj 507 0 obj << /D [499 0 R /FitH 705.275] >> endobj 508 0 obj << /D [499 0 R /FitH 691.726] >> endobj 509 0 obj << /D [499 0 R /FitH 678.177] >> endobj 18 0 obj << /D [499 0 R /FitH 492.775] >> endobj 22 0 obj << /D [499 0 R /FitH 250.054] >> endobj 498 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F4 503 0 R /F59 505 0 R /F26 353 0 R /F41 487 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 514 0 obj << /Length 538 /Filter /FlateDecode >> stream xڍSM0+| R9U7ʪU-U=T>ZۄF03o `w $(+PBc377-ds mBltkIÇ G1/(o{OHFZpn)3uvn d~ 0_-@Ǒs>dB .8N& gSΝ "ke.k.19q. [}ٍ֏j'čv EglV!ܕAo]4U=M=1/mBXXp' Z} Xd[K^a ^PW4ѭۭZ7TK~`玁*Wvԍ/ٵ:d‡QQu}M3G0]cSULp[,Z\dwU$I$L pdp^K8GT,  'Q$+ siGSǑL|3?Lpsj2sHl_ub?u1 endstream endobj 513 0 obj << /Type /Page /Contents 514 0 R /Resources 512 0 R /MediaBox [0 0 595.276 841.89] /Parent 490 0 R /Annots [ 511 0 R 510 0 R ] >> endobj 511 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 510 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [248.395 679.782 254.871 691.246] /A << /S /GoTo /D (Hfootnote.3) >> >> endobj 515 0 obj << /D [513 0 R /FitH 778.724] >> endobj 516 0 obj << /D [513 0 R /FitH 160.961] >> endobj 512 0 obj << /Font << /F30 352 0 R /F33 360 0 R >> /ProcSet [ /PDF /Text ] >> endobj 520 0 obj << /Length 952 /Filter /FlateDecode >> stream xڵVKo8Wh57cmEuC,TRVv#%I4=2%73< ".6 J!M4RH3n&A?+&rmS[\/m՟QFypy P| E Bqԣ$T.mUge1`X+U(oa˗`&'9l.(qlD~nBGBr,Ego>,zF +&',)pH]t;| X'TX pq30PKÁZ/MB1'IsL4B$FJ\acl{Y̙*tb%yTl۱뛢shPQ)("n(\t׽bI9r %,J'v?Fbʎk`hQ/S )#-7F*M,D\kpbdCT]n=h&3|%^ќg@zdJ9!5$4qA XV> O3SޔH3!s7/DXAHo+&RGs[OݽӯN9[xfH\1)uҰh9ja(wIWc"Avֶin(} ᝝o)nqlmR{?u 7Pu66Ӊ-"@ٻ) ):{) oڸ0xM7p|n{R ;=5;h̉hճx9n)_ endstream endobj 519 0 obj << /Type /Page /Contents 520 0 R /Resources 518 0 R /MediaBox [0 0 595.276 841.89] /Parent 490 0 R /Annots [ 517 0 R ] >> endobj 517 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 521 0 obj << /D [519 0 R /FitH 778.724] >> endobj 26 0 obj << /D [519 0 R /FitH 739.268] >> endobj 30 0 obj << /D [519 0 R /FitH 550.079] >> endobj 34 0 obj << /D [519 0 R /FitH 448.64] >> endobj 522 0 obj << /D [519 0 R /FitH 394.4] >> endobj 523 0 obj << /D [519 0 R /FitH 395.498] >> endobj 518 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R >> /ProcSet [ /PDF /Text ] >> endobj 528 0 obj << /Length 1406 /Filter /FlateDecode >> stream xXߓ6~_[M'M3msx$yl`t|]! w>{&v{+{7;=Qc͗^Q$Q{iz뻿xz-Y8E*oIMr=@.) K _̊;,LfП&">ϒw0ͯ;חgy>wB/D8^|<{,]3s!hsac,1lY]ղ{ yuV"[6ɽS'_}J;΀h;baaje沶l6龪zev,LU۝knz!7 *rGb,Nj{h9cD+fheշߛ&y+~RIPW|17Y#Յzm#Y[2*pcpJ,>풷g7eRO z pGLJ\~petnõ^۲z2Uy6d2g=Vuq-+-}MH07Ƨx-,evm)+p3zsب҂fRNpm2d76^%diWZfkf Sڣ;[4pMP9\!Іw"B*> mluBl6]uͶ?ZzИ@QD<@ƬA'̃nq޲ӉG9'{>Q,<8odCg&GdLAF$g!\miީlas(<Vs>c͒>| FY4`"v!jst!i@j)8܅q v2 x Y} 8d#_48t<1H&fڵӢ};VOJ9Wig1F9Q @H(vYPa@[Yءi l.4JE+Lu)Eeҡ8NȽo\*ie@QuCuͥ m}K0 .st%Sv 8{3uNYV74g$:PppZ}s&9c747\};i:Y2 =bftfs3IQ1K PV͐*?н_hێst_ v_  ׋Iu]g| ! +U֪# |}[SR~S'x2.f^z|'16!FiK> endobj 525 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 529 0 obj << /D [527 0 R /FitH 778.724] >> endobj 38 0 obj << /D [527 0 R /FitH 604.163] >> endobj 530 0 obj << /D [527 0 R /FitH 550.312] >> endobj 531 0 obj << /D [527 0 R /FitH 551.411] >> endobj 42 0 obj << /D [527 0 R /FitH 361.384] >> endobj 532 0 obj << /D [527 0 R /FitH 307.533] >> endobj 533 0 obj << /D [527 0 R /FitH 308.632] >> endobj 526 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 538 0 obj << /Length 372 /Filter /FlateDecode >> stream xڍ=o0w fklal&jJi!@R`B> |>:א xݘЅQCF)\QN\fR;L iSjYFS#ŎܐbgN~l;ˑUQ6ApF.f[] !;L~'Hm=Ej 1 ,mjXg{|o\Gkh)ev|5$(.Y]Cql뛣r֨VSU65ej૚reⳎANKr ^jI \}dz;7sؗ"_X#l)r4b*GY%:,nv99,|DG}[ endstream endobj 537 0 obj << /Type /Page /Contents 538 0 R /Resources 536 0 R /MediaBox [0 0 595.276 841.89] /Parent 540 0 R /Annots [ 535 0 R ] >> endobj 535 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 539 0 obj << /D [537 0 R /FitH 778.724] >> endobj 536 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 544 0 obj << /Length 1904 /Filter /FlateDecode >> stream xZKs6W(X$9i즓&ICK)E$']IP-ЃG6M|]|؇wa {Ļ^z>F/DY]/O˷7xr*2ҹ(~ Xq` o_DLT^YZ?ȟ| vBa$=p?.Z= 1›>} 07 Mg4pk% xr3%$Nٔ}ʯQHnP؛1$5ʨu7lMVd=?̮ʹ) $?xỊ8-UBF4^m`;_jY,|qDBU[kRiF3 [1,C@0 +ki湊ʆ.`I KX0p, O5:JOkh fڬn6Y^eA!* Z7W|eDtE |25JB٦R?A,IRET#TXӕEH~TD W>gG20 ݓ(6[|Oq?:mUEDA@<r}]T? A+oɇw_>_3 ^BI+hQ` cRz(X o<; |ʝ]hS04lj(x;tv#'@I fD.g0KBqU1SA4Ԅ!ΫT"P4GXz O0GpE!Njru> H8 lU9&(bB6.#bN-Swouѐx'P1Vœq!FEfRڔ-pS n?m#t['vqxV'(jC:1֙./%p}c~"sj%I9mRp?ozzU8 /fHQ()>TT7&(lK*-py-gvF_+5\Vi8*BF N7WlFSqiNtG|DZ»0 ^젋uJCDe6K';BO۬dH`$LjG`FQJqՅ*F9C (*v\0O|0z9H/F4}48 CxkO (H ?~ۡߖ#A<łCqKydJşΫS KvݤfzM.@k*$ulyv8-(QzOڞR5hzXKNN_ɀ#wSayxGՍjHa{UVmcaKVjj/c֐bJNɲ4۷KM&k?d Zb# )IG*Jjݙ7Q3a"st`{ s endstream endobj 543 0 obj << /Type /Page /Contents 544 0 R /Resources 542 0 R /MediaBox [0 0 595.276 841.89] /Parent 540 0 R /Annots [ 541 0 R ] >> endobj 541 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 545 0 obj << /D [543 0 R /FitH 778.724] >> endobj 46 0 obj << /D [543 0 R /FitH 739.268] >> endobj 50 0 obj << /D [543 0 R /FitH 653.532] >> endobj 546 0 obj << /D [543 0 R /FitH 597.04] >> endobj 547 0 obj << /D [543 0 R /FitH 598.138] >> endobj 548 0 obj << /D [543 0 R /FitH 584.589] >> endobj 549 0 obj << /D [543 0 R /FitH 571.04] >> endobj 542 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R /F38 550 0 R /F15 551 0 R /F36 552 0 R >> /ProcSet [ /PDF /Text ] >> endobj 559 0 obj << /Length 2052 /Filter /FlateDecode >> stream xڵXYs6~[Aǣ$;NΤ3M'C E<⦿NH ~.~?e='w"00F$HsqyrE^ AeЫbo *h&%͕^iQzh0f7[53B#~5X>z<![/>< P1/۟rH{P3ebT[xwgTHQMnyw/Ң+8AY|ыڝq}ӕYG鲌y_/?.)^}DkiCs$U>QF+ˈ.ίᄂePJD+}ΛaYS۪/͇T=2-Siּ1Ovy}Ht[~ )FҨkBUQu07]ъr `j9Vhќ7{I!Y?x/&]DX ; 3KAw͵4n@uW & VQ؏=B^Oe0 ]D``՟̵+J)bQñף r,g4\ly봐ѢLh5s6]QNW9_viּ.63zPEYjߦ2FrA" 8M O1_V>5+p ![<2{<79SEюW{+vAKҞȹIƤ͞Z"ky~"9g ch~ gGK Ѫ6s!)nPVm]Skj`ܒnù@(8-b ҏJ$DWQ:P 5‚c@W]cnlDvt24!KJ-ESX p6mZU@i zau z`XcD#4کM SS r4Xz.F;P֙{#1?'h 0DTcv.Hwnб9)0B$?v7s(%ݞk( i$}xuŇw7}K|Ui^r"E9~!}OGmEO@Ft4)~DC͊PO#vʥ(3|:ΥRdf.:p7L8gLvl+USm 弓w²g Jk̶P3wom!cL.n^\e.0;Z<-6 I#ɡ{QŶ&Ԡv# D)_U4DLLc`E'G쇄e)dBs|[JX@S%LĒIDPD⣃;:T8+prhQAAH$m'gB Mٚ~+1YфX>z O33L+9|ց QlZ rq33[1Wރi۪;mQZ}r>wv'^Y'ƾL>my\=pڵ;uU52DZ/*bX;TlѼ endstream endobj 558 0 obj << /Type /Page /Contents 559 0 R /Resources 557 0 R /MediaBox [0 0 595.276 841.89] /Parent 540 0 R /Annots [ 556 0 R 553 0 R 554 0 R 555 0 R ] >> endobj 556 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 553 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [189.552 347.322 199.421 359.072] /A << /S /GoTo /D (appendix.A) >> >> endobj 554 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [258.966 192.112 274.595 203.863] /A << /S /GoTo /D (table.3.1) >> >> endobj 555 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [382.631 158.239 398.259 169.99] /A << /S /GoTo /D (table.3.1) >> >> endobj 560 0 obj << /D [558 0 R /FitH 778.724] >> endobj 54 0 obj << /D [558 0 R /FitH 323.733] >> endobj 561 0 obj << /D [558 0 R /FitH 270.826] >> endobj 562 0 obj << /D [558 0 R /FitH 271.925] >> endobj 557 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 566 0 obj << /Length 2227 /Filter /FlateDecode >> stream x՚_s8)x4UWmޘTrlfg+e@$2&kfg>$[c¡{ʲ[ϭV˨Cӳ_)aG(½"_A/ Ohԛ.z{Wțȥ4d6:ζqcDѺ(4i)K>7:3Lޭ/~*ec||9^\쀙vFӳ?0aho#~|uޫn1N}Δi_Vܾ뎎 b~@DQ]a%Z+CR~$l<,GpxQݨ%! IS'iR0tgz3ϓB/'>v_i5L'UdFQ>NFɰ1\bA[:p"PW̋d^J{:Kunnr湼 yX%k\!Ym7rF J2J4=^l(l@Rc/_&+g{}SU\1w}lPvҘfG;&p=3}x lzp9@څ!%]DiٮfR+Bo4YRlLI ų4PՅse2m vM.ճ> e puqx2ixA#7"i8mb2@щ-ź1,:QjY+`\h(`T52UTD^ñW5l0oe(8rQ'rE WC0aK.V6ZH IZHK UuP3KTZW''#-0fi,m^+ëC,0ŲX E:-5Wj?*&N_cS|e+x[ Es_D}_;".$AI.LmЅRKa]u@j\N$οh3[tE'„n\ |ۉh2ĉv HSy?dn'-+uw/r, q/Y+?s6\f 'Sz.Ly&˺KezQq ~:Q5Y1;|?5lDN3P͜Bs,j|>\|)oư彻ڑqbKEOƼV+Z-TYTksS-fe\n $(C@h? Ul]ꅩ6ѥ*蔏J-g k/D4CawjԱ;[7c)v[Wj#Bxʍ)T0Q"zE}l] p@!*UQ5Y֭3`- ϣ-Nˑ3 9$`|;+SXLL](֕^V؅!0$XUQT :jWI=EfWP@)ggwbZ1x i'P1@p1Azƈ!d#^ /v!}Tv84ōa7Q #˛.R!0i'J+JL#7 ixCn>~*[q$<',8> d[Ypi@S9 CÒ7|z8G+8;(wai{bc'-u66Eź 1`B>) 묐 rm3:`+DD3_ K\$è_B0#4-7qMxs/rgsMӤ^FzMiaP6'4kϙ>}sVn CB=?OqG3alps8զɸ?>8'Yј5?]-?}JW'A$+d endstream endobj 565 0 obj << /Type /Page /Contents 566 0 R /Resources 564 0 R /MediaBox [0 0 595.276 841.89] /Parent 540 0 R /Annots [ 563 0 R ] >> endobj 563 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 567 0 obj << /D [565 0 R /FitH 778.724] >> endobj 473 0 obj << /D [565 0 R /FitH 209.303] >> endobj 564 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R >> /ProcSet [ /PDF /Text ] >> endobj 572 0 obj << /Length 2068 /Filter /FlateDecode >> stream xY]s۶}`$XE=:74SYӦHH".,H@Tv:} {vYȶm-^^l˱̞9jcMm5 #z3kZo_?'n`tC7"wqo\rV< F_d:8V8/W6 -_>.Wwuүӕo#̦~ͶREֱ]# έv-Lt&7"-aZRTBi⼡:.q,X:г Z3a1Eލ@ RS XRm>:N>K^d0'^ʾ6 V~6x06ix|T%Omv}.pG~08ȉ۟7 GI+:ٙ#.r`%f$5^\nMSvc'sn~U4E)j|ih}*XQgoSkzKO[^u$e[Om҆KqQʢ@7A̵;ʬ#1tx4t L{aZaS]z~ 8s $!0?] ]+]%6 dJ`R(G>].kGĶgI5ZͿծn~y/ުU%?#0י>> endobj 569 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 568 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [112.59 226.819 122.458 238.569] /A << /S /GoTo /D (appendix.A) >> >> endobj 573 0 obj << /D [571 0 R /FitH 778.724] >> endobj 570 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R >> /ProcSet [ /PDF /Text ] >> endobj 577 0 obj << /Length 1457 /Filter /FlateDecode >> stream xXn8}WjVJ}f۠MY-LBեn~>$eppxЮq\|r u"J,׎"_>"T:˕yzxs=N/Ze3MU )xuh KRm= (My9 ]1ؘ EnA蝏gz`x Q$=7_]g߽*}g_q3p\M>6pMs0Fsҥ&Mޟig؟F*awiP-M3'WթA)"ۤ~.x9\K3ϙc>w2;7BR8RޏSH$, f^؆ F>`C`U`=D|ϑ Ӱ8*1 nX] X}<NbpΞ`GK~UU#J,<(Wϔ4Zew, 3Jۊx>cu$Yt}zRD 8.CmVO8'alȅn7Aܨ:Xwc*:ҝ-KUIaT'\OY+?8mס$,O7YSZUO&zcXȪn}k[Ӆvt,/ahhdyljqe5s#) 1Cu %Ht4]ˌb(>4*(-s+*U LDc6p-(O?`J3 endstream endobj 576 0 obj << /Type /Page /Contents 577 0 R /Resources 575 0 R /MediaBox [0 0 595.276 841.89] /Parent 540 0 R /Annots [ 574 0 R ] >> endobj 574 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 578 0 obj << /D [576 0 R /FitH 778.724] >> endobj 58 0 obj << /D [576 0 R /FitH 739.268] >> endobj 579 0 obj << /D [576 0 R /FitH 692.43] >> endobj 580 0 obj << /D [576 0 R /FitH 693.528] >> endobj 62 0 obj << /D [576 0 R /FitH 514.136] >> endobj 581 0 obj << /D [576 0 R /FitH 459.896] >> endobj 582 0 obj << /D [576 0 R /FitH 460.995] >> endobj 575 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F41 487 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 586 0 obj << /Length 1458 /Filter /FlateDecode >> stream xڵX[s8~ީUIH{I3dlnNFr,Dln}d\>}waxv1y(+/( Dyuz|r6OJ3?,V2d:)QĄj+o>6+~L(͉OB>=3k FןB>O`Z@rب cX<pzzuvzrruŅݪL^j H3͜lzN0Fa/;xk8|ЅVɺP?*Ur nT(ӾmvhXQ fgR=!bx|b_bvr,nQC$mp{ŇA 5|D1n8L>V5%:U.% |S{OevSʹeKqez>*6;$B0bg+(@ƀ¡2 ļE6i4 7zL,`wr>XCcܘvPsV[zOD Cb稏 XzdM1p[<8e.sK@t[ue 20m 3&]htQ - Ԭ ><>3sc x-1G%hޚ4+ uuMvZk=1%.0IG!0qz>q ^({P)E:3w,Fi;ŰA ΂2Fk,O@JrzflLmNj! y42ޔw8N:eَK]]0P<]c[\;l&FgmZ=L=}? g71t[6w0FHq[B6ou\-D:z;> endobj 583 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 587 0 obj << /D [585 0 R /FitH 778.724] >> endobj 66 0 obj << /D [585 0 R /FitH 517.787] >> endobj 588 0 obj << /D [585 0 R /FitH 462.477] >> endobj 589 0 obj << /D [585 0 R /FitH 463.576] >> endobj 584 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 594 0 obj << /Length 1507 /Filter /FlateDecode >> stream xYr6}WQ$@mǙ6qmM=$I&U%_P$EŖ,7`bεwvF NQȹQO8<=ݥ; OBLeK(_Gu.܃N[, wF<]lVn~J0x~2lqƯ#9W$ x"t7<|ep\L~ohcK M#uKi'K".5Q lCvf4@< 4/,ʯ-C^G b<|!\Pzs $dN)Eoʅ!F$8劇Zd|8hS5 Ϟn-ʀz!֪\;@jX(ġL0ۅ<iOM9[<3b"Q(>Q&'#ɘjy[N"LtzEA&rOw`hoy=N9"!Ҥ^C l)e8dM0{P892 6)nS`U;4ux:| rF᝝}nd 'y4 O70`Bnk)x[TF=Q)uڊvr樷qUZWv=50WQIGa^F5D_BBƮ11Z4.*Q-''63@p:~sDGp(l2&F=m> PϠ`Lu}*#fsS]wen[͐hQ۽,S7]İ(P3%v+?zmHC:@Ƞ  4aq߈nǾ+' ZXڹU#A#ѩ?3|<巏8+X((ɦ ~ԆVNr8~^JPY*H 7jOQ6Go;l@S}ۈy>Ňcn) YQIw|?ڃ3{=<ĈB_$t wǯ'nmf?ǵLCuUTx5uK)3.6KjW+[UerQ̇uu;#_uڧ%2e.:]M endstream endobj 593 0 obj << /Type /Page /Contents 594 0 R /Resources 592 0 R /MediaBox [0 0 595.276 841.89] /Parent 590 0 R /Annots [ 591 0 R ] >> endobj 591 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 595 0 obj << /D [593 0 R /FitH 778.724] >> endobj 70 0 obj << /D [593 0 R /FitH 739.268] >> endobj 596 0 obj << /D [593 0 R /FitH 693.573] >> endobj 597 0 obj << /D [593 0 R /FitH 694.672] >> endobj 74 0 obj << /D [593 0 R /FitH 324.493] >> endobj 598 0 obj << /D [593 0 R /FitH 271.396] >> endobj 599 0 obj << /D [593 0 R /FitH 272.495] >> endobj 592 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R /F41 487 0 R >> /ProcSet [ /PDF /Text ] >> endobj 603 0 obj << /Length 1341 /Filter /FlateDecode >> stream xXK8WpbEH>1;qUI ȶ0Lxęm! yj.iuyػXY~c`xb$8B.#ozZSWr+˕.eHW7qy*QpNjzμmER*r@QZ{&V{Sǫ恑~,.N( `/wl%^|mp}X۩kaLT [dݔ/㬑:8r^҈ 1"Z?dݯtWeI|'Vh:[><-V-+ΖhwL 9/>^QN+<ܚպ2΄ٞeൔcǶ܏E}gHνivlD#`gLsBJRY`\K* gt߇&Յ}jyFd:ژZcP$(bZtOq>H@bl{WHc.iF 2 jx5tΑcz bJm{}3ahqD"$F"Sqe9)Ӓ/`g2>٩^ kSOD9_;h hz\N0p!x ('"{LN&mj~+TjHE}Ys{]kGsO;1`ySy=rD@_Z~zGWS' "^젽T=/#O@gPVMȋRViQ|{n=GAcw:`! הfl2>݁Ȗqѿ۴0lUX~岀,atǵq,Mgdq..ྛ6~zg 7/iRY<<}3m+O*o[ Gl]ôuB(dN0kN+xr$!|n#W]3xd4d~ҭ6Uo;pJ|gvL`MsFc $_8 p7-gV,U!)T#Vg}+$$kRx}]a§2)X#]%f>+$gfIG&b3i2 d7v^wxem{DVU\vn8wz=³nW廎dB֎eJgDhQH~k9-" 6'{6(JuHU'\PF84̰]]qf6f~ UߓhIN?ˤ endstream endobj 602 0 obj << /Type /Page /Contents 603 0 R /Resources 601 0 R /MediaBox [0 0 595.276 841.89] /Parent 590 0 R /Annots [ 600 0 R ] >> endobj 600 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 604 0 obj << /D [602 0 R /FitH 778.724] >> endobj 78 0 obj << /D [602 0 R /FitH 558.959] >> endobj 605 0 obj << /D [602 0 R /FitH 504.719] >> endobj 606 0 obj << /D [602 0 R /FitH 505.818] >> endobj 601 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 610 0 obj << /Length 1470 /Filter /FlateDecode >> stream xڵXMs6W(DI=9IFM\[I&CK) $]ER-?؇ݷK޵xGofh@boEBxқ-w`|*i8Vz?cS#@61ARrrc>Vyd> ('∏̻Hx ޺=?lگKpmE2f{-G@26q83 N_ \E =䜴i"AMEIp$u\8ыxsiz-a7!!QhZX_J;]ƿjVgce{{@EIf80ϙc1r-[NߏCv<  ~ rzhkH#;F90/رMuH9aîbT85p<!mX!sHf,Q(~:Vh!\:4fj\'CF:-?TF7/>_50?UpBL"_Dp:G@ iblztNsB1aBX+(@13NtVuZ_>qJ2KSk3`ͳ2+noCۄ*|{2;B Z^lEz{RfCYJ)ӓb0GF'EjZu-{#UUz12 X[Z "Ě15XHLc2[akBDd [mb umo؇0iD}e:m7b~VTM𵆉h_1Pr\f%tkU6:jOݶ*yr[aʱՓUtX;b0NVqd}vf5]섆ZK5՟򠝻Y0~H؛g7t XuX_gufsnts7+XBA58Ԡ*JDiF␑K8) م0Vp߾Y/unjL'ISz6 lE)Q?N|_fӿO?.y85FCK%s"}p;`!MNj/lvO+٣@E+E' 0EHP=DAr$wz̴/ @=b7o Cp|`FJ[}!1L|~]{|OcPtpN#5V*w3#ыH@Sr\)HQB˯KQQ4pyX' endstream endobj 609 0 obj << /Type /Page /Contents 610 0 R /Resources 608 0 R /MediaBox [0 0 595.276 841.89] /Parent 590 0 R /Annots [ 607 0 R ] >> endobj 607 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 611 0 obj << /D [609 0 R /FitH 778.724] >> endobj 82 0 obj << /D [609 0 R /FitH 739.268] >> endobj 612 0 obj << /D [609 0 R /FitH 692.43] >> endobj 613 0 obj << /D [609 0 R /FitH 693.528] >> endobj 86 0 obj << /D [609 0 R /FitH 294.421] >> endobj 614 0 obj << /D [609 0 R /FitH 237.928] >> endobj 615 0 obj << /D [609 0 R /FitH 239.027] >> endobj 608 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 621 0 obj << /Length 1154 /Filter /FlateDecode >> stream xX]sF}ׯG7 <&mqqU!+ eXjd M {޳s!t;{y G$hBR(P!fŨ:fDkwT$#%ZGKb?e싻S.J=+GR2p@͓c)"xj7o&4dyPjgq*?#d~-|TzJ0H'3 A=z/Za8jEU@Snf- Rfx^@}Qū6T-;!8`WL J@C'@zeM 9h2$X]` "J#9 c5|.Ċc941?>Ia r%y=WW/t"'҉:.E.QT9qEn)K(k(']vg5ܲR?AKG i7u-znVCҕO+\Puq B`)5@S܊ma=Ӭp@#\NoVz3^YC5+W 5SP|>qA©-4y ?w*Fro4UpNy'o Qsx8&*rr'X}Z(褎7_3ᄡeղ[׍&pۜ+e揮߮ڞnڵ(Ub%mkڮR_2}f8AvΈC=Mu2Ӷ8Ml̓A,J1"O:b(C(缧C/gP8'C`]v(V؂+͚4+> endobj 618 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 616 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [411.812 263.876 427.44 275.626] /A << /S /GoTo /D (table.3.2) >> >> endobj 617 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [484.204 218.793 499.833 230.543] /A << /S /GoTo /D (table.3.2) >> >> endobj 622 0 obj << /D [620 0 R /FitH 778.724] >> endobj 90 0 obj << /D [620 0 R /FitH 640.335] >> endobj 623 0 obj << /D [620 0 R /FitH 586.468] >> endobj 624 0 obj << /D [620 0 R /FitH 587.566] >> endobj 94 0 obj << /D [620 0 R /FitH 399.671] >> endobj 625 0 obj << /D [620 0 R /FitH 343.55] >> endobj 626 0 obj << /D [620 0 R /FitH 344.649] >> endobj 619 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 630 0 obj << /Length 2109 /Filter /FlateDecode >> stream xś[s+xu}ca*!3[{)'a kfg~i9(&UuR,Ւt;Nu:Aґ3{x\ٲ[zwNӝaܣ^7aVtD`czSX\ ='zwxFYA^S,xwyX>sq szum,˟}! C{E?}8E)ם۳ͽ IDA6\@h]P[ *&RīPt`zQe? 6a:K!ZJn[1cR2/.QAto8\r_ y|61{gjϫh}Y݅QO#\ zo}Tò8c0bVX2$̾ϋ_Ԇ%Ъ$HDHю(TCb/x4 kW JU .b~wb6HK\J$ 8Pp*2i1Z[F+aT盖)=t8J"\q1vdFR+P=|..r˥_? g5m^ ׺6UiWIiGSfpeupQ%uo-rg!\wWSiC.BSqFx  $s0%8t}Bi.@SC1MG``!ad A n#g|iC.BSzzUw@6h#Ғ QG;ڙ_S(mHPEhrl<#v() ۙ?^iC.DS$Gp6SIL$/qì{L2ty1J_Ӟ8Y-%n LH,]ض>){bxe% @+I0fE@[IjyCWA!)&(LCI{H@5tLv<3@!潻yGcEBs*@[e2%LAfw(\W_.kB |A] vC6sy;Θ(VLs+:Ɋ,ZNA4K@eR*N =Ȕ@XQ`f*xF4 Xf&=bTw`VD)5B0)U%F@&1*zQռkY!岕BPIҭpdziRrVd)5BFx:/5r(HC&TV/Toĉ]N%2K3TX0 w?`O4†(FTd1EzM¾\c1Np np@Wqװ{ɪ7W؟G0^EKaǯȅ@JtcNSTcm8(~ưZ Z$]F#M1KI45*_f $u N[P{{X(nυR;٩Piߟo&~!CRKfNzצ,٫ڹI .tuSaJv1 qbH KUWph~2!Vd)4"Mgq~"Q_("?3 ^}Ĺ `B|݋@Qsu@~x "kZd3T&{)F endstream endobj 629 0 obj << /Type /Page /Contents 630 0 R /Resources 628 0 R /MediaBox [0 0 595.276 841.89] /Parent 590 0 R /Annots [ 627 0 R ] >> endobj 627 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 631 0 obj << /D [629 0 R /FitH 778.724] >> endobj 474 0 obj << /D [629 0 R /FitH 220.86] >> endobj 628 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 635 0 obj << /Length 1792 /Filter /FlateDecode >> stream xY]s:}3$n&4udc|7w$ 6NǙAiϮvϪعss{?İC0 p@0p<#g2uO>} )|L#} U ~N>kB"W0Bywyޗyg~@7F|޿T;M p0_Ko[zk4#p m,b(-zbg > |g]\8.gjsh^MG γR]D`7.0: !6:.5K}W,/T\SpBuM4P_h0d/ʹP<\u$eSLj#~ݻ7l\05ӖwKLr'CD1⸈fmc=?0\=ƒ!uRfӊ!yeKFp9ݲyV"InXqgE63;O4@ DF9%&NIjY>QmVӬ4tbάR4LDD.ny,"2 8u+AXރCq*3>:{@!hU H7?0j4l#f ÕJh?nHor؟6v<m[n=6PB SA.ubZ%V!R21.j*Һ¦HmxY)[y\ڟҨԭKR 7xnd/5WɅ73tSVrUZM{tyl0FEMwz\&]Wf.VC5 x۴w(wwK*IkIx 3p_R`TAzC]T@դA`(0~.kd%fhY )O ^f=o|.PTvxtUܿiX-1jqkI,,o2Qj.> endobj 632 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 636 0 obj << /D [634 0 R /FitH 778.724] >> endobj 98 0 obj << /D [634 0 R /FitH 612.578] >> endobj 637 0 obj << /D [634 0 R /FitH 559.385] >> endobj 638 0 obj << /D [634 0 R /FitH 560.484] >> endobj 102 0 obj << /D [634 0 R /FitH 318.104] >> endobj 639 0 obj << /D [634 0 R /FitH 264.911] >> endobj 640 0 obj << /D [634 0 R /FitH 266.01] >> endobj 633 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 645 0 obj << /Length 1424 /Filter /FlateDecode >> stream xX[6~ўY+H .Sm2l3ۍ;Aa3w{$n&}G;s\+ub7&sBEAA;|}~&]W+/\rpw&V>m+o Z./o_V.yU Wk.o;3B1^(p\䶿 T޽^tƮ6iEC$ŇO»#RzJycD9H0c= N:[_noX<j *^/);bgxNT#lL& ͞UAHw|T>_J>4Z{ %cr\"s'U>dlDz27MNs(mT8h#&^0͛QGº)Xu mW%>R1:\) (-ýRb7p*F18ˏPmz]sy(4J=fEe BBD{5)5]Sd;m_o&],PaǏ0IzQ9"TmQYq;1(:m)"԰VugEc{P qp&nCD"6#, ;WA;{RtF#,O00=?F1Y!Ayg`CgP{>]Vj6?$f"v$/-806G1O -82`S?\pz^p&RhiX4D@>}:;p:Dt 0Iڒ۲~%nf~:ggӞ(Fk ysa8z֖M&yjF3YyK)EA?mǪ|8y6߻l~ysstgtO =fy/F]9 |g8i.gC#}aQ*>t|_8Uݟ77W ~}nW^6a.v|Gu#솰|D@ўp%`];AM<6zZbv190_B.);@ WiLHCҴ#d" lT>gʹaR| ehnD)/ SQPҦηAYmz7xMA+\X:g>8UͶWh q endstream endobj 644 0 obj << /Type /Page /Contents 645 0 R /Resources 643 0 R /MediaBox [0 0 595.276 841.89] /Parent 641 0 R /Annots [ 642 0 R ] >> endobj 642 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 646 0 obj << /D [644 0 R /FitH 778.724] >> endobj 106 0 obj << /D [644 0 R /FitH 538.635] >> endobj 647 0 obj << /D [644 0 R /FitH 484.395] >> endobj 648 0 obj << /D [644 0 R /FitH 485.494] >> endobj 643 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 652 0 obj << /Length 609 /Filter /FlateDecode >> stream x}TN0}W1ZKcYK F%دIEqe[rWu[ .ѣsۏccbĎV7A''nr1vFi%W7 jjK+9tܜ2B/Ą7iwvJH-Mmr&+mz &'t0 2YJq&t^}U\z'v;- e c6q4]vrmxfU endstream endobj 651 0 obj << /Type /Page /Contents 652 0 R /Resources 650 0 R /MediaBox [0 0 595.276 841.89] /Parent 641 0 R /Annots [ 649 0 R ] >> endobj 649 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 653 0 obj << /D [651 0 R /FitH 778.724] >> endobj 650 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 657 0 obj << /Length 1828 /Filter /FlateDecode >> stream xڵZMs6W(S&n3M&u.'3-}S+%z{s *=|::dq⢣&# D sDQ(+SՑ+dJ3J2C7Iů=e9aMp"EXe_)EW{Givi;o)Dr=6²:|ov2 m\,9b&䨱@JYEdl7җ⻽,|`q8Adp3ȩ8vAaԯjLO`FEU=g2YLr_*%voB!&I8Ͷy uGqlnb 8.Kan]6tLiF| tҗCޭVWIUuJihY +dQVm{CP6u@3 R@6F T5@% L{2pӶ$mYH|^ݬRMMH> Tv٧ϗ*6a4g|xLReb"Y8J>V-ʏhn~eyMUCRo>sdTL툎\SPk9)Tdx&|Lirtr@EeGx8V7KVVnte3Z/^>\jwE2B>b|gOuH=0>Gx8g`Ўp,\e7jgp Tw\JxcqbÕ9!ډ.)bB%*S]?ROhr0KOp)(u%@>=\u#x-TJ$|C @-u3\x cTyHs{p r>,d:`[dR0'_yE3.}dqW[ ۹i1|YoA| }_gvS!bxTә@=qC' Er- ܅j/>"ḱ ZnypD}U?pɢܙNJ",o T+\IEio:&wqtއY58LDGwU Q1鎃 5Uu,uAZڿ^TC~"NQ7z/ endstream endobj 656 0 obj << /Type /Page /Contents 657 0 R /Resources 655 0 R /MediaBox [0 0 595.276 841.89] /Parent 641 0 R /Annots [ 654 0 R ] >> endobj 654 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 658 0 obj << /D [656 0 R /FitH 778.724] >> endobj 110 0 obj << /D [656 0 R /FitH 739.268] >> endobj 114 0 obj << /D [656 0 R /FitH 664.829] >> endobj 659 0 obj << /D [656 0 R /FitH 610.589] >> endobj 660 0 obj << /D [656 0 R /FitH 611.688] >> endobj 661 0 obj << /D [656 0 R /FitH 372.932] >> endobj 662 0 obj << /D [656 0 R /FitH 374.178] >> endobj 663 0 obj << /D [656 0 R /FitH 360.629] >> endobj 665 0 obj << /D [656 0 R /FitH 347.08] >> endobj 666 0 obj << /D [656 0 R /FitH 333.531] >> endobj 667 0 obj << /D [656 0 R /FitH 319.982] >> endobj 668 0 obj << /D [656 0 R /FitH 306.432] >> endobj 655 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R /F65 664 0 R /F38 550 0 R /F15 551 0 R /F26 353 0 R >> /ProcSet [ /PDF /Text ] >> endobj 672 0 obj << /Length 1352 /Filter /FlateDecode >> stream xڵXKs6W(uL$=mi餎=$9"$sJ*IEH<lr~ADz9{s +(ZQDp,%dWhO?nYL^j.VO}/,߁*~*CR_TuUgea4dt3(,ۻ薡sq7p q"V٧/;UcsqWER`0s`cB|}ͯ)wT[!aGV/6<)6ho0wq &hsJ4ZE<☞I>8CLτDmS4!H^WJX /:,+! ! 4(&b%WtaI 1)x 8 ^ī@|]meJ:A2r\i~-rPDzϑ)|&, dhkn!FD5?HpOV %42CTU4Fcy^ECb0x00)u('U Lځ(6>B/ R=u𕁓+bk 0d'VS- }JrlJ*cگ}CzpY۫{76>:wq_?:z_D|h`.+ zuDJ_dD6}ϲyDY 2ջGsnnz'V8HȡmGwV]Y2Yй[FIZNZ򂣬H̛Q fzUnwew N#n*}3v"Ծ9lT3.*Jgq_gpo׮n[{azI*x1eVMWCC6}kw2!O4M/l5]dl80^g_(V]f]%Xs \d|Lu̗h ICk qɦl 8wLӓRWpHѷMգZiz[´T$xuBS?WTj_U]Onzh<~[WyXb&K s;↚ qRr) endstream endobj 671 0 obj << /Type /Page /Contents 672 0 R /Resources 670 0 R /MediaBox [0 0 595.276 841.89] /Parent 641 0 R /Annots [ 669 0 R ] >> endobj 669 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 673 0 obj << /D [671 0 R /FitH 778.724] >> endobj 118 0 obj << /D [671 0 R /FitH 739.268] >> endobj 674 0 obj << /D [671 0 R /FitH 692.43] >> endobj 675 0 obj << /D [671 0 R /FitH 693.528] >> endobj 670 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 679 0 obj << /Length 1551 /Filter /FlateDecode >> stream xX]wF}ׯQ:@ߒI(Cae`|M}gaw)-[;3wgg ;v^̞fO3gv<|!OY?,\r"=̚0]|^(և"E``Eyz{ۂ,$Ϻy%a ,}g #z` [:_ж1x܉nf?c'gsۮq\wénkiC\\A4Q1ibȅ00Y]Y&AY2c(򲮺ohfL|}6lJ{(?-Ͽ.T|~28orxwr𽪓koR()GYo wYiKQJ?KR#zc uR'3W#Uh]7YTCDGF X i0v0 km5~99xfaTΣLP95U y4#uPkjdPA~lavyY.8ꏘ.z9IB '΁z 8a4*;tֽ&t}qݑvGnu*[$D|v^TU+<@}\{( R a[uFߓi}bch ̉!f .raz9LW$'Xmf 21$sթ-O⮈𠿖=?=ŧ-<|w v/*#CG^N[b:4|[*BӍB5 aGmgrO^v)T6BK͂<_dIF;6f1szhw'1pXM*ш7ZJY%Nwf _N!|l7Z%? PB͒ԠWt+XF(;TVnn 17Q;G&r¹gjEMACBwmo;(c.nڣֶUN=*"MNfE=g݆ųfS2| w_Ղ_.޾~7w,TP0vWyծIKFBJu[uV I'jӘϦ⅖C(?6^voUVDtb hH/A+yq45 9Fҟ`K%>C=]o%В@BV ў nJ,%D<<BrQ4JH{ dlJA8>PtdB 8 :=F{C@ćrc%Ї$?JhN[3q ԋhduZ?= endstream endobj 678 0 obj << /Type /Page /Contents 679 0 R /Resources 677 0 R /MediaBox [0 0 595.276 841.89] /Parent 641 0 R /Annots [ 676 0 R ] >> endobj 676 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 680 0 obj << /D [678 0 R /FitH 778.724] >> endobj 122 0 obj << /D [678 0 R /FitH 739.268] >> endobj 126 0 obj << /D [678 0 R /FitH 583.534] >> endobj 681 0 obj << /D [678 0 R /FitH 529.294] >> endobj 682 0 obj << /D [678 0 R /FitH 530.392] >> endobj 130 0 obj << /D [678 0 R /FitH 251.122] >> endobj 683 0 obj << /D [678 0 R /FitH 196.735] >> endobj 684 0 obj << /D [678 0 R /FitH 197.834] >> endobj 677 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R >> /ProcSet [ /PDF /Text ] >> endobj 689 0 obj << /Length 1553 /Filter /FlateDecode >> stream xڵXKs6Wfq&Bɣ8Ӵumu|H3,64PwA|eG=ǷsϹ0}O={("̗Nࡐs'!"4r ;wF7KQ4<z8ęyH.)s j*W?.fSQVi w)Z6aoቇ!+Ahs_3z]'_'ZEQq,`PQl띏(b8sn'7jH0  L 7QHn 59a%fۍR7l#N㝨2]KeWieYnD6J,zQ:i0X.a'rYѓ&YQ4|f17|i(.E+ wFA?V$2%mdZMND-Eȓezto62¨ 62ͬFJ݈f}qYY$a[g!è44c(qЊ:pY$jӃ؄ETB=ef=[SծⱾpгy!-EB}T汾+3q &)֥q ȅuw"1#>2C))2?+!YIx?v3rfy3('9!vh" I5sԘ!sJ,;*UaݫTqWN"NxeFZ qf3Zv{L@E|bDB>ExUMнhuԳ|(?:D A|\N.GTtl4rN,n%wWd#vC`~5T*q/)~$}Mp j4zwYdC}<֌u+A]{sI$\_S^W}YS,MAE+v{uHUsӔ\2wVMME3*,><غtNV^"-GuLS>Cn7kqv :قs@@w3SMB5VW3@o^h>YjK○o.no A9դo.>^^~GPNƞ~>LE5N7e4^m>.dk]UX9n,El3.k/~sh]ӼWB@4*νv endstream endobj 688 0 obj << /Type /Page /Contents 689 0 R /Resources 687 0 R /MediaBox [0 0 595.276 841.89] /Parent 693 0 R /Annots [ 686 0 R 685 0 R ] >> endobj 686 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 685 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [369.78 297.548 385.409 309.299] /A << /S /GoTo /D (table.3.3) >> >> endobj 690 0 obj << /D [688 0 R /FitH 778.724] >> endobj 134 0 obj << /D [688 0 R /FitH 445.532] >> endobj 691 0 obj << /D [688 0 R /FitH 391.145] >> endobj 692 0 obj << /D [688 0 R /FitH 392.244] >> endobj 687 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 697 0 obj << /Length 2181 /Filter /FlateDecode >> stream xŜnUz츖גE0'YVthѷ/ǒFԈpa C\?EMZ[uqt28%`&`jieqWwp툺kqZGIZ_\ ܚϟ|l AJ?nm JHZbpJYo(`Lpuޱ=8AYc)gva'.S 4qp6.*{uAY+7fV.4}epAUێe T AK Pᰐր&9-o/cE†Ǝ^5Y̿6O0tMAgyt۬[4"-ms!K{߇'YTZa󶻲HxJ )^`;wOi'YUZ)Ҍ E3R*0J4g< j<o|dYAodT0+67Ƚ^U,]0DԀ|SlR,֛O UV2*p}HĘab"jboJ! K[ UuZ"d%@[v"0$| n9-gtlz}U/MޛY>UG,sO(DOEgIBb/#˳صCE=|0^k L ͯf;vŘ'w3ȋj1g } g~}_|}A!b4|i=,~r'+"s*AO-h)OwJd㎢k q/?.fpqJǝrOd0y5N̉C>ؒCBۗ]<<4I;dgO.IWfFHjf)i{zy}) ؠޑLpXm64#2s1_}ueRߖ>JtZE}BQcE9o l^cBYJk Ts{wzA &xa>4!)hyrŏ!>*j@b:d+]f$yF 5aíӻ*߼1R3􇳧UP% n]%HqF P·/l#%5_r^&IW֥9WNEZQ+{ue(7Lv_edN)0οesdx=8VmUu-wFUݧwoKΡ 'A endstream endobj 696 0 obj << /Type /Page /Contents 697 0 R /Resources 695 0 R /MediaBox [0 0 595.276 841.89] /Parent 693 0 R /Annots [ 694 0 R ] >> endobj 694 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 698 0 obj << /D [696 0 R /FitH 778.724] >> endobj 475 0 obj << /D [696 0 R /FitH 184.955] >> endobj 695 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F26 353 0 R /F15 551 0 R >> /ProcSet [ /PDF /Text ] >> endobj 703 0 obj << /Length 1513 /Filter /FlateDecode >> stream xX[s:~Wf*ɖ/IKҴ=3m'cԗ$9i`շb9xuib`a˵`ڶ.g,WhL#8?.hu:(l,(k!O0911ˆ3q(ll#\~Rps~5lےT\ۀ%vDÌ`7+L5ʝa11K8_\Iuh.2Cl@t-* ܏sK|~b6|d뉼f\y"Mz&/06V^.D_$كp4IQ._WUycʕ}+}]" *a|J<oy!Rʌ#N 2T~dC:$]H|)Σ,9"ɎwL #c#^{1?]#":S\H'=CKX\$M{+?VI˱Ua)l=+")i %kE@jT^7)_06\g:5C=tCIYJNvZ~LWFS חKK~b WaY+q<]qWֲUE!|Ԋ5*$C^I=>6z?IMyoߴ=d:zY4Ck٢m@Fز({X9 aF3O$ʤ~\;Nw' i,Lt&9/7bkEe[Ɣ IWQxG a znx^}1ȥCzt$c9cSHlʥ&c$\]yxdx;tJzdqP€s\"fZCo1b @\fX0%#mC<4c<./魀4RU,vʨ4Xɞ%:60yvǨlD]rLqR-'`>+ֆ4D(¤6ۤ[Ӑ[Er$U~mڂ'>%S_]}יXKkrazs5o߼N^`DzT endstream endobj 702 0 obj << /Type /Page /Contents 703 0 R /Resources 701 0 R /MediaBox [0 0 595.276 841.89] /Parent 693 0 R /Annots [ 700 0 R 699 0 R ] >> endobj 700 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 699 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [489.876 422.269 505.505 433.234] /A << /S /GoTo /D (table.3.4) >> >> endobj 704 0 obj << /D [702 0 R /FitH 778.724] >> endobj 138 0 obj << /D [702 0 R /FitH 555.771] >> endobj 705 0 obj << /D [702 0 R /FitH 501.531] >> endobj 706 0 obj << /D [702 0 R /FitH 502.63] >> endobj 701 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 710 0 obj << /Length 1497 /Filter /FlateDecode >> stream xXr6}WQX 񘴎L.&I2ZlPKl uq$8{{.n=]^F/^#I,7[zF^ BD}ޗŻן'SJ-U>J *J&fooCI>XQ^^1+~L PL'!_gѭŦ 4!`ǷBﳪPYa(07a`~5a'Qz[5$i=Xa( #LGǙ *B[9BlI|̓H *4 Y@̲zh3L3-RlYe{S $i㰫D %qxW|=SˁۂX!5 s(_"I(>LATXMY0e{ gU#WJ)uBx*6>ĔT.!3IJJs=G\.bSCRM9Zə!,"zEef sZ.rSdSV航U2{ ty&R3t1]Լ'y-`B"!h(9p `[d !c˶p}_U˥C-V߶m?mN?g?~Ofז4IԢI8T&ޘrՕ0uYezU͒țZ8+FLgy;#!>w~=dt4XT0I3!>ݴXDrK\-JDMPIQNcѐ'X0v{,ޭ- L\9CnDm\O@'lЀ A@szZYHF$O'~@ c@º~ٻ.F endstream endobj 709 0 obj << /Type /Page /Contents 710 0 R /Resources 708 0 R /MediaBox [0 0 595.276 841.89] /Parent 693 0 R /Annots [ 707 0 R ] >> endobj 707 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 711 0 obj << /D [709 0 R /FitH 778.724] >> endobj 142 0 obj << /D [709 0 R /FitH 739.268] >> endobj 712 0 obj << /D [709 0 R /FitH 692.43] >> endobj 713 0 obj << /D [709 0 R /FitH 693.528] >> endobj 146 0 obj << /D [709 0 R /FitH 346.365] >> endobj 714 0 obj << /D [709 0 R /FitH 292.125] >> endobj 715 0 obj << /D [709 0 R /FitH 293.224] >> endobj 708 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 719 0 obj << /Length 1443 /Filter /FlateDecode >> stream xڵX]s8}fbUv7ʹӏlN1088XHIG[&f7F!5K-, e5KoէwΔrl߈TTmQB5}U;?fHH1ԢF<9ۢP Δ0pZ56 H Fn?Lj؞.g'!MF >l%# 0mυr+'[?:&DİF4JοvD= ee!Ta !lHt6jKtUč"ܥv.S86=ȁtkxR*,:{ȅj9.FI:7 4p![]F`,ՠ,$]DQߔ{wRqcjzd/JQ9Y-RHUaZ[#Yw;(~*ӽoF!gK1\o'1 f߀;}n{o4N䴻 endstream endobj 718 0 obj << /Type /Page /Contents 719 0 R /Resources 717 0 R /MediaBox [0 0 595.276 841.89] /Parent 693 0 R /Annots [ 716 0 R ] >> endobj 716 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 720 0 obj << /D [718 0 R /FitH 778.724] >> endobj 150 0 obj << /D [718 0 R /FitH 601.311] >> endobj 721 0 obj << /D [718 0 R /FitH 547.805] >> endobj 722 0 obj << /D [718 0 R /FitH 548.904] >> endobj 154 0 obj << /D [718 0 R /FitH 290.005] >> endobj 723 0 obj << /D [718 0 R /FitH 236.499] >> endobj 724 0 obj << /D [718 0 R /FitH 237.598] >> endobj 717 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 729 0 obj << /Length 1579 /Filter /FlateDecode >> stream xXɒ6+xF0\ؑ]v[irqHp2E*\,ߧAAAxaj( hlֲWɳmavMj6 <'6ajlN=b)f?eEī٧0 M suUuVAlJێȳldw>xj=Wq-6'!cD }jŻɇOwo֡[\ rsk=7ץ49Lkڊ_q(oYmʎmAp\`C?XWپ{f—-Ox[&j2Ύktlkx2 !(ڶ=Ú5TE7QLG^#/ġ9Ш&&Z+t?^y(E\r,Ŏ U1+~'0E PZ! =4RD\w1гO@əPɉ , B<Z; mPmu`鉀s*cYE./H0J!))~[0=l\_,BR`L`f%ѡTo s9'a,1TvB#Zt9o蚺*NXU%jmQ#3stÎX"G9"ɭَi|13FP2X]+Ktb9-طvKwޖm.lQCh$H) (b*n4- F= ]18>Zny2#ZK 0섌=: M}I=Pc_ouE]y XZRkvgU= 2M.?^A@9' ʦKAX:ZYEcpL;1 q@ QQ|N #hcjeb)YfZzjWr@:5y ~LxBP?à>yepS廚5s)#lDsfעՋ[^u23E0GO J_D͈T*n?+Y.6ʝ.\5k~P.D[ؾvLEg1ĶR;CDP=`VfT+yfpy =zDjѲ>=H'NC <:Bߥj"®fZ/r ux ӉBK"sіoQ].~wxb?Q!U#`Y/ڷͨ;-R5%cRy>h~(J,.f]S 1+EUߛeg8.AًV `W Ǒr,=qز„#<%=i~t^9&^LSR:4;eOzz!#0X;c}4߉  q9tz`ryFL2^q endstream endobj 728 0 obj << /Type /Page /Contents 729 0 R /Resources 727 0 R /MediaBox [0 0 595.276 841.89] /Parent 693 0 R /Annots [ 726 0 R 725 0 R ] >> endobj 726 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 725 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [438.582 436.627 454.211 448.377] /A << /S /GoTo /D (table.3.3) >> >> endobj 730 0 obj << /D [728 0 R /FitH 778.724] >> endobj 158 0 obj << /D [728 0 R /FitH 638.66] >> endobj 731 0 obj << /D [728 0 R /FitH 584.42] >> endobj 732 0 obj << /D [728 0 R /FitH 585.519] >> endobj 727 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 736 0 obj << /Length 1681 /Filter /FlateDecode >> stream xڵXr6}WҌ$퓣*JZrd2IРKT}$^DN< ݳ,ѳFZF>c|d;X//O6[\D&eL>^)m6r;UVo^+M,SQ_7t|#;e!ϤFW:}9̭SqW#ZZ'lmku\ Jk9ۘ`=Pja}`\D0D1qɋ>faK`!{Yw]iPD,G4m/lƐÏ@\2(q,§Vƭm+Oe $k(`60hg*8?bUAeS>“ߑ͓M) dWb!D(`w 덺8?,.:?]B)/ @㶪ddƛCh~S4;@<1ZbJ#-E}!ZCx(xvKHLΓ X<4Q,c$њ7>A-ygC>D/ #T׿;.xA*AhS앑/G.}XaAWV~7|2'btzQ$ ]}iPYZÁ>нU}owvXgCд8 Z[tջt14|xWuESSOۡ!L1OeQ.!1.E2KD5VV%3Kf'~ڻqnWw e5XښJuJ!aNkrzDMGuR1R(6:(E,ʚ(> endobj 733 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 737 0 obj << /D [735 0 R /FitH 778.724] >> endobj 162 0 obj << /D [735 0 R /FitH 739.268] >> endobj 738 0 obj << /D [735 0 R /FitH 692.43] >> endobj 739 0 obj << /D [735 0 R /FitH 693.528] >> endobj 166 0 obj << /D [735 0 R /FitH 204.099] >> endobj 734 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 746 0 obj << /Length 1534 /Filter /FlateDecode >> stream xX[s8~Wf*ɒl>%-ɦC.C8 fڦ4GdlcRte_st|`s2;uC0 p@0p<#h| O?ʴz]~uƋ0}}( EpARr|}w|ޕi6Kb"'.yZ>lS.~)^y9`zk0|V(3~| wgqq%W ~%I Ł3A'}ҙmp 5#H҈" P Pںa,bcda% [<&S kRM^FM'!;a Tvu4*&KS@oLs 1;Ceܻ3TqOMN~OfMj<M2Hn2YU;0);u%hK=gUKf1Hak/cj yyOa(wrONQnu,kr5=EYTfLdoZCfk$ΞEd`B%Lf(JY_ח(e0O<_Rr+_VP?Y c!,FWQmhg[ȐOO2f]'Cd6mB%+m|JtM!,CJ*IѢm*EjMdϠZMLV|׫%"UǨKTok\`6sI GˬsLҴ86(g<7zo@b0%խ'MA%]`k \pX䊂tfȼdkN[gE VAނ بzVϤǍ$.?D@h! Yͭ8e$\Aft6& Zg5hPiJU=γwlO4Zw2eR|v:AN$*ZhJ{ftbm'@AB'ݣIl8$哌 r[m h" ڈ=@nYcG9иLRuxO V|h)Ze8?YLjbWv%0V{wF=w?ˑ0+:q e3h2%v~quw;?QVߍtTGffGkX+y> {t+EHP95|$\ù 39@\~m^<Q[/TA?(S-/j%e48}L o5:e7D۹!\;! ?|]0+i̓ʔ*췰 @ zXHN㗊]MC/e_iMz'tB}>Si k9\yiUr 2'LG endstream endobj 745 0 obj << /Type /Page /Contents 746 0 R /Resources 744 0 R /MediaBox [0 0 595.276 841.89] /Parent 740 0 R /Annots [ 743 0 R 741 0 R 742 0 R ] >> endobj 743 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 741 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [121.077 583.482 136.706 595.232] /A << /S /GoTo /D (table.3.4) >> >> endobj 742 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [174.4 583.482 187.302 595.232] /A << /S /GoTo /D (table.3.4) >> >> endobj 747 0 obj << /D [745 0 R /FitH 778.724] >> endobj 748 0 obj << /D [745 0 R /FitH 739.268] >> endobj 749 0 obj << /D [745 0 R /FitH 732.374] >> endobj 170 0 obj << /D [745 0 R /FitH 317.465] >> endobj 750 0 obj << /D [745 0 R /FitH 263.225] >> endobj 751 0 obj << /D [745 0 R /FitH 264.323] >> endobj 744 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F27 351 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 755 0 obj << /Length 1332 /Filter /FlateDecode >> stream xWr6+f"ڕ:duff<YRJQQ !'cN qpt|l:x`"t%I!DHD|hL9^酮F,bEZl|aD((MC]m%1aDy:ٌ=5#*0:l_g#T£j%H`JFUsxl Σ7?[qoJ"$T"L QXlY J@Q/"ͱ\y~+]ty|c־|Vz]V?[" D%[y~dbcU+zv&+r҇hxgOa @q!F~ ovv7`Rꥅ÷ח'볿^M߸`Mm~ׁw҅ 9m` 0ZLq,`Ԫf(cl wƣO}YӏRZAր<-n-#uɑh#W@$!baC~,E $*-:3aEd[r.R_.bMzk!A (NC|ɥx J{ZGc ZF1C8A9tH`|Wq} |Nc s Dj2S$CK͏e(Wo5P1 r46f{Cm˾Ǧ)~cǁ!ES:I#;B/w_qUߛ1O`Ƞlfwڍyqa%۝Z# `闩uLc${rVܝUi[!0 .޿I,l/OY>v+8UYZZ ):OO&^ 1k۵ڍ/c_oQ2Z"@Rح_zo2| `7 endstream endobj 754 0 obj << /Type /Page /Contents 755 0 R /Resources 753 0 R /MediaBox [0 0 595.276 841.89] /Parent 740 0 R /Annots [ 752 0 R ] >> endobj 752 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 756 0 obj << /D [754 0 R /FitH 778.724] >> endobj 174 0 obj << /D [754 0 R /FitH 492.954] >> endobj 757 0 obj << /D [754 0 R /FitH 438.567] >> endobj 758 0 obj << /D [754 0 R /FitH 439.666] >> endobj 753 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 764 0 obj << /Length 1475 /Filter /FlateDecode >> stream xڵW]s8}WvKniلNqA$ڦ4~,ɱa,{m[Šy 1e*̂/o?ƔᕞbPgSm>*NG_'CEQ(TGyu9"|23;@ #^[/MF"ןRo=^ {ǀO("t13"0ErxhNM&*`b1t:JWN#4YUڱpz3=O[ )XUyS)l([OZ"CQ衆šU܁9i;8!{߂iB ́GXug s? " 7*!\_m4 0aG; Cq{/>jY<|q%j9ÙX d3Qvklvk;*o]! SvvsȭbS.QHc)ru+{u7zB#r(h{KNw*unO#ݛ?ng /}f}҃2z=Y"FwƋڇiKH,UڹcI(0mYzMrȦTw+:S[;-Q|o UjUqC\vS*{n[HPQJ2!5N@#L Ź-%s@B?o_K`ͦiޞVa"lnm}e?"<EP36)5r'VNJxBSS 3XJw녛> _=-gqg[pJz']xKur>e<e[Qfؘn;IjM=ɗөR$L 8.BH.=j3ƪu& endstream endobj 763 0 obj << /Type /Page /Contents 764 0 R /Resources 762 0 R /MediaBox [0 0 595.276 841.89] /Parent 740 0 R /Annots [ 761 0 R 759 0 R 760 0 R ] >> endobj 761 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 759 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [411.812 502.779 427.44 514.529] /A << /S /GoTo /D (table.3.5) >> >> endobj 760 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [429.157 456.95 444.786 468.701] /A << /S /GoTo /D (table.3.5) >> >> endobj 765 0 obj << /D [763 0 R /FitH 778.724] >> endobj 178 0 obj << /D [763 0 R /FitH 671.086] >> endobj 766 0 obj << /D [763 0 R /FitH 616.699] >> endobj 767 0 obj << /D [763 0 R /FitH 617.798] >> endobj 182 0 obj << /D [763 0 R /FitH 304.508] >> endobj 768 0 obj << /D [763 0 R /FitH 250.268] >> endobj 769 0 obj << /D [763 0 R /FitH 251.366] >> endobj 762 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 773 0 obj << /Length 1724 /Filter /FlateDecode >> stream xڵXr6}WQX n:i'dh RKm ."(ʱA#^=nL}~6 OJT3?"oI&D}Q$(>h<{v;#l*:+ p6'>|h>{&O0FU`z|yi^-&_'.G>C楛ɇO[»KǑwۭx nׅca؎IlD9={͝`oNA7 /ܺlqICDC߃8Zs&n$[>bL!]Ƿ,]z]R]_p<}[\NbDФK=CcfU.*1&P{EDvEVk'5|J _{1e[֧DTU3%Aj][A[@M$) B*+-Wx-) 꾧E1>w[*7i$jxhڪK`Vݧ_Rla븍 /LWm6 CkPGi\ `bm;Ɋln*1nD&l HM/L`7qD~ine;H$$b^5tHT*ҋQKjJmSZH$ߋ u&YEDU?va*vXz21~VK.B5$)+1VS(!=\wdQ_uJp[߷%uP(;Hܓ&hJLt&4'Z}\6:g-AEL2Dz͌/Y7gܪe«ݞ>H[nfof,ʨNLf2;((3.b fw{U{w}&N |ř􌸙m6AH8 I؀`Q+f?՘&^=Fe9xߔ |@ciF/i(B2-ۈAj@.5եS w]_K 637F篺AH`fg-"Gt"*KO~!9l!M{x0@P?3]g-FmNXEs)W*cl8FfIt6B)Mu5$ڄc5-h)cc,q:3[M2-|I)¶{Қ۶p^R'(f 5섩>XF_MSQ 8S'n:Љ[{P⤎bO9N^ 8#2;*LĀ/}G̫/\a㇝KreC09c"rD(e8Zc wGItPr8|Wlq~I'bIE8f@Q$fO1Efc;Gd9!1Y4!cV[MX1]'՘!?uCx{|9{dmbu觯ͽ%Xn 6> ď5RA@V|‘3mHXIM$vW~[:s6|lP endstream endobj 772 0 obj << /Type /Page /Contents 773 0 R /Resources 771 0 R /MediaBox [0 0 595.276 841.89] /Parent 740 0 R /Annots [ 770 0 R ] >> endobj 770 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 774 0 obj << /D [772 0 R /FitH 778.724] >> endobj 186 0 obj << /D [772 0 R /FitH 289.569] >> endobj 775 0 obj << /D [772 0 R /FitH 235.329] >> endobj 776 0 obj << /D [772 0 R /FitH 236.428] >> endobj 777 0 obj << /D [772 0 R /FitH 222.879] >> endobj 771 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F63 534 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R >> /ProcSet [ /PDF /Text ] >> endobj 781 0 obj << /Length 1193 /Filter /FlateDecode >> stream xڥWMs6W(X0H趲n:N@d%A$*> b]yrs7e9%q1Jp:ˍa1H,·ݛmhx74|Z>+u&C;<+73Qe%W&Sq0~MkxQ`?ww#jk}0ԎDw$|XY8~@Pˀsg1uwɋ`bD bc*hj 6ԃ=_YSJ}FӋp7 &m^Y֌G=+5ҭV۲jpK???kZ-xA$2!YnrH|q"tZ>V/(7qR?"SA$w㦮K^MPdyFҐfqU3UӚ7n4ٺo\ 0oyc]exY=ޟz^Սl&l3 Bn^#dMӺmO*GĊi6ʍf%{;fZn[%ϊhUM ? u'5If=kș0)unWlI~6Ғsѥ̬GKjGoLJۢUvU술EBH!w:EəFQ vVgYYHb_[7S }ع!*+Y&.N K&:@> endobj 778 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 782 0 obj << /D [780 0 R /FitH 778.724] >> endobj 779 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 786 0 obj << /Length 1237 /Filter /FlateDecode >> stream xڵWK8Wp4U7p>2Vv[9$90lSacf0l ԟ??ag`fz=(q;ȗ( gwE^ު\-UQaRmXq` ݧţKRey&E"bI yo5#`_w^oo-y=z}ABk#b(9.|}S5pع[U4Q!1.i&# M` a`k%mKP De֘!b F^-`M=$}f*}HC]ԵDC4QzK ɔ0:=>; $-@Pcz,LS٢lU~2#9GDjX܇>2 R.ysρ݂X#  8$P|>VTnɡrS۴MAw6'Ͷ@ @)ͣ<6oՃj(Ohs7/q`{(j$iR$:5v$4]K3uFsd 0,1csԐğDk\̯;3NL>+l5>gP2tm+dq>U׽Kb|PgiyRȞ$'6k`9ez\{.)lu~G%F2lνf Zƚw~Hxk@騸XY.OxgG#CxC)LYS*~\C=>Wfm-gXX(Χ(n/UmÎӯ\d6F{D endstream endobj 785 0 obj << /Type /Page /Contents 786 0 R /Resources 784 0 R /MediaBox [0 0 595.276 841.89] /Parent 792 0 R /Annots [ 783 0 R ] >> endobj 783 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 787 0 obj << /D [785 0 R /FitH 778.724] >> endobj 190 0 obj << /D [785 0 R /FitH 739.268] >> endobj 194 0 obj << /D [785 0 R /FitH 714.106] >> endobj 788 0 obj << /D [785 0 R /FitH 660.673] >> endobj 789 0 obj << /D [785 0 R /FitH 661.772] >> endobj 198 0 obj << /D [785 0 R /FitH 398.344] >> endobj 790 0 obj << /D [785 0 R /FitH 344.361] >> endobj 791 0 obj << /D [785 0 R /FitH 345.459] >> endobj 784 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 796 0 obj << /Length 1166 /Filter /FlateDecode >> stream xڵWM8WhWŊ$@{ۯLmj?o!Ɂ٦ bۀ$'3F׭ A;D J$EBHĘm2ayWkVmU ҩHtOd8ԣa݊򥪛jMdgu X Iۛ`pXgu0NXF'2- 2F~eB`vo"D)1M,4f#Jb'bZ8<8[$zzכ{m/{uޟ~ޞ*cx;_PPiZȹ/h2E*X R0DZ?Nυ['PK).N LuY KꙆ!A>h&kwД@zbJL9p!68 q7;R_c)5yW٠!\ V[|$ Ϡ[U 9tL^ 2$"D/*D^u:y:4=O{u# <Ô2,:):l Q맕le`&pi 6UnkyJg5rµÆf.oiоc׊V5s}+T&麐ny3زmuj|rh7{[Ӥ(rsJ2,XUgp(꼲jkxtq<g#5h=sw6IiGJU8s\b(B(P?+` w 5Wp93uP:SP:/Y<C4yW =e yo;U}E;x{Ɋr:p^Fǜ~/B:jLOJ_&fWY;YOMSTb vbnPXI-4~osL(mUm|>Cf>3I!5 T;JanfxrԨ{~drдi~\VjKN]S(h5t&W`#0sqhJbL)g1^>+&F9/KQ}{i E> endobj 793 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 797 0 obj << /D [795 0 R /FitH 778.724] >> endobj 202 0 obj << /D [795 0 R /FitH 739.268] >> endobj 798 0 obj << /D [795 0 R /FitH 692.43] >> endobj 799 0 obj << /D [795 0 R /FitH 693.528] >> endobj 794 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R /F38 550 0 R >> /ProcSet [ /PDF /Text ] >> endobj 804 0 obj << /Length 2314 /Filter /FlateDecode >> stream xڵZ[s8~ϯꨑyJLe3T ئ ˤS[I܌ӁT0ssѹ`[˶>]>m$lrc0{vtNY/uW?.h/@6IaA)TRQo=lYASٝ|o4m*Kg6▍/??muZaj(.?<(PYOʝ0#gUJkaQ&LC0QA ۶g7J?^ {^s_=:qU@e-BEk?yYo=Ğ9a30 )0G3@X`tQ{zď7EXwm’`cq#σ@%pXǬ4 {-sLkXٲc $8,(fR[ Hr%a`S vuC"YL0lAF" cf6Pf ކ#r ` 6 iq Ȅ@M !L471\+i3[Ҧ.S:IA([?%8/ƿ`An5n.x{ py2=uo2GP&0r)?E94JU,G#hC7Gݳa.p@X{Q%p޶It v23 uET$݅:E]xXyZ$|쒙V T=RI$&&E\)1zs#Sp8%R9]#sZIP,s=mV_G KG0LmU/",9daF2sS f4dee"1`2g*k\O!iEҐTQ-ا! gcg~dRmÚ35YeF:Q*FAvwҨxb-'y\j!i'1ϔNR~ 4CL!\Y(*MLfnK㣟.0 AUV]RH9#S~ 4qL8\U:Ngz] U#;IWMf&I:ptx<א]sno{%bLzb7ԱK=AJńK峙fXu1<1ApcIܱ %! ?Řհ6rdjS]hKeCNPY57ZQ(qJ@ @$*G\ڃ8J?-+" E㙨YoTg<J_(8i4k|PT0B2NP./;&ݠ 39 ? 27y뇋۫˛p' endstream endobj 803 0 obj << /Type /Page /Contents 804 0 R /Resources 802 0 R /MediaBox [0 0 595.276 841.89] /Parent 792 0 R /Annots [ 801 0 R 800 0 R ] >> endobj 801 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 800 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [435.931 451.997 451.56 463.748] /A << /S /GoTo /D (table.3.6) >> >> endobj 805 0 obj << /D [803 0 R /FitH 778.724] >> endobj 206 0 obj << /D [803 0 R /FitH 739.268] >> endobj 210 0 obj << /D [803 0 R /FitH 665.373] >> endobj 806 0 obj << /D [803 0 R /FitH 612.236] >> endobj 807 0 obj << /D [803 0 R /FitH 613.335] >> endobj 808 0 obj << /D [803 0 R /FitH 333.78] >> endobj 809 0 obj << /D [803 0 R /FitH 335.026] >> endobj 810 0 obj << /D [803 0 R /FitH 321.477] >> endobj 811 0 obj << /D [803 0 R /FitH 307.927] >> endobj 812 0 obj << /D [803 0 R /FitH 294.378] >> endobj 813 0 obj << /D [803 0 R /FitH 280.829] >> endobj 814 0 obj << /D [803 0 R /FitH 267.28] >> endobj 802 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R /F65 664 0 R /F41 487 0 R /F15 551 0 R /F39 815 0 R /F26 353 0 R >> /ProcSet [ /PDF /Text ] >> endobj 820 0 obj << /Length 1709 /Filter /FlateDecode >> stream xڵYKs6W(=tFIlq=-Qg(R%8HrpDb[K [ -}bM' Q[ӹyxy}='"ld eH&)S7TwWWaQ\{DN~ H.2`:m}ZG!l=[s(0߳ʝk qG2[VL&!5LIXiK,q|8}~x{5U>qzDJb},ѨH=\Oԣr4 kЌ,1BRFyHYP$!HEkP*G$4w_mRG!ؕx앖!*EֈPGx!)T%84֛4 An8Be< #9U-vJp17OA|W95?k&T1DqGťJ 7ZaM*/ ({$>bżoߝ#EMZ!`QWKx7x4 lo@q o9XW]J㨎S 7\OR144KBj#:iZRY[ok:&ذբSrE7fifURpoޥDkR>oVA d !$yԛc]ךv s* w 2gH c\MNe-]"y;do7}KI' D 0bO[`ɂ ֢__9q!m;LN|LX>[9p%;ώ)#v.[v,Axrt<(p6,4 Z Ds%:vjjXcf>aY+^y} Ҷ&پoY"u[[=wN#쨷Lb{ endstream endobj 819 0 obj << /Type /Page /Contents 820 0 R /Resources 818 0 R /MediaBox [0 0 595.276 841.89] /Parent 792 0 R /Annots [ 817 0 R 816 0 R ] >> endobj 817 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 816 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [435.931 307.909 451.56 319.66] /A << /S /GoTo /D (table.3.6) >> >> endobj 821 0 obj << /D [819 0 R /FitH 778.724] >> endobj 214 0 obj << /D [819 0 R /FitH 570.914] >> endobj 822 0 obj << /D [819 0 R /FitH 516.674] >> endobj 823 0 obj << /D [819 0 R /FitH 517.773] >> endobj 818 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 828 0 obj << /Length 1429 /Filter /FlateDecode >> stream xXMs6W($zsL=9$q"UrKcDowOHbI 1B!ʤ7_x_gZgT2>.wPDRO7fŽOTUZE?#D|I+7x0ͧ{?o'-3|W!r/L|Ùyg DC41liXԪ~"*[~UFw/"mEYWzm9O˝)ާs?ӸI4]y1,(7qsח$ȼlP s~o0-8Ӄ <./?7l8}oS]RWYM[4ޕޖVȤN]$TDH0jgH c$UBJt:(238_ڃ[=uݞ]qgy;:B("%.}P@ F+jtq R>DRPipȆ 8UagFIh({VZA0B`<6L0;CCπtbN 9p[28 P}rgXMf r%rxЦ}.L ?A:);RT#-;RW<[F1 jFDs{ "$(שBMy@(ӮUUhdD{,!*gVmWUZ@q76{8}W>T@U6l;i#vm7&P39xhZ[UJݎVf3pPgE~6&l}Lu?ĜSF<[-3dJlTCdMh{pb z.FR+T\:Y6ZlaNje7|@D?/GЛT]ҝR~.6kT';&> endobj 825 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 824 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [439.411 188.95 455.04 200.7] /A << /S /GoTo /D (table.3.7) >> >> endobj 829 0 obj << /D [827 0 R /FitH 778.724] >> endobj 218 0 obj << /D [827 0 R /FitH 637.066] >> endobj 830 0 obj << /D [827 0 R /FitH 582.826] >> endobj 831 0 obj << /D [827 0 R /FitH 583.925] >> endobj 222 0 obj << /D [827 0 R /FitH 357.11] >> endobj 832 0 obj << /D [827 0 R /FitH 302.87] >> endobj 833 0 obj << /D [827 0 R /FitH 303.969] >> endobj 826 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 837 0 obj << /Length 1858 /Filter /FlateDecode >> stream xZKsFWpUyc-[jwK%l+AH(B#cq!=둱a`C0RzJjD3|tL܆gjӰX M_A"".hʥ\o1Wy )0&f-rqwwk%nSD BK I&*20ALr x:3X9T5\OR`njj"F/jL3sPυxVޗZ!NdW/|}i<'p'xi<\_MFón\zĥa(|H<[$M{&M~F`솲ŭ0PR1(?'(Bn >Lt;|ztMnJsۛY/S ~8B4Fy(my"`.)G/$qdaݏ^JaR{U65tEcHݍiw- Na6 .1Vonwë>W4OƷ>;fd8X_u9M8{ R|'!ry[(Fėjd4 _.wn+pʯ6pU@X\Po!\od [h@eH1=I ">6 >0цs?λhC#:5C RCC7IwPa)ǭҵ VҬUA^MA{,sBM޼@3q'6nEP0ԍ8M{\\27Nd"m|bs7jG)d K61eCF0\F[uT#VvYH͞Vta#=$@HP6*aaobHwan23rt ͮh粥d5̆fax`%`QS̓L)DBɽ]!l$TY ZucheGi|`>-gM^]ڇ2^lʃUߠxe"in>L.OnkFڰa3#Qr=b]O2cj]\'>D˧*W5$@nhf1w݁y(㣦K 8 $`|2(xQbOb.$,HجliiQJۉ)`NP`ymyR49atp$z+QJAjC b15="=N 譹bt: uDY@0n&M7AϖȎA<+VHv1li/'kGſDkw ŸEmS_{ |SA:P%k&T֍+•ʈSkqKRKR}XPk݆:Wy-rd8$p8(JRJ*i LFcA=-GBz*bj endstream endobj 836 0 obj << /Type /Page /Contents 837 0 R /Resources 835 0 R /MediaBox [0 0 595.276 841.89] /Parent 792 0 R /Annots [ 834 0 R ] >> endobj 834 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 838 0 obj << /D [836 0 R /FitH 778.724] >> endobj 476 0 obj << /D [836 0 R /FitH 640.368] >> endobj 477 0 obj << /D [836 0 R /FitH 509.711] >> endobj 478 0 obj << /D [836 0 R /FitH 349.823] >> endobj 479 0 obj << /D [836 0 R /FitH 189.815] >> endobj 835 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F15 551 0 R /F39 815 0 R /F26 353 0 R >> /ProcSet [ /PDF /Text ] >> endobj 842 0 obj << /Length 1911 /Filter /FlateDecode >> stream xYr6+Z wwvȉkE$sJ ݯCP8 e s=85/o"8$bcg^Zy8k4.^ G?d銉GQZEۦHH੶rv9;;dygx@?mm~ 0,pC?9bbm@#ddwn+`u_Yk#'Om&hl,abeS'FI :؂ܼ9otUjhrn3-rq5rxoRm.{:?ɢ5[EZTI8!MlX Lq#ͯ:~"LF".V֦r[Vx_x .qa&Z/"(ٮi"?{co>ʣ+E1$;LlSTEa+2!BD +,ε7Z3#PA$T(V90 !M`X8yAЕkvYuqU `Wl(C0ӷ@`xJrjpG`fqBa-9lyΧf6]^]^/g v=.ڄcbI"Sh/lj+,QM=;@0Y{d,eyT]Ʋ#FeYꡖܤ tk>]ͦ˛y!,z{Xa$)F{+`7ʀUCgIA#|vzl%H6dT}0^l~&AͺW\,BH VާkmWIuFG.R@dyovy%1ntbpJ#Wu ʦAbz&(~t-P5]0XhM[0U%u_k':ol,XeI::w%Y#Ҷ_M;8BmO\̣HbS Qb?e=0ƫ&WQOL9h{tc5Dj ełlH%H(@$*g"li9@-u?vG7r]*H ,Dqs\tYϠ`XA~@=3e\GXkW\uTJWԅ9VŹV#FC;Tp~ځ ̾g_j t@ 먌&wvx[ "ꘊv$Ѷgr*PPM*7 yGIOj߫7ڱտLt endstream endobj 841 0 obj << /Type /Page /Contents 842 0 R /Resources 840 0 R /MediaBox [0 0 595.276 841.89] /Parent 846 0 R /Annots [ 839 0 R ] >> endobj 839 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 843 0 obj << /D [841 0 R /FitH 778.724] >> endobj 226 0 obj << /D [841 0 R /FitH 274.426] >> endobj 844 0 obj << /D [841 0 R /FitH 220.186] >> endobj 845 0 obj << /D [841 0 R /FitH 221.285] >> endobj 840 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F15 551 0 R /F39 815 0 R /F26 353 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R >> /ProcSet [ /PDF /Text ] >> endobj 851 0 obj << /Length 1750 /Filter /FlateDecode >> stream xXr6+$' I*#'-$%H"Y~}/b5lsf9uac4SXn(0NdXْrCk"iS=L嶧Vg/l$KTg*3-V;5Pu MhɲjVXIG8&o3j:~"L,}p$s ou[dDuA!қ!W(l/(R[ҽq#NRUKÚ87 ]OZ91'lWa3Xd#lb2rmp۳Q0 .4'|kb`mG0ѥ5uLu3u{XH Bi6w W7;拷flK漠)ǔ|粽'0/zvǵ^;"֣,;3I 7GKhR BpKk>>gE),HvJWE*a'q$5)ٖj;)N=ŬL4R^FT<0W3YWyx@ge~soqDUv'zCkߐԬ)RHe%ҌwdWL[G}ˌdWȳݎi ZS\^r9$:Uc^[9+O<.ر3RO gJ>¯47iSaABE$QzxY{b~ڃ 9mZi@ug *CNNw[o*+5tFnNGl` ~29{ul~T&eRiP/h DnxY'p1l2iVv9ŜM5&G[0sz20TF(%$:^{T9E6{`ֵFj %5ttϴ/NI_)+ endstream endobj 850 0 obj << /Type /Page /Contents 851 0 R /Resources 849 0 R /MediaBox [0 0 595.276 841.89] /Parent 846 0 R /Annots [ 848 0 R 847 0 R ] >> endobj 848 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 847 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [439.411 623.332 455.04 635.083] /A << /S /GoTo /D (table.3.7) >> >> endobj 852 0 obj << /D [850 0 R /FitH 778.724] >> endobj 849 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F63 534 0 R /F41 487 0 R /F15 551 0 R /F39 815 0 R /F26 353 0 R >> /ProcSet [ /PDF /Text ] >> endobj 857 0 obj << /Length 1900 /Filter /FlateDecode >> stream xYv6+Z @$sU.ZdRG}ăQ&.Q8s΀r([/( Dyˍٜr<[Y`*ԷY??)kD1N~SYI9Iȧxgl3J`$O7I3ޛI͋}\#jh3S((A{n#F/EBW<<CCe_Vo4} >5HSCRJ,`[e{aȸ؅,Erhb< $.AS ڀVZpO H]E?dvyCc -q)c5 t`,7͇GGwspa7/yhT%28t_I!m;#ڻMHo D`OwC6+\V zz~w~}zXveR]VgF`QnuPB9TH d& PmLuVMJ4ֻ|Rց>,.WZqqE:?$IyTn+ űк4kd _qy8-J!q"p<兲o91!dVu)MgWĦuJUWg_5vHfh_'ڌHMnί:_A>T~IglP,vx:q?+9ўVd ǔ#œH@Y|>-jMɤ}JZ&"-c-k-/ϵ6n^#^]3n, :N]iW U.8J!|SnQʧu%.> endobj 854 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 853 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [439.411 578.509 455.04 590.259] /A << /S /GoTo /D (table.3.7) >> >> endobj 858 0 obj << /D [856 0 R /FitH 778.724] >> endobj 230 0 obj << /D [856 0 R /FitH 739.268] >> endobj 859 0 obj << /D [856 0 R /FitH 692.43] >> endobj 860 0 obj << /D [856 0 R /FitH 693.528] >> endobj 855 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R /F41 487 0 R /F15 551 0 R /F39 815 0 R /F26 353 0 R >> /ProcSet [ /PDF /Text ] >> endobj 864 0 obj << /Length 504 /Filter /FlateDecode >> stream xڍo0+pmx$ZZ""/8$Əu 64Ye-A#B#A#d9xv [yGBW4Qzٽ"R8 D4$;s⷇+T+`qOVQA:6u6&5s~9XC@#6EV2.c35LA O Tz!0؞ښ(QhRP? ̮"Ɛ4f0D&TnIw_WM[l˜h/׼ذ?ΗvT]|,!@[9t&fuJ،7[L ~ .4]zQ폶[{H6]f/Qd)urF  (ocώB'|m+s碕smKv?RKIs75+Y=Ͽ endstream endobj 863 0 obj << /Type /Page /Contents 864 0 R /Resources 862 0 R /MediaBox [0 0 595.276 841.89] /Parent 846 0 R /Annots [ 861 0 R ] >> endobj 861 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 865 0 obj << /D [863 0 R /FitH 778.724] >> endobj 862 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F41 487 0 R >> /ProcSet [ /PDF /Text ] >> endobj 869 0 obj << /Length 1731 /Filter /FlateDecode >> stream xڽX]o6}У=,Imi"]C ŠZt"̖\IK%Gnރ!&% ~ ޾ q@0RX`2 "A$$ &Iixvv4L0lԇ8[ї{EE!h\GuQyf'(FcɇWf[#x0[g-]:  G!R/8H !T2X+!<n70( LvD!va k70˥.?*m|Y-yQ  Aw(0z S @W^ '}ّճ͋)M»G4XL 'sGtHͥH՘S*~[iּ7+G͙uiNJ89=*kp !C)0E7DCWafMfJ;v'>(V۷DX?Ͷ"1ݭqK7_¦bngZ+|7 Hi.+WgOm ~\Le-맺?%]W~,Pr%\ijVX B1FHfDŤW{S)3|vMt>_5BG~ O{Nv_@X#vOk]_p`MX7Mi33:j&3˺t fu{R;$I7^Okwp qs˶}6FHBu[ӺLix'};: Cةn}D;S?"/+ۑb5ݬ]|KcwX;&맭LWW|z$H:yΟZy l>+hI/=Z2ADAu޿% $=&bp!BrY{"$CW4ǁZEPqPbtZ 1y֭6` m? "Q4h! lF$|_mWO'X7 endstream endobj 868 0 obj << /Type /Page /Contents 869 0 R /Resources 867 0 R /MediaBox [0 0 595.276 841.89] /Parent 846 0 R /Annots [ 866 0 R ] >> endobj 866 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 870 0 obj << /D [868 0 R /FitH 778.724] >> endobj 234 0 obj << /D [868 0 R /FitH 739.268] >> endobj 238 0 obj << /D [868 0 R /FitH 637.731] >> endobj 871 0 obj << /D [868 0 R /FitH 583.49] >> endobj 872 0 obj << /D [868 0 R /FitH 584.589] >> endobj 242 0 obj << /D [868 0 R /FitH 264.524] >> endobj 873 0 obj << /D [868 0 R /FitH 210.284] >> endobj 874 0 obj << /D [868 0 R /FitH 211.383] >> endobj 867 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 878 0 obj << /Length 1536 /Filter /FlateDecode >> stream xXKs6W(u"oGO2n:nrHr)HBK Q @JDN4Hb `r Q#.#%eJ(E~zylN.f,,џqV+0M".X~F|1Ei=( #JLxms`$p+lKqq;4!Є1"H6qwTk\0$u8 L50p &&O" 9A9)w#Ed0n0'  Y@~ SVkŕ^7]C)͉kUak'yV&cӴr[qzHG$޸8,|@Qx0Ǩ&bAɈsX9 jK/YYRA93 4`ڰuKWua-e%!mĮWXYi;OŢe: ߊiՉ1m Ŗ lO=hpYW©Y:M\3>xF-`Ԥ]lΰ)}s.I 6y^.L m ?e98TX߷ {DS‘1's^9d+TW>s߈^oR"s$k`G%H0!o[yZKij@=/(Đkz |\ٴҭ+I4eK},X?/2}JW'iŷ.$*݉<+/;LRvwxu$ד6; @րM_ons ;-rF99PfòTaFT1**htѿ5m<Xvc+YUA^!(BiًSy_Vzf{>HвnwPdlQ{J Gapz]0}HRDQDauaaȓ m&옺{k3mAjҠhv\nL PA IFEBĠJK#:} q[N W*yqU=_|GR{߽R"HAs[X\$ J׭?ٙAn裸$msV8lb;.s\x0H'*0SB8 ڑ;agX,=} 1@)p>$8 o!$#Wx؎<@/:ɱ՟@~(m؀i/ivؘoL\w"=DpB%n+>0ݚ60*hg@ endstream endobj 877 0 obj << /Type /Page /Contents 878 0 R /Resources 876 0 R /MediaBox [0 0 595.276 841.89] /Parent 846 0 R /Annots [ 875 0 R ] >> endobj 875 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 879 0 obj << /D [877 0 R /FitH 778.724] >> endobj 246 0 obj << /D [877 0 R /FitH 438.61] >> endobj 880 0 obj << /D [877 0 R /FitH 384.37] >> endobj 881 0 obj << /D [877 0 R /FitH 385.469] >> endobj 876 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F63 534 0 R /F41 487 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R >> /ProcSet [ /PDF /Text ] >> endobj 885 0 obj << /Length 728 /Filter /FlateDecode >> stream xڽUMS0W,mH@CDI{vM 4}.9AD͖( 8T *ČGh@O3ISԅǃ6sf!K5Q9Em0x>4,^5":G+D0 Ht2l%ܽlcD_gqH4FO/-x]}3CBr,EpF_;Z& BI#g]΋dc+^r=['cܚ(9F6V@"KB4jpԏ 3 ,3rjH Ԓ `mRic}EĞ)9 Ԯ[#oM\rTt*GN2 0˼RnW]ůcr[ݝݡ+^4o 8M+ qɥK{N}$bpuw~ , Wq6voNCIx?{;p$<6-[mօ]_]9qطf}zdSL-]TL,<>&67NssTX#;WSl[ھ慎kx:Yfŧ,"'.1crsw#j/:X;Z.!PTݐX]ѣd  ]\5pza 3 D endstream endobj 884 0 obj << /Type /Page /Contents 885 0 R /Resources 883 0 R /MediaBox [0 0 595.276 841.89] /Parent 887 0 R /Annots [ 882 0 R ] >> endobj 882 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 886 0 obj << /D [884 0 R /FitH 778.724] >> endobj 883 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R /F59 505 0 R >> /ProcSet [ /PDF /Text ] >> endobj 891 0 obj << /Length 1780 /Filter /FlateDecode >> stream xڵXK8Wpl$`ͫfg]C˶0xym! Ɠu|oޫٓa%~֋|3E,FAxaU@؊rFsBgO7 *I AS+zӹ(+Yz @bC;l?Qg>bwf =b=w\= QQ/=>| |{$ÑGh(Qg?;q-LAaB‚!LAB}ޗ TS*ĈajgY_*q% *Ba1m#$ DzHEUhOl2cŞ®3? + |)GnCZ4%7&Y& VCLȒe =8 b|6rhZ/DZ4^ǦkWsUrK_mx1+,6EօQ?˃rB q/nrW ɥ5=݋Muh}@AnkQ@~ti0Gq/@-JmJk0<:2sXF aXu]==3P z1bq<Ӻ3s^φOaK݈Cq= 8aQz1Jm< F3*NǨKPpւD`|z̄:) $B)GA Eǰ:h;[E.?@ҍ!b`PAOB !62i2цQ!-Cg GK?sz BhjMC! OУsSiɚ r59[I$SH Dǒ HNZ_Z#ެD@ )^bXB+r@[ ^˝v`kn=7h [MbӾܔnֶWFtyH6"Ӱw^&3=/{~:ER$:GTҍnsgO߾R7 9f`v%oռm1C-te[Z8%hHH7]{qٲY-˾ C2Ҩ;<<FUMe÷jL ߮Qc*hF`Q[U #^xQGSpej jnND۪.M+Ydg ^FT|3'i69xUuo 8 &ѩ>2@ާtdH ̫XNaLh֙ R.F#`TcpLvw{'T-bֈkW$jo j.ܽ*qnQԡOBm 4o6qctrj-4Ӷ|O8F]50:*E(NknY%kh@#HsΪD^t·2'0h=|.GQWvlp!th9iLO5 /z7_O{~?+vJas+ƍ ݒgݝMlz*p{݆ JMޭ)J"5apO#2Ug _EWy,x&L.Q+P(PS|&v&~^دA3eGe4y% endstream endobj 890 0 obj << /Type /Page /Contents 891 0 R /Resources 889 0 R /MediaBox [0 0 595.276 841.89] /Parent 887 0 R /Annots [ 888 0 R ] >> endobj 888 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 892 0 obj << /D [890 0 R /FitH 778.724] >> endobj 250 0 obj << /D [890 0 R /FitH 739.268] >> endobj 254 0 obj << /D [890 0 R /FitH 624.181] >> endobj 893 0 obj << /D [890 0 R /FitH 569.941] >> endobj 894 0 obj << /D [890 0 R /FitH 571.04] >> endobj 889 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F59 505 0 R /F61 524 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 898 0 obj << /Length 1490 /Filter /FlateDecode >> stream xYYoF~ׯXI>9i:*" F\D)]+Q@>|3;_gF NH\FA$cDY,pACUR_ӲK-@1I(⒁7*E0^XlAiF2?5>z=;frG0mkCI$f 2X{ ,~&!EqDA41lib8C0b}R5mx^,/* QlK4B2 c|@EsSFؾ.%cx xk\$ X #coGߣU& =VI܍U$(TjH3QoKN;=O'ߛ~ i^%ZD0ي # 3$| ǂqiO@KLqG$XF UnsH{$Q?kӧH;BBfɼ3o^' M/$FF?Uְ QwM.8M ]3meʡj`*Ձ>a,.ίz/ty霱uEaR묮,bdM3=6)Ew}މCvQ1oV:RuI푼 WwW]rM"֎CysUmZDg{ZFVfy gHw Bu7|i+TN-ڥ:]uWX SB1ܪl2_M-,AXz<0:j)l9K:#1uULQho%q? -x$a^`y`Pf3h@شt?(h_g!?^XYu͕Zf๶xݪݖЗk|`ҢPىn/9'gWVU0D(W遦8yl| Z7lTå)nܢ"i ہH^PSĩލ~ў-8֍񦩑Wx2hxr>H&N HP;q3B2/lja`_C4xشK=)$C#~`!ML endstream endobj 897 0 obj << /Type /Page /Contents 898 0 R /Resources 896 0 R /MediaBox [0 0 595.276 841.89] /Parent 887 0 R /Annots [ 895 0 R ] >> endobj 895 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 899 0 obj << /D [897 0 R /FitH 778.724] >> endobj 258 0 obj << /D [897 0 R /FitH 739.268] >> endobj 900 0 obj << /D [897 0 R /FitH 692.43] >> endobj 901 0 obj << /D [897 0 R /FitH 693.528] >> endobj 262 0 obj << /D [897 0 R /FitH 421.033] >> endobj 902 0 obj << /D [897 0 R /FitH 366.646] >> endobj 903 0 obj << /D [897 0 R /FitH 367.744] >> endobj 896 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 907 0 obj << /Length 912 /Filter /FlateDecode >> stream xڵVَH}W#HJcIYzzDe 3B7n;:AW7{N%KQB``-R)p$ nʕ!ׁ+?8DeX(Z7~ǷU+u4u-٫xAB*۫`+u~/(<##(.>}!([-c)_\+s219dz窤^3r[}MAC]ЄT~eVyO}RFQEQo:IW"!%X鶯v]yipo +j?C.&-US1K6.Vg&gU/C\t?JWˢn]ŵB%5aAX8`M phS`a%LceGxmqiQu P.g$ tȃPK$th5 菱 pIQkb TpZ ݲfgT֪{VZk RK ڇ`2>Ǖ:҅11ՠwTL`e',S+_Dc)LQD`&F/djRcHkl8fZ.KE}i K-?4ľh!r3r3('L?K!5 aJ}62޺FiAz m`!a|3Ur> endobj 904 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 908 0 obj << /D [906 0 R /FitH 778.724] >> endobj 266 0 obj << /D [906 0 R /FitH 670.939] >> endobj 909 0 obj << /D [906 0 R /FitH 616.699] >> endobj 910 0 obj << /D [906 0 R /FitH 617.798] >> endobj 905 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F59 505 0 R /F61 524 0 R >> /ProcSet [ /PDF /Text ] >> endobj 914 0 obj << /Length 1195 /Filter /FlateDecode >> stream xŘ[6)hĊ.H4mvvҭ;}HAt0lo0.G@0e2xD H@dHI3I ?33AOzWCF=La26x $Ow?'~Xf)~ ֶo+%"ԿBo]>= :oSHmǁ(Z |#(>hS\!Op,*51Wdm92}Hd]]1XRaVV)Ԛ&0 23BG\'[{ha.7Z[iEø#JU㴾̦4QhRdj=d#&E4ݺʳJVY1c5n,+m8e.r@s0^PQPx&7vIF D.,gX,_KeLX<fT@Rfajw&@x^-G'XFipo+äcT9܃Wnܦ;,`T@" p ߃,[U7l:L]AL3ĊnȖYuaCk" ?40y6Ƚ~~u*:b A1cR;.*0 Wt;A6큘Z082`0e=rW1mk}έ:ʆ'fZ8іnn{<։%4+Յ UQ|#$eq,]㰸6eýI⌲̳4j5ri DSXrP'ý=QeR9D^$a@{i|=ՠ_Vz[J@i=DT9No |I&Wi=/G4eA3ew?\9cg7*c|Ӯpb-[vtM~A(XcݏP{Q endstream endobj 913 0 obj << /Type /Page /Contents 914 0 R /Resources 912 0 R /MediaBox [0 0 595.276 841.89] /Parent 887 0 R /Annots [ 911 0 R ] >> endobj 911 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 915 0 obj << /D [913 0 R /FitH 778.724] >> endobj 270 0 obj << /D [913 0 R /FitH 739.268] >> endobj 274 0 obj << /D [913 0 R /FitH 651.28] >> endobj 916 0 obj << /D [913 0 R /FitH 597.04] >> endobj 917 0 obj << /D [913 0 R /FitH 598.138] >> endobj 278 0 obj << /D [913 0 R /FitH 407.45] >> endobj 918 0 obj << /D [913 0 R /FitH 350.957] >> endobj 919 0 obj << /D [913 0 R /FitH 352.056] >> endobj 912 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F59 505 0 R /F61 524 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 923 0 obj << /Length 1059 /Filter /FlateDecode >> stream xWKs6WHΘ}œL2M\uzHr%JbKQ I%P֒N=ŷ #nGߏG^s(3BҘqS)}8aDw,cFy5ݭY-@Cw[LeM 8j}ϲǖzxuDa m3ؤMO_³F ɱ62hb))YHӘOcBy9{x~揎 %Xԝ%\f|Iy3`ўn'_p6_{_(%9 =pL\jE(>LE_B4!҄'ԟ﯃H' :mˮ u` 6B+d*5hsĔorulzyo:_wB"dDŽ1L 0I2oahpxPxp'  G4 Wnv?|Һ"eGd}XF@F:o2 ZU1o&ugkE?EդuJvEYڕuQv.%|]nu.E@O>u;kqBfnneeg' Qfܧ(]q;_V>veQέU[s.h@Cް2^v -+=it76U57 y3릈tj|X c'n0[ʡVXm1nEjmlRER:*PqaL5ŅjBz҉51B u\rHũB5:W> endobj 920 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 924 0 obj << /D [922 0 R /FitH 778.724] >> endobj 282 0 obj << /D [922 0 R /FitH 739.268] >> endobj 925 0 obj << /D [922 0 R /FitH 692.43] >> endobj 926 0 obj << /D [922 0 R /FitH 693.528] >> endobj 286 0 obj << /D [922 0 R /FitH 453.312] >> endobj 927 0 obj << /D [922 0 R /FitH 398.925] >> endobj 928 0 obj << /D [922 0 R /FitH 400.023] >> endobj 921 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 932 0 obj << /Length 1096 /Filter /FlateDecode >> stream xڵXM6WhZ} !'T&I{XIy xf_H6c@xz=C0a? [<ƃ.aiq#/M᷏Bo Eh^m*Xhy(Y&0'&)uBy6M 4EOfu*FbIEkj(.E땙We^W,Yy禔 5$ve}7 M;U;kPG*gg;8,/h&k,k!gHbE;1ulϗ"jhXv-Yrueۂ9A}n*LJ3n+̎bA9S%mZW!XK&->[ }~&$V}lؙKvAPk-sa!&Q詆Z]udI Zjb cAz?7 X@ZBqw2>"yB&W;ɳ.m3n0Fӻ> endobj 929 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 933 0 obj << /D [931 0 R /FitH 778.724] >> endobj 290 0 obj << /D [931 0 R /FitH 739.268] >> endobj 294 0 obj << /D [931 0 R /FitH 664.829] >> endobj 934 0 obj << /D [931 0 R /FitH 610.589] >> endobj 935 0 obj << /D [931 0 R /FitH 611.688] >> endobj 298 0 obj << /D [931 0 R /FitH 418.746] >> endobj 936 0 obj << /D [931 0 R /FitH 364.506] >> endobj 937 0 obj << /D [931 0 R /FitH 365.605] >> endobj 930 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F59 505 0 R /F61 524 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 942 0 obj << /Length 1517 /Filter /FlateDecode >> stream xXn8}WbHJ|f7EmѦ^X02+K.M;4vCb]Ù33ޕ7׫٫3{#%V/( D/2Œr</`HGTZdmT}UDRĄ;Z~pnW\>yg}@QX|SWN7F9޻x3݂Y9ُKpG2^}5{ |zcGc!HrN0#pO0dsy!<ҵ(ޒH]jNTzUi 3A, C %Ds&{6='׾Dʧ< )sX~8 d G(w6值bgW7!HiJ PA1(~Wl4L!M 18a/0K$? ć3S kRg;/yB9Y1Wb) G;suҽVeh=R:.=e($+Ϊj{ȡ<R"<C<%0u^=ƆA9l~gx%WVPz +q{)+#WzÆl` l3k~.(TPDJe?h4%^ڀUnH(ӫ!Sw@#Q.tKOp( G}RE?84#gv<#!Чq\0yM2vh®2W>e肠 8)|`a慱0>fpJ VI dQ.JFۉ}\y\\HxHOX ڡ 5*mN6Bm}bro~/{eF+m:/ʾSwRQYusTVd7,D*l7b9էڋmJEqC/2?h C*#iH5 vfwUO3gTh/!FwF7sc@|gTDF1cSgύHԽc#> endobj 939 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 943 0 obj << /D [941 0 R /FitH 778.724] >> endobj 302 0 obj << /D [941 0 R /FitH 739.268] >> endobj 944 0 obj << /D [941 0 R /FitH 692.43] >> endobj 945 0 obj << /D [941 0 R /FitH 693.528] >> endobj 306 0 obj << /D [941 0 R /FitH 265.07] >> endobj 946 0 obj << /D [941 0 R /FitH 210.83] >> endobj 947 0 obj << /D [941 0 R /FitH 211.929] >> endobj 940 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 951 0 obj << /Length 1069 /Filter /FlateDecode >> stream xWMs6W(X0>8&iIfrHrIHb"U%R"%Lә4Hۇ%"zv>Q5("XI"0yzէ`؅-Mm[WoM|(E5á`EyqP1e{p(JL?6c,@}ozs=luޯ瓿&#u$P|JP> ݷ+(!?&pL,:&S/p'SS+9,t;"OFR# zsoF޴ X6"ڸvɓbwZCf ۸lGo\̶:vdH0/r{VqnZtJ+eߥjS]c ^nPZTxaL߷!<%?P\D8⪻Q0ŌD*8xŐ< #u(<vR`y.:RG_Ոweq}$qxeL`Eۆ7(JAd /1 $6`daC{qf*W[Qt>lrEyzx_칲oeM aTG:vꡪڏMYf, < ٢,ևuqGmӵnhZ%TXrL@9#L-O5-L~A @*r m_ 6|=+ ?fTJQBRL6կyJJhWF?(!Do5*T k45ȳHIpcUY`U鵖Vó PH樓ñLJ:CC_̘jT,!4[A`׃j*?LI!՘>4'(MѬo4\;_ LBZjrVȈL_/IedU Z]?Ch AcOSdٿB`EU?1zʮFĎ#II_ n+UHK2~{?dtmzt>HtdI{ endstream endobj 950 0 obj << /Type /Page /Contents 951 0 R /Resources 949 0 R /MediaBox [0 0 595.276 841.89] /Parent 938 0 R /Annots [ 948 0 R ] >> endobj 948 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 952 0 obj << /D [950 0 R /FitH 778.724] >> endobj 310 0 obj << /D [950 0 R /FitH 486.033] >> endobj 953 0 obj << /D [950 0 R /FitH 431.793] >> endobj 954 0 obj << /D [950 0 R /FitH 432.891] >> endobj 949 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F63 534 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R >> /ProcSet [ /PDF /Text ] >> endobj 965 0 obj << /Length 1705 /Filter /FlateDecode >> stream xڽYr8+x, .G'QR$cVJR.%V(RŊ~$ͤlyF k'WLl<cFm"jzrelN^@3әի<.x4̶)Qd&TZ9=P͸6i&q"g6'&q\6s_Il#\zlV5NŵXNКL9>s}9rkXD̒GKm:iٴ uL&"@ 3_DERd6r>Ac|lM01HO^G~HoL7V u7j캨1nQ0z#m#ׅ E] |o1t #ht|ض xaljK`;eCd#-2YgY:kĶŐxjX܅\K" qXX/,ɉ.:OCQ YP/0'{odMTܶM*a^{,ȘVF|~b=.ma6".ՃA*ydQ}jym|~:6u2L&c+Cc2$P;C,"4{}Z$D>}*봌os@9RRhR|+rhc;ffCYg{fb{38LXRrYQTнNapW@H՘<>I몢3Mی֡2Pgʺ6Y.ԠPQm&r;@hÝk,$4“>Pl+ -եIA.+TID)r4$EHI5IJÈ ZV,  tE#Mis&:qgWg>]--^^>7B-AKUY;_!(V+ 3 QF⦪|=^ɖϣVQnup+4.r-ҍ3|3^{^uJnr3C'EpB{HF1ZR31ۗ\D*( rzBs)Cۧ NcFQHM*"ʻG@Ӳ trW/CfM/UM@͵ (Ca\%JH÷!b<BbәDP3[ݣ3(#ÚXfs(u؆y'X_l {2 y>\]V)47'ŇT&Cxm*|"VÊݕN> )r2aitly?\ߎP ~6X,'ûa endstream endobj 964 0 obj << /Type /Page /Contents 965 0 R /Resources 963 0 R /MediaBox [0 0 595.276 841.89] /Parent 938 0 R /Annots [ 962 0 R 955 0 R ] >> endobj 962 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 955 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [448.247 570.775 463.876 582.526] /A << /S /GoTo /D (table.3.8) >> >> endobj 966 0 obj << /D [964 0 R /FitH 778.724] >> endobj 314 0 obj << /D [964 0 R /FitH 739.268] >> endobj 318 0 obj << /D [964 0 R /FitH 716.846] >> endobj 967 0 obj << /D [964 0 R /FitH 662.394] >> endobj 968 0 obj << /D [964 0 R /FitH 663.493] >> endobj 969 0 obj << /D [964 0 R /FitH 649.944] >> endobj 970 0 obj << /D [964 0 R /FitH 458.479] >> endobj 971 0 obj << /D [964 0 R /FitH 355.635] >> endobj 972 0 obj << /D [964 0 R /FitH 266.341] >> endobj 963 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F4 503 0 R /F61 524 0 R /F59 505 0 R /F63 534 0 R >> /ProcSet [ /PDF /Text ] >> endobj 976 0 obj << /Length 2003 /Filter /FlateDecode >> stream xYm6~fSH>&%km&vnm&\q_zŲc_V>˴rpTzMO_/ >",Z)On__\L'iUge!_(tq#:ߒM+1C^W/@6#rfz`ZgQ:կ{ A9v!4@s'#m0 Lwӗ^}Ά瀡q* &oZOdg+^}߭ZL*޶J:]Y_E叙WyM35\0hlv 5y{P?t.57:h-fńY݋v} TJ }=2]kf:q}M"Q2ȶ pVJkl넷\f*U٥VgHqd֟R=F<(}q[E7_Zc ^ e1 B={h|eBi~Zp`Qb}M #MqKO%]xbfĮ%_ZHEIN?۲?k*䞙ܫ*:ϸ BQZmX@ H@&t)0œLr0 e;)r ^ć7D/2i|A"FwU+x_9SZ!ɻI^rv/Ǡ`cS6g"%ˢ_.n8z@yA17| i06cA]e觇!/wJa ~{311"[9$͌oj^Ym>Ę!h蠔 =}޼}Loި&9 }ag*1*7hͯ55FtWIο&3i$a& bIKRPN/*xlBx+05vc].? ׌Eaא GzïWT-tpA;M_Ji ?7u7rV BOVبf@5LUs%j&lc)BzZV b?Og^nߞfS*+űJx ZïHlmZF~e.МFHCeŢu+B>Q{;=,LM qرuYgm:Y^پѱ/Ep8tNVJGγUlMʋ~_ޜֆ&-E߫uŔ1P* ryxlfi~y[]!fJQ9(~X=IjK/x򧺂F?.\CQ p È PQJeF12q|]q`|. 6/l]$1 .H:Xw*AÀ-c 5,nU1@A7|VO/4$]C DX(?\V [61*4謽C8o; #XQNCBl¶J Tޑ ~(#Qh= G Dq Dn`i*\Z 71 endstream endobj 975 0 obj << /Type /Page /Contents 976 0 R /Resources 974 0 R /MediaBox [0 0 595.276 841.89] /Parent 938 0 R /Annots [ 973 0 R ] >> endobj 973 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 977 0 obj << /D [975 0 R /FitH 778.724] >> endobj 978 0 obj << /D [975 0 R /FitH 739.268] >> endobj 979 0 obj << /D [975 0 R /FitH 585.275] >> endobj 980 0 obj << /D [975 0 R /FitH 397.18] >> endobj 322 0 obj << /D [975 0 R /FitH 232.184] >> endobj 981 0 obj << /D [975 0 R /FitH 177.944] >> endobj 982 0 obj << /D [975 0 R /FitH 179.043] >> endobj 974 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F59 505 0 R /F4 503 0 R /F61 524 0 R >> /ProcSet [ /PDF /Text ] >> endobj 986 0 obj << /Length 477 /Filter /FlateDecode >> stream xSn0+xDQc6FHm=92mHj)1-ٝY-"h}*{JPHpN% J G4G=?YĈ\Vܦ:x)RyB%m"i0 i1i+;!Gp&㧡rw[~{! MyPx/ahlP(fpV#hS^)0%&.ށK2; `4Q`KzE:uϯQ윗^Vr=pJc݄} ;jc% "fsV7FiG 97 qhήQ#%9FH}S',l5r{\֚w5&kմ8osĿqkl*Pjn(l0:4p=Xu'fNr-y7]twŐ!{'/k>m endstream endobj 985 0 obj << /Type /Page /Contents 986 0 R /Resources 984 0 R /MediaBox [0 0 595.276 841.89] /Parent 938 0 R /Annots [ 983 0 R ] >> endobj 983 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 987 0 obj << /D [985 0 R /FitH 778.724] >> endobj 984 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 991 0 obj << /Length 1037 /Filter /FlateDecode >> stream xڽ]s6+ +DR,gmNf!6NŐ^O}% 11缒Z/3@B,nqZi3}uOgG<06HA|P I KT2O1;(ML"ॊ3xkA˿LIo܎*KMj\?gԿjh#"@rfMoߡ5SϾD kU\X[u}Fň$:3(w wP]FY_. Y-@ a9A]\IOs\6^I9Hi獵H"ISar3p,b73C. jzgY.H|zS!IT ;g҆j?<9w}> endobj 988 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 956 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [83.881 488.626 231.728 517.717] /A << /S /GoTo /D (lnk:autopollevents) >> >> endobj 957 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [83.881 474.679 190.109 490.22] /A << /S /GoTo /D (lnk:keyrepeat) >> >> endobj 958 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [83.881 420.083 209.516 476.273] /A << /S /GoTo /D (lnk:mousecursor) >> >> endobj 959 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [83.881 406.136 195.564 421.677] /A << /S /GoTo /D (lnk:stickykeys) >> >> endobj 960 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [83.881 392.188 260.712 407.73] /A << /S /GoTo /D (lnk:stickymousebuttons) >> >> endobj 961 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [83.881 378.24 199.207 393.782] /A << /S /GoTo /D (lnk:systemkeys) >> >> endobj 992 0 obj << /D [990 0 R /FitH 778.724] >> endobj 480 0 obj << /D [990 0 R /FitH 373.912] >> endobj 989 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 997 0 obj << /Length 1572 /Filter /FlateDecode >> stream xXn8+FfI4E@[Dۄ)JǤyGw6, ˒x_K;r뷾c8kmڱ(Ql{~bm3Յ:OtO^RRu떈{0Mg:+oԊVnU nxzun.?gmGkixؑN O =f{%g:|ce=Xz̭ 0sOc+X}d⠫R tduvi,9Kl=L+')إKs%M7#~&]P%7T`eb1S_%1îI3崢^W؞TV4- AI )+Y2ъuScP/MDן^*kɓiqqcmVYOT5܅,gv%')6DX}i puuuk/w(xb/((y];2[uCF$=_8͙q5BF!r$ Q(UZ'G,)u)Qћ!E,sJ`*~Oİ<n *#E d?~ コ>~׺+n w+Ln*i= NӢ4An*pM{; n-i 9Ҁ}HaSQ*wlU-ZNPwTg(oI콠s_\oJ.lhxo5xϾCgP 3`Cѿ2UsU{y;:c27rɰ+7^v,rdѭbj4/Il'нVgcmo>BC"[[W뉠1S*:@Û͇vpsU\ġQ*"-:]Ii9 <dNB7xQS`¾C`jYS^.EԳ%G”d'VIINs>_pf^֣pv8'c d~y~ֳJNJ͟C&, endstream endobj 996 0 obj << /Type /Page /Contents 997 0 R /Resources 995 0 R /MediaBox [0 0 595.276 841.89] /Parent 993 0 R /Annots [ 994 0 R ] >> endobj 994 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 998 0 obj << /D [996 0 R /FitH 778.724] >> endobj 326 0 obj << /D [996 0 R /FitH 739.268] >> endobj 330 0 obj << /D [996 0 R /FitH 435.988] >> endobj 995 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 1002 0 obj << /Length 1743 /Filter /FlateDecode >> stream xYYsH~WdN8.|-uJƃXI'~{4#!I}Rk믯[N:Gc-=bMfkۖc2ϚY'g׽>;3ӕT[A ޗX՗"EfST#+,Lb}"'{fmU w0-pIAIֶ3v '?:.E y/غg`֪[\0$R8Ɲߪ ci&" LD 1I0|e Vdߟ$yz- *)?a*3c?ؤ.\ dƦmR5 AxӨy_.Uyd,!hmS|rɟN`D+k|V~TaFM`J !6r!^ˎ1HULQt ]z) #[2VJ K22ؐ:gl,|iݤ$(+Mi>wrj4JFi02C<}H8b7X$-#CbY7G"\p%ɫyƳwJRm1 v }4[X ) [&ƒQCeU&2Bѵ)0eY0_Dr]i@2nta?@{J @x<ply3h[}er#4<i "vS9xs2BI[w W|g?Bj h֏9@j lIf;[WҨٷ22]-BĻ^G |rPUSD͚LM[UhZ^!)!NrH\)95{#ˋDKX+ߊxV5^knXUBx5 H5&ǧgD4$t.ϯzzd 2eh2MJ)FKDz@nqU+T\-:`jPc*KfEi #S kջ0 "~;0ZQ7=P2n{p]pL"޺XT$@r%=X-q[oA~VYZ5澚% | &Z)_y껨.;fcmb\AN6Y;̒tKP]<) Ɔ3Qvlf֍@jf:otСj1fve:;T47I9 k,SYDA^,-Y{dָjhlet"iY Wvv(cr!㰿lO^tLIF~WqFNOW[sw˿tx;ˬk(ۂ $LxAVqlw*7p |#k{?0v?;Zj +wO endstream endobj 1001 0 obj << /Type /Page /Contents 1002 0 R /Resources 1000 0 R /MediaBox [0 0 595.276 841.89] /Parent 993 0 R /Annots [ 999 0 R ] >> endobj 999 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 1003 0 obj << /D [1001 0 R /FitH 778.724] >> endobj 334 0 obj << /D [1001 0 R /FitH 739.268] >> endobj 338 0 obj << /D [1001 0 R /FitH 413.089] >> endobj 1000 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R /F41 487 0 R >> /ProcSet [ /PDF /Text ] >> endobj 1007 0 obj << /Length 1048 /Filter /FlateDecode >> stream xWMo8W(6KRG'uI:Mna(m )W붿~")˶]eу!J$g޼y321]{llBc4|3|/@yb|6ǷWր؜%+,7t]Y_7`n"!Egpz-w|kLs.?P[b5b.Z)۞^aWl۞#שF!vF 6 vzp\9IE Mۨ(~xn͋%}Nj䄠s1Ƿ `"~>4)hfasYT'x.gҢdqU{͈'rdU\.0Q Mg\]ߎdB>EWEpaq9Z!5!Ĝ˥{)U.|~"JQSV(v%~ll<$d5XYE Ωj '#9],BcQq+ZlO_ӌuA6DƿWjFG.a[(T|:ygi'ݗ*vjw1kV0s@v\)T5͢FphKON-!76|CYe%]9v<*4D1p !rb 4c#N 6Ƀ|~yD)S'4_̵DRꜲӘ E^0Y=GDW迪St~q7CI+U^j>%3FQсImڈ7]q| Kl -:6%- C0bNIJ\moy*hB;`=}MOݣKM` endstream endobj 1006 0 obj << /Type /Page /Contents 1007 0 R /Resources 1005 0 R /MediaBox [0 0 595.276 841.89] /Parent 993 0 R /Annots [ 1004 0 R ] >> endobj 1004 0 obj << /Type /Annot /Subtype /Link /Border[0 0 0]/H/N/C[1 0 0] /Rect [512.504 763.178 525.406 778.72] /A << /S /GoTo /D (page.64) >> >> endobj 491 0 obj << /D [1006 0 R /FitH 778.724] >> endobj 342 0 obj << /D [1006 0 R /FitH 634.392] >> endobj 1005 0 obj << /Font << /F30 352 0 R /F33 360 0 R /F27 351 0 R >> /ProcSet [ /PDF /Text ] >> endobj 1008 0 obj [939.8 644.7] endobj 1010 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 1011 0 obj [531.3 531.3] endobj 1012 0 obj [777.8 277.8 333.3 277.8 500 500 500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8] endobj 1013 0 obj [758.5 714.7 827.9 738.2 643.1 786.2 831.3 439.6 554.5 849.3 680.6 970.1 803.5 762.8 642 790.6 759.3 613.2 584.4 682.8 583.3 944.4 828.5 580.6 682.6 388.9 388.9 388.9 1000 1000 416.7 528.6 429.2 432.8 520.5 465.6 489.6 477 576.2 344.5 411.8 520.6 298.4 878 600.2 484.7 503.1 446.4 451.2 468.7 361.1 572.5 484.7 715.9] endobj 1014 0 obj [556 167 333 611 278 333 333 0 333 606 0 611 389 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 278 250 389 555 500 500 833 778 333 333 333 500 570 250 333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 570 570 570 500 832 667 667 667 722 667 667 722 778 389 500 667 611 889 722 722 611 722 667 556 611 722 667 889 667 611 611 333 278 333 570 500 333 500 500 444 500 444 333 500 556 278 278 500 278 778 556 500 500 500 389 389 278 556 444 667 500 444 389] endobj 1015 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 1016 0 obj [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 1017 0 obj [800 800 800 800] endobj 1018 0 obj [1062.5] endobj 1019 0 obj [556 556 167 333 611 278 333 333 0 333 564 0 611 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 180 250 333 408 500 500 833 778 333 333 333 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 278 278 564 564 564 444 921 722 667 667 722 611 556 722 722 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444 480 200 480 541 0 0 0 333 500 444 1000 500 500 333 1000 556 333 889 0 0 0 0 0 0 444 444] endobj 1020 0 obj [777.8 277.8 777.8 500 777.8 500 777.8 777.8 777.8 777.8 777.8 777.8 777.8 1000 500 500] endobj 1021 0 obj [250 333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 675 675 675 500 920 611 611 667 722 611 611 722 722 333 444 667 556 833 667 722 611 722 611 500 556 722 611 833 611 556 556 389 278 389 422 500 333 500 500 444 500 444 278 500 500 278 278 444 278 722 500 500 500 500 389 389 278 500 444 667 444 444] endobj 1022 0 obj [556 556 167 333 667 278 333 333 0 333 570 0 667 444 333 278 0 0 0 0 0 0 0 0 0 0 0 0 333 278 250 333 555 500 500 1000 833 333 333 333 500 570 250 333 250 278 500 500 500 500 500 500 500 500 500 500 333 333 570 570 570 500 930 722 667 722 722 667 611 778 778 389 500 778 667 944 722 778 611 778 722 556 667 722 722 1000 722 722 667 333 278 333 581 500 333 500 556 444 556 444 333 500 556 278 333 556 278 833 556 500 556 556 444 389 333 556 500 722 500 500 444] endobj 1023 0 obj << /Length1 1666 /Length2 10004 /Length3 0 /Length 11076 /Filter /FlateDecode >> stream xڍP.L^ݝ 8www-RܵHq-R;n9{3Nfyu=BE$f6I!Ll̬ %%96V++3++;JlyI!/J`{[!؉ t2(1 g$* %%ߏZS:1;)X^2m`S+B ZB ,,@;gf0# b P9\@fߔ@;_ԘV*4W"2;|79^4* ?4`U3;@SS`ne H+2C oC3qt @ZL |a?gS'+3o,üYLlg8#>,5j7273M_6/"d  rL-Y~'twd-~vy[^~<. ߊFHll3+SdaeO1O'+7Xd2af`{[h1 _<8L\6VN^˃OfThQ 7ѠkoB2 ?j (ICOGue?@^C "ks@fVW+,ˠ3q2r)rrZAL- v}xeLm^.痞:,"ƠUsHٛ~$;7tGzd{Y^33`aC^\/`'ߍx,2 v RXt~3a1|X rX,,VA>?eHY_B9 r|!|9Ȯ' /q@n SY@um`M+ I.;x!Ojh#^#+sQB/uMܹVi;Iիk"Yf(UND3> *t/ڞWjRi6LE\">Am <v1a) HUÃ˘]~.ۧL)A"IUh9%.X&2آf}kt7g[gd<ƉlĘ8N;fK!0M =iVݫȇ)/L?|PHӛeTz:nb JS%ŀImOi|E4îǛj٦)\꫋bZsuѻ+OΧvqEǪ(He¼6zӴH W+* ;pg6;9H0?4l#<0 5fo%ItTrn݅X? ɥ/:PIT@~2/_yN;1GuzAv|-,>̍ J[*LKѨ8j{1mb-9t53G(mB~|e?3.8, 3HڍHMFoNʼn G^7鐓Co5fet諾U NZ\#|c<i$ |?~v09 P})yY&'[wGj)ue>pHOX]wȒ%Ӿ^3k$k0/,B_gܼs0U_`xZ7 Pmz͵Oo½%w2A$:N(t߼QZ!zҦjŽ#o7 w Pq#m*7?lܰҋ&_G~ S:D.^>nX^ܪ̝Oo#dZNXZwpѼsC ;X5~Uw_컨~X7޾[L&8d 6j&=,-e+ikubS!jjji UjJ8쎉 H@h#ncoE񢜠RZ.*^cN ~,)p˺re_I]u24Uz}ѯiMO&zFqflj}kt:coR26J!wDSO  1pp鸗) mkУoE: QhC03 ܫ iDv_yh9sn7\bDwZWYY:z%$w5`o֕)n_Saߊfk73rp=GSk|RW񅠕p9~Ub$8~lTgzOO} ߃$KGv@uUQDћExZH5_!?i1_WQU$a`D历w廓Ihס(ۿ8)tz$yw#(Ϧβɚ׆GÛ>"%Q6&õSwž.Ë1ŀcL.ֈ`堌HN-F$|VloݖSUK.)̉V,.b'~=}&_T tblW$zPAߣej$PZ3-m4@&I[q]Gw|3kZl/H[ccSsVާmG;KSΧ+ i{՟k= , A51I i;$6zv>cBӀirIlF0%:R?>)SG(FeK&.f.Y-G},tFYh q촊P Cr.WStxP5y;Ʃ}}H"4KxOfqK a8nVgc?$\ΜڽSG&L/-6E_H*"VDW hv:߷Nwb!0Rf$`>GuF9V!.'=ډy,\̄5kW J/mwXkJyӌ/!S曠-:wKSlzfxݚ-'b*;nBF񝍄8mHJϾ{= UBO3M3ZE}#λZ!OoIX$7_=@(i0yU^̞)!7%%RLj7?9PaK)>KFAѭ]-䀫o[eRRِ=J4gm8)uDFװr~Φ* d:F퍛3s\0upcMio;gy};_S6p Gѝ5X.FJG]TXKC?A`cV'"3U%הͶ]9Ϝb.(ma#b\-}Tc2]ЃK*߃huF#!)e3rPc8'Q)]7AJB㤬MQTbP3@|QEC@u%$5Iick+{bp#GOs^7I9PւQ8ѪDvu"ZbY J݌@\^Nӯ qgcgȅfQ6MЎ@txUK}cWW@&JճAC-*˓s 8gK'L(Ԝ1.RgvBYʠ"8X[OPEd }&[< @`pR=˶d"8c<;0ffW 3am蠿Itҝc7!٧V֤Adɍ>[(ϝas ,$NVDnw<^ D$9˕M c< rKXDߊ Q^5pGAwy7h~IH Ac.5ybJG*\ej,r7\UcE+WwYegvG'l"ƻ+KNΜuv^u.9K)"x'f|7j뱜Q ~%jQl~bu x-Z~60/o$ ac~^m3_h%;"\$۬G;wZyp ƹNk1 Z}Xzg[T+[Q{5QH0v*Fo/ { ښIRYٓRX 9==Br{a%ƧCtn'{0n\̋9 Ц >]-E('~E +Os=x7!`b_h8u<V oVPz\}&HJ(s*7HQRN"߰XɹȽG{Շ%fLrI>1(x,Eb>G)`1Q<} wCtF!7Ȯr-/1ky*!⋛"A"?%DAE_K&.t)67>'{a_49DwEgL\@& ݐ/FqyOd'n/\U|[4_-|J1uK 0qvtW pC`t }~ra6sQ5DgN{vB1=yS"ՓӸK z56 *"jfw&Q bo >e"Hqo8s>( hФTߋ#Y}.H؅TmxQ s3 LxG3SY}HxdZxǾP3=&O9ǐXԩۤn^7}_-riMq S X}M'c΂ڭPlSy1g)L=Ku=\Euf0R{pK o>*0֯0}\0@qi!;8@jV!:*DS*nnn?1E6VX*֑͂/eVJ §d[/oAn^O &bUSX:LjQmbRϥ.C*=d l=iceZp=Og,EMmq5g^RaIj?Z8KXdL]ZufC=T;W?YEaKܑB"{#bxg#e( ~0:xԛ~{9.ʐqWV-;ڦxKky=+-*{dPPATtЯqxJn F)w"DfXw!'j=,$ }a9˅4|QeP/zTzWO _d:hj+¢~% x}0윒B<ҵ }0^*P?R >QtŸAvۅkKb,-eBA|)M}#5Tg#U:0D`mg XmI6nOXd6.OûL<<]{uj#ʙ h-&5߶veWۜ+i56.E@ގ9\nқG,_ pZ^?ٺMNTӥb~6iˬvSNm?< YD`6e[% 'Pk<҆y<1y94-MF!Uʷ[Qt)*3]9H~Ǽˀ,b0h`E OP(27d}"j8BU9|F=bR B ezDfL&} |bRob'k㪯ty>2|ɥh rXBaM|];hX"p4ߥo*Lޅⴧ|ŐSQ?!/9OrYF<{_LE탂 ڄҨ Ĕ,ᅕ`=;K)"kV9fpE2a՛A7aչ~xGxz ln۴+wZR oS9Mǹo+oquiv-Ptqb*0#*{kBg?* oO_OW0Ч"DUkEa= "Tq30!ĹŬW6$NAA gC9 5AJgʨyE4'r£[Ձ*kRhWZ^]לMdu^Nz/L d&O9efoޫ{6R0721_ҵs©$G$ֆ!ac,I,;>ҵy;l^ c[Gpx0{ 2#%0J$sOT3*gݻ@=9%\ݷ"SES{PoԊZui>'aS1m rSLM]%r#եW bͿRE]VL>]=$ ZD('>*Cwʭ Ee5t4}A7éM=\WTp}Zx}kLy!J&&J3%;v\  P$ TxtAAaێpW6+zV x㠘ʦ՘x(9A}g/Gc޷Ge2ᣜ}Gv;;W(S,KB+=\oV#Y3}QLY Uq˲/؝0t(vm?A5Iȶ B#B$38X֟|Lga<>_F=I6pӫ\ZeUKC1x_ .@z puPɜ_bˎ}PdXCHN 0Lt?@xXFsH_oWW,jat_eM*k0ڋE6%9#+u4&)D^'W'Ɣw$wd9r+Soqu^89-2/뻇h*}22:mƃ@#zp&'|lѯb " V=]UVk̲ed.\di]})a#Kڊd8$JE!bBEiKM#kȒ?< &!",Sc!z;q0W-qٍ3`F x)Kf=UZl22|M 8$]I1Ǘ^TkAf1R%}OBNTyw>ɤB~gr٨Yvcj$bUibBde2Z"9/RA;lz㔯dvek]ZA&"͡¥FZ6];AUyj[qszn*uC)wB^OCx;PIiI7_uVbWقi,X{xY*mV&zsN8&mãޓd*Œ?߄#UQ'@(|]l%&F/,*-_&9vSR%g Mcxrgp"u0]f`18vt u͆__+r~ح}<:~cgЅ̖( ɷ4?#]l#N%t1"'zE"A#b=-Q&.P_VupB\<6!UK_1hoρDso|T5ˍ[CދR;Xn+ZGQXmpk¯:Ci?O8f={9 ak<L+Sc`F' j.x 8`bu،gjҽFj[:]ROY|PF3$WĭD.\`RL^4vd7~pȱfzh*2pP)`rGs '4o{Y6,A3~sq Θ.dw$(j͂Yu]ks)+[QqŅ]zZ"̷o'PG?L|]+~&W]9_o2kU|iR+E>VU6$^&)akY𙭷jmK֎X)йƠ Pc|Ugw:Zgۉcw9TuF8Ͱ@Wk}H~9LwAނwٓ>O+vL=~Wr &9 cb[BɼhڤxFKy{^:G Cմִ7AJVUoى;JAIto7>19\9*Tz=W_m +tW7,Θhi&ךmy^c-Ќ*6̟XcY84nyO>%ATiyu67T\TFT#Ki3*ۏk0ge'"-M\wli:yyWb<>ɶ/MO9YpDg_}Ǒ-=TbB )OXW~u6v7˱tŪu@jӔ1d;(_K.up|a!k@{Xl:Q4NqL"T۱U#{_.i4oiј3n|CAߣŧ I%#8хu,C0U0_Lk9!2(3S`;V5@//ȱ+}q(W;z~F ',&>BtU7E'm(:8ZNC}Q@VEqx"orkZrFxXv}O첔auw$Xx,.,ЄWs` "Vc&.za^͘t[⍺ĪR/~|?A*/,)qch[(BntS.Yف97'ֹۮV&YY\N)/ǷC,w ?k|MN']kR9㸂 `Ha!S;{ʸl'!mqdJNh=zu#SK6=D la{foȿ_ofR_X,> endobj 1025 0 obj << /Length1 1423 /Length2 6396 /Length3 0 /Length 7361 /Filter /FlateDecode >> stream xڍtTk/HI9CIwHwJ  0CKw (% ] ) -! -z{޻ֽkϳ{;!=Bb I8ٍ/51  G!% !6 D$$$vDyH!^p{@ٕPnpG' G; C!H6sVBC+&)(-qE <epyxt ?FNp!   CH{[`u!8kqu7? BQn/p#`]U-Ar (l< G@;T,ࡡp7 Z G(+ UJ(WW&՟2^ɺ QH8{O7Ac$ VE `IWz#_7o# p`?b4 xx1 C1;#IOvGxr d= |4tuy MQ `0=;.oz_́ɨt@Y~@_; w 0?ܷ{~߈+ݐ'!p_X.{b{n]MavYfto:#`= 1P?L{8B=9(lص`4vbL4v1Ka} (_($*xx@|J0voa> @0sAk`p]X "*?0 J<3J;o[_ys%- f4{Fwey*\l a)3rE{ô?X"3l#͹o&~CI'3 67۾RLAcl 0+;Ko_eje> Xhlt}@o8l֪=pxksdb;8^)/p;iР֜nu- ҄U^>l'JW" : 8u;ŸG7lHHšuԵl~xp{(K{Dͤ_ 2;)/=/ yBO2N>yJr80Tz$}N!M؛b aQ7O'ٯHt)Xzxi<̒fZqn \hاqox;"a^kׄE_U^.i? =v]ۚ7/p\cqNP~7ؐ#tu._m3]mR' ΣOKxj4_F2݌֛ 4juLs.?0ҟ[OaK{>H-u]FܪS4θТ mh(xwT-#>gZ w9IO2)N˫7~ *0ykz !+Hgy}q0Bf٬M[;dgS]){T8A HnέP;Qe[ZIg'/#JldW;de&nwQ5t]=8h&>xF'YH,cYrz4VaMON=SM7_0})Cy`]pԊOA;۝ ~jE 7 lh'㠢{}4FՇ.S8(-ϓo͹rE_;{Q86v^ۀ 2VIʽ=$Z@AeWk_~Sp2/Z5Ij T[eI/\iCڗ;?/nNQW0> {rV!9e "i~믓8{[)t-5)+]_ ~/Tc5֒wXd J^@17zqXAXHP_QnYOP}R&: BËiy~\:֩JmBi=ºM9}%nd@G mOL[&ϧVȤ;535W. `>z+rtjK)|TW7Xw!Op.*o]Hw6&-*GoS0}_wXX@<}7p0j5MW4*q s򤇏gWjJą'2MPf=@qױި0I0SL:Nx?JZke7ĵlH&1C~F=!Dڊ4*Inۡ7%>9/bQFB/:wn#qg÷0݇PK^ƕq}Ӳ:'>32֗6ŭ;)FGid$dD$ʹMaBuN➔SdyI ӥo󃚈0IC~9~N(tinYQ8ߞՏA:E4^ط/dJbg*tDqB9^I=WL=m֟p&kuxv},g7k*ĄD~oD ;,g k.#:xūi@7XO%ހsdrHs-+;;_#6. 0gi=N(j9yY'Sǥrt\ܢD7 P/HY>7fQP"}|w3{wA{x@T@"U~k?~zZ;YL-jjiCٌn`k9IXYDVJXzkŵ5G\ZMB^%_8t.jN}qp7/M ѱ܋vDh} O׆彚X_GSk 'p%RfE4 9xg\&Hť35_X$wʉbo>I JN+wsl( \p"MZ\ @X+^ܘBBǍy%S `ƛ{pݴ>ҙ ?A|i~m@"Y]B6 j< QCW7yq*P%^)T}t5([0N$(r㕔S.K`\FJbﺉSc(biopR뼗Cu׻Hc+C {;uٱuO2')[h:C + >o-gz79]bKDP?7ju/aG[*ROB`gbiD*퍳ܩB&f+f;OdٴWU|E.%T  .qj+/e)aI̬4: .zg4vpx O−*џl|^GdP޻\7o (s[QW_zۙa vd{"*Rq ,;䚈`C+7eU.zP~H٠/.j{Ӂ(Y\y+&WѺ'/:v5CQ_c>vdB5IhʿaLqA4\K? ݬP쩍}vT)\ot|U! 3Vj6v"zNP /1>U %ٻߺ0Q"\mph\aZJ8c}7CYTF!0L1eV|c츋Ǐ}˔Tk|.@dlfLϐ]uD[|gʢ1 D'Ϟ$hiSXmCaO^DplfI]L5.FSƨn+;9|IrP_砹 _we.wj.9b"ZHh_Aڭ8ŸmbǾ)#1aF+.t'mS_nԀ)x2Moqڗd̴sŗ">w+{gi x[DTO܉ʏne>Qej"{bkxT}2ik;5T"dcdqt$ fz'e`z >Sf)pGmVҵU'$$ 7~m߄Ounl7w/" "Jr:m40YBO=쾴gq#++; E^ʹՍL(6]w)Xgx|%%O SQLWݡdң']f=D7\qjLZ2?{|O5k^-x@xYwUW b]rW*.M-kt#zJO<뵱raoTh -ΟoVsëjh#h?Uڌoț:>-X(yg\c=uD17{z9hTV~m Nkҕ%]7itq:qᇈP_4dt~~Xt7|o.Gc&<4/B-͠'bpY۶|Wė.&IrGxsDoCG꽘3ەt3<1Ϣ"8+c^k/iYJ+(9 *^f[.;vGT,sl^t96-kxS^Ҋ~Q(ͭ8ɖ&}/@={ϗ)꣯1(v,xKsPC>Kc-!)̺A _Ʀ"yVAg.Ll[BM>hlPWv7z=otmBXSN^ rr9{/YkeR+N=J?G2)%t3:Ha.JTTd,3wbf)_qʤ$; ~6nma@9N'}r/ A[aw~>yY8osԹETc|M,' 8J d#6f1ādf g9o{@[~`^)`xՀkcm0-p^T)Kѳ`hYDD]Yqr 8jVSVtHZMο rCO18q΁`29ZWhE=ˊ5 CG7zQBbEtc$_:%zM|Zzkpxw>k`֕&3M!*Np/F+%C $B>O MnRẲ+;a°r6RY9| ,n N1"__\g^xS!8=q= fT(VB'n\L-d;09:ID#Fsa[u&!zԸסXP{=V\[a lGeŽv jI E>(LΟIj 0X\ep> endobj 1027 0 obj << /Length1 1422 /Length2 6694 /Length3 0 /Length 7659 /Filter /FlateDecode >> stream xڍtTk/%1HCtw 30 "RHH % HJHJ7H J79{ZY?o?N Iu@B@!!!!a; A^P\9(#!`FFatp7 ĥABB@a!!Hi j!/2 uqEa}r9rARR|Á$ QwLEG0 hpBPJ%ByH ݽH9n>/ 4xA>'/@=;2;GopF F:B^o k= ?:_`GG0P_MGN0/&7 ` y9"(//(D_i0]V;)#!pTH#&%8CNο@8y{¡M\0*t.PLHHHBJB]76~1=@g H0z} @  :@\pc?2fHJ=P ^N8?+hdddab?6%%0_T/,&"44o`__5 /Zp2WC` rBbB{~x+}!5o췙0ݡ00TFaBYC. VMp?mzA NP=Lz1@xA=6@~ˆY8 3&f]Rpxb@0 `FĀ ̆:A~S((G0!@ `3 5QqP;F[#*y{D"~Db7;0[@ ~G8Q&]D[ŻFW_rN!nxԲ561v70Vڄ/XslAaCفTbad3ABAiײ {U5= eoߦJlQe߰z|(g + c8<&%#VWm2Uƺ}EU*{7<|O8~Бzs/Ժ~MT_ԇ*X> OktB %Z-J/$[q={^;M4b-0M󭇻ZW;|_I= ?u;F3]X_h,\\Ӏ vyVZ˟DhB5 =#fwIvx|Gx[*A0xTUϛ[mJ>-wi'S9r|٧H/_4]8256ɛ{|S{^X 1xrzJHP/=N@kt$)E4KHi@8']~k=Wӯ>&Z2H2˱^}b:Q95e>=ђ+ |%%N}&rȢkSHvu(j Xe-͡@e̛VyƓɼ@Tqƕ^q'K3Õ^ |_?Z2%u휘jyF%kٺ\7a5û YIoCo)C9}avb![#nZ2sF=!g4p& kCB[ Q iGEH%'lZK2eY z\$5@h[oI03.|ɧz1oe8]`'ݹXi&r'y9׫協l[ʪfM=씆Ija6t|˰H㱁Ԅ8/؜ez^#?kof2ErFE~֗r[e󚼷߼GfN?a%QtOዶj$yxE- ݾF>wYKX#EFc.%Iz٬-y.Sdo\>KȜ#à" )[t-s:z 2Y^_UZvTNw1k4k\?c;+AH’VOwa6)4 |Xl1%C緭h2^KB)Cc6as*]HB!eیH LJܾS}XɼZusĠw;09_޽-qؤ\̚eelȃ`Gv^V̗s6cgwOZoa7נ3\vM5+!|*R~u;³"5[?7lb5lKY)Ο=Td=rEFw *cl|`Z#>]dm* }S0 &$ܛ?ǕߗuoV~PSO'89'A >%Z[,>U=yל.Rl gE6 {_ԵdJ}V4{E"Ί,Iޥms+M{_,w6T~I?vb$0*&)Hon(zץA)BkBu)DbۊKOp%ػ]yx\)׍nwt њ-A-l *K䦃m qM;;3@a!S]' 8tAxLU>N>琽cU1sKsjV^/]m0ݛ9kp5Y[?=7Vᏽ]_p,Vv]rɃ_g;wO^h_Uf; -_ᓭDKޯEzΑ3YBSƀCo.gUjigs!3FnkQy ax"Wl[ci@J1J1U I97nYsWhܞ_!;f*ZcA$ÅȘnO&݊48/ enİ4j$dV;>^<Me%I#j fTxtK{Tڰr%gHk3&C&>i {-J+@P7Gz7i6FgQ{iukM(,W |j=gHMG'98ƺRϰU@cS¤51EPl)w8~XsJ&8ܶ7#|jU)T[݀T4~|D\]Y~N.ݯ5.4+("qqMbk# 3s7Rm|LADU/3// #feM[-M;/V5*IEǎCgwdw0l[u(6$ğz|_zM4i9ҖBYnP [ALQtTk/ wbX]dhiN̙+9;:fϨ}S0h`ܱ\1۽/qlPHv͒Qs,3n: e$&[z+48jJ1}RwUI?QC= 8Rf~ 75“n?Yjg)0#3 aoUJ׮u)әϓYJ-KO XmR}[b۞0 dzyV?)AT\;Cuk&sNp^а>Ndw?KU F3^1-YgY-6 :N&QJ.k阦B:#%\XU̷,JbeG#+I1O Cʍ4CDkff_#;G'Y"5WkR\PMId͖ߴ23\Df߶^> endobj 1029 0 obj << /Length1 1398 /Length2 6141 /Length3 0 /Length 7093 /Filter /FlateDecode >> stream xڍtT[.H#]2t ! ) 000tt4"-!Ht H %Q9|u~~IGOn VÐ|@~A C~AA!|66 n8L`)(7M8 @1 AAߎp@h0><w@ppb`h`gTEJt9x@Fxm@?> B( P0[0 Wha58O%~ll. 7f@m% ~rAxY~PPbf _ ~A]"V !O۠n[w[`pOfk! VU#"b@qFCQC?|_7D};| ` A`ݟ=T%< @9J[p?+nn?&99(OHDFu@&0;8@M/Mp5.\WЂt pGf"6[Co!>;XA_vݑЄ߮OXl qwo* Y=K)A:Tz(ցA~=3>PfzJPmF%a6p_3'$" ! o|TQ;/5`ߺHTE`G꧈@ ;Z@a6p5[ϫe<6G6s#/pR NeSߓ|y"x'9Y2Qob8UXW^-W?`'&5(5YY0ra1f8!`~voηh16C6nslj#v~XIpP `PFǬ4$90%a ~R[R!dƫՆYOԦJnI IkGyvzE=yԧz /9* 0WUʭFݏXsU7e4:l? T*-m7#%''o媍>w3s8$Yȓ{yAͩ;ӍGe%Z3{{_d1iŶH>>ZU&5NL]%V66'@hA$%.۪X lZsx'#Ϙ0԰H<\H`bUlىmLM\(7G[݋jsy_{PFP'Gvӱ]DJCY>l$In"Bh?^'Y45=oyĥYR//铈+m&_;؍WO7s1kFfn @J';Dߖ]ӌ֗<2%i?-{<2#AfEfNĺw I&DmvB~1q!aBׄu{s]D4*߸z+ܣWu "Ѡ?zno_$kTԲGZKOsa5KKhiT(+@w0B7L ZH'~j.vvovbXd3T.шWF1QbL2j壽~otn /[7:ШN-ȧ[2a~ٳTh}1D;N"ȩ2t7?х\=bI|f6OKzS*0 gII¹EW&Ƣ#Si o \.;sWq-SKD'J¿P1aOkgX!s1˵fG.OR3!hD^Sн`hԅ-cJֺmyvMzUkR;ہeMf m霁00t6ņZǭQwF2C=uԫ>[ `] j\14iŠ{*)ңmSAjWmts lv| ͑͸Px9K/!- _)dgE rUYL?=U "+jU]x,9O5{Eu>^1ŁɡT8ƧJFQ)^jaJh0^όG?g^y0:Ԧ{St,`ҏ5w6J*S3GOUn]]ѵZZ`?߃F]"_)Vk^Wu?lfioN~- .8 ̆BqL{%N "GʸR^0PM/:S)sr/grCʠ?R|]M80dWm1aPFf|LYax{♷`]hL av"Yfqrײ]f ZSu،·1EN*6:5楘D#׮\mg`ps]JI"-hIn21Hrl}ܕE +)ʲƎҧ/vQY'~ߝI$I1Ji,V͊יGDK| =YJ(4YyIgT)tQ;}> ]SVjA#=dkjs.X9G;NC0&2Cr,SC]^߈ 5b!'o}z>0wq-瞍o^ǀi0,|޹1TM@KϔTo TVUCN3=SޔbmyGVzk]ݝ=E.*ϖ|<[E{G>[<9ЬGm}u^-/@yciߨ9C60Z@l)|J/ltY{:|wZue`%UU^Ę(^T%{rn6Z%8q>>eq{Q׸[Iz_>GzLvLgy352 YUB[~wY{L e3󷬞LS |] :UtƿQV(6[\sbnԩR10Zٴ6q7yFSCZ.:їws%UtJ3g,MN)xhi>W\)O$ ڔRMQ?Ei~ t}p5b/0%ˁڰP cr?Q4Lt*;_s*Al*,8dn}x4G<"9P:!E@@z./3k-:'^?(['(c Fڧߙ:_~H!Ϯ5yQi1,Vڟڸ0uWhŕLX~&znd۵%[L-2 h)F\piʻűzMr`6y(VYaWR]s%:U,ۮ֬/w69{#-b20korةD7#aNh$> ?$)lI Pnsk^w"kꋫNXxc}<%g{>'bOp_-rߧ>Qo*r08v)"cs[,P gG wnrcC?eGPpp6c;PJ:`k>VTz]r2B:<6R^h 7~$ @˿\dR]q-%jޗXZ~_KCÍeK;wk 9v,ckXFnT HyVMAfLe/M'lR}% {xoHb=i҅8(>1Fo"-9_ ͭ(f95I~_>5O+T|`[<|fp:":92lr{)BRъ5cC.xͧk[<A=GY\q9ڏ;|om΋@`A35x?++Lf@9n&' Q4}6~Y5:@\;!pdε6UL&z +7h*8k\ORG^OONgt .;-V#B~аˌi!%Cb~KaV=_8xS޷݋ hs 0ͅv?x^w"" UxO.yWwyK 7yD{/iC2ܤΙ9]6u[KNt;wJ]^ż_vvͽGRI^7(^r\)9]fWF~r6{ 1JL_Ev㑍/i<&K8Nsإs0OP%Tr=lvp[U&3*A#DQ`Q(gL"c0QNU[4N}UfPJ8U䋦TOK/b Gמ/ f2o~޵$O%AN>S;+lsz4V9auE=jeX(*$.|R+,fx*gc7چUF!s92ٕbX dbۺ`-edI㲑a4_ؓ-X-CTjp"͚<Ř kYͺDP4?܍6IU`789[L!fm^mEq~IXUZR"3ddm}Փ4ia0|0z+ J6{;8$߶R-,09n0 rlǜ:{Fl页ZrZxX43x1m4*&JzJn\)dq/YX&gܛI'ɒ{Mˀ62()IBwz@S`Ň&Oq`G@n U-}hk҄E^ vKnj,|T#?|mJ33q.؁H".2Wn'DŽ~2 bp=:f`Y->u.eUkܯAIp]ڟLXBR7UFmłw۠ΏqrSbx||B]!e7g BgK.˳,ڕ>rG/,R N҉5ǒniS4$+ endstream endobj 1030 0 obj << /Type /FontDescriptor /FontName /KTQKTJ+CMR8 /Flags 4 /FontBBox [-36 -250 1070 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle 0 /StemV 76 /XHeight 431 /CharSet (/four/three) /FontFile 1029 0 R >> endobj 1031 0 obj << /Length1 1483 /Length2 6502 /Length3 0 /Length 7505 /Filter /FlateDecode >> stream xڍxP[-E:ґޤ& "wE@zG4) HWzA?߽3NfwdƬ+g(#(^~ Ho@@HA ، nH(.< (4hB;j"G0 _D_T@b;"P[& .nP{ߏN0_LLp3 4QgtE5 C!(t@\<==H ^rA7-e35 ˠCyZAhCHt;@Wi] 5rxs8~ ?DJ.po(`A@nD=0k[th!nP~q}Jp[3Bڟ" F7ߟ:p߿WvP/.|p;DM"fAAb""+vUFsuA4 P;i!?? Fl P8a_ktݠ^sZ~Я?Oh"0n1#5C?1#b^1_ ** wNoQkjp;@/ep.+h!z8# a=Co)ޑ; av¼xBφ&=!v55К[[Pۣu/ CP/vKK7]CtH{ =z`'݂D UFP@X`fMVz% GϪ-|@89n/ AZh/Ha6 ೅yX++Ǧb6t9(+0\l ܚw$.;_"M psy˘dBG Kq}*ם}Gʷ&]ٻ;I-jȌDPs+@|ln 3Y)#AB9mLۦrA3N /E< iJ{ 0utKQw/~n7D#>|Kn3'eZPBoD/0 (x\`=Ya\C,:m7 ]fCS{]i^MWG6*,a%v!hC!kγV|7vg/$6],?7i|tWṗ hbF*}}HNd="pk&؀ɨ/R횳>m!kRq9:_h{4* Q~CG'>mrm cW:6(SӈV"ӄ7E&:JG7Vmwj*i^oiptu .ϯROJf0Ͼg˜R= sos\Z3 #R|EMgjЃXj,,*#6HA+G3݉}9zd?P3Y=o3e9WߔQ1|r9 +v5^[T\y_͚D"ѻF{2} LRc Uu?f֜M=㡧6_@@C<#k j,ˉ*-vcYِ幐MQj6  3?j`>Q1 '<7,x0i^}UMPv7K54"\rY#IXY 4eveVS\߇zQK}Gk% [ El6.7VuMg;xKl97{xۚ _ ` ؎#zb?R:ך]i?=[6M".`VhkWxvڜϕ5g;mp ؛' x r#: ~H1R %6gihqigy/N V9g'-HAr7{a$_`~Ρ{B45ay~) L<JMw/5vjvQXת/Z,*"{DxMrԉ<~umF+1*0u;:>nVRUX|9*"L4=#i|>64/7 kV8$KmCkz*7YzfUn#U ]?zSha셜,b׉n|T$ڕvcx:-FcT/OM7V@{ɣ}N Ht6Ȏ o2rXq-{c0Jtt8۞}Kc Ja9oО4S`rU{Zp5W?r,l~;~c_1aZLQP K0Y8<␜2Z]r+ ϰ<.FħZ(TJRc<ю1W{xx a RK.7%q}LTDn=QtחDwaDlw,O;*^@i7\zGɘ@,/ 1Jm 8.VA>ԕ*/V\[v+u{mޤO ~Ğ=hr!TһdZe˙n3pQbXvbܵt{&_;ŹǗ50(Œ٭%x|);@ԹwM0?5s,cX ?80kЙJ֟AcbKEhy8R2c@e+߄v cv\u/IF;.cL&`w zPc0HhYڦyz@>r:1PQ:J/w=B !t! zxrr(([WhGm`ٚ.yF#1vDG)2y8V$‚%3= ByY7rʫW\_N0.O 50F'Nбv"g8܊̓^yNNNBG`«Zltٓy.L0g)[Y6|.Nv+O?Ķ1+Gߥ}Y=ޗGBr'7d*fq717ՍI- Jn6_B+lv?mu>zEJ:2N]\>;rūn[zʡ9jz^[>N9KBrevle\;lܚY_J%lf⌸tu)P&%#Pi*k ]kqZ1eqr]4l'hj#r`oPXh0C6x&Q!;'.uT>ͨWjxҡ>Sִ"J!L;LJek4J;ች"4UM=y@,xg 6)Mkþz4*KWU\81q9h̦,7<${p^>hފ6jd@mə[OJqtެ.>׻KWP{E>&/vbpA LBR7A"E[Pwxkˊ+m\ȏ'2Y{WQ lj6@e_ 켭kH簁eSjssKNՎx6|2>Q mb6$/DҦyЈǴm|6'Fʔ ϺqxT QTgƣyii/iaWj5g˯ %G5< |6 Z@ Kwm2LeņWpΰՓ{9.(m,s!}T-5p _ `#Ioy 3WBlE4|^B];11X2/8F(?~5Qw>}zk6׷E;N^y_#ϻLQgSIk779,ssL5Js8v]ʝ4 [dqe 2a(6}|.z× , 2 —< u2Zme_3?mD龤=;Ӈ8ih}Ƅm__P)=X %ҤFPp ~6T,pA`Uz?ju IqP훯IB>ہSGpj)I]QT{Y痯v GVcredYX#Z|?rD`ZW~:T @o2tyfěɝv>UA֗£Xl֕b_p3Ht8&wJz"Wq+LCЍ]Lˏ_ԉ[Ih(1bCkI' ?]<];^?ᥖYOZ ßE/9PhfEd7E9*쎗^rc7 6_ c_Q}/O] Z]' }<V+ŵp|Syu{R%[ \h&0ש |J7UhE}'ӴjPsx,?'EX1s"&QpXܣ~EެM}9@%g 40'|aZ:O|ƌpiJzFi*q|MvL)=Pr]`g1vZ>dYgCcصf!F)0xWE~AD*0ho\7)0.=Hg?i0J-Vi M;rJ1jvu T5wM٭*-9m 7]㴂% >k"8zztL:y=::sKU :A'Nி1'^do )~{dDYȼ}_ݯ;NA~g ߉sBe%~ȕ,Mu҈׫ٺ^DuWLU@,'X mi--\iUfȈ ]3Ejzs?Hrfˆkk2kejIicVuaYuEk};X!Sf*ay$m?Rworh%'۩#Jn7Fز5^0x%7> endobj 1033 0 obj << /Length1 1401 /Length2 5973 /Length3 0 /Length 6927 /Filter /FlateDecode >> stream xڍuT[6-  Ct483303t7" ȡA:$D ;Ykg߹}_.6#S!\ jV2@H\pq!.?fAr+@ `q6ugBu=\@Q)9Qi9(B!@B1.5ŵ J J( 4`᮸P E>*źɉxyy C\1(" u1p' x L4sD`~MQX/\P8@h 9TGhG s6@Qa+\ Hhp 5XA  qpOk1Fa1O"?NY SC‘X h8w>"'Dy!,HO07s$'gcsc Y)) Y :,oi!sCq {8@<@,^DE0 |w@ TǙ׸@0=Q /[`(?+bgh-|(o8($+) JK]?7_V#@TAڣ1ohG2|wq6 I#-_)7oH嗛pC\.>pTda‰ߡR6BpPA:(.$*! mG`4p uMG@P:3Vlj}5P$4H&c(N0/~E(,.G?NJD491O/_h4Nkpo803ʇ; o:Ra:HsKLUW${깟L1wiF%C6m!ϰx]B}'{m[0ðtZ"cD`'+-ku+-H%e ֊3 e<5ac>|A?Rmcw^RZD+@V;D>_b:NgY $6%.NLaEemIݫϿv܎ksz_s쿖z[8u-_^eM v )BAJ|G:?EVo*7L ̿ T] &f&'ȡ]%W$EݠQaljS݀'e3OيW^Hz) :!ʎpac<")59{}O:}mUs_{j"tncRhΝr2QRjݝ-RwUu 5t,ϣ I'k Sj>\Tuj0KD%P46.5g=w"#?]wW'Vc3c47]?>{JtNȟ+­\_ 4Q ]rO6l?J6~i8E]v ZJ`p(5wӁ8R,7=v՟L rrd +apa&0靑, 蟘JUM>" #2Pe9[*`BeˉbbW_Ӹre5fXl|07GKTc>,}_ZL39 a~͝UzT!2,F4$wu)Sէ*@GӣV;Ϩ9f+rvfLCz ~\l3DZ?אx^x0+ua.&w1{I—0{yjKKG#<*Gd~!YhF=Mxf#QˈR@HTC9 nlVЫ9OK IWcbg'ul_, &v]\e6lDX/h)O35ڑ<Ɣ7dmڽܧ=z6rtJ`Ydlũ PZd'3}(9YEċ4cK/߾dgmd3j!. az*$1r)Scʜ=ȻH(it[̥M\UY/nd}ڄf鞾{MtTQnޭWi𦧶Xe6sΨ6J, M$*6,c1R{Y}/ma^u D#탩kWGPHi#& ݅Tgb/)rca'P@c}R&7I 7VBElL=̯ fQwX^탺 ܠyЧzlYf.aV )ub]^:zT7#<ִ.62ϛTa}tY_v2 FN"9)yie+Ko+f~9.+5zeCsۀ*怍9&5[4A`{ G. ưm!vx;Eq$0.7q7Έ!x H16w{lR}mQ¡|e4ʲOg 8*re2-еoi<=4`f#RKWQ`Ŷn*Mj,I. ,I _btgogJayl(?7']!K)/qH ď,MR;$mnpAZJ} j-HeցbKtbuqpn<9uGCڭI`d(ɓFB˚@XriS3{{jܐֳQ6}P -_FGn.{zZ'uҢ#Yv:8nj6$gŞv;EQR\ݡmjწ7_n;g4UOo6 HK2SʜVpm<_m"Y _WJ9bMV"@娞6UWDfmpŌcR% g=x&fÀi4W4=klf><ʪyDKMzQsONENp'1&_ˆ$ЧLi]߿|q&^Hlr'Mc.N~"aZd:,|ژ!AwDrqziz;N9]drf?3%_`&^9g'\Ѝ[驃;4FBZE_0lM|P+#^h n]LB"\e\_]ʝA6ƫ˂s"jBSs9$QPdPeǜg$V qmu|H-Rh֜ LJ0#$ac?gF~D8/hU盝F}-O~xCFI=0B2&w =.s/6rktV5Z_ <P P ]~4yIEmFU(XCtVFm*y¾b9*_*~^7;ex{9װڍw=k!_z6c9EA҄w4)sJMZ ey)oUD'Le^HRo<oz VMJZ>aOpK5VGɡ7J_XS8K2w=sy=x J 8*O/9{[p>݇zSlFv"MĶPֹ/> endobj 1035 0 obj << /Length1 1398 /Length2 1220 /Length3 0 /Length 2073 /Filter /FlateDecode >> stream xڍSiX  ^AWm$$Ha (0d&N& r+J"*JQы-W7@HI@'e99yw^槲xoHG !!ąFq!Ac0 B?1(\(DaaJ DT; pB Rİ)D8e0C 2p}Yt R$8”U7" RA%<r8 l̘R8TzTA FرLĴxBA`C!(t%DX {,7ese a%FBqgBAlx42R,r3Vi :Ø Na.`dE-BbJb*3M =0\J(Ni"MW Cr\Ʊ:T".ƀ/r}x]P#䘯I0iPKkvLr5(h2h@?F֣"uhNr @:ጁU"@rdͧWMN*֜ 2xHaAA>}Grx?Wc}M~PU+˅{>5蓑'|C A7 <0C}p(,)O *G7S,~@`52tǀ9hө?J(PӆcFT.(DٻI?Jdpnrx|I61 z]x|>“F˦'(:htTP$0>]O[~K@[~˗|-֠I҂4{ۢn5y 1>'yNkK*+G$=v_إ&㭇׏ni{?*)w{t7f [1im]_mkNޢؒwϛe5uqE~#3Cr"%t~yzE/ .M QeExaΡǥ j+彗$D3#s}ZtΚTIGuŁm~WkZ]T&;@-^Ij2k/N_ѶդKמϛ>oR͙\XDD^>nۋu]:]8^y~Ja[)\p`غ(*ڧ-Ϸ4ibOak()q9i̅cqv)Уձ] VwoYu4Y]jOΥ<խC_9k9fksoĬb|3HW!e/ыڱʴ=*}rraPԡn BYfq[JaCĜG_*zx{k?M'ԏ8yy+ՅsڦldS& cP"%&VͨT;fu(4tJ_ZM=|fjLlUqf(ix;l0|qc$wYM85&،V.ؠ^_elZNvU5O`o%y nWpYSeAf%Z?r}-'~,Z˾^ѣux6/vvwaq#sTy)WK8vxˊXYY[Oltb>A7Nw[v;gF&LnhdI~1|jӣ|HbdM#;p(AdUqk^uc{n/K : SB爧ǐcI'? !/o卫]ӊfx3RF9O[;Kzy\L|tYm!C{]cgo=?LȊ '9CW9.H]]ƅqF]#+G ^eR endstream endobj 1036 0 obj << /Type /FontDescriptor /FontName /ZUTHPM+LCIRCLE10 /Flags 4 /FontBBox [-2000 -2000 2040 2040] /Ascent 0 /CapHeight 0 /Descent 0 /ItalicAngle 0 /StemV 40 /XHeight 0 /CharSet (/a4/a5/a6/a7) /FontFile 1035 0 R >> endobj 1037 0 obj << /Length1 1606 /Length2 7846 /Length3 0 /Length 8661 /Filter /FlateDecode >> stream xڭTeXniS Q``$TBAZ;xuuaa㑳Z/$@ ` ׄB4x`+SE hA!$hPZ,( dc?7w p Ca@|P lkPy`W!@'s0@ h,8` u2Pwkp,98-Aǀn@7tr`dA< `g?`NЇ [:`CUEx"lkAa! j?(@7Z@?~9p 6b pژ;YpO9 O |ixm`^55  π  s+(ZciA%7ys"$'5{ k;<,_ ᅁ4ߘk'b@chg~^؂,!.W;ySWk'KAu wCjO7< #, M?05N 74߿,(A,VDazX:~-sgŁ@7%$R*.-3<{PU{Jw0C\rhoZؒDME0o͐]m:`^7G[.k>x;Q?PE ~.>7-Ajr?cr#e>XVŒ5 aM ъ˅GO8rbOʟ6Ccs M% _UUj+Pچ{rѭJ>=bN0Xl;HR?qz6J0@t~ Z_KyۢZ^TH\!8q:اa:fNQBRҾGe2|xCf6`"rLMNiteLMmd2&Ƹ]eazrãxZb4Ѭy;y7x+# 93%< fꢗx z=̚$RD:q>x< c3|eb6xIqr@XLyz0~cۊ./E(WrJ!_Б Uw:ɗ@q@L_PPY>p I8:Z]Ua;~5-Nty66ndTPe)oTx9h9I|=ڽ ҖrG&B9LumtIb[fНxE&ʌ.5 Ms~1Y:0&Io+n@9W;n'ϳhY,ԏ~ }v);vGA /~)S hS} MRE9kH:-#oR M;|:N? kY<@~߈1{'.I\ՁJ/l]}]="/{RQi8+['\4}%ϋ/_ĕ(%x)c?dZا6tKu|ϸ%Kk)EˈI DkX;czLՂE5fG'ÑCY|RA/"륻;:G>ǭNeU'wxl*oIo;|o+ QV?%N^\Bzzt …rP~30dKm:o|zd]7t\^Y\, _/p~5O1t\vefd[5VۮX-qP&ӄmu-`K)<a}k(KBuIr8ɫpE$Zw;;Iʿ")A뉋 )UȜoNɝ{bzgXNQi?XYaSb*"n6du.6,4 qL ^t{f2g}H p W|9aQdnYAw&Udz*FWsEEmD4OVx-&,~T_q8~Ѻ_s˴ߞޅl,99-l =0sH/3Q73U;_Һrir͊f. 9ڴXOF}#.dyX^ZYA#I9o ĞW*vW9ƧI(w71;՚b.p}"Z8:e5y*2y$.chms5F.Ҹ/]p)Gg""rؓ1H?tČ:jvdd~c#L3ƭ8\A YbOgFi~f4^KN@Jr_K5ʌڪ{I4>ڎ}]<#Cm>[sPSֻ{X]1~J7i)aM7o.ⵌ,v7CI2E0=n8F_a85{^cx%7G FRN $lȎmt=[?늾Wh%Цne=ײ/QxY,PĚ_'7^NSЧ)*[d0_OHQT۠a OQI]ø5ŀh I߫+B 3j]j6SDSI=-uθ_ЩPHVq;9|a,_7Q wDćy~=}aX;rr<V1xۉQJLJJTR(*ubt3ׯC7\L%]=V9/wn. ld]XL7V b}S8P4@:se4^UƛI-%_X]mlO)rGũcm\9qUmr OzIRGtVԜ"¤Y[Qƌ$-򒂑$$!//Mq8r4;(UywzAm 9˄Al źo?s*J_>Ikt{>Nhz!K!ҨΈ]QS.Pb4 )=yY^oL|F@<3um,uq'4{i%S'oJ15=^b ,:YH!o{h@9aqALfqCӅjuRwsfڷ?YG8 *fn.aT1lR%l홃 B+#R\L{oM[N4!bƐB5*YA;CxI `5ѩ2ڀ2R+ɟIgD~$Xusϕ u>X?q> Z'K}}6 9#n\̐*Tdܧ'YUeIl)Do+Q@f{KȣY64g{&Sc ugLT<!o)݆_l-ؕ0Xxw {Ne, :'E`X$n0yŦ2c;.ךޫ?9I]N,|>KW@Q#4X6tqyà  O|?&'S2f+WAU]Hz%yP6hO:_^dQlbqE-e.~  6Mˢa2H15Ė,uk4IAuoN7pw`Tr\$*+3J»o >y0ѻR~Nc*Ab50W/_Q{x5hŮZ$~P@Ĺn f,6h`Y|sMl'1C޹ԗdp4|?yz$++b= }@61B_ li5{{v( *LuW- j` s \cf1YQ7q.]52:Rٜ&AhR]$˩PcLNeR)>g]Me|_\ \h SRHjSXj[G7?>x!J΍cea_ݟtDuWx'Aͼ1ڪ7/]cFqʑm'(98^U*/Œ,/Vܠx $ˋEBުD!/0SM~𕏱('KY3S=F&Q\є},l>x&3JTh"_.I=R kr ` &y9J9fdNJ^iLq^MƣT"&H[R.reQ~lZKbSWVNnTlWc==:YeCc|KYGi9'Vq uAoťi\zz f Sq~lR]_ݦ冻3-07HBZdy x䏅?!Iɜب<+(SdȜ%zy 5&cu&^ Tvf 6j^?~VEޕ}!1u^|ڽw)ɖܗUۀ^E *$ͯT'*1GmϤdKS'ʖc:5=H]@*pR@bݰeE:QkF`&UvL6[ 8Ja=m±V7]@>$<\qZipO2~>{ki4*pwcT# ]Rl gSݏ#"OaC߰\[$?|i튅:[ $GEü(@Mi!OvEy(?ŁP48_in~im(. ZV=>xwa96wqJLviE~$TWqR1w/d`LNYy@_6lʕ/s2E[Id4ߠ/0( \_xHt1ZBWk_E:Ct~f_!tjV ~ n>75F)g:a}A-uaq&=F9\Pljۛx3UhpQ7zbtqW'1Gӯ2+YkJ%6ЕIf,o܁FJ2.oI㫃 g9SQɹ1?'%0(_%9;-t_[v9u u"/(1R坿&dݒۣ@ DZyuþQK#+blY wU`6#\67_unvXAU`[Z#AvԆXNaEW_&\OϦ~ Zۅi[_~1,>M[ƾV@:(4v}.V.X$Ip.N #nI2:2#&_/,bg䐌c?_RK~.$M )hX ͨ柡 X,aCuql6y֜}u>CYh5eOtVճC5~ФQ*@5ۋ6FlvieWl;ke_$8n2F~_%hxB/!%ݰ4zy{]<_3Uta^tj/i,FD1 Tѓv.|gMeiHˈB! >>1äsQ.RÕC{P6 <ւ΢Gg[:PPe)%M}WQy$nmi kDdц_(m%jvıՃwk!fԛN)MbkGʣ"Yxt'wް2*}埏pgMMnCBQ-қ̚HvzC*K7]UV_Omnzxv8J4 7ЊPiՉEᦙYu{Samu&2W9_NSB^',4y+]3[ܨ=_u0Ch(ܬ˿|)LmR>׫gRqdZ<3 +aݮx`u(C)lԹ\{(Z9 K04jl VKݬBL{_$xʟ*wd(y::V"lٲbyq-s^t$HY:e< "9[ɤqoʈN n`HnJf+vg&xM7}Ν@~:$nleH);?}L *ozWd񦦜Ѥ!/#G$33'8zߋ#s/|پ]_$%?kOz:[!9c: 2DP91CE>_賑=ܹݛ}hDTCg;9rQ{?fƗE8ASb^ L>|Fhd\-k7a7^Yr@C,r{R[n~eXtQ;dj%"᭔|In_}or7sn)#5ɸ$tN`THή*3ֆjkc5'ʭŖ.6U޹Xٶ?  ׍1 i?/>۠9qXBZNQƣ]Rt2@I(xu׉L薣uim$I, "u=ܒ\6 HEp5{8cͱE*/BݵYDJ<\y_L&RLX;q"xx1FV{qziݷKuũə'[uF1.IhUchɍpՋa3J)XM~F i[TJTşx˘rvh-@D8 k\-`%3M 3ՎPɮ%s?Ж_3Ŭٓ/H3> endobj 1039 0 obj << /Length1 1612 /Length2 14135 /Length3 0 /Length 14972 /Filter /FlateDecode >> stream xڭeP%S;;64ָ5n5и; ~ϙoܹ~?*ٙW̕;#LUI(bbcf(:{+9;)2=\TTn@3Z$vv@Rסc``/?!s{ @t@6@ ',QnfUs[ Hrv8pv4wXb3 5#h`v3s`dav+rqsLnfͪ*)o 3?mV#--<)_0 3['w '9`i`7_07pu/7/__u\\|u_Q-`Ō7onk['Eoy f/ 3Kg'% E7%Ne>$oEF#ZA{ng"` 7su?\@Iȁ6C ̬6ںKz-UmA6+3]`迚 `bce? d/,*Rj SW{_b%guC\ dbpM/:+lKfeW_'rpgV4@fNq[xU_/oA!vY:ܼII^6PF͢J?M?}N]G{qhzR?) 7;xYK3t\-*nCsjN!pz ,¢|tA HkDkè+<=N:~z깁; dȍ0 H9%K7Z|@zx }Cd>Kn^ 5)hãʘS kᰏ"]nob\=7Sq6amC3fõZ qo {xGq;5K.Gr}#8i'?hq ]2 /+gSt[0 -a{,oɍ[dV&`P|`Sq"Znÿ f7%2SS?;;ZZMHĿc)qS暨Ms3EmSE_)i=UG;$Z@EL֧ XL3'Z:`_!%>3/:Lc1p)};:uZ*lv;=M! ȳSDKhmK#ɀm, mi:ֆ ;DNDO92Ph0`BmB/ծZXM0nEHwzqkF qs6& 1x~PSR([' $`;uƐE2C`X >1@(>tw(ȳ}v t#ΕT|HgEr}en^Y6m*61wqÀπ%r~Q9ѵDCf#DyxBcfqa aiFOpv%Cw*QΕ@u,oN1/oѹl6@Zz> pmߑGm5=}6q{ӂ-OLmI2z%7R#:.` HOꇚy"hFaP$WV`mͳʴlz'L]_vͺ0<>qe;Tw;#x}u'(S-!-V)Aaz笿X8,cR4>nն ~qG |F8>! ) d$e"E=qw=(UkYI~-ԡ( an4vQR3&a6GSfI8tʀ?"8hP6BdY*W$pY_/,e$gٝX9Vq1KEUC|þ!TXv&)P'/ZVvdғ+Fُ9 D`8?i=A_ipD-b*F޺0෯j$=sԂ4LI[, bAxz N>vS-'D#C5h+sIڭo.H|LSRݘЭ[`2)VXz碉lx\&z545s 5_N.)Hu`FV'thk U8I35=!22>?dz),Pq{ʤB6wU補v}8>Q7Z`hSEՌz gò/zu؊̈́6F B66Seut`ꃔ]\"9#NM#0]|`{uf~8Jc*Lq3B&>-TvՉ9S&r|40bZ*c^!6ev]3iU}m+So!]G:b|liY:vלo~5!IV,;nPƂh]SW< Zf' !;gf![81ϭ(@$ASbWq.JIR h<6aܖem逯mKvwK~6167 |ޭx=ݴsDTCD<ryTŋeVVb}dan|Gߦ/ ,M`L`~4QhAi z>ȹ<|(f>7)m%&0:u\)Πi8gbnyΜ蹟.ށ9nȻ\t꾂CŖw wTf~4}4~c#Cvo϶ #sS-@;*YZO:;q768fp7CϏ)?B{ė|cР—ywPKn&=Kh83 vW{4NvKrB1)Ҥ/IKzKkMHm'ФL[&gM-MեvI?0ޡ>x:uVKoաK+%vWH@$5\gNEuF%r532@LUƛ|b!^pn~5s{2 ӗ @"}<]5|d}Di@;ýjj hOpt}Q'[6o|xT2gQMGL-3J:l6U%=;V+d4c!D{fwpۡv$if%~Yy/4;3NTl힎5+v'~.ވAÍP~(Lo0trw澤'cjCMDJP]rc|ɕ'=WrVD r1YRXֳ:`)jp{Ve->b XXUH5˶V\{=}A}|qmW w9tT )؂ω>}c OFkZAcx7Uޗ3ؑ5fYT>IGF}S&癟 Z|m=6Zji'|#8]2iW5=c~%%8Ò"A %I[?G]ǦpTw4 Vƞh.A:aSD}Ag>6aE2%h}Y bt/L!ƕ;lἺCbFvLzit9(s]OAhf$QɠТ;~ORN_#~w;7n 9T##%sSiRYQj. ggCkJJ㕄yόJS|GSu :8BXY/Ό>-1AD΍ףԟH^';*Bfd Xӷ/ ؉4t:%=%qT C\4 ,#FIK.d6eH7׉q@x؁}$&^ 0dg><9?`dƘR&(F,$@_WC1g`j|,"|$εSpH\(^+V'OCFGPaTEkz;+)lS"Y)*'܂u?ޝ |4L'Pfռ6xU#FE= "\A3 4" vSȀh+P "UBz|6e.x>Bi19֎Momab):`e7qY`4Z*=0 VaA5wjȊ׶Rw/[Ca0GB P 0s%083+!'6>[[< ~!8iĉc2vђa~*sϘs}#ɈsUcNH9@r> 1Mg- [F4fyҤz~gYw*Ac'zY*ݮ#V :A=#N!Asr"U D b1{+ nmǩ@T~ǫS`A :'U}NeV.nX>㖬Ԩ7>o15—+)6lDEdhJe2D=WϹ!ה)~b/"wx3$9Ue|$k@Fiy qI2X)[Dl{~J{4|:g4Rl§>*[DHZ[+?*jM5}*WrI9UynJ%ƐJs2:BT1waܣѠTI:!l%R f/` |mSv(E8Q6jٜ>Uʯ=46r9\d׽.'Gqao[Ol$kђXQߥل k-s g*Qlj$B~,46cM9gT{7(e%3YEA6آ7I ͊LW p}a=m.d6v=- #P){཰- i5%,@շ]߄@n}A[LԳ0M'>؍*I*b/lE&$ɡjxk&GeplN{UcY}Qso݊ӄeW{gCco0WW_| 5J ()2\kePd)(~;d{[T0j/aUtq/l P-U )HMGYRx*?&J41Cs+gXarSU?: xɢk`o7/5ʰ}'ny[̷y J>8+;N)gp;2-[ Xqbr RSaBJppF6*Bdg_1KE-Q0raCLz%&fjKSff,o6U ١hЩ𳬧~bo]O?f]v&2$1/`RR1Wc+wo{u_"okzRk/cӟ;=K4O9|<*KqSuT|θi^\F80nXHKoӧL?};俄&iMU^%fe';~%7;n (i:WjƦ@p؂тRE&;z .Bճr<k`٧R]|mnv16YL_GLV$yuM.mY"qͷ- ۻn&,UUA1i!\T @LbCubH: < 22X6}fDu_b5wބВ^P͋ TeCf>Ji>.:p?WKaYe 4y# 1)f Xi9֭UN!W!H'cd'pp_CCvPqU+9Vkuz} iD hqp^WExDd^pvsd>fjF-<~Ň~ эh:DlQch2i5N b@h3J=%zbߧ؏>xJWM hWN)}E%J##?`~lY) 뇶c^]MQrEL&'8qr| =`Kp!|̮ۮ^k[{Nbj!=NC11`opGK|y%G~.E"^ FRϯwypcpS j=Ա'|lFZc%qܝV99}>XE͞&zĝC/܉m[7l]8(3yGL謁`׌Ts^TZ6,3oo@+J80QF~%Jp>*y8}APS2M$-dl iAДCXIΧ[98yYS[YZ aQ\?S H麦.exq gza0MUQAySEO܌o;V~, $i}ŪW,[u\0I vis4sFtfK ~z*@DiT?=$hn AU:dr/j~i@S@DB|_Z#U/I_1fJz<`6TeG1Glmy׸p|KnR|l1!l9<4gPI۪|ׂm Iɐt)encj}D2O#Z`Y.S+}@|MT$ ʥNЮ.fI]i*Vjqiel!Ҳ\[G"pzc#qOmE &^ 'OQ_C$6QUZ s~#KL Ց=AM0݌ZIY-@b#q*QѰWhfN=Af\ 1iP 8NrL,=|6MšjfB!Abkqs뗨}JMS?n]7)A ;&-e:"cLn~a|u'$>]R HTW)w-=/0CoJW*b}Uaa]WZ|XNb9h,dvǝvgƔu/N`k(luk+k;$OnmN:_A%LtP^+k(.N.Z@ȟ]"E? =߯'sڂ>8\^2QȡLzYhfl`SأZ0g<m8z'7f3̆&4w!)+!gb@TWWV~8 MPf/OOڵV˔%JQLbl^U.=$F` +. sjdڹmLxrhG >zFoDZ\Px"6S)c'1W _<.Uʼ˵E(_yw1bɂIĵrzLϘ](WӎW4|k{I7O͖6Kɷ_}m2zm3+I.[5_Jdt * eHYMGҍSo%#k (tHIeոҶh̷Oo]f F"b5'V:پ\<|nqsFaC p5#i_-L>|ib7d]mTjm(of4U,٦ԇ\31xeE!@on0-Z)[^&LyG`ֹ: 'НzQ^|觗FbP707Cojep?ZZaFqbv9Kt&;Lo: W}D26*f|() q]:BSdzbNeefJQ_ïM7Rqq;pfV2RrE@b`R,|ipԠLUujHoF.g\~u7"&Rj͑ASte_AN` 筢ojR 00>xp03DF {rHZLY5x à&*{;'0e(wjb"']Tl/[V;X[ŷ$|Ŋu_OmQ,+xQBFa;qS}іU/sezeˎ-jDFØYfNEV1$sT%j؜/{^y>$g媹|3d=&I3 VOG?os(8 L<ܒMlRޘ8"*ݝ+$ōt32<^?e.o8&5>ttV.Ozyr5 rI֢$hm;g.2_|||hrP?nfUbC7dLIwǣTlKS '󻢦B2i2xD$ŚUM^V$L"f!~ J_n%&HP8A?~JMiVuUk o9:sEՇ!PC&"Bt M0#u"stK!S;9*wy`" 6EfunY ՎBWҬٚk]<*D)bw |1dz(ÕW( Bw6dyRo2bMCW1#Nt?N+SݺYC9kFߘ0Lt ݿ:#4^1֞O2APuoA4\7Êh7wq5P[%>-0  <) rݹk\,W9Y}MFkn~d3Qص3lxyV{ǁ^x[™Ҁy%.|I@7c "VCr}{[UVkB{KB4GcG10{{yKo5W߻a)Oø뭹:Qngb XɺP Gyۈ; ml((7;I8q@l IVlb~2߲ŵs7}cnPyUhi|2WuĠsd펷hsLR(`+a Z7YRJ GJJvnRc~_l~Qf]|P,,Wg:0;IK؝ nvFjl+A 4ɭ.Z3{m}C+7+q~9%ʮHXN28<002k Os{u5b&8?8>B} lcM APEuuZ𮜖Odhgyk[_I݊9Ś&f}{!mQ3lSrM]Mpji{d=}b^Qm%=[$#]I))KЦؼTpL /$7^uyz$演-ȊSȍmvl.ВG59"5ʂ9 mHoqs= zƯoQESϴMh3Nw˙,4V~=9VZCCY~xhn9Uuϡ%-6 endstream endobj 1040 0 obj << /Type /FontDescriptor /FontName /ZHOEQX+NimbusMonL-Regu /Flags 4 /FontBBox [-12 -237 650 811] /Ascent 625 /CapHeight 557 /Descent -147 /ItalicAngle 0 /StemV 41 /XHeight 426 /CharSet (/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/R/S/T/U/V/W/a/asterisk/b/braceleft/braceright/c/comma/d/e/f/g/h/i/j/k/l/m/n/o/p/parenleft/parenright/plus/r/s/semicolon/t/two/u/underscore/v/w/x/y/z) /FontFile 1039 0 R >> endobj 1041 0 obj << /Length1 1630 /Length2 7902 /Length3 0 /Length 8732 /Filter /FlateDecode >> stream xڭveX6- 54Cw+9%ݍtw -!!4 ‡>;?fZZs #X- T8[y\`; +'02;Xhʂ@#Pwim' AL`'Wg0@[(idQP*`Pk* A@[jK ]֐057tÜ!p3,3pwBN6 xۺ)=i0;1_u[ <@GOk-iQwKt{e@N>\a?ex!PW,a6N`8t'to'׿jNǜ PeQںyx ΀q:m.uǔ@ʜ= W>ZIqd Pq5n/hVr|Q^N<l qZ:=]j9AGm1o=[ 0?x.#5CmeCt|w]W0i \lu#- r <<!,ao17'77LF#v9:Pe7l=jl?k{.baoHrdzx]Ku j\_fF} lo;pUu{؉;|O@-[eb2+:4;U]G16+C\= ~> hH$mB+<8dJݻ<024 +D F1KW>F{O! 1P*dWmq4'PB ZH^p/%)oM5q]۵ ќ2v'S'%Qc "3DI} O5`ެJ&w@7K>ÑԆ_6'N5h n`7Q7?xdv=ɬ'PuHbx5}˒@6,i2˛oT9Q|/%i3FOB&4l˫5c֞$F23 i4i(,Fn`~Í^fC2& ݖ ;JKfOj(n7 xI%F (8NF9 ^b>tOB353*YP#ԙHڠ`Մ,Gq֕O+SQ >}lL*lpHLo>S vGUPsMU.['ϒuywBg!~bF-s=%Զ=eJ];ВZ%J>r`FV[i@JkԴ+1$cJTo1#JCY NϘG^"|]P^+R`#A#uq|`SP>d<|-[.pri7`5(B\9;vo[G~ް۝p°,Ջ_f]'=7m_g\5QH2n`lXm;۞_ÈP߹H(vwgz-8?[Ku5 u/8GIl'DJ|V=ȼM7]G=x,:b8uS"mK݄9l%IFҬGʷMb ۸eM#՞!,cX/2NbM2̶x)Y~w;EBwOf.GFg%J$'P(|[͏d#:dhooz;>BP_lbGyL2RXX왬p\#7:v;4$m8My%}D28,IV"w4׏x-:P gG){ A~#Ckˍѻd&s ]ZDyk<(q.\5t&B/&QaOQ ^L"*A8#"؋ɹ5WƂY XvIWL&"g= 5:K.eXV0 3YBrJ9z֬VEj,0»->&sְ@ҙʘ}j|yk\ɪM=Ga9Lp-] ^xoAvd殬Uzq~hJ W>1i[-ī;C>d&eK'aE)_;3&+pCs섆ZS#!qD%oӇ.p5r ʌtKM~} ]g}%>sVʫ2f_*+>Ϫ_t7ΟOՐ-$`e>v}]o]n/4⵬pfC ],yt,Y$,s'l܅pwL,hqW 58-b̉tҬN$[ʴ$tvf+0 RqMb1zMX`'#R}GȶF blİ8'"ރZ묪rd?|x O" N/Kj^+8a5&vPa 2Fh̀J]vd#ab"\9RAybRޏ$tzyuP:8lX^DAQ% 8_X9H^938/Wya#-Wz- Xb0Ypd"j]9_[}றd8W+.#'MN==G9|c/OCUt6ePM]9hNQdcO7j~X-)qrB칝vhqOw(<6 Shw> Dgr:`zOQ\Cc8 ͫ()vwhl[]ߦzҨ˦H~uO*-ŏM"E'zV(1/Ћ1~5:b˫;p%=ˋîȑ."u8¶{Pfj01"%uUlam"==$_lWb}BE$x [/̜mvLΣ3iv`"Q5w#I V S=q~*UVsoMUYFS{438w uy!DC'hN7Hy7[uHһ)`g*l0D~q]cvʥ.8R(SJ$ٿpҙ"?= H:wNoc8|i~[./6Jm #ܦۨrW Bn"4t2%(:rD[UO,| >!^=8v$+@Tb,07!BJ` @H6.;KPc*oWY3R4"3:0J~cJ-۬}QN6-:JQu3eoϓDLe֧P2iZ]yAMܴ5FH^yK4P}ԴPg,RQdrskS>Kzb+ʪys.W#̖A bKXkCwYWwcOINb_D>[x"[- ?>撲'jr<-<9ይ ~-sZBs*q'=t<,GqhM)]&XoPeIѦ ~a'sd` ތA7(h6,iL.2.\"xp]eu( :[w>#?*ڋ=z. #Jt5yz/@C+>h)b('QpZ8H{fD"qS0B>MwNŕ'/N.p[!ӦM{P-x,gpZ4 SB,J~ ݛTíBiLTORh>ВPo9s*ig8ĊW1AB Re.v'8BB6~Z?6,wN :] oJʸNf˒֌DZ1W 7\'ke¯⾞5UN8B^ 6}~W*r!`^ 2(qCY0S)=7{V95A79B ues]RٝFF+?7A޸;[N E$*^5}WU*8XFiH[*,Ʒ?3ʣ3]* T<-d/0HD}}|ûU63|t(zgdm=uܕC]c^K4c·Ň kOgK0e. (TiQ(DHv8sn"^`;4__IVȶ*FŌ 3=O[*3%D5^+}m#̇S_^z[XZvO1o- 9y@1Ղc[,Ã&tj}xԞ0/)WhM]˶<5\Qsڡ|I"rވƿ^b~PZ{p}BTAOxeN:+u;.YRX/b-cA Cϊ+GYfW)=@>Vi h+2^0At(^r//h ʤGy⊯ug>MxZsI{ E?&vi,c`h:<ϝ?]?ⱖrfkN}+?>)`%a]n K@m݂%}̗y< _WS\E/*F&&{%z'9K6꽥ٻ / ^Ux J O@=WHig)Z;w}b"7\|J0_OE܌s g$ $%l;6?BhR =m8`6@Nٗ/_AJ|w*{F-Rm9E}A*k4Mk1>Y[˜=0|"f-`[Wh-43S Z[[m8u%`;fVݩ6/ٟ֯QL[ f_%k q*ےd#L Bk_*1'Rm}lG>lѠvb/}4-9ʵ 2FzZ$A=ukվ!oL}YӶ@%^Ix:,l"hqݗ\g_⎩3IqR[.7\D$ǹ7_FaX6Y<]?,s 43#Mr"VE=Fnٵ:mX&zՓBS +*Ewr^lq5g >y'&FH}3"m:EuF(WRrigC^u 5ͳa Bk&f!NRLu^|\OA\=j<[lB [J~/DOx,~>]iA0#F? XY0h9:' VvtȷX|TÑv+t0(AVhZO1t\*cL+3AǢju^l yEn5)ӣ!| o+`jh]\=Hٳ-/L*4@ g^z}7D6k٤ȡs⭅6"X7vM\u6 *y+x!RWg[+iRC㹍p{PMEF'3DGW_n+Wy ^G4Ρ0i)SYfO$u $6{ (e endstream endobj 1042 0 obj << /Type /FontDescriptor /FontName /ZMYRJY+NimbusMonL-ReguObli /Flags 4 /FontBBox [-61 -237 774 811] /Ascent 625 /CapHeight 557 /Descent -147 /ItalicAngle -12 /StemV 43 /XHeight 426 /CharSet (/G/I/L/N/O/P/V/a/b/d/e/f/g/i/l/m/n/o/p/r/s/slash/t/u/x/y) /FontFile 1041 0 R >> endobj 1043 0 obj << /Length1 1626 /Length2 15139 /Length3 0 /Length 15989 /Filter /FlateDecode >> stream xڭeP%;4RCָ7ލ4и6sf8wߏre;$URe17JہYX .* r@SK_;'%dio'n4q ˋ@ wp4hU4hOzf:[q;@!U@04R )blci49ifN&vK`pvXMq1N,NFv3,Ll\L!nf/BN#l);M,@U%da_7o?-ddi A2L-l< d/.Ζvŀ47r2:;tOֽǿ8X6fLlk6C`gW,8O+_ggh02AKhTfA['j]?%]lll.Gyh\l_)F6_I7[Q{ID,,L,6Z:KZM,A&3#]dciF `dea?p3Oyfi-5qMm@KRp"ooڻYx_B\,>bou?~u ;{Fddgw_uv?y h`ol 9P֠V\_m[eV81'C?܃mCݝ ( !-D[d/C8Ոۄb=_C4wHOZIkVՉ^[trJt@?248} ݻG@OorB 0tk0~qvSqqЖYcJ0mjϔ7NGSi{V>{^CKL#TK<XC|&iz|cL*laZGm+MyF1# T;Ggʟ:c_N7A(`]18h(9VUcʯp$1.~a|r+4WC0w #?pKȊ6V=p&-W037R50 |.1=ΕLџ|H~VܳJU#+;rtxГe[`xzqֱs-ҏz@ )j.Y] 2ǩFE'8ȳkN~Vo.?aʻ.]pjLӓ 3*^m>y[>H0U}60ԝqTOyy Ze)8t!\;z|ЎKhΎ4B۪b/: 10fvH1jYzpt~ƨ8Neaӛ`6tƸՍލW#7VܥxZCrvD+!Z| nQc\2_b`p[ivفZ*Ctu^!?wvco$0N~f,۷G]ru~VnLWQ.5 -GnnLkv @uaU^dw*YVI+qci,9;BԴ.V~CX <o!tcG@*7'[J1_V灠 Fb[DYRݣvWPm*z,~9Q*liUMZ:˗."gȵwBaؐIvb9kJ8 7mPs5fYuKz(&XcH^yn;\02%-l(kҼQQǠm 1{jU:q=r5d)uvXJ$!82ԽNr0o2e X=;nTټe񹕪SuKCryphi~Y$z3hQ=A bU|,%{)=98Z~X Kqc nVK.SA{ T7\BQ5 %ALgR0fI[Y1R_=V> \WX3>A;eF\V8hh(7US3tZq/|Qx<z)͔ 2a|N7>rs a却 zx:PR smŨd޷e-N,/Dž |".c6 erٺU&cFnhHg:}d/ q75Ru5H$<`h7%xnzhz8]AAKl']UӦ4qɉ<=bP+&Ke*"+гzxށCj3TAtzsl~bH _`mveq\flPݚwo\'e^X[Ҋ=`Q~teR]c$nzKeɂaǢ*G繫 p~QQXUgtn ȫr{1xc  *]+.̝rQ\{@cZp=7S~wKL ^"8.J[80s/> bDdZu4п[3O( }˺> gYQ" 复Ê//_cyIe҆²ZLg1wN_Z{Imoɺ,)Vh޵4;3uXiƹctLH$Y-7`BN!i/yHZ}A[1VwPf7ư7F˦d]4V:M\ФmLUhHYLقRJ7$|"B$y@8&0_V[xS8B,ě!Yu }J /CJwY=s;k6sW )J]y9HX¼4ugkIż`3.Ubkt;U:vdO-,lM<|C|K5тǸ1c!߯^(·LXx['LՄÉI˧ 7֨[؄~.<%_bkٌ:GQf܂{7B|D:|QH)>tў|A4 d I$4'la!fuw|;sÎ7TDg2VZUEr2z)cg]L[M?[@$K%¸T ]9kwt hk21RݢW\Qr.\|+3=a><{=FcZuo =6\ QxhjCMZ>V  j@96BE9T'Yc+';7G]|u:|0_` zW"PJnGi/[npߓ)uhCx({M( $ LEyJI)|쨻uIUEPҗ dBszZAj:!я+(;~]JYo<FmC_\<$둥\/?ά~)KH)fmkq@>in^Ogq~8B-qY:QwYbwlRJKY35p®+zm"41a+}T~_}U+ޫ a?Ks!%+1qx" 9*Pqm2@#{_'W!㰪!0s-p@We0#"3/XF۾9hJtzq: ,[E$NBTWȥ&3a_^Fp~-AWR\Qjh-wE/wf( 2Io;K>w*<\Is$cKV~+Ԝw5O{bWaJk>gDD=ût!>[!~yoLZ]$}|Z.{EY~'tV/5t )GV18zDˉX+)o%1+:#|-瓘yC8<;tƵw,bJ]T'^coIueRguQ_kOsZaoۄ+c9}GѝI]n.N,}Uys+b7 ^&.1u@ pj- ,*7RAv&r/3[Yq" ::Z7^p}@T`7̡Vi1kA +Y:WLyE'nwSMS=K/fT 澠dz\iBfyt}fP5 1,nfʠSH`-ΡH@J{`@!2vk"2pՓKYe##;$*.& LirYsKg. wϹ3g-SVdy&cͨ秤ɘF")̑_ I ;8;&vL3.~5{5SX|=Bdn:s(`ҋiLcl O<-oN%NY*dQ1bFt/6 t lhY*9Dj@e x w[}bE8DiIXBٴ+E kج&ۭIRͫ 2\>٪Z K "4kx-8`V Z5P$ӊ>L h~k7mі&׶g \@vEpl*IjtiGl}KmLU8m{Xldh&K~ANQp> Bh[=N^)pt&,%,g~#X=BYGOɔ Rr՗Rכ?[R<Ց4|!9fJwǜI$R u Lqm!q_Le1u)#Z1Ig`x-&xm}>nAhw)tJ"'m#ae)(5{ / u/金'^۳.o;~7PǗ"qtըG},c_[P!gD'?RpA Ş[mkYC7ıbpt(kuJ+x&5 ^B 8"~E. ů@$sf|g;J:VӽGS<<Ý@#e]EAH嬦$GK=TLa*oL ( }<i'-n*G7qЄYOCSc/?΋dʼny0@|R';^X,LS $P?GV:p#a/7eL3.nEӟϺ|d5P'ŏ;ʙ#l^e#y/x7g-u‘;RƫBiĽ8ͨ ֘"$:=+/rymo[wI&RM,8P\gkNUq S_Х?tbꚔ15R%?(! TbHFuP*8,C^FښP$ihQ䷬k,[zuGջ_myʰA &M5e(ɤ85WMu`D CZSpKcM"1$;}`W3sؗ"t<~U M92Mذ1j%G f<+P.eI#֛S1³-b%zzC |NlK*#ؗgq!lT٤V b ,3S[ aT#b=p_ 0CTKT89Εy.KZö˖<cfDET@LƋ0JKIS.Yew>gz2 |GK=Sh *.X!-o*6Uٍ~X|ךoS2UltOƟ|.KCZXeKO#MY=\{*YeU{˜H,twrlHz_9U.;Y1/p;nH1M zT9W]6\~AkrcEmM-c2ÁZ8xx"(m5T=/a8QS_CjY8j\qK RZ Eӷ51iw׋U82wzdU)Q5 )ܤDmNlL`*JbydM CqVwmh&luIɓD=xl4e;p=LO&WI?ͫ˵ u K2{m :O=Q'vWө?jF7\RubV% #Wn5KѬHll ;*Igzb?"mp#MLlLT6G]Fny)k QG,릮hd~6Q3[SB䮙’ v 0(͑yP++q֤ɥ0uH׌aV(SL|8.h#Ɣ)[|Dd~źmӹ k|%=}q$N,?PKĽPˈVI>ceOWpWg6"TSthY0 Eŏ- fڠU=i ~M()7ؤ,6e4-OhB3gtg maY0/3bSBh7OgMb<4?  7}G$h$*3f"{?pEPrSÅ&-x@fxM1g˳|<}4U* Gۯ g D t"?34e 1k&qT(ok1|^p+húou h֦$`z6(FWMopE&f6?@=Y7'_)CA iQ!njAyvo}W]{!TH)߃)21)IH3< d7xε@57M%ŞP(Kˑ0֢:]!՚EwKnC4ޮ$ej-WS` /Z[}Y{t$E03yȱn\@ <2{Br NTaM[?<1/46Ќ/igWX?j ~5Wy{i!`rLI;=T;332ňV8'ߡ\j.YG8kc+9˞&=I)Ի WS||G! BG4>YqUnMeX@ЛOnNidIIL%p΃3x +s :FWC$E3n|GP@"2O*щbԖl@:'tH9y(I>EPz[WT>-Dץ0, ޻sco!ha^`0:@V %l0 F-W!zƗ璊՟-ՙ^ݎ`.):B:}0IzcE&.*:v=;2qBFI|TK,GPKptF)BR Mc鍭5ʦ$va}ҵ+Kfj>e۞m|}v͊|3R0iG7W2%wk(?B9㐽/5~,n-pZ0TOcÖPCkgF= 2 խlJ"D;HF [`1c㍛dJ.[1E?u,$t6N^RJaBNX26 Up%E [c:b]590 jkiU1`(]iA@mx }/puҊ ybkOx0?-u p_8t#@W2W5Q31R?zPKjr /WO硎ƐזuSTi˃#?:}Ka9BD)=TC'"6#pHu(|o8BTUH_EJyi9&qb2>0CMgp<ͳA2杒LY|<p5z}wfj7#wUT"D47 HҰM`G'! B m%LwY۾*  TJ1||bu\Ǎ}+^ha[N%If~D k$yfpBNx6z"W-%7 &rw; :/+OPI O)gHI*! jw *XK5 xmscBꛨQ0&4"$\&m]B V D?f}mFtcX`j8hH5M:[&ϾlcQd{ VqdX 'Jryid E5e8urvK M|SlXT]`y:y.S]3MmDt"Kwvq4}VQC '?T_Kd֣bv^=^ǟZVxR|)U&Xhxlx ;&b|^Z 1 UCQ@hNo)z9IhW\`*n]s,~[.qU>cnvfB!R2o=ń4*v/藣T-?Go`y-h^}1EL /zH͘8Q ʞʜw>φZG*$- VԱ끋6 j{|cF.Y"QHRPRL.1iuY۩2Kɡ~[O 16\=USP[da4ʈ9s~K?e^ E`P2Pʘi. gktedGNa$2dјRQـ <U.-#eZ1XϬ:ӥWp؀T)Fp Ujsd r7s-Xոz 3]z#V2 hJh kUȎmN/*?,,~rm1g+|ռ  -5;$vc);FnB;uZ<h%xwcUci`5Me1"nڗ$G ~' M̴RbnZ ߯yߏTX"w h:"-#0ZjMB[:el~AZ]SY~VnqjZ)@NR5(x1R18o%BсX3c^C R an [Kw]Q!nOkZ+ I>p2F@⊇Ʈr2Mr3ay[h3n'^E nT@z aQs (@aTh|8Yys]}> G-eӨ@i'!0dmԕxTh ޭ*VY>?|<˵o-DX3ΰ"#tl8evIvnD'ٛ4 %X4֤`Q_08lfO`WvCF.f}~J*[./%=rBu!DŽO_wG1`םt"W1ӵge>Cr{#.g yraշFkB)h\nl'c"/5X/lfh˩UQI.T~k Bx+XE砖x;C,юƨTV\iEc epF{0b7@X yʐGuy&XSJC0åBԭO;gV\kɸTҷ1];B yp[?c!uZ$vy,P_N¡ -lwNa(]=>D eM/ E[3ۇxI|LX <%%m#QH>ZW&4a܊_ #8}ߩi;B=4ЂVՉJC_s5.3aՏ3PC2軐NDOf-B26kğ )>MXR9!2zՁ.XX+鏘*߼i\ xxܾm ;F^Gxq ʕ":]>Y~HX1բ,ke{ZgWu\[2+1Q]C׿ue`g}JǾVEs7:p?`>̔ h|^AH^j:%EHSmFY)N?:窷7fk= #g,>7;}hvp ]sa ߉ȴlEC9ZR[QՀL hr,<#R| q@t3!iob&ʷ\6.J[j0 PTMɇr٠p԰ba rf[,'byauWsUKI-?x1]T]&uܢ 0#/] gCa&UbQ- ڤMK.1!)+5.j誢H[)ۻT 6DD +-,41i?DP_~Yء“_YmLlĠ/rL_tiH5* Y(ud;:f!ՐᮭŰnE٩-`T~yO@sa+m])(!X%n<‡ ɬwt*Ps8cNY*%ͱP'IUe5Rku=) @b^evqҗ {L.cDM,X56Tb$'9FКs(8;]VC)9İb/d+fp ɖ=*)>/$.7`Ui+LNy1+`>m kE1s30sWҏ]0"/dT\cJz%+)j0)5UVt\6;HTuҘХE'E{erpY4ρ;,4al 㣺q\s+x] 1y8 }DݲMmV 8.U%|1>U'WL ׳KJŝnfIO~-'֨P=Zaa%0>MToX-ΣMSo5 )*騷nyv9vL0 fL( Q_7(}S\?mkZi`:h* uQ ~|Wѓj 9G4kMLo[Z9']Ljk8?Q`=R#3lz7ql.'F~>L7S9C[qB}d֐ۙR?tN=4) i%[N9fVu-AV 1!`U6Cs1>g5õo(4o6r_s:9aqY[|R~)3bPM:4wW󅌝?t9)]ls[rZ%#uPݜJu04VG"2 ҩ;|n2j;zLQjȿ-$m!pf1u|%^ sVPtYᅵn|&18]K%>W'AOsreߛTV+ ߮9 0Jْ\a,)xYF؈DݽWlK3yuu>8(9](A|B)t**9=VL'\N飷Ȟs/{qU:ŏ9LX=#k< C)U~b6h{z/r!U4d%j0'~?agFl5eHq,{;=.NKʻ#r-΃kâ`tZ3䈅+V O!a<䜈V2Srش4y~u1ݥT$}7#HX|}SxyFt~jP?J+L6a3<;.Ɖ\f S: Rg6<2!>ǝ\ể$ endstream endobj 1044 0 obj << /Type /FontDescriptor /FontName /IYTDXZ+NimbusRomNo9L-Medi /Flags 4 /FontBBox [-168 -341 1000 960] /Ascent 690 /CapHeight 690 /Descent -209 /ItalicAngle 0 /StemV 140 /XHeight 461 /CharSet (/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/a/b/c/d/e/eight/f/fi/five/four/g/h/hyphen/i/k/l/m/n/nine/o/one/p/period/plus/r/s/seven/six/slash/t/three/two/u/underscore/v/w/x/y/z/zero) /FontFile 1043 0 R >> endobj 1045 0 obj << /Length1 1642 /Length2 9574 /Length3 0 /Length 10426 /Filter /FlateDecode >> stream xڭweTm-Npwk=8ƂHpw']}wfΚ{ϟsGzU]onjrufQ P Pq0ssQ9(67 Z 4u9J@ `C<6V֮:M5mzFFY;gok ?gؘ?6]{k.Z doVo0spmqPq5Xڿ]_vMG &_wo%fϪ#'lڿU&U A<}x3s ~Ί`}666v?>:9:ZM? `s70M[85@G9@mjFk ^ค~_;`SIFa~@?5b:;Kp=mw2,ؗ7cq7ը%X:7渪QvN;Jl_N~)uq8 5G4 whG/a{wL]=M7/ywcG}2>al;DNXވh% Vp0̔o 97!OMT k"_ Bz iۮpM Rx8$B"t?ۨ[ + 1Ud`WԉgGC[L8<:gGEVTπܚ.^sv&=g!6UG4@4w:i3ٓI\f~)*ƿJqبmSVAK+G&h.~V)68Z:D`߉%Ԁ~bӨ^x4]QL&KT}=@ezu6T#'뮆k6Slb[8i CW*,kߓD'e;uyVGd$'-+`@[[F v ;vs?9)h Ƴ7IMJ_#T`RcD%sjӯ+]a# 8o][F⒏#]i.!=meK 5(niqo׬9$t02R[a-I?ã]k D{< vDRv)]Pa=8* ̵H_Fx,WTF^VHvxIv:4!϶ v+3}-%@tRGd;2}]&]w~no6ȇ[27ޞn=S|Ҟ97;;GsvluFڋlONmd"Ǜf%W`6gz[ b~FڊZQˢ/Y(v{xjeX*׫n95 (A.ߝy8cn 2/~$B]I8~ޝO80>²E@@~4 T `|T%bj}e{h]dWIl0 ӥ:v)j46j'Y mB$O{pWS};փ脟$=x&)\I|N@!u<^,__ j[ |+5<1I P>>$戬 j0w(dRu%YRM0-]TCIKK9KI&)ttI~× [u H$ڊVdnw?p/1J%?b0,r. +r\[ut/ϨmH>'*AaavTՏ?k,fmTKbXctGGh lfI ?^{lVJM5`CqցGLf I>G454˻HhQ:*D}T%+KYv:tuc69H׎jNzWjg{'r܊P= I)`DArhuSSDQ /$"ϥhM6C-/2 c6!8.[6Kn,xW^!\Y*X^vjjmCN1~"]]2ϐH0e?߫;1r3^˜qHb!B&H@>÷yK]ӨYDnѬtsW/,<Z&2 D8WSQ4onG=}}(!Fm'3.UUnE0@<®m9ʑ6'dc, wEEY5|!q f7wW ѡePmKأ_K&͏,WOxe/!*SceiY1חkEaLvcgV? o8NEZ4홢r!UO1 _bP &8?ms 2]C2)¾A[*E\\˸Z nkaɆ?7Sҍ jE+fpɼE}]`u*x?4X~H[WI%Ɵ&uBK$_nfJ7]ꃓ5p껤V>'J*v' w-G./a 9D\ %K_#  :cg慨I.3zp 2á7Fye,Her[)Ycw+K`* ]ӁlsH]zPP^&9myOָXA <1|Kʔ}n|Q]*&jg#?i!,`摈QUj2,zYRiN0{IĭbxɥM~GAp{r]MVB}A ,$f8c^s_hk$4u@`P4t c7ru"BEDIy1ľ;T M006惴 }ū Fx}uNA~O.L~>)u(+k} HkBۿFG2n˽ ԯrnm&Jqik ٯ:]= CAR;('c14Ml0)DD^  +t6SՀvDm3R=̜v̒~X<q'9b_a;7˚V8LmK`g8#M S֒#. F'$LS}\ IZ`NwX{ǟ(HzoN|$] Ŗ*/]ArTUU/؈Z1xV)V~nY.wY^~MB L 442ߏS] da>HjCO1;f?#>-[N&/~),iE|ejlFF(ޕ*cf4+qs cjgb3EtYK5qC=O ?PYPYGB|e,AYgz9i'Ye2T(쇢LXan? E 9>WQYh̾NWщCiklG ð aJ DVPoUjv#Uǐ|&Se5 1 E 9eR\x| 6pcj[j{Ai^mIj׍=9VvdkAv‰WQբ q 芄j+J =*^?t󴉮psjuG4W*<]F d.H7ܻK +[Q&7 -ʥrӮE;:gؚӏPr(=@s.ps4oeîTQ\Cg-y"RL?%ø_ySI~] o%=^yݎ&up FˢdʺF'*!znj.31:ER6u `5hLP|]OOO{etdNO):%H($N] Q>4b%9:tp&FYOt $lY~fRTX6~Hu {l a#>AN hk}tsJ-jnWcZ6Zح X @ap䝬DvDBOd^ HџK5xv9 qc8o==>]mLRu`ä ^[) 5 D5V1x /ctĴl.ͱJDr&_` q4vF^ QG\tlz\c;e ?ai: jYBx;GVEVH\64IWzicd"D) hN2/ZE ,LS.GRsAӷş$:]ys\@nd7^TCRLqJ^:-1_P>1@8Y,$D TwC]Wueƫ,}!/{bO)w%wR:fTw"ebb la0buƯ[3љ;R+@T* Q0|nnK;T@ {=^B,\pü k +uZT&}V 2:^gƔ_P٢y'M`TIXq7a x1,%fPjް&~/լCkVD9z%#mڒɌ%4I;@sBZjL}SԦ!I;E>(fx|$8!u+ iI +( RNh8LOpg2Ì8#iZCz3 |umEvqUV[Dj |!r2\9K%*mB :+MpmF=߹ZyиU}nI(V*pxbTծv:"lt~@Ir} I?ؤ ݑ#q|%L{((]2(%jjQB_q_xͫ"mޚ*)9 CΌiGNk-)2q,()7E}Pk7Olyſ Ym5ɟ w$yJĹ)GQf6ꅍꨡ'%ň @9ڇ )%Eq5/1qY~q3*#4R*,TsI$cu+D> Yx-;^2k]-xî7ݳC# *gޝr[9Sf~u|ndųMZ@ѷbNmC ‚PPժ{pjEzZZ _1Z+#x28!tUm[Џu C&V'v,&TvNQ2HhE€$>k|'m8u)ekXC HsTSt_?0?y>V}KI_Fv}cS;xk mҗ % s<~ҕ,މ{4lNrzvg.Rv/2 ,;j:m^ͦH]@u!IF|Y16έBP9wG=kBnXe9Oh %.X$kAO!% <\I$:i0=7Fsde\ޚÕL%i_KeĵvJ 잣V GgQm_=,y״sUĠlsQ>bfgGo5bV塠8cnW25dg< 9|- Nw+т{eXF9UͽV&jwg%,Lh kT*hWW{Yu\RAci^evtWmlwNZq99[+,Ӫ.$\/euWdߣ_WPHssTcI@,]@d=r06 p*{_eޝTH$)%Wv20NL 4| dNsyٹ;k'hqD#'L6K|5G\#!%\]f^?k.K}/ɘBB)!3-_\}^nDY 0GiZ%7wg ?SNOy8ఆ|1^M&Lx߶~w;"sH=઱;6`/j?P,7kb# p$Ff qp< hNE c<`6 Nj ͎ |H[Kr+Es}ʃsQsQVUѰM/קm)B0ҲD"]Ld봻6qf3|vN)1Ȫ5lV.ZؔVoA L86BHW"*Hg!quZ_(Ek'"TV$|4{5`v3e՟N|;9vS^(7B"{hl-=Q?5jJUB/gԖfoWi MXD%u^azj,0ɣ~X?LI:AB%̯AcL֖CaP-d)|p_D!wƊ tžJъNnV r9ǼtIpl_HxA2Gt`gqF>׎@5*w}2훗]I^f_N4KP7dut?vYD b'f-O}Q~E4ۖ, 34EX/3+I7@7xʘ@DSMWuiH\|9uuɩEͰZxTbaҌsp=nZ*?yN节7&Hj`Sa[d/Z/!@YJi6!DXuX*P a&'>TΥiykه`p4n`Ηꧨҟv8.h(=3`BMt>L ̀'<4{rLjŶЭ }.Nbni'+Ǧtɋ@pgZptTBTq3~F5n/43QL z% Q=\;&yYx}!aQ2u jV>Ure:p}`cbh%#fRFA3d/[E}7/-LCt|)I `9Xn3)Uȴf8"6?r=:lv:0}3/ω# .E$2dye5ë$\3vH n˴pfM8Mw ͊8Og:%3$;Q\bPA{?a#Cڸ}tcz endstream endobj 1046 0 obj << /Type /FontDescriptor /FontName /QRLXJK+NimbusRomNo9L-MediItal /Flags 4 /FontBBox [-200 -324 996 964] /Ascent 688 /CapHeight 688 /Descent -209 /ItalicAngle -15 /StemV 120 /XHeight 462 /CharSet (/D/I/a/b/c/comma/d/e/f/fl/g/h/i/j/k/l/m/n/o/p/r/s/t/u/v/w/x/y/z) /FontFile 1045 0 R >> endobj 1047 0 obj << /Length1 1630 /Length2 17993 /Length3 0 /Length 18835 /Filter /FlateDecode >> stream xڬctf]&bݩضmwlۨضm'b۶}q?c5q5ؤD ʴƶ&b@'ZF:.- 3௜T(bdP71a[;w 3s':%55I1毧@Qdn06+hJʉ(T&@k@hB 0uX0[S#_,AG⯛?*w#N ? +!;ۿ6ul,*;O'sb;ZUlMZ9Sҿtaj ,'7b- f`4-f /__u m/ڔoL#,̊$o\L foƶ@kw),ߐ3ߑ'?tos3;1Kg2߭MLo[facQX`j`gM-&W[ MbnadLt+z uuq%%łApRqF? ٺF)ȍ gd O䃣C{n qcaH |N>!^]+2[ԫQT]=p Ib. ̾A c]/CCb hDŽUt:%ϖVR29c,#S Y7?Q($3B~K1p )jEN}'C-O(p&RI:SFxqo iBuTÿ,yS|Ҳrvh?) Ur'Ebæ+J2.IG;U5a_QxڽaHST/F.ׇ%Iqްwc#vvnfPrFOn"7~s̅_5/y !- q.w-(TL=C+[۴9/B,pyW}rJ L,u=.n%c!.7 x`#ȹ3 KO]C dZryՈQ5z28($_bn[L⸭ zuO1qo_",*VdR`:G5G@;tƇ|fA@3ҝEs4f Pc%l]EH0\U֚xyܪK e'J6v͌ϒ\kg/OW :*3D&X@0v,g9Dk^Rq.7UWJ8i{bH 3lvr)!\+]x:yp4ԛeZFT [A=l@'AF5&p{8b1u6RCJ/*l)J˭Lo[Ɋ*&UFv6WW&IPJ^Gf ƵSzo`x438ߗ#gjYYR}V {uClpx9(J~dְz`Ts#en i2H]6nsfo2 kJB@$a.d#?KCm<ؾ'gp2kP%(e+x4zsÂ]Xi2/)VzQ} bb.E;zZcKF ^|MtecqW{޿3N!4tKƒà5ݑƕ2d>2wNҳ*ܐf>ۤjB5#+nF-tCt;.J2:|u5~M; k6 B~j`y(?|E}qDoEW2^ }%<ż+%exǣ4I$ JuF737wz/*PUTl3ֽr/6v9^JJ'\)Q4xՅ``H‘E}U$T>lb@"J@n&l@>xgtbح@7P5 ƉcfbGil v=]"r3XN`ؤvڱAq +](Ih!W-3k*#:T8*9h+K !;vU^lj 1-vX{"3HPw{, !-U1Yl憎't+') T]ְ|qo4Ĝf֩ -*ъ~i"$kYm-3:'5>L[bG_sǾֈQ.l oR u|ݰ0u$WZ)G+ˬk.q.UX@2[J¥n5xLc"= UE0M"bB*N%4^r.C7MKs{EW1a~K`7fMnP>X0޾֛RԘux$|f%U] HCUu’d9"jsPq -<$`= I jٴ{$BUUh4O*75J`!cY_2T{қᑑJK'4?WK +gtz"_3 1t tt LΖcJaxZ $pn1Cr*:g2ocgV`Z4l@ꁍTl9h R])BbycThs7Mـ Y+XYmo'S3LI?VOfc}0$X 9L;RLz}x|2trP DA [yƜk-;PLj_&p LՇj{)5PߊyO\L?eK|iɲ'2y:H|{p!ؼFs:;U@&t45e1)Z29p9/9D#OmEO@֯ʒ)'ӱ$IuOi2^'[wOQM\b8T:/"P0Rc4=6fq *U1]u<4!󆓓oǛT8>w%@sY} _6|γ!8-MdⶬC扒qt$&Wx_Q"fYKI,D\slq6Й+go1S(x#:E߰uЭI% Y V׏ni՟`ʯsX՛M.~hfX% iXOBTJ -BO'lg\)ւ2$H]$9EH}Y96=).vh'v#̣XJjIոI>! iO{Ht?SAOJ6H0wn~d3\nt c'G}j*nzTP\aC, uuEk[`9ހ>3UFr{)C@Sc5ʯ]JSz9~L,&twv_."pG2UIUz*ꈾVD-~1,]NBIUl X7F&cYCp(͸L $~㎘p+(6-aRGB hb <=Cl~&@nז"\kPU^;?Y}-Od@r3'~P7X[u#cR* ejjwNت.I rAFE`lĴoW#pERO-Tm] kIwQ)"{PnkzJR9%z;*O|؈[<x3ߐSR9b"aE@ݗ\ t۬uTT[FԫQ/}8>)SZTcӸZX!B!%(;f $:`͚n[d_2()͕l$ɂPO"q-:#$MB勂Mh=CEdMʒGX[zdn;3^n$0ʏI޳qc2ÌVV=2*R]hGhxa@SqWosSZU. o&IPNmɑۋϭϑ{V^ڤK =ҟ9Vݔi+xSTfYf߿xlkWDQ|J,uZht৳UW5¹ l?CmedgŬWrqam&)آ1k fxIQb1!׆N$\ ǢaiAMjb̋P:zܞՊC +- aGΞZD-MhD^յ}Xځ%N |[_[̃'8L~s|]8hqO@<7T'|<9'̙qQG=orqiP<#yiGQ;;lzluq DERՃe|2a)c*e9!7 ]xj=װns1;FgΨYr< N#GQG$|Yӕ[9K3.)G0Z٪U`ѭڛN0i+2H|WuU2pen@?$ZfϱdR#PR54;I+# 1nO#QLq;ObTOd!djlAQ_.ʝ&Q׊"uFxcZ{Bky:M<|FWˠ Ńf|ex~'K|Ǜ[0|;}B}3!ȹt"*Ʀx"DSc=Tp̑H"$PiÉ(MÌf̱攗4fޥHP9 b"RN<6eҢo·O:8:j%Ba}(&QVpB*TՀ/gC8t/'tZv | l?$"S~y׮|̼ʅ1_\zlN˱-udw録Lmά TLִgՎrr `֜=k. H;mU o Ws+޺xX=Ep(Ki׵ǂt~_8뫬j`]#Ò9dtbVp^lTT)bSuHɼDyGK/`z04P60 b`OrH^<ܥXtFZ—8:6_aYne(?;}+fу_ޏ,!,~ˆ`^򍵇\cc#<͍=pIkϘ箾\0%˝j'?\|i̴ ?1Wp.kgFP=X"@j8BU#  ,\ֻP r,^dmw{) ~< y囃M \ @E኷aDWAS2晴E8^;]Ko~GEGc : LӈN쒝dU>ӺJW4B wjNNY'rAkXj[0Н_nf4IqPhi5α7uȧG,P P2'@:/q0vg'Ƚrmj=YdrDl(Ti9F +ypXٙ@ O|dP͟uMT`d!g6Hhm~ZPg$jbmCE Z:0OQ%AX8OЍQ~'~n5;>]F-"Rbm{e2|Nm' er?͈O !}!/LQE#믈Gt8԰ kBwcfb4\kld  XLEfh,`rykTuQfh@c(c#w~R1VK' S]P**iT\T- h?N? ,)ǟU5uݫL:Z`k &~޼Yfl&aPҥkaVO[\z>#jHbڇ4${,SoC-SV62#2 PڹXK4 K @ PX@>5F7gW.v=`3 /P_}p+ p= Aⲉ v|ޓI.x+X<@vRv7$VSNk |pPm(xǀ)`[^LېU$S4؁<`Eh)8Ւ wm.xX0n; ##GUTRqp2IuK6ceJ|)A3T| eA.+XwLSGF(y:lJ uŐt7n򱞈@mgIZn+&Dc.G+pc\>g,z 1n$It1l]T5;^YށKko _lW7Hl4@҉ONq UgCKXL7b"˶crh?5HV ^wh^{gr"@PߍlMY9Fp0H C ӐXqM{1̺ ?Xt p?nWi;|}q{tBI^TPkDV5?] .'q/fRI:oMNR^(ڪ; $4RGQ#պpj I {hfc TW&B޷ֲ-}kESotOI{|~W.p y3m8|%ݤSvdEReK`,)xNZ{ dɾ$Rx&+qg s",~1.E\(vV18lAHª0ZIvKaloJE6{\SN%tNm2f&B:S Axl]u$8nN/:/!#=5Ti!^(w8%wt_'c[WG0{OxMEF%Y{#z9/K8'e9\l4oI|ZJ70@Re7 SeA-(nC0 kavcEw-nJ*G-c(E(Z^WHO8FOn`qoc N f-hEr3(3 %Y<5_,_vx߄k`ג;I0'N_ZּTUo}0uxSF 8D3腰j2mG|6vXp/~r]<CkL1Rӻşl3.Ou^-G Z6Hj B#H>e NE9{w^̃%)ݥ9^M [}pfEUOo $~*@1""[Tvկw%K,ES3BOǀB؀ *kY]d:!F]C[OB@z)VϨNI"a?f/N,i`.զuݳygݨJPAB7[Fcru!Zj/BwX"E*8-$ y_K]>*&ͥ|z U  `/`"yU?cAgҞ HX<Oa>i-RRYtMt &F%A3L{(qʧrFEJ{בW.glxL[ Cˎ•ew/E&q_# 1HuЄs{}P9+tHk z`/I4J_i~web$0,>vj#s]qvn?oDž~l$AmwQ3D:0͡ȸWZȴt|ġit3ܖ(J h]{'%EA_{S  ؒR#ӏϕKͩ[X8q-oE/ :'6OP 8gpN 5BӑF~#QXj$݂ખ"T-ckf0ڻѣHFHɀT,@NkuBŁzHZߓHE_P^N}3[>ァJ$E޾'V4\<0Rf]⏺6;}Mp2j%$:ИӰXd\gEJhZ\.ywm/š|]Dp!XUtu@ I8b.z uӑqDp$ѻT{9C`”tktPkF ˙>ү͔M >'p8⑟JwVJs_?-3OIi-߂ZQK6 z~<_ULU.C8U23%F*uyƦQ]j.P%r, 벱XqɇG (A{}[LUU7}tן38ϥ#3Zӽ>u)mZ*sB8D݀s(Vg }OEa #loI4\fag9_#-'WƓPBa)[ElLnR9uo+3 a\w= BEȒsgJj- л*>^є[J~饣 ڐ& nݢ((MT3$2ft7 >ЖN};{y=tJ]-jLݙEg|}AE$~W.3|Ţ7_gXj?6=ev@ÝD'tGEA.pszV@.1ٹlry 4qyBkG D[b\F䃾7#P1Ĺ毩S:tZTZr U&rqWO eù7'3Ճg P/ߡQV:;\$O01@jLrۖdw0$R!9[`-Ӯ 47Re9svKqt߁SY- sw ;Ɓ GyJy?treK-.pA0ޡIXlZ C3jK0&:vy3DSaj^z_5IH>+5 Vް)+9X'lEw~hΕ\}ʷV 뼅 |k>0 M0g"{3z'|x\-5Ě6]h |1Z NC/k!|rq \BǓ0`ޱ,UQy zZb1>q' G$ŧ۠oZzf  M[:F#*URcr1Wcg ^`q{7UΔGF9 }LȧqW*+%89JΨK02|/?ZiNۆO#TIZY@[LT?:SqZOblܖYhl37^%d*70X "UM[nX,r^m/.AI+^57)-`V҉6F^;IZ]Wۣ &*@_wM Π}4+H}Jv&ju^-؃)~dv5 (j<;Ƚp_&/w7 e`- EH_x+BTS2n5lN+>f+Fl6Oң݈a5b,{ (xhnS^Wq 5`^UdVBกQ%L: T> .; !^'4$d|Gg?#fMV9"D+3udyv VcI  ݙeލM ;GIJ&ƈDMZ:%Jql'HEF쿔aPX}͢_?H 4dT|$EC/jݒ! vz'&|8=X=)aFr:~^^m4;͍?Q4*,)N ž)}o;,EiGĢvZ[7uxdgOCYUo\P/=ي]_v]!^;I Rz؉|yi^/ x8^v CP5ATMm a2Wmչ;n_'3϶i\95q=Jvgup`k*by]ޫY$Buw4 g TgU8A,-DɳLt:xl҅~l |Sy&ˇp;WMO-iStvd"$a,S~-scC[jCE)صT_aV1K)G@!Z8"[A§6}NʓI5~{cFQ >ԇ]IwѽNfh#6rI,+DB|0&Tjӥ̈́Yq*>9\FCA0=?M1J+f?D$ώ9(3NlMKmd\+b?zo@|wa)#,>!fjLM%eAT/NSwl';C\-$`~ws|5Ϯ_A0imc֟YNPwÃ*zVΚjNb_xЗ"R?]O {}Q>2b$C6(Gp T Aq2;^lDep=%f_gr_ tvQ413'YTuBܡٜS w9͌'W4%^C2=DZm{=őŨJf*G }@8Bl[QM& Y#/{V&B^b_K*JVVD2!3y.ZyRϹ6gU0~iK,uw˹z}Ձ APiQR9Eҁm$vb_8b:{LVo7\u7M,ao4Ce<jcSr "D|٘d$x&=S?v!"K1ˏ)B `Bҋ9=<Е wLmm6AQa.MQif/b3RKѓ&yq"%I*Kfde*_ղ K5 xx!C#eU{[?{XS*"`E AQٌ(G:;XP ^Gd1}jHsny[}Y*놈dH$ [T|<|X9s=Kd2?VTN撷&:?ҤqRoa&)L= B##:m4=~ru)ܚiW'vϬɦ6%p潖.Ϧz SzG`*'{CoD&7j/΢? )k)Ƅ(B6eٚG2Ʀd;7ӊ ط^x=j3P{*Rjҥ"āgD>bůo\$n3!-i%YSryђN`0Vw5O\j=(z=)_WӞ+0Jѕ27_dFd&@26'm1my`V'_o.A,9JdB@k+ @mrqe \Dh r8Y3 Ԁ k]}-n ?4vJ!{Z}&qeM t~J;MK&H/uXyϺFrڙ&bY2Vl˾>ܔgGRdFW' 0>#`ΉG_B>eoPl$ߡHO9-BtPTV( M,ιAwiRJM!PP_i^V6 }'Z!m  yZ7uE@1EF!hS@;KRhV'M&Kd묒wiEJ"c-Vc*2Wk3p[) \LԾ' n EL5#9w/B*ew3 @0 ;9UN5/D Tg߀k,-4y>$Kй Ss"xd10S۫HgQδX;x,_ TX [hg'U6kɶ Zt1ӡ3d$EP$`8%ЂϤ$g5qI*fW[8t Z/A^X"FDD)ݓנ³Ye<}V'3`Mm}^9`Nc1kta&կ->oЙ 6`}K  !45y3G$r,Sx-##) S#-li/jY픤)yiǕuf=Mc~Is=M9mFK֗*M^dIHB" rv&nO}#wmg϶RZܲA:"V%5D([(P lV>Rݲ dqE5N9,zxNMV!RSno{/A۬g{h$)rSCMJ?TH]Dbac,V^0Rnܡ2<^lkd>!w DeD>]SիfF+Kj~N:B/T7'V +qyZ]ԟZHw|ƳC fb{ER2٘ $oFM`DqN$?jlӖRiS?mi?3TxE(Q!_MT;-Oc񴵗ZnPdt:?0oX|5[2ڛW]}MO,o")##n8~Z8oϼOx\iJS#0Hvy#gí& {Gc!)ǃvEBUiJBu pl??Ma^x\BF/A .́^{p/k6|5<$-I`qN2= tS^%tb8QqzMdTқ#Iݙ@X*ZȚ F-yI=(:31,}0:bL GNluȏ) 3\AyIdts#Թy% F6R xVzpbu-PfWV)llTJa?zS_:y`u |1w1ULb~wfmRI"ӟRCkZk>k;)ʼ]-d> endobj 1049 0 obj << /Length1 1647 /Length2 11673 /Length3 0 /Length 12523 /Filter /FlateDecode >> stream xڭyUXܒ-8!:@7Ҹ;k܂.̙;/s]jU^ԵX% @Y!P9XhBT!ʬ@W=ErCA9(Z.. @ u413 k  8:Wq { @JMQNU _PwYA@  ` [jͅK`pqZ^À@ǿ #r8w@`K{W x[C.C\. G(5?ښCzWO+_-ҼPsz@eX\=_s9:.W,g=Wҽѐho͆Fak^'?V܀__3s+`FaW@_Sg* +GZ^ug x5e_Y_ {.߽?8G ͫBl0\dA@+u`mnzyuV@g{*o-`U;`VT6`oSt# ?QIJB<ެ|V.~x|i&Y rqpp^hdH jz4[:;*6xDYX |LZE7"m X\]POX,3{ ezn9pȴ=E`Й <%yםy;ݤˡ^*IVngw4nyx7~k۰`pno~ #>񻢺{~JNHU{Ms0_I~v]:>VZ]am_cr0+ꤷ\ΧȲ3r)x\6 .2j.Eպth'K͜NtPV(ue k"qcۇx%d?S9KjVhYT/q}\zŝ5֧"OsWj$ko"$)KI1Ej{A/6欢hk`-S5q\E艍@I̢v|.xR; I̊I3qm@ |4GXBF"|UޣqĄH:-,0TCD `-3EQ?eU|><ή*sJA@ϤU&bpfy~OvqԘC.$+96YBOwtAiƧRcb8ZOeyݞ5cct*s 1rbr)몤:=(ITh:آosBJɑ+)@ p&UQYN꺭YL绘fiByVے$ߓ+ fUmd C8)V", {jRW5>0]UxtLby\i$bg0d2Qx.USnJ+bC/gTi VrVvh0r,# L,_L\ th9?ǗhM DÈD֝yּ'ƇPneo&Y:.+pȚNشM-E%51!kZV 0IcxE52څL<ȷ8vݶ&#,Ę2׿3`<vYJck-`D]nz;U)r!񧣘c3닟p$f m*̓wb Jx8czR'3h!BkL]7$ 8}2iv¼s/1o j-{tBx/@an,ܨtٰ!O$ٍ6xZ)5a ]L׷o8V/uM;C5kM%WΥ_)aҝQ=OM.}Zu閃G#ͨ$bcӈwQ-$3!70P\] )߳&A'/o{e '>Vȍ䝣~ v!H,ĒiWqw/jR0/Nsn,YKlםΘ1 C5R `lDl@=M`9S01ՑYswM¢(18?={/7/A Q /k}m1Ȁ{4mdO9#0e2a6f*VcTh8.6-;EYojt7+zY8=63-*xY@{#}vDDs=w,&s{p}9 <9v|L,%.0 ҀңUb?myh+0^4Xe` . ی~21G|^n'}w|phП𡔰$ПNgL|E+S1)G@gs[Qj3p4YjLes &U3I^I׃+$i|P҅@z3q)g},m{] nZIa$E瘓ڢoD3Gh^sĢe$oCh\k{ͳh)vh29k.f}*;Dml3 mMX"a֒< yvAO~kuU`V==eJ՝Ï Efimim,|`҂$J #kGEOxy/EitݎA?_e=RG%oOљX9M|ۄnN&/X*7M~-f$: GGO݃ELAs Z89\aɘg޲_ aly̪G[fsm?Ad|!%sL%U b;8 D(49A~ CDD"RD޶$𸸚'XNF 3w ,viظuzYVk["F2PVX?W9ZuIȽs ȓY~bXS#"48 DJVnzkn_{j*rV!]HC~գU“CN4ZT'9o!;+v"2gBF\0-o4k<7c wTq],KMV=9>-{V/E]oDGUwv$0X;ilP*1Ěp)PhB TsE՘1ks tZCiTq[Z$2ày{;q4:D) 0a;+"-)Eܪ*,/偂5e5IJ gC߂W:?$NH@)]PkhD՟}Y4ogv F#SCf4K 9D2~68إzT{S;/z OR[ du*x9K.-lȊ.ND ,z^aijN m܆>U/ K! -D(rw߶z8IWH\^|,aq%-IՄ(B"N:7PEMAGB?)ͳpsm}jw?: qc5y.#&xvx> twv%ނ} m%get` ,$gl?5RG1 {8NX`]!tOdПz߮c!C0lԍ͆Sc$Q1cRxM w,>W<-5\xh%i PKKq U)޷=k:g'vjXz~#ճTb0 Pدvo~]zSerqp``rX_G2ytELr&%5oij_kkj U1Ar[%{萇P[DKn' =Ҹ ?!!Wkm  l}l[̭9X8-A[BX(C\?st ϥo\xJަήK)ZX 9c[tj'ES 'ɽȋ񏬳)c=\A&'谇ƮrTiͥ%I 'PF6TB`}lEy~EAp[~g9̉ܝVb\>RԪ:]9+E%TC˄|dtqGHzG r&(':).b/Jz`5ə=]꺨#/W,b zq?wZ|27WU|0{cEhd&.*f1U@,VHe18IpZ$T>8BKzV}yXV&)f$=?))=0U n0LEQD\$t6)*ZN>hK^n#h튱 SٖyL,T5MEiԧܹHeϡQ؜%^P|(dmz,}Ie?ԩۍBaF^Ujb _(];'U`'=ju4k N.Z 4aas*aDK;h!,\zRG_Z!OJA;[ެCp"U:EGEj#enϦ(uvjO~v0$!3A=:8G Y:T,z04IP>'"yw_שbDvJ8SO0M2Pݱ }ϑ^N%j~Rôf_t K/0GI e$ %^Aq.f~kHQb+eEnvYUz#;*mr,VA+V~0C> (L7V)qDb<\.v Bl(+ crVΫS"gAfjz6{LXS6"xŸf'm3ZVL;VRO Tȣ݄a0Й<|?Co.EHtw9̎;ku=Q~B)<[VC qC2vF?iȧΙvtO .Q[1%Ϛ.Û=#G{C77 k~Ks~[tl}~?4[$YOi߸ mQV5nVpT&#W%};02M#XObU$QC"Ғz}vfV2VVx>lp7sbf=ʠXXU]9w9W*]Xܭ%3uF_'U!__6{EHN_OJ&[5ZC@Щ+獵/}p_Uys:ۆ49&O#3{͂S4ZRmO5>'Q43 ?Kힴ~g O0WŝጺSG@gWj&vI9xO5Ly\-~^l+Q a]]q7BBLI S(uA$ѴnP#9sú9^iUX0fHiMw3t.Lb2_O_%A!J+ί (ry U=?AAb_Ml\NIIUF!D䕁(aIfqY^@/[6 Ydoϗ +ѤmMnGqς5]Py#hE'z RPMÕJ:R 6/oKX'>30P2vii9γ!}b2%,&+a fP>vnH ƫZw tDg{IL9,i;g^oi;܁3Ԧ1Ξ1a<}f ~ f2\v;C*X_#蓬-Ry?rD|&fk_!,ZV Zpqj8^bޝ<.Tc~=¯ftR.qRJۺ gj2+8^ڰi("nVnY򟿪6;')8( \"nY^s?/P@aV8CƐqk8ٖxNA8SHNuR,J l ׂZ[1b#§BS#OUFGY#m4+(=W(決׎xWEp2w_7g7pv]ޏMt'b@G1֖*^Ji .&`J0}aQX8VK#04(|ؑA-CcWJB}P299. J2Z^Zln- kĐhew1b?`ΈM4k{f͊inãkQhM`c(Nz iEIcFvK0vmSNR^R~jX*Hj9{nQ5SDgBC&mm]Əۘ,`N[-Mo~q%m&Xw_pkxe-EsԒjf.]J_0 X]f6o^^0h66زԌ N%I?&g/L~yR@E:V&c e:RB҆Kp-mD]i{!\M~}X 1+c, tEclQ&Q?OL8$!a%J\m](q[59@hp`UKGM.kg\T|BpL5vuSm al~ /½_s g',ىCi'j"*FW@EFNfW|諅 nZۭ_?=  VBw"8шF鍡ij%RπB' XɢiD6lBr ֟Z{H~jqk tu.cjI1Vy @4*N97KG"“zqGb#ܲk4ⴣYzިBEYnq2f=V+O)cۇ4޺)Y"0mpJb` 6լiAYFx4|c!Jݩ4ս FsތK nu5V(nyeߦGsz z;ss;'_MY׬9XgR~ xe6~)Ye>bl|6 we~<8+I\‰7xT߸cT*wN3(c;)!ߟ}dLJ2;A\˛ci&UR%ϞS׾Mǀ?bMʛF0@~}M*䰚TPѣ-W$IU; MR'R Y}:ba=iAʧDU~,3"Kl8}fyJC&RS7+W ơGNǪPgIև%g=C􅩟~ߕ@}Jqu@fSBHit^ .!DR@o3$=y p,Bzam^X0 H#9StYYy!mA4ytF1i])󇮑Bper Xu2M^d(+D|v_0dX͡l)u.XG}m=p{WWOWlB {ڗcSF?2~Ȕb-wrP1FOz:ȉ[|W} (DUWH 9. YMZ M?hՏr>mcſ;^.eɄD|`w+jsDudq*wъal ⺠]o9BB~i-DZJN$a-!Ǭ5xMR h>-Ťg`nDFk~m$?O~l됽tAA>7/AO3Cߣ.7p[A#"sN@筯U=njV +8:$A:lj4Az52g ]ݕX|6HnӸAVݔ=-Zf^1nBvBe$e|o~ƾo5oDoa_1=&PJ$\{"S~P3+uO`L+\+{p'|%j]ׄoz5=}NgߺMi~|$@f-;!P?]Z䋳*|s1`L.Е4ҧ E\Y9!d#$aS<Î;EgTJM> W *Ep 8)W\POCxp8]ePz+=`ЉygpcW, z16źӘb,mɓ E'y;{#a]y&!HKK)”_ma0F&ΚSL>#jnB@2ʊW7FC=l@Cl{=kxc{u!q}a.ݔG]@y"͡ӄ@p˚-W{lN%FU&,~rҴ/ڭNAjOWaT`%Z}A6 endstream endobj 1050 0 obj << /Type /FontDescriptor /FontName /DKBOTZ+NimbusRomNo9L-ReguItal /Flags 4 /FontBBox [-169 -270 1010 924] /Ascent 668 /CapHeight 668 /Descent -193 /ItalicAngle -15 /StemV 78 /XHeight 441 /CharSet (/A/B/D/F/G/H/L/M/P/R/U/W/a/b/c/comma/d/e/equal/f/five/g/greater/h/hyphen/i/k/l/m/n/o/one/p/r/s/six/t/two/u/v/w/x/y/zero) /FontFile 1049 0 R >> endobj 1009 0 obj << /Type /Encoding /Differences [2/fi/fl 33/exclam/quotedbl 39/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon 61/equal/greater 65/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z 95/underscore 97/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft 125/braceright 147/quotedblleft/quotedblright] >> endobj 550 0 obj << /Type /Font /Subtype /Type1 /BaseFont /DKVUJG+CMMI10 /FontDescriptor 1024 0 R /FirstChar 66 /LastChar 119 /Widths 1013 0 R >> endobj 815 0 obj << /Type /Font /Subtype /Type1 /BaseFont /GJOBMO+CMMI8 /FontDescriptor 1026 0 R /FirstChar 109 /LastChar 110 /Widths 1008 0 R >> endobj 551 0 obj << /Type /Font /Subtype /Type1 /BaseFont /RRRXTV+CMR10 /FontDescriptor 1028 0 R /FirstChar 43 /LastChar 61 /Widths 1012 0 R >> endobj 552 0 obj << /Type /Font /Subtype /Type1 /BaseFont /KTQKTJ+CMR8 /FontDescriptor 1030 0 R /FirstChar 51 /LastChar 52 /Widths 1011 0 R >> endobj 353 0 obj << /Type /Font /Subtype /Type1 /BaseFont /JTGICU+CMSY10 /FontDescriptor 1032 0 R /FirstChar 0 /LastChar 15 /Widths 1020 0 R >> endobj 487 0 obj << /Type /Font /Subtype /Type1 /BaseFont /AQKOUH+CMSY8 /FontDescriptor 1034 0 R /FirstChar 13 /LastChar 13 /Widths 1018 0 R >> endobj 503 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ZUTHPM+LCIRCLE10 /FontDescriptor 1036 0 R /FirstChar 4 /LastChar 7 /Widths 1017 0 R >> endobj 524 0 obj << /Type /Font /Subtype /Type1 /BaseFont /FPQMUJ+NimbusMonL-Bold /FontDescriptor 1038 0 R /FirstChar 97 /LastChar 121 /Widths 1015 0 R /Encoding 1009 0 R >> endobj 505 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ZHOEQX+NimbusMonL-Regu /FontDescriptor 1040 0 R /FirstChar 40 /LastChar 125 /Widths 1016 0 R /Encoding 1009 0 R >> endobj 664 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ZMYRJY+NimbusMonL-ReguObli /FontDescriptor 1042 0 R /FirstChar 47 /LastChar 121 /Widths 1010 0 R /Encoding 1009 0 R >> endobj 351 0 obj << /Type /Font /Subtype /Type1 /BaseFont /IYTDXZ+NimbusRomNo9L-Medi /FontDescriptor 1044 0 R /FirstChar 2 /LastChar 122 /Widths 1022 0 R /Encoding 1009 0 R >> endobj 534 0 obj << /Type /Font /Subtype /Type1 /BaseFont /QRLXJK+NimbusRomNo9L-MediItal /FontDescriptor 1046 0 R /FirstChar 3 /LastChar 122 /Widths 1014 0 R /Encoding 1009 0 R >> endobj 360 0 obj << /Type /Font /Subtype /Type1 /BaseFont /XWWGRR+NimbusRomNo9L-Regu /FontDescriptor 1048 0 R /FirstChar 2 /LastChar 148 /Widths 1019 0 R /Encoding 1009 0 R >> endobj 352 0 obj << /Type /Font /Subtype /Type1 /BaseFont /DKBOTZ+NimbusRomNo9L-ReguItal /FontDescriptor 1050 0 R /FirstChar 44 /LastChar 121 /Widths 1021 0 R /Encoding 1009 0 R >> endobj 354 0 obj << /Type /Pages /Count 6 /Parent 1051 0 R /Kids [346 0 R 356 0 R 393 0 R 441 0 R 457 0 R 469 0 R] >> endobj 490 0 obj << /Type /Pages /Count 6 /Parent 1051 0 R /Kids [485 0 R 494 0 R 499 0 R 513 0 R 519 0 R 527 0 R] >> endobj 540 0 obj << /Type /Pages /Count 6 /Parent 1051 0 R /Kids [537 0 R 543 0 R 558 0 R 565 0 R 571 0 R 576 0 R] >> endobj 590 0 obj << /Type /Pages /Count 6 /Parent 1051 0 R /Kids [585 0 R 593 0 R 602 0 R 609 0 R 620 0 R 629 0 R] >> endobj 641 0 obj << /Type /Pages /Count 6 /Parent 1051 0 R /Kids [634 0 R 644 0 R 651 0 R 656 0 R 671 0 R 678 0 R] >> endobj 693 0 obj << /Type /Pages /Count 6 /Parent 1051 0 R /Kids [688 0 R 696 0 R 702 0 R 709 0 R 718 0 R 728 0 R] >> endobj 740 0 obj << /Type /Pages /Count 6 /Parent 1052 0 R /Kids [735 0 R 745 0 R 754 0 R 763 0 R 772 0 R 780 0 R] >> endobj 792 0 obj << /Type /Pages /Count 6 /Parent 1052 0 R /Kids [785 0 R 795 0 R 803 0 R 819 0 R 827 0 R 836 0 R] >> endobj 846 0 obj << /Type /Pages /Count 6 /Parent 1052 0 R /Kids [841 0 R 850 0 R 856 0 R 863 0 R 868 0 R 877 0 R] >> endobj 887 0 obj << /Type /Pages /Count 6 /Parent 1052 0 R /Kids [884 0 R 890 0 R 897 0 R 906 0 R 913 0 R 922 0 R] >> endobj 938 0 obj << /Type /Pages /Count 6 /Parent 1052 0 R /Kids [931 0 R 941 0 R 950 0 R 964 0 R 975 0 R 985 0 R] >> endobj 993 0 obj << /Type /Pages /Count 4 /Parent 1052 0 R /Kids [990 0 R 996 0 R 1001 0 R 1006 0 R] >> endobj 1051 0 obj << /Type /Pages /Count 36 /Parent 1053 0 R /Kids [354 0 R 490 0 R 540 0 R 590 0 R 641 0 R 693 0 R] >> endobj 1052 0 obj << /Type /Pages /Count 34 /Parent 1053 0 R /Kids [740 0 R 792 0 R 846 0 R 887 0 R 938 0 R 993 0 R] >> endobj 1053 0 obj << /Type /Pages /Count 70 /Kids [1051 0 R 1052 0 R] >> endobj 1054 0 obj << /Type /Outlines /First 3 0 R /Last 327 0 R /Count 23 >> endobj 343 0 obj << /Title 344 0 R /A 341 0 R /Parent 327 0 R /Prev 339 0 R >> endobj 339 0 obj << /Title 340 0 R /A 337 0 R /Parent 327 0 R /Prev 335 0 R /Next 343 0 R >> endobj 335 0 obj << /Title 336 0 R /A 333 0 R /Parent 327 0 R /Prev 331 0 R /Next 339 0 R >> endobj 331 0 obj << /Title 332 0 R /A 329 0 R /Parent 327 0 R /Next 335 0 R >> endobj 327 0 obj << /Title 328 0 R /A 325 0 R /Parent 1054 0 R /Prev 27 0 R /First 331 0 R /Last 343 0 R /Count 4 >> endobj 323 0 obj << /Title 324 0 R /A 321 0 R /Parent 315 0 R /Prev 319 0 R >> endobj 319 0 obj << /Title 320 0 R /A 317 0 R /Parent 315 0 R /Next 323 0 R >> endobj 315 0 obj << /Title 316 0 R /A 313 0 R /Parent 27 0 R /Prev 291 0 R /First 319 0 R /Last 323 0 R /Count -2 >> endobj 311 0 obj << /Title 312 0 R /A 309 0 R /Parent 291 0 R /Prev 307 0 R >> endobj 307 0 obj << /Title 308 0 R /A 305 0 R /Parent 291 0 R /Prev 303 0 R /Next 311 0 R >> endobj 303 0 obj << /Title 304 0 R /A 301 0 R /Parent 291 0 R /Prev 299 0 R /Next 307 0 R >> endobj 299 0 obj << /Title 300 0 R /A 297 0 R /Parent 291 0 R /Prev 295 0 R /Next 303 0 R >> endobj 295 0 obj << /Title 296 0 R /A 293 0 R /Parent 291 0 R /Next 299 0 R >> endobj 291 0 obj << /Title 292 0 R /A 289 0 R /Parent 27 0 R /Prev 271 0 R /Next 315 0 R /First 295 0 R /Last 311 0 R /Count -5 >> endobj 287 0 obj << /Title 288 0 R /A 285 0 R /Parent 271 0 R /Prev 283 0 R >> endobj 283 0 obj << /Title 284 0 R /A 281 0 R /Parent 271 0 R /Prev 279 0 R /Next 287 0 R >> endobj 279 0 obj << /Title 280 0 R /A 277 0 R /Parent 271 0 R /Prev 275 0 R /Next 283 0 R >> endobj 275 0 obj << /Title 276 0 R /A 273 0 R /Parent 271 0 R /Next 279 0 R >> endobj 271 0 obj << /Title 272 0 R /A 269 0 R /Parent 27 0 R /Prev 251 0 R /Next 291 0 R /First 275 0 R /Last 287 0 R /Count -4 >> endobj 267 0 obj << /Title 268 0 R /A 265 0 R /Parent 251 0 R /Prev 263 0 R >> endobj 263 0 obj << /Title 264 0 R /A 261 0 R /Parent 251 0 R /Prev 259 0 R /Next 267 0 R >> endobj 259 0 obj << /Title 260 0 R /A 257 0 R /Parent 251 0 R /Prev 255 0 R /Next 263 0 R >> endobj 255 0 obj << /Title 256 0 R /A 253 0 R /Parent 251 0 R /Next 259 0 R >> endobj 251 0 obj << /Title 252 0 R /A 249 0 R /Parent 27 0 R /Prev 235 0 R /Next 271 0 R /First 255 0 R /Last 267 0 R /Count -4 >> endobj 247 0 obj << /Title 248 0 R /A 245 0 R /Parent 235 0 R /Prev 243 0 R >> endobj 243 0 obj << /Title 244 0 R /A 241 0 R /Parent 235 0 R /Prev 239 0 R /Next 247 0 R >> endobj 239 0 obj << /Title 240 0 R /A 237 0 R /Parent 235 0 R /Next 243 0 R >> endobj 235 0 obj << /Title 236 0 R /A 233 0 R /Parent 27 0 R /Prev 207 0 R /Next 251 0 R /First 239 0 R /Last 247 0 R /Count -3 >> endobj 231 0 obj << /Title 232 0 R /A 229 0 R /Parent 207 0 R /Prev 227 0 R >> endobj 227 0 obj << /Title 228 0 R /A 225 0 R /Parent 207 0 R /Prev 223 0 R /Next 231 0 R >> endobj 223 0 obj << /Title 224 0 R /A 221 0 R /Parent 207 0 R /Prev 219 0 R /Next 227 0 R >> endobj 219 0 obj << /Title 220 0 R /A 217 0 R /Parent 207 0 R /Prev 215 0 R /Next 223 0 R >> endobj 215 0 obj << /Title 216 0 R /A 213 0 R /Parent 207 0 R /Prev 211 0 R /Next 219 0 R >> endobj 211 0 obj << /Title 212 0 R /A 209 0 R /Parent 207 0 R /Next 215 0 R >> endobj 207 0 obj << /Title 208 0 R /A 205 0 R /Parent 27 0 R /Prev 191 0 R /Next 235 0 R /First 211 0 R /Last 231 0 R /Count -6 >> endobj 203 0 obj << /Title 204 0 R /A 201 0 R /Parent 191 0 R /Prev 199 0 R >> endobj 199 0 obj << /Title 200 0 R /A 197 0 R /Parent 191 0 R /Prev 195 0 R /Next 203 0 R >> endobj 195 0 obj << /Title 196 0 R /A 193 0 R /Parent 191 0 R /Next 199 0 R >> endobj 191 0 obj << /Title 192 0 R /A 189 0 R /Parent 27 0 R /Prev 123 0 R /Next 207 0 R /First 195 0 R /Last 203 0 R /Count -3 >> endobj 187 0 obj << /Title 188 0 R /A 185 0 R /Parent 123 0 R /Prev 183 0 R >> endobj 183 0 obj << /Title 184 0 R /A 181 0 R /Parent 123 0 R /Prev 179 0 R /Next 187 0 R >> endobj 179 0 obj << /Title 180 0 R /A 177 0 R /Parent 123 0 R /Prev 175 0 R /Next 183 0 R >> endobj 175 0 obj << /Title 176 0 R /A 173 0 R /Parent 123 0 R /Prev 171 0 R /Next 179 0 R >> endobj 171 0 obj << /Title 172 0 R /A 169 0 R /Parent 123 0 R /Prev 167 0 R /Next 175 0 R >> endobj 167 0 obj << /Title 168 0 R /A 165 0 R /Parent 123 0 R /Prev 163 0 R /Next 171 0 R >> endobj 163 0 obj << /Title 164 0 R /A 161 0 R /Parent 123 0 R /Prev 159 0 R /Next 167 0 R >> endobj 159 0 obj << /Title 160 0 R /A 157 0 R /Parent 123 0 R /Prev 155 0 R /Next 163 0 R >> endobj 155 0 obj << /Title 156 0 R /A 153 0 R /Parent 123 0 R /Prev 151 0 R /Next 159 0 R >> endobj 151 0 obj << /Title 152 0 R /A 149 0 R /Parent 123 0 R /Prev 147 0 R /Next 155 0 R >> endobj 147 0 obj << /Title 148 0 R /A 145 0 R /Parent 123 0 R /Prev 143 0 R /Next 151 0 R >> endobj 143 0 obj << /Title 144 0 R /A 141 0 R /Parent 123 0 R /Prev 139 0 R /Next 147 0 R >> endobj 139 0 obj << /Title 140 0 R /A 137 0 R /Parent 123 0 R /Prev 135 0 R /Next 143 0 R >> endobj 135 0 obj << /Title 136 0 R /A 133 0 R /Parent 123 0 R /Prev 131 0 R /Next 139 0 R >> endobj 131 0 obj << /Title 132 0 R /A 129 0 R /Parent 123 0 R /Prev 127 0 R /Next 135 0 R >> endobj 127 0 obj << /Title 128 0 R /A 125 0 R /Parent 123 0 R /Next 131 0 R >> endobj 123 0 obj << /Title 124 0 R /A 121 0 R /Parent 27 0 R /Prev 111 0 R /Next 191 0 R /First 127 0 R /Last 187 0 R /Count -16 >> endobj 119 0 obj << /Title 120 0 R /A 117 0 R /Parent 111 0 R /Prev 115 0 R >> endobj 115 0 obj << /Title 116 0 R /A 113 0 R /Parent 111 0 R /Next 119 0 R >> endobj 111 0 obj << /Title 112 0 R /A 109 0 R /Parent 27 0 R /Prev 47 0 R /Next 123 0 R /First 115 0 R /Last 119 0 R /Count -2 >> endobj 107 0 obj << /Title 108 0 R /A 105 0 R /Parent 47 0 R /Prev 103 0 R >> endobj 103 0 obj << /Title 104 0 R /A 101 0 R /Parent 47 0 R /Prev 99 0 R /Next 107 0 R >> endobj 99 0 obj << /Title 100 0 R /A 97 0 R /Parent 47 0 R /Prev 95 0 R /Next 103 0 R >> endobj 95 0 obj << /Title 96 0 R /A 93 0 R /Parent 47 0 R /Prev 91 0 R /Next 99 0 R >> endobj 91 0 obj << /Title 92 0 R /A 89 0 R /Parent 47 0 R /Prev 87 0 R /Next 95 0 R >> endobj 87 0 obj << /Title 88 0 R /A 85 0 R /Parent 47 0 R /Prev 83 0 R /Next 91 0 R >> endobj 83 0 obj << /Title 84 0 R /A 81 0 R /Parent 47 0 R /Prev 79 0 R /Next 87 0 R >> endobj 79 0 obj << /Title 80 0 R /A 77 0 R /Parent 47 0 R /Prev 75 0 R /Next 83 0 R >> endobj 75 0 obj << /Title 76 0 R /A 73 0 R /Parent 47 0 R /Prev 71 0 R /Next 79 0 R >> endobj 71 0 obj << /Title 72 0 R /A 69 0 R /Parent 47 0 R /Prev 67 0 R /Next 75 0 R >> endobj 67 0 obj << /Title 68 0 R /A 65 0 R /Parent 47 0 R /Prev 63 0 R /Next 71 0 R >> endobj 63 0 obj << /Title 64 0 R /A 61 0 R /Parent 47 0 R /Prev 59 0 R /Next 67 0 R >> endobj 59 0 obj << /Title 60 0 R /A 57 0 R /Parent 47 0 R /Prev 55 0 R /Next 63 0 R >> endobj 55 0 obj << /Title 56 0 R /A 53 0 R /Parent 47 0 R /Prev 51 0 R /Next 59 0 R >> endobj 51 0 obj << /Title 52 0 R /A 49 0 R /Parent 47 0 R /Next 55 0 R >> endobj 47 0 obj << /Title 48 0 R /A 45 0 R /Parent 27 0 R /Prev 31 0 R /Next 111 0 R /First 51 0 R /Last 107 0 R /Count -15 >> endobj 43 0 obj << /Title 44 0 R /A 41 0 R /Parent 31 0 R /Prev 39 0 R >> endobj 39 0 obj << /Title 40 0 R /A 37 0 R /Parent 31 0 R /Prev 35 0 R /Next 43 0 R >> endobj 35 0 obj << /Title 36 0 R /A 33 0 R /Parent 31 0 R /Next 39 0 R >> endobj 31 0 obj << /Title 32 0 R /A 29 0 R /Parent 27 0 R /Next 47 0 R /First 35 0 R /Last 43 0 R /Count -3 >> endobj 27 0 obj << /Title 28 0 R /A 25 0 R /Parent 1054 0 R /Prev 7 0 R /Next 327 0 R /First 31 0 R /Last 315 0 R /Count 11 >> endobj 23 0 obj << /Title 24 0 R /A 21 0 R /Parent 7 0 R /Prev 19 0 R >> endobj 19 0 obj << /Title 20 0 R /A 17 0 R /Parent 7 0 R /Prev 15 0 R /Next 23 0 R >> endobj 15 0 obj << /Title 16 0 R /A 13 0 R /Parent 7 0 R /Prev 11 0 R /Next 19 0 R >> endobj 11 0 obj << /Title 12 0 R /A 9 0 R /Parent 7 0 R /Next 15 0 R >> endobj 7 0 obj << /Title 8 0 R /A 5 0 R /Parent 1054 0 R /Prev 3 0 R /Next 27 0 R /First 11 0 R /Last 23 0 R /Count 4 >> endobj 3 0 obj << /Title 4 0 R /A 1 0 R /Parent 1054 0 R /Next 7 0 R >> endobj 1055 0 obj << /Names [(Doc-Start) 350 0 R (Hfootnote.1) 488 0 R (Hfootnote.2) 489 0 R (Hfootnote.3) 516 0 R (appendix.A) 326 0 R (chapter*.1) 359 0 R] /Limits [(Doc-Start) (chapter*.1)] >> endobj 1056 0 obj << /Names [(chapter*.2) 396 0 R (chapter*.3) 472 0 R (chapter.1) 2 0 R (chapter.2) 6 0 R (chapter.3) 26 0 R (lnk:autopollevents) 970 0 R] /Limits [(chapter*.2) (lnk:autopollevents)] >> endobj 1057 0 obj << /Names [(lnk:keyrepeat) 971 0 R (lnk:mousecursor) 972 0 R (lnk:stickykeys) 978 0 R (lnk:stickymousebuttons) 979 0 R (lnk:systemkeys) 980 0 R (lstlisting.2.-1) 502 0 R] /Limits [(lnk:keyrepeat) (lstlisting.2.-1)] >> endobj 1058 0 obj << /Names [(lstlisting.3.-10) 596 0 R (lstlisting.3.-11) 598 0 R (lstlisting.3.-12) 605 0 R (lstlisting.3.-13) 612 0 R (lstlisting.3.-14) 614 0 R (lstlisting.3.-15) 623 0 R] /Limits [(lstlisting.3.-10) (lstlisting.3.-15)] >> endobj 1059 0 obj << /Names [(lstlisting.3.-16) 625 0 R (lstlisting.3.-17) 637 0 R (lstlisting.3.-18) 639 0 R (lstlisting.3.-19) 647 0 R (lstlisting.3.-2) 522 0 R (lstlisting.3.-20) 659 0 R] /Limits [(lstlisting.3.-16) (lstlisting.3.-20)] >> endobj 1060 0 obj << /Names [(lstlisting.3.-21) 661 0 R (lstlisting.3.-22) 674 0 R (lstlisting.3.-23) 681 0 R (lstlisting.3.-24) 683 0 R (lstlisting.3.-25) 691 0 R (lstlisting.3.-26) 705 0 R] /Limits [(lstlisting.3.-21) (lstlisting.3.-26)] >> endobj 1061 0 obj << /Names [(lstlisting.3.-27) 712 0 R (lstlisting.3.-28) 714 0 R (lstlisting.3.-29) 721 0 R (lstlisting.3.-3) 530 0 R (lstlisting.3.-30) 723 0 R (lstlisting.3.-31) 731 0 R] /Limits [(lstlisting.3.-27) (lstlisting.3.-31)] >> endobj 1062 0 obj << /Names [(lstlisting.3.-32) 738 0 R (lstlisting.3.-33) 748 0 R (lstlisting.3.-34) 750 0 R (lstlisting.3.-35) 757 0 R (lstlisting.3.-36) 766 0 R (lstlisting.3.-37) 768 0 R] /Limits [(lstlisting.3.-32) (lstlisting.3.-37)] >> endobj 1063 0 obj << /Names [(lstlisting.3.-38) 775 0 R (lstlisting.3.-39) 788 0 R (lstlisting.3.-4) 532 0 R (lstlisting.3.-40) 790 0 R (lstlisting.3.-41) 798 0 R (lstlisting.3.-42) 806 0 R] /Limits [(lstlisting.3.-38) (lstlisting.3.-42)] >> endobj 1064 0 obj << /Names [(lstlisting.3.-43) 808 0 R (lstlisting.3.-44) 822 0 R (lstlisting.3.-45) 830 0 R (lstlisting.3.-46) 832 0 R (lstlisting.3.-47) 844 0 R (lstlisting.3.-48) 859 0 R] /Limits [(lstlisting.3.-43) (lstlisting.3.-48)] >> endobj 1065 0 obj << /Names [(lstlisting.3.-49) 871 0 R (lstlisting.3.-5) 546 0 R (lstlisting.3.-50) 873 0 R (lstlisting.3.-51) 880 0 R (lstlisting.3.-52) 893 0 R (lstlisting.3.-53) 900 0 R] /Limits [(lstlisting.3.-49) (lstlisting.3.-53)] >> endobj 1066 0 obj << /Names [(lstlisting.3.-54) 902 0 R (lstlisting.3.-55) 909 0 R (lstlisting.3.-56) 916 0 R (lstlisting.3.-57) 918 0 R (lstlisting.3.-58) 925 0 R (lstlisting.3.-59) 927 0 R] /Limits [(lstlisting.3.-54) (lstlisting.3.-59)] >> endobj 1067 0 obj << /Names [(lstlisting.3.-6) 561 0 R (lstlisting.3.-60) 934 0 R (lstlisting.3.-61) 936 0 R (lstlisting.3.-62) 944 0 R (lstlisting.3.-63) 946 0 R (lstlisting.3.-64) 953 0 R] /Limits [(lstlisting.3.-6) (lstlisting.3.-64)] >> endobj 1068 0 obj << /Names [(lstlisting.3.-65) 967 0 R (lstlisting.3.-66) 981 0 R (lstlisting.3.-7) 579 0 R (lstlisting.3.-8) 581 0 R (lstlisting.3.-9) 588 0 R (lstnumber.-1.1) 504 0 R] /Limits [(lstlisting.3.-65) (lstnumber.-1.1)] >> endobj 1069 0 obj << /Names [(lstnumber.-1.2) 506 0 R (lstnumber.-1.3) 507 0 R (lstnumber.-1.4) 508 0 R (lstnumber.-1.5) 509 0 R (lstnumber.-10.1) 597 0 R (lstnumber.-11.1) 599 0 R] /Limits [(lstnumber.-1.2) (lstnumber.-11.1)] >> endobj 1070 0 obj << /Names [(lstnumber.-12.1) 606 0 R (lstnumber.-13.1) 613 0 R (lstnumber.-14.1) 615 0 R (lstnumber.-15.1) 624 0 R (lstnumber.-16.1) 626 0 R (lstnumber.-17.1) 638 0 R] /Limits [(lstnumber.-12.1) (lstnumber.-17.1)] >> endobj 1071 0 obj << /Names [(lstnumber.-18.1) 640 0 R (lstnumber.-19.1) 648 0 R (lstnumber.-2.1) 523 0 R (lstnumber.-20.1) 660 0 R (lstnumber.-21.1) 662 0 R (lstnumber.-21.2) 663 0 R] /Limits [(lstnumber.-18.1) (lstnumber.-21.2)] >> endobj 1072 0 obj << /Names [(lstnumber.-21.3) 665 0 R (lstnumber.-21.4) 666 0 R (lstnumber.-21.5) 667 0 R (lstnumber.-21.6) 668 0 R (lstnumber.-22.1) 675 0 R (lstnumber.-23.1) 682 0 R] /Limits [(lstnumber.-21.3) (lstnumber.-23.1)] >> endobj 1073 0 obj << /Names [(lstnumber.-24.1) 684 0 R (lstnumber.-25.1) 692 0 R (lstnumber.-26.1) 706 0 R (lstnumber.-27.1) 713 0 R (lstnumber.-28.1) 715 0 R (lstnumber.-29.1) 722 0 R] /Limits [(lstnumber.-24.1) (lstnumber.-29.1)] >> endobj 1074 0 obj << /Names [(lstnumber.-3.1) 531 0 R (lstnumber.-30.1) 724 0 R (lstnumber.-31.1) 732 0 R (lstnumber.-32.1) 739 0 R (lstnumber.-33.1) 749 0 R (lstnumber.-34.1) 751 0 R] /Limits [(lstnumber.-3.1) (lstnumber.-34.1)] >> endobj 1075 0 obj << /Names [(lstnumber.-35.1) 758 0 R (lstnumber.-36.1) 767 0 R (lstnumber.-37.1) 769 0 R (lstnumber.-38.1) 776 0 R (lstnumber.-38.2) 777 0 R (lstnumber.-39.1) 789 0 R] /Limits [(lstnumber.-35.1) (lstnumber.-39.1)] >> endobj 1076 0 obj << /Names [(lstnumber.-4.1) 533 0 R (lstnumber.-40.1) 791 0 R (lstnumber.-41.1) 799 0 R (lstnumber.-42.1) 807 0 R (lstnumber.-43.1) 809 0 R (lstnumber.-43.2) 810 0 R] /Limits [(lstnumber.-4.1) (lstnumber.-43.2)] >> endobj 1077 0 obj << /Names [(lstnumber.-43.3) 811 0 R (lstnumber.-43.4) 812 0 R (lstnumber.-43.5) 813 0 R (lstnumber.-43.6) 814 0 R (lstnumber.-44.1) 823 0 R (lstnumber.-45.1) 831 0 R] /Limits [(lstnumber.-43.3) (lstnumber.-45.1)] >> endobj 1078 0 obj << /Names [(lstnumber.-46.1) 833 0 R (lstnumber.-47.1) 845 0 R (lstnumber.-48.1) 860 0 R (lstnumber.-49.1) 872 0 R (lstnumber.-5.1) 547 0 R (lstnumber.-5.2) 548 0 R] /Limits [(lstnumber.-46.1) (lstnumber.-5.2)] >> endobj 1079 0 obj << /Names [(lstnumber.-5.3) 549 0 R (lstnumber.-50.1) 874 0 R (lstnumber.-51.1) 881 0 R (lstnumber.-52.1) 894 0 R (lstnumber.-53.1) 901 0 R (lstnumber.-54.1) 903 0 R] /Limits [(lstnumber.-5.3) (lstnumber.-54.1)] >> endobj 1080 0 obj << /Names [(lstnumber.-55.1) 910 0 R (lstnumber.-56.1) 917 0 R (lstnumber.-57.1) 919 0 R (lstnumber.-58.1) 926 0 R (lstnumber.-59.1) 928 0 R (lstnumber.-6.1) 562 0 R] /Limits [(lstnumber.-55.1) (lstnumber.-6.1)] >> endobj 1081 0 obj << /Names [(lstnumber.-60.1) 935 0 R (lstnumber.-61.1) 937 0 R (lstnumber.-62.1) 945 0 R (lstnumber.-63.1) 947 0 R (lstnumber.-64.1) 954 0 R (lstnumber.-65.1) 968 0 R] /Limits [(lstnumber.-60.1) (lstnumber.-65.1)] >> endobj 1082 0 obj << /Names [(lstnumber.-65.2) 969 0 R (lstnumber.-66.1) 982 0 R (lstnumber.-7.1) 580 0 R (lstnumber.-8.1) 582 0 R (lstnumber.-9.1) 589 0 R (page.1) 349 0 R] /Limits [(lstnumber.-65.2) (page.1)] >> endobj 1083 0 obj << /Names [(page.10) 567 0 R (page.11) 573 0 R (page.12) 578 0 R (page.13) 587 0 R (page.14) 595 0 R (page.15) 604 0 R] /Limits [(page.10) (page.15)] >> endobj 1084 0 obj << /Names [(page.16) 611 0 R (page.17) 622 0 R (page.18) 631 0 R (page.19) 636 0 R (page.2) 496 0 R (page.20) 646 0 R] /Limits [(page.16) (page.20)] >> endobj 1085 0 obj << /Names [(page.21) 653 0 R (page.22) 658 0 R (page.23) 673 0 R (page.24) 680 0 R (page.25) 690 0 R (page.26) 698 0 R] /Limits [(page.21) (page.26)] >> endobj 1086 0 obj << /Names [(page.27) 704 0 R (page.28) 711 0 R (page.29) 720 0 R (page.3) 501 0 R (page.30) 730 0 R (page.31) 737 0 R] /Limits [(page.27) (page.31)] >> endobj 1087 0 obj << /Names [(page.32) 747 0 R (page.33) 756 0 R (page.34) 765 0 R (page.35) 774 0 R (page.36) 782 0 R (page.37) 787 0 R] /Limits [(page.32) (page.37)] >> endobj 1088 0 obj << /Names [(page.38) 797 0 R (page.39) 805 0 R (page.4) 515 0 R (page.40) 821 0 R (page.41) 829 0 R (page.42) 838 0 R] /Limits [(page.38) (page.42)] >> endobj 1089 0 obj << /Names [(page.43) 843 0 R (page.44) 852 0 R (page.45) 858 0 R (page.46) 865 0 R (page.47) 870 0 R (page.48) 879 0 R] /Limits [(page.43) (page.48)] >> endobj 1090 0 obj << /Names [(page.49) 886 0 R (page.5) 521 0 R (page.50) 892 0 R (page.51) 899 0 R (page.52) 908 0 R (page.53) 915 0 R] /Limits [(page.49) (page.53)] >> endobj 1091 0 obj << /Names [(page.54) 924 0 R (page.55) 933 0 R (page.56) 943 0 R (page.57) 952 0 R (page.58) 966 0 R (page.59) 977 0 R] /Limits [(page.54) (page.59)] >> endobj 1092 0 obj << /Names [(page.6) 529 0 R (page.60) 987 0 R (page.61) 992 0 R (page.62) 998 0 R (page.63) 1003 0 R (page.64) 491 0 R] /Limits [(page.6) (page.64)] >> endobj 1093 0 obj << /Names [(page.7) 539 0 R (page.8) 545 0 R (page.9) 560 0 R (page.i) 358 0 R (page.ii) 395 0 R (page.iii) 443 0 R] /Limits [(page.7) (page.iii)] >> endobj 1094 0 obj << /Names [(page.iv) 459 0 R (page.v) 471 0 R (section.2.1) 10 0 R (section.2.2) 14 0 R (section.2.3) 18 0 R (section.2.4) 22 0 R] /Limits [(page.iv) (section.2.4)] >> endobj 1095 0 obj << /Names [(section.3.1) 30 0 R (section.3.10) 290 0 R (section.3.11) 314 0 R (section.3.2) 46 0 R (section.3.3) 110 0 R (section.3.4) 122 0 R] /Limits [(section.3.1) (section.3.4)] >> endobj 1096 0 obj << /Names [(section.3.5) 190 0 R (section.3.6) 206 0 R (section.3.7) 234 0 R (section.3.8) 250 0 R (section.3.9) 270 0 R (section.A.1) 330 0 R] /Limits [(section.3.5) (section.A.1)] >> endobj 1097 0 obj << /Names [(section.A.2) 334 0 R (section.A.3) 338 0 R (section.A.4) 342 0 R (subsection.3.1.1) 34 0 R (subsection.3.1.2) 38 0 R (subsection.3.1.3) 42 0 R] /Limits [(section.A.2) (subsection.3.1.3)] >> endobj 1098 0 obj << /Names [(subsection.3.10.1) 294 0 R (subsection.3.10.2) 298 0 R (subsection.3.10.3) 302 0 R (subsection.3.10.4) 306 0 R (subsection.3.10.5) 310 0 R (subsection.3.11.1) 318 0 R] /Limits [(subsection.3.10.1) (subsection.3.11.1)] >> endobj 1099 0 obj << /Names [(subsection.3.11.2) 322 0 R (subsection.3.2.1) 50 0 R (subsection.3.2.10) 86 0 R (subsection.3.2.11) 90 0 R (subsection.3.2.12) 94 0 R (subsection.3.2.13) 98 0 R] /Limits [(subsection.3.11.2) (subsection.3.2.13)] >> endobj 1100 0 obj << /Names [(subsection.3.2.14) 102 0 R (subsection.3.2.15) 106 0 R (subsection.3.2.2) 54 0 R (subsection.3.2.3) 58 0 R (subsection.3.2.4) 62 0 R (subsection.3.2.5) 66 0 R] /Limits [(subsection.3.2.14) (subsection.3.2.5)] >> endobj 1101 0 obj << /Names [(subsection.3.2.6) 70 0 R (subsection.3.2.7) 74 0 R (subsection.3.2.8) 78 0 R (subsection.3.2.9) 82 0 R (subsection.3.3.1) 114 0 R (subsection.3.3.2) 118 0 R] /Limits [(subsection.3.2.6) (subsection.3.3.2)] >> endobj 1102 0 obj << /Names [(subsection.3.4.1) 126 0 R (subsection.3.4.10) 162 0 R (subsection.3.4.11) 166 0 R (subsection.3.4.12) 170 0 R (subsection.3.4.13) 174 0 R (subsection.3.4.14) 178 0 R] /Limits [(subsection.3.4.1) (subsection.3.4.14)] >> endobj 1103 0 obj << /Names [(subsection.3.4.15) 182 0 R (subsection.3.4.16) 186 0 R (subsection.3.4.2) 130 0 R (subsection.3.4.3) 134 0 R (subsection.3.4.4) 138 0 R (subsection.3.4.5) 142 0 R] /Limits [(subsection.3.4.15) (subsection.3.4.5)] >> endobj 1104 0 obj << /Names [(subsection.3.4.6) 146 0 R (subsection.3.4.7) 150 0 R (subsection.3.4.8) 154 0 R (subsection.3.4.9) 158 0 R (subsection.3.5.1) 194 0 R (subsection.3.5.2) 198 0 R] /Limits [(subsection.3.4.6) (subsection.3.5.2)] >> endobj 1105 0 obj << /Names [(subsection.3.5.3) 202 0 R (subsection.3.6.1) 210 0 R (subsection.3.6.2) 214 0 R (subsection.3.6.3) 218 0 R (subsection.3.6.4) 222 0 R (subsection.3.6.5) 226 0 R] /Limits [(subsection.3.5.3) (subsection.3.6.5)] >> endobj 1106 0 obj << /Names [(subsection.3.6.6) 230 0 R (subsection.3.7.1) 238 0 R (subsection.3.7.2) 242 0 R (subsection.3.7.3) 246 0 R (subsection.3.8.1) 254 0 R (subsection.3.8.2) 258 0 R] /Limits [(subsection.3.6.6) (subsection.3.8.2)] >> endobj 1107 0 obj << /Names [(subsection.3.8.3) 262 0 R (subsection.3.8.4) 266 0 R (subsection.3.9.1) 274 0 R (subsection.3.9.2) 278 0 R (subsection.3.9.3) 282 0 R (subsection.3.9.4) 286 0 R] /Limits [(subsection.3.8.3) (subsection.3.9.4)] >> endobj 1108 0 obj << /Names [(table.3.1) 473 0 R (table.3.2) 474 0 R (table.3.3) 475 0 R (table.3.4) 476 0 R (table.3.5) 477 0 R (table.3.6) 478 0 R] /Limits [(table.3.1) (table.3.6)] >> endobj 1109 0 obj << /Names [(table.3.7) 479 0 R (table.3.8) 480 0 R] /Limits [(table.3.7) (table.3.8)] >> endobj 1110 0 obj << /Kids [1055 0 R 1056 0 R 1057 0 R 1058 0 R 1059 0 R 1060 0 R] /Limits [(Doc-Start) (lstlisting.3.-26)] >> endobj 1111 0 obj << /Kids [1061 0 R 1062 0 R 1063 0 R 1064 0 R 1065 0 R 1066 0 R] /Limits [(lstlisting.3.-27) (lstlisting.3.-59)] >> endobj 1112 0 obj << /Kids [1067 0 R 1068 0 R 1069 0 R 1070 0 R 1071 0 R 1072 0 R] /Limits [(lstlisting.3.-6) (lstnumber.-23.1)] >> endobj 1113 0 obj << /Kids [1073 0 R 1074 0 R 1075 0 R 1076 0 R 1077 0 R 1078 0 R] /Limits [(lstnumber.-24.1) (lstnumber.-5.2)] >> endobj 1114 0 obj << /Kids [1079 0 R 1080 0 R 1081 0 R 1082 0 R 1083 0 R 1084 0 R] /Limits [(lstnumber.-5.3) (page.20)] >> endobj 1115 0 obj << /Kids [1085 0 R 1086 0 R 1087 0 R 1088 0 R 1089 0 R 1090 0 R] /Limits [(page.21) (page.53)] >> endobj 1116 0 obj << /Kids [1091 0 R 1092 0 R 1093 0 R 1094 0 R 1095 0 R 1096 0 R] /Limits [(page.54) (section.A.1)] >> endobj 1117 0 obj << /Kids [1097 0 R 1098 0 R 1099 0 R 1100 0 R 1101 0 R 1102 0 R] /Limits [(section.A.2) (subsection.3.4.14)] >> endobj 1118 0 obj << /Kids [1103 0 R 1104 0 R 1105 0 R 1106 0 R 1107 0 R 1108 0 R] /Limits [(subsection.3.4.15) (table.3.6)] >> endobj 1119 0 obj << /Kids [1109 0 R] /Limits [(table.3.7) (table.3.8)] >> endobj 1120 0 obj << /Kids [1110 0 R 1111 0 R 1112 0 R 1113 0 R 1114 0 R 1115 0 R] /Limits [(Doc-Start) (page.53)] >> endobj 1121 0 obj << /Kids [1116 0 R 1117 0 R 1118 0 R 1119 0 R] /Limits [(page.54) (table.3.8)] >> endobj 1122 0 obj << /Kids [1120 0 R 1121 0 R] /Limits [(Doc-Start) (table.3.8)] >> endobj 1123 0 obj << /Dests 1122 0 R >> endobj 1124 0 obj << /Type /Catalog /Pages 1053 0 R /Outlines 1054 0 R /Names 1123 0 R /PageMode/UseOutlines/PageLabels<>1<>6<>]>> /OpenAction 345 0 R >> endobj 1125 0 obj << /Author(Camilla Berglund)/Title(GLFW Reference Manual)/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.10)/Keywords(GLFW,OpenGL,reference,manual) /CreationDate (D:20110812142059+02'00') /ModDate (D:20110812142059+02'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian) kpathsea version 5.0.0) >> endobj xref 0 1126 0000000000 65535 f 0000000015 00000 n 0000032316 00000 n 0000338324 00000 n 0000000060 00000 n 0000000092 00000 n 0000034392 00000 n 0000338203 00000 n 0000000137 00000 n 0000000180 00000 n 0000034440 00000 n 0000338131 00000 n 0000000227 00000 n 0000000265 00000 n 0000034489 00000 n 0000338045 00000 n 0000000313 00000 n 0000000355 00000 n 0000037478 00000 n 0000337959 00000 n 0000000403 00000 n 0000000444 00000 n 0000037527 00000 n 0000337886 00000 n 0000000492 00000 n 0000000522 00000 n 0000040350 00000 n 0000337759 00000 n 0000000568 00000 n 0000000607 00000 n 0000040399 00000 n 0000337648 00000 n 0000000655 00000 n 0000000713 00000 n 0000040448 00000 n 0000337574 00000 n 0000000766 00000 n 0000000799 00000 n 0000042555 00000 n 0000337487 00000 n 0000000852 00000 n 0000000890 00000 n 0000042704 00000 n 0000337413 00000 n 0000000943 00000 n 0000000982 00000 n 0000046214 00000 n 0000337286 00000 n 0000001030 00000 n 0000001068 00000 n 0000046263 00000 n 0000337212 00000 n 0000001121 00000 n 0000001160 00000 n 0000049662 00000 n 0000337125 00000 n 0000001213 00000 n 0000001256 00000 n 0000057414 00000 n 0000337038 00000 n 0000001309 00000 n 0000001349 00000 n 0000057562 00000 n 0000336951 00000 n 0000001402 00000 n 0000001453 00000 n 0000059750 00000 n 0000336864 00000 n 0000001506 00000 n 0000001549 00000 n 0000061987 00000 n 0000336777 00000 n 0000001602 00000 n 0000001644 00000 n 0000062136 00000 n 0000336690 00000 n 0000001697 00000 n 0000001738 00000 n 0000064207 00000 n 0000336603 00000 n 0000001791 00000 n 0000001833 00000 n 0000066394 00000 n 0000336516 00000 n 0000001886 00000 n 0000001936 00000 n 0000066542 00000 n 0000336429 00000 n 0000001990 00000 n 0000002033 00000 n 0000068732 00000 n 0000336342 00000 n 0000002087 00000 n 0000002130 00000 n 0000068881 00000 n 0000336255 00000 n 0000002184 00000 n 0000002228 00000 n 0000074064 00000 n 0000336166 00000 n 0000002282 00000 n 0000002324 00000 n 0000074213 00000 n 0000336075 00000 n 0000002379 00000 n 0000002422 00000 n 0000076367 00000 n 0000335997 00000 n 0000002477 00000 n 0000002532 00000 n 0000080039 00000 n 0000335867 00000 n 0000002581 00000 n 0000002616 00000 n 0000080089 00000 n 0000335788 00000 n 0000002670 00000 n 0000002713 00000 n 0000082560 00000 n 0000335709 00000 n 0000002767 00000 n 0000002811 00000 n 0000084828 00000 n 0000335577 00000 n 0000002860 00000 n 0000002898 00000 n 0000084878 00000 n 0000335498 00000 n 0000002952 00000 n 0000002992 00000 n 0000085028 00000 n 0000335405 00000 n 0000003046 00000 n 0000003086 00000 n 0000087445 00000 n 0000335312 00000 n 0000003140 00000 n 0000003176 00000 n 0000092610 00000 n 0000335219 00000 n 0000003230 00000 n 0000003274 00000 n 0000094824 00000 n 0000335126 00000 n 0000003328 00000 n 0000003369 00000 n 0000094973 00000 n 0000335033 00000 n 0000003423 00000 n 0000003464 00000 n 0000097134 00000 n 0000334940 00000 n 0000003518 00000 n 0000003561 00000 n 0000097284 00000 n 0000334847 00000 n 0000003615 00000 n 0000003658 00000 n 0000099741 00000 n 0000334754 00000 n 0000003712 00000 n 0000003756 00000 n 0000102138 00000 n 0000334661 00000 n 0000003811 00000 n 0000003857 00000 n 0000102287 00000 n 0000334568 00000 n 0000003912 00000 n 0000003965 00000 n 0000104857 00000 n 0000334475 00000 n 0000004020 00000 n 0000004070 00000 n 0000106907 00000 n 0000334382 00000 n 0000004125 00000 n 0000004177 00000 n 0000109418 00000 n 0000334289 00000 n 0000004232 00000 n 0000004279 00000 n 0000109568 00000 n 0000334196 00000 n 0000004334 00000 n 0000004379 00000 n 0000112010 00000 n 0000334117 00000 n 0000004434 00000 n 0000004483 00000 n 0000115738 00000 n 0000333986 00000 n 0000004532 00000 n 0000004562 00000 n 0000115788 00000 n 0000333907 00000 n 0000004616 00000 n 0000004653 00000 n 0000115938 00000 n 0000333814 00000 n 0000004707 00000 n 0000004744 00000 n 0000117822 00000 n 0000333735 00000 n 0000004798 00000 n 0000004833 00000 n 0000121025 00000 n 0000333604 00000 n 0000004882 00000 n 0000004931 00000 n 0000121075 00000 n 0000333525 00000 n 0000004985 00000 n 0000005024 00000 n 0000124073 00000 n 0000333432 00000 n 0000005078 00000 n 0000005123 00000 n 0000126376 00000 n 0000333339 00000 n 0000005177 00000 n 0000005216 00000 n 0000126526 00000 n 0000333246 00000 n 0000005270 00000 n 0000005313 00000 n 0000131767 00000 n 0000333153 00000 n 0000005367 00000 n 0000005416 00000 n 0000137074 00000 n 0000333074 00000 n 0000005470 00000 n 0000005518 00000 n 0000140595 00000 n 0000332943 00000 n 0000005567 00000 n 0000005615 00000 n 0000140645 00000 n 0000332864 00000 n 0000005669 00000 n 0000005717 00000 n 0000140794 00000 n 0000332771 00000 n 0000005771 00000 n 0000005815 00000 n 0000143061 00000 n 0000332692 00000 n 0000005869 00000 n 0000005911 00000 n 0000146841 00000 n 0000332561 00000 n 0000005960 00000 n 0000005991 00000 n 0000146891 00000 n 0000332482 00000 n 0000006045 00000 n 0000006087 00000 n 0000149098 00000 n 0000332389 00000 n 0000006141 00000 n 0000006184 00000 n 0000149247 00000 n 0000332296 00000 n 0000006238 00000 n 0000006278 00000 n 0000150877 00000 n 0000332217 00000 n 0000006332 00000 n 0000006373 00000 n 0000152777 00000 n 0000332086 00000 n 0000006422 00000 n 0000006453 00000 n 0000152827 00000 n 0000332007 00000 n 0000006507 00000 n 0000006548 00000 n 0000152975 00000 n 0000331914 00000 n 0000006602 00000 n 0000006644 00000 n 0000154751 00000 n 0000331821 00000 n 0000006698 00000 n 0000006737 00000 n 0000154900 00000 n 0000331742 00000 n 0000006791 00000 n 0000006832 00000 n 0000156714 00000 n 0000331611 00000 n 0000006882 00000 n 0000006926 00000 n 0000156764 00000 n 0000331532 00000 n 0000006981 00000 n 0000007022 00000 n 0000156914 00000 n 0000331439 00000 n 0000007077 00000 n 0000007119 00000 n 0000159149 00000 n 0000331346 00000 n 0000007174 00000 n 0000007213 00000 n 0000159298 00000 n 0000331253 00000 n 0000007268 00000 n 0000007309 00000 n 0000161083 00000 n 0000331174 00000 n 0000007364 00000 n 0000007408 00000 n 0000163666 00000 n 0000331057 00000 n 0000007458 00000 n 0000007496 00000 n 0000163716 00000 n 0000330978 00000 n 0000007551 00000 n 0000007600 00000 n 0000166786 00000 n 0000330899 00000 n 0000007655 00000 n 0000007707 00000 n 0000172654 00000 n 0000330782 00000 n 0000007755 00000 n 0000007795 00000 n 0000172704 00000 n 0000330703 00000 n 0000007844 00000 n 0000007894 00000 n 0000175020 00000 n 0000330610 00000 n 0000007943 00000 n 0000007981 00000 n 0000175071 00000 n 0000330517 00000 n 0000008030 00000 n 0000008068 00000 n 0000176708 00000 n 0000330438 00000 n 0000008117 00000 n 0000008164 00000 n 0000008641 00000 n 0000008860 00000 n 0000008217 00000 n 0000008760 00000 n 0000008810 00000 n 0000327933 00000 n 0000328465 00000 n 0000326973 00000 n 0000328646 00000 n 0000009912 00000 n 0000009693 00000 n 0000008958 00000 n 0000009812 00000 n 0000009862 00000 n 0000328289 00000 n 0000011373 00000 n 0000011523 00000 n 0000011673 00000 n 0000011826 00000 n 0000011979 00000 n 0000012132 00000 n 0000012285 00000 n 0000012435 00000 n 0000012588 00000 n 0000012747 00000 n 0000012901 00000 n 0000013059 00000 n 0000013212 00000 n 0000013371 00000 n 0000013530 00000 n 0000013689 00000 n 0000013848 00000 n 0000014006 00000 n 0000014164 00000 n 0000014323 00000 n 0000014482 00000 n 0000014641 00000 n 0000014800 00000 n 0000014959 00000 n 0000015119 00000 n 0000015279 00000 n 0000015439 00000 n 0000015599 00000 n 0000015752 00000 n 0000015911 00000 n 0000017848 00000 n 0000016169 00000 n 0000011002 00000 n 0000010010 00000 n 0000016070 00000 n 0000016120 00000 n 0000018001 00000 n 0000018160 00000 n 0000018319 00000 n 0000018478 00000 n 0000018637 00000 n 0000018795 00000 n 0000018949 00000 n 0000019108 00000 n 0000019266 00000 n 0000019425 00000 n 0000019585 00000 n 0000019745 00000 n 0000019905 00000 n 0000020065 00000 n 0000020225 00000 n 0000020385 00000 n 0000020545 00000 n 0000020698 00000 n 0000020855 00000 n 0000021013 00000 n 0000021172 00000 n 0000021325 00000 n 0000021484 00000 n 0000021643 00000 n 0000021802 00000 n 0000021961 00000 n 0000022120 00000 n 0000022279 00000 n 0000022432 00000 n 0000022591 00000 n 0000022749 00000 n 0000022906 00000 n 0000023059 00000 n 0000023218 00000 n 0000023377 00000 n 0000023536 00000 n 0000023695 00000 n 0000023847 00000 n 0000024006 00000 n 0000024165 00000 n 0000024323 00000 n 0000024482 00000 n 0000025624 00000 n 0000024686 00000 n 0000017373 00000 n 0000016254 00000 n 0000024636 00000 n 0000025784 00000 n 0000025944 00000 n 0000026104 00000 n 0000026264 00000 n 0000026424 00000 n 0000026577 00000 n 0000026732 00000 n 0000026891 00000 n 0000027041 00000 n 0000027194 00000 n 0000027347 00000 n 0000027500 00000 n 0000027703 00000 n 0000025389 00000 n 0000024758 00000 n 0000027653 00000 n 0000028679 00000 n 0000028828 00000 n 0000028978 00000 n 0000029129 00000 n 0000029280 00000 n 0000029429 00000 n 0000029580 00000 n 0000029731 00000 n 0000029981 00000 n 0000028484 00000 n 0000027788 00000 n 0000029882 00000 n 0000029932 00000 n 0000052619 00000 n 0000071706 00000 n 0000090344 00000 n 0000129100 00000 n 0000129150 00000 n 0000129200 00000 n 0000129250 00000 n 0000170515 00000 n 0000032009 00000 n 0000032163 00000 n 0000031860 00000 n 0000032464 00000 n 0000031705 00000 n 0000030066 00000 n 0000327117 00000 n 0000032364 00000 n 0000032414 00000 n 0000328764 00000 n 0000176657 00000 n 0000034193 00000 n 0000034538 00000 n 0000034054 00000 n 0000032588 00000 n 0000034342 00000 n 0000036979 00000 n 0000037576 00000 n 0000036840 00000 n 0000034649 00000 n 0000037128 00000 n 0000037178 00000 n 0000327261 00000 n 0000037228 00000 n 0000327581 00000 n 0000037278 00000 n 0000037328 00000 n 0000037378 00000 n 0000037428 00000 n 0000038640 00000 n 0000038491 00000 n 0000038894 00000 n 0000038344 00000 n 0000037725 00000 n 0000038794 00000 n 0000038844 00000 n 0000040151 00000 n 0000040594 00000 n 0000040012 00000 n 0000038979 00000 n 0000040300 00000 n 0000040496 00000 n 0000040544 00000 n 0000327407 00000 n 0000042356 00000 n 0000042853 00000 n 0000042217 00000 n 0000040730 00000 n 0000042505 00000 n 0000042604 00000 n 0000042654 00000 n 0000042753 00000 n 0000042803 00000 n 0000328109 00000 n 0000043594 00000 n 0000043793 00000 n 0000043455 00000 n 0000043002 00000 n 0000043743 00000 n 0000328882 00000 n 0000046015 00000 n 0000046510 00000 n 0000045876 00000 n 0000043891 00000 n 0000046164 00000 n 0000046312 00000 n 0000046361 00000 n 0000046411 00000 n 0000046461 00000 n 0000326394 00000 n 0000326686 00000 n 0000326830 00000 n 0000049156 00000 n 0000049309 00000 n 0000049461 00000 n 0000049007 00000 n 0000049811 00000 n 0000048844 00000 n 0000046711 00000 n 0000049612 00000 n 0000049711 00000 n 0000049761 00000 n 0000052420 00000 n 0000052669 00000 n 0000052281 00000 n 0000049973 00000 n 0000052569 00000 n 0000055225 00000 n 0000055076 00000 n 0000055427 00000 n 0000054929 00000 n 0000052780 00000 n 0000055377 00000 n 0000057215 00000 n 0000057711 00000 n 0000057076 00000 n 0000055538 00000 n 0000057364 00000 n 0000057463 00000 n 0000057512 00000 n 0000057611 00000 n 0000057661 00000 n 0000059551 00000 n 0000059899 00000 n 0000059412 00000 n 0000057873 00000 n 0000059700 00000 n 0000059799 00000 n 0000059849 00000 n 0000329000 00000 n 0000061788 00000 n 0000062285 00000 n 0000061649 00000 n 0000060061 00000 n 0000061937 00000 n 0000062036 00000 n 0000062086 00000 n 0000062185 00000 n 0000062235 00000 n 0000064008 00000 n 0000064356 00000 n 0000063869 00000 n 0000062447 00000 n 0000064157 00000 n 0000064256 00000 n 0000064306 00000 n 0000066195 00000 n 0000066691 00000 n 0000066056 00000 n 0000064505 00000 n 0000066344 00000 n 0000066443 00000 n 0000066492 00000 n 0000066591 00000 n 0000066641 00000 n 0000068379 00000 n 0000068530 00000 n 0000068230 00000 n 0000069029 00000 n 0000068075 00000 n 0000066840 00000 n 0000068682 00000 n 0000068781 00000 n 0000068831 00000 n 0000068930 00000 n 0000068979 00000 n 0000071507 00000 n 0000071755 00000 n 0000071368 00000 n 0000069178 00000 n 0000071656 00000 n 0000073865 00000 n 0000074362 00000 n 0000073726 00000 n 0000071853 00000 n 0000074014 00000 n 0000074113 00000 n 0000074163 00000 n 0000074263 00000 n 0000074313 00000 n 0000329118 00000 n 0000076168 00000 n 0000076517 00000 n 0000076029 00000 n 0000074524 00000 n 0000076317 00000 n 0000076417 00000 n 0000076467 00000 n 0000077495 00000 n 0000077694 00000 n 0000077356 00000 n 0000076666 00000 n 0000077644 00000 n 0000079840 00000 n 0000080588 00000 n 0000079701 00000 n 0000077792 00000 n 0000079989 00000 n 0000080139 00000 n 0000080189 00000 n 0000080239 00000 n 0000080289 00000 n 0000080339 00000 n 0000327755 00000 n 0000080389 00000 n 0000080438 00000 n 0000080488 00000 n 0000080538 00000 n 0000082361 00000 n 0000082709 00000 n 0000082222 00000 n 0000080789 00000 n 0000082510 00000 n 0000082610 00000 n 0000082659 00000 n 0000084629 00000 n 0000085178 00000 n 0000084490 00000 n 0000082858 00000 n 0000084778 00000 n 0000084928 00000 n 0000084978 00000 n 0000085078 00000 n 0000085128 00000 n 0000087244 00000 n 0000087095 00000 n 0000087595 00000 n 0000086948 00000 n 0000085314 00000 n 0000087395 00000 n 0000087495 00000 n 0000087545 00000 n 0000329236 00000 n 0000090145 00000 n 0000090394 00000 n 0000090006 00000 n 0000087744 00000 n 0000090294 00000 n 0000092408 00000 n 0000092259 00000 n 0000092759 00000 n 0000092112 00000 n 0000090518 00000 n 0000092560 00000 n 0000092660 00000 n 0000092710 00000 n 0000094625 00000 n 0000095123 00000 n 0000094486 00000 n 0000092908 00000 n 0000094774 00000 n 0000094874 00000 n 0000094923 00000 n 0000095023 00000 n 0000095073 00000 n 0000096935 00000 n 0000097434 00000 n 0000096796 00000 n 0000095272 00000 n 0000097084 00000 n 0000097184 00000 n 0000097234 00000 n 0000097334 00000 n 0000097384 00000 n 0000099539 00000 n 0000099390 00000 n 0000099889 00000 n 0000099243 00000 n 0000097583 00000 n 0000099691 00000 n 0000099790 00000 n 0000099839 00000 n 0000101939 00000 n 0000102337 00000 n 0000101800 00000 n 0000100038 00000 n 0000102088 00000 n 0000102188 00000 n 0000102237 00000 n 0000329354 00000 n 0000104405 00000 n 0000104557 00000 n 0000104256 00000 n 0000105007 00000 n 0000104101 00000 n 0000102486 00000 n 0000104707 00000 n 0000104757 00000 n 0000104807 00000 n 0000104907 00000 n 0000104957 00000 n 0000106708 00000 n 0000107057 00000 n 0000106569 00000 n 0000105156 00000 n 0000106857 00000 n 0000106957 00000 n 0000107007 00000 n 0000109066 00000 n 0000109217 00000 n 0000108917 00000 n 0000109718 00000 n 0000108762 00000 n 0000107206 00000 n 0000109368 00000 n 0000109468 00000 n 0000109518 00000 n 0000109618 00000 n 0000109668 00000 n 0000111811 00000 n 0000112210 00000 n 0000111672 00000 n 0000109867 00000 n 0000111960 00000 n 0000112060 00000 n 0000112110 00000 n 0000112160 00000 n 0000113772 00000 n 0000113971 00000 n 0000113633 00000 n 0000112359 00000 n 0000113921 00000 n 0000115539 00000 n 0000116088 00000 n 0000115400 00000 n 0000114082 00000 n 0000115688 00000 n 0000115838 00000 n 0000115888 00000 n 0000115988 00000 n 0000116038 00000 n 0000329472 00000 n 0000117623 00000 n 0000117971 00000 n 0000117484 00000 n 0000116237 00000 n 0000117772 00000 n 0000117872 00000 n 0000117921 00000 n 0000120824 00000 n 0000120675 00000 n 0000121573 00000 n 0000120528 00000 n 0000118133 00000 n 0000120975 00000 n 0000121125 00000 n 0000121175 00000 n 0000121225 00000 n 0000121274 00000 n 0000121324 00000 n 0000121374 00000 n 0000121424 00000 n 0000121474 00000 n 0000121524 00000 n 0000326540 00000 n 0000123873 00000 n 0000123724 00000 n 0000124223 00000 n 0000123577 00000 n 0000121787 00000 n 0000124023 00000 n 0000124123 00000 n 0000124173 00000 n 0000126178 00000 n 0000126029 00000 n 0000126674 00000 n 0000125882 00000 n 0000124372 00000 n 0000126326 00000 n 0000126426 00000 n 0000126476 00000 n 0000126575 00000 n 0000126624 00000 n 0000128901 00000 n 0000129300 00000 n 0000128762 00000 n 0000126823 00000 n 0000129050 00000 n 0000131568 00000 n 0000131917 00000 n 0000131429 00000 n 0000129437 00000 n 0000131717 00000 n 0000131817 00000 n 0000131867 00000 n 0000329590 00000 n 0000134232 00000 n 0000134083 00000 n 0000134433 00000 n 0000133936 00000 n 0000132105 00000 n 0000134383 00000 n 0000136873 00000 n 0000136724 00000 n 0000137223 00000 n 0000136577 00000 n 0000134596 00000 n 0000137024 00000 n 0000137124 00000 n 0000137173 00000 n 0000138148 00000 n 0000138347 00000 n 0000138009 00000 n 0000137424 00000 n 0000138297 00000 n 0000140396 00000 n 0000140944 00000 n 0000140257 00000 n 0000138445 00000 n 0000140545 00000 n 0000140695 00000 n 0000140744 00000 n 0000140844 00000 n 0000140894 00000 n 0000142862 00000 n 0000143209 00000 n 0000142723 00000 n 0000141106 00000 n 0000143011 00000 n 0000143110 00000 n 0000143159 00000 n 0000144319 00000 n 0000144518 00000 n 0000144180 00000 n 0000143371 00000 n 0000144468 00000 n 0000329708 00000 n 0000146642 00000 n 0000147040 00000 n 0000146503 00000 n 0000144642 00000 n 0000146791 00000 n 0000146941 00000 n 0000146991 00000 n 0000148899 00000 n 0000149397 00000 n 0000148760 00000 n 0000147189 00000 n 0000149048 00000 n 0000149148 00000 n 0000149197 00000 n 0000149297 00000 n 0000149347 00000 n 0000150678 00000 n 0000151027 00000 n 0000150539 00000 n 0000149546 00000 n 0000150827 00000 n 0000150927 00000 n 0000150977 00000 n 0000152578 00000 n 0000153124 00000 n 0000152439 00000 n 0000151163 00000 n 0000152727 00000 n 0000152876 00000 n 0000152925 00000 n 0000153024 00000 n 0000153074 00000 n 0000154552 00000 n 0000155050 00000 n 0000154413 00000 n 0000153273 00000 n 0000154701 00000 n 0000154801 00000 n 0000154850 00000 n 0000154950 00000 n 0000155000 00000 n 0000156515 00000 n 0000157064 00000 n 0000156376 00000 n 0000155199 00000 n 0000156664 00000 n 0000156814 00000 n 0000156864 00000 n 0000156964 00000 n 0000157014 00000 n 0000329826 00000 n 0000158950 00000 n 0000159446 00000 n 0000158811 00000 n 0000157213 00000 n 0000159099 00000 n 0000159199 00000 n 0000159248 00000 n 0000159347 00000 n 0000159396 00000 n 0000160884 00000 n 0000161233 00000 n 0000160745 00000 n 0000159595 00000 n 0000161033 00000 n 0000161133 00000 n 0000161183 00000 n 0000163464 00000 n 0000169520 00000 n 0000169680 00000 n 0000169834 00000 n 0000169991 00000 n 0000170147 00000 n 0000170310 00000 n 0000163315 00000 n 0000164066 00000 n 0000163168 00000 n 0000161382 00000 n 0000163616 00000 n 0000163766 00000 n 0000163816 00000 n 0000163866 00000 n 0000163916 00000 n 0000163966 00000 n 0000164016 00000 n 0000166438 00000 n 0000166936 00000 n 0000166299 00000 n 0000164215 00000 n 0000166587 00000 n 0000166637 00000 n 0000166687 00000 n 0000166737 00000 n 0000166836 00000 n 0000166886 00000 n 0000167769 00000 n 0000167968 00000 n 0000167630 00000 n 0000167072 00000 n 0000167918 00000 n 0000169371 00000 n 0000170565 00000 n 0000169184 00000 n 0000168066 00000 n 0000170465 00000 n 0000329944 00000 n 0000172455 00000 n 0000172754 00000 n 0000172316 00000 n 0000170663 00000 n 0000172604 00000 n 0000174819 00000 n 0000175122 00000 n 0000174677 00000 n 0000172852 00000 n 0000174968 00000 n 0000176507 00000 n 0000176759 00000 n 0000176364 00000 n 0000175234 00000 n 0000176858 00000 n 0000325974 00000 n 0000176890 00000 n 0000177210 00000 n 0000177242 00000 n 0000177354 00000 n 0000177690 00000 n 0000178162 00000 n 0000178282 00000 n 0000178646 00000 n 0000178682 00000 n 0000178709 00000 n 0000179273 00000 n 0000179380 00000 n 0000179712 00000 n 0000180190 00000 n 0000191388 00000 n 0000191646 00000 n 0000199128 00000 n 0000199353 00000 n 0000207133 00000 n 0000207367 00000 n 0000214581 00000 n 0000214810 00000 n 0000222436 00000 n 0000222700 00000 n 0000229748 00000 n 0000229982 00000 n 0000232176 00000 n 0000232406 00000 n 0000241188 00000 n 0000241455 00000 n 0000256549 00000 n 0000256958 00000 n 0000265811 00000 n 0000266101 00000 n 0000282212 00000 n 0000282633 00000 n 0000293180 00000 n 0000293482 00000 n 0000312439 00000 n 0000312971 00000 n 0000325616 00000 n 0000330048 00000 n 0000330168 00000 n 0000330288 00000 n 0000330361 00000 n 0000338396 00000 n 0000338592 00000 n 0000338795 00000 n 0000339031 00000 n 0000339274 00000 n 0000339516 00000 n 0000339759 00000 n 0000340001 00000 n 0000340244 00000 n 0000340486 00000 n 0000340729 00000 n 0000340971 00000 n 0000341214 00000 n 0000341455 00000 n 0000341691 00000 n 0000341921 00000 n 0000342156 00000 n 0000342390 00000 n 0000342625 00000 n 0000342860 00000 n 0000343093 00000 n 0000343328 00000 n 0000343561 00000 n 0000343796 00000 n 0000344028 00000 n 0000344261 00000 n 0000344494 00000 n 0000344729 00000 n 0000344943 00000 n 0000345114 00000 n 0000345284 00000 n 0000345455 00000 n 0000345625 00000 n 0000345796 00000 n 0000345966 00000 n 0000346137 00000 n 0000346307 00000 n 0000346478 00000 n 0000346648 00000 n 0000346816 00000 n 0000347002 00000 n 0000347205 00000 n 0000347408 00000 n 0000347628 00000 n 0000347879 00000 n 0000348124 00000 n 0000348366 00000 n 0000348605 00000 n 0000348854 00000 n 0000349100 00000 n 0000349343 00000 n 0000349586 00000 n 0000349829 00000 n 0000350072 00000 n 0000350259 00000 n 0000350366 00000 n 0000350493 00000 n 0000350627 00000 n 0000350759 00000 n 0000350890 00000 n 0000351013 00000 n 0000351129 00000 n 0000351249 00000 n 0000351379 00000 n 0000351507 00000 n 0000351582 00000 n 0000351700 00000 n 0000351800 00000 n 0000351884 00000 n 0000351924 00000 n 0000352105 00000 n trailer << /Size 1126 /Root 1124 0 R /Info 1125 0 R /ID [<1C110026B2C57CA27660C35FAD7D771F> <1C110026B2C57CA27660C35FAD7D771F>] >> startxref 352497 %%EOF glfw-2.7.2/docs/Makefile0000644000175000017500000000321610625531326016050 0ustar elmindredaelmindreda########################################################################## # Makefile for the GLFW documentation. ########################################################################## PDFDOCS = glfwrm.pdf glfwug.pdf DVIDOCS = glfwrm.dvi glfwug.dvi ########################################################################## # Build macros ########################################################################## default: pdf pdf: $(PDFDOCS) dvi: $(DVIDOCS) ########################################################################## # Clean macros ########################################################################## clean: rm -f glfwrm.dvi glfwrm.aux glfwrm.log glfwrm.out glfwrm.pdf glfwrm.toc glfwrm.lot rm -f glfwug.dvi glfwug.aux glfwug.log glfwug.out glfwug.pdf glfwug.toc clean-win: @.\\cleanup.bat ########################################################################## # Rules for building the GLFW Reference Manual ########################################################################## glfwrm.pdf: glfwrm.tex glfwrm.toc glfwrm.lot glfwdoc.sty pdflatex glfwrm.tex glfwrm.dvi: glfwrm.tex glfwrm.toc glfwrm.lot glfwdoc.sty latex glfwrm.tex glfwrm.toc: glfwrm.tex glfwdoc.sty latex glfwrm.tex glfwrm.lot: glfwrm.tex glfwdoc.sty latex glfwrm.tex ########################################################################## # Rules for building the GLFW Users Guide ########################################################################## glfwug.pdf: glfwug.tex glfwug.toc glfwdoc.sty pdflatex glfwug.tex glfwug.dvi: glfwug.tex glfwug.toc glfwdoc.sty latex glfwug.tex glfwug.toc: glfwug.tex glfwdoc.sty latex glfwug.tex glfw-2.7.2/docs/glfwrm.tex0000644000175000017500000033744411614045512016441 0ustar elmindredaelmindreda%------------------------------------------------------------------------- % GLFW Reference Manual % API Version: 2.7 %------------------------------------------------------------------------- % Document class \documentclass[a4paper,11pt,oneside]{report} % Document title and API version \newcommand{\glfwdoctype}[1][0]{Reference Manual} \newcommand{\glfwapiver}[1][0]{2.7} % Common document settings and macros \input{glfwdoc.sty} % PDF specific document settings \hypersetup{pdftitle={GLFW Reference Manual}} \hypersetup{pdfauthor={Camilla Berglund}} \hypersetup{pdfkeywords={GLFW,OpenGL,reference,manual}} %------------------------------------------------------------------------- % Document body %------------------------------------------------------------------------- \begin{document} \pagestyle{plain} % Title page \glfwmaketitle % Summary, trademarks and table of contents \pagenumbering{roman} \setcounter{page}{1} %------------------------------------------------------------------------- % Summary and Trademarks %------------------------------------------------------------------------- \chapter*{Summary} This document is primarily a function reference manual for the \GLFW\ API. For a description of how to use \GLFW\ you should refer to the \textit{GLFW Users Guide}. \vspace{5cm} \large Trademarks \small OpenGL and IRIX are registered trademarks of Silicon Graphics, Inc.\linebreak Microsoft and Windows are registered trademarks of Microsoft Corporation.\linebreak Mac OS is a registered trademark of Apple Computer, Inc.\linebreak Linux is a registered trademark of Linus Torvalds.\linebreak FreeBSD is a registered trademark of Wind River Systems, Inc.\linebreak Solaris is a trademark of Sun Microsystems, Inc.\linebreak UNIX is a registered trademark of The Open Group.\linebreak X Window System is a trademark of The Open Group.\linebreak POSIX is a trademark of IEEE.\linebreak Truevision, TARGA and TGA are registered trademarks of Truevision, Inc.\linebreak All other trademarks mentioned in this document are the property of their respective owners. \normalsize %------------------------------------------------------------------------- % Table of contents %------------------------------------------------------------------------- \tableofcontents %------------------------------------------------------------------------- % List of tables %------------------------------------------------------------------------- \listoftables \pagebreak % Document chapters starts here... \pagenumbering{arabic} \setcounter{page}{1} \pagestyle{fancy} %------------------------------------------------------------------------- % Introduction %------------------------------------------------------------------------- \chapter{Introduction} \thispagestyle{fancy} \GLFW\ is a portable API (Application Program Interface) that handles operating system specific tasks related to \OpenGL\ programming. While \OpenGL\ in general is portable, easy to use and often results in tidy and compact code, the operating system specific mechanisms that are required to set up and manage an \OpenGL\ window are quite the opposite. \GLFW\ tries to remedy this by providing the following functionality: \begin{itemize} \item Opening and managing an \OpenGL\ context and its associated window. \item Keyboard, mouse and joystick input. \item A high precision timer. \item Multi-threading support. \item Support for querying and using \OpenGL\ extensions. \item Basic Targa image loading support. \end{itemize} All this functionality is implemented as a set of easy-to-use functions, which makes it possible to write an \OpenGL\ application framework in just a few lines of code. The \GLFW\ API looks and behaves the same on all supported platforms, making it very simple to port \GLFW\ based \OpenGL\ applications to a variety of platforms. Currently supported platforms are: \begin{itemize} \item Microsoft Windows\textsuperscript{\textregistered} (32-bit only). \item Unix\textsuperscript{\textregistered} or Unix-like systems running resonably a modern version of the X Window System\texttrademark\footnote{X11.app on Mac OS X is not supported due to its incomplete implementation of GLXFBConfigs} e.g. Linux\textsuperscript{\textregistered}, FreeBSD\textsuperscript{\textregistered} and Solaris\texttrademark (32- and 64-bit). \item Mac OS\textsuperscript{\textregistered} X, using Cocoa\footnote{Joystick input is not yet supported on Mac OS X.} (32- and 64-bit). \end{itemize} %------------------------------------------------------------------------- % GLFW Operation %------------------------------------------------------------------------- \chapter{GLFW Operation Overview} \thispagestyle{fancy} %------------------------------------------------------------------------- \section{The GLFW Window} \GLFW\ only supports having one window open at a time. The window can be either a normal desktop window or a fullscreen window. The latter is completely undecorated, without window borders, and covers the entire monitor. With a fullscreen window, it is also possible to select which video mode to use. When a window is opened, an \OpenGL\ rendering context is created and attached to the entire client area of the window. When the window is closed, the \OpenGL\ rendering context is detached and destroyed. Through a window it is possible to receive user input in the form of keyboard and mouse input. User input is exposed through the \GLFW\ API primarily via a set of callback functions. Also, \GLFW\ stores most user input as internal state that can be queried through different \GLFW\ API functions (for instance it is possible to query the position of the mouse cursor with the \textbf{glfwGetMousePos} function). As for user input, it is possible to receive information about window state changes, such as window resize or close events, through callback functions. It is also possible to query some kinds of information about the window information using \GLFW\ API functions. %------------------------------------------------------------------------- \section{The GLFW Event Loop} The \GLFW\ event loop is an open loop, which means that it is up to the programmer to design the loop. Events are processed by calling specific \GLFW\ functions, which in turn query the system for new input and window events and reports these events back to the program through callback functions. The programmer decides when to call the event processing functions and when to abort the event loop. In pseudo language, a typical event loop might look like this: \begin{lstlisting} repeat until window is closed { poll events draw OpenGL graphics } \end{lstlisting} There are two ways to handle events in \GLFW : \begin{itemize} \item Block the event loop while waiting for new events. \item Poll for new events and continue the loop regardless of whether there are any new events or not. \end{itemize} The first method is useful for interactive applications that do not need to refresh the \OpenGL\ display unless the user interacts with the application through user input. Typical applications are CAD software and other kinds of editors. The second method is useful for applications that need to refresh the \OpenGL\ display constantly, regardless of user input, such as games, demos, 3D animations, screen savers and so on. %------------------------------------------------------------------------- \section{Callback Functions} Using callback functions can be a good method for receiving up to date information about window state and user input. When a window has been opened, it is possible to register custom callback functions that will be called when certain events occur. Callback functions are called from any of the event polling functions \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers}. Callback functions should \emph{only} be used to gather information. Since the callback functions are called from within the internal \GLFW\ event polling loops, they should not call any \GLFW\ functions that might result in considerable \GLFW\ state changes, nor stall the event polling loop for a lengthy period of time. In other words, most or all \OpenGL\ rendering should be called from the main application event loop, not from any of the \GLFW\ callback functions. Also, the only \GLFW\ functions that may be safely called from callback functions are the different Get functions (e.g. \textbf{glfwGetKey}, \textbf{glfwGetTime}, \textbf{glfwGetWindowParam} etc.). %------------------------------------------------------------------------- \section{Threads} \GLFW\ has functions for creating threads, which means that it is possible to make multi-threaded applications with \GLFW . The thread that calls \textbf{glfwInit} becomes the main thread, and it is recommended that all \GLFW\ and \OpenGL\ functions are called from the main thread. Additional threads should primarily be used for CPU heavy tasks or for managing other resources such as file or sound I/O. It should be noted that the current implementation of \GLFW\ is not thread safe, so you should never call \GLFW\ functions from different threads. \footnote{The thread management functions are of course thread safe.} %------------------------------------------------------------------------- % Function Reference %------------------------------------------------------------------------- \chapter{Function Reference} \thispagestyle{fancy} %------------------------------------------------------------------------- \section{GLFW Initialization and Termination} Before any other \GLFW\ functions can be used, \GLFW\ must be initialized to ensure proper functionality, and before a program terminates \GLFW\ should be terminated in order to free allocated resources, memory, etc. %------------------------------------------------------------------------- \subsection{glfwInit} \textbf{C language syntax} \begin{lstlisting} int glfwInit( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} If the function succeeds, GL\_TRUE is returned.\\ If the function fails, GL\_FALSE is returned. \end{refreturn} \begin{refdescription} The glfwInit function initializes \GLFW. No other \GLFW\ functions may be called before this function has succeeded. \end{refdescription} \begin{refnotes} This function may take several seconds to complete on some systems, while on other systems it may take only a fraction of a second to complete. This function registers a function calling \textbf{glfwTerminate} with the atexit facility of the C library. On Mac OS X, this function will change the current directory of the application to the \textbf{Contents/Resources} subdirectory of the application's bundle, if present. For more information on bundles, see the Bundle Programming Guide provided by Apple. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwTerminate} \textbf{C language syntax} \begin{lstlisting} void glfwTerminate( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function terminates \GLFW. Among other things it closes the window, if open, and kills any running threads. This function should be called before a program exits. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwGetVersion} \textbf{C language syntax} \begin{lstlisting} void glfwGetVersion( int *major, int *minor, int *rev ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{major}]\ \\ Pointer to an integer that will hold the major version number. \item [\textit{minor}]\ \\ Pointer to an integer that will hold the minor version number. \item [\textit{rev}]\ \\ Pointer to an integer that will hold the revision. \end{description} \end{refparameters} \begin{refreturn} The function returns the major and minor version numbers and the revision for the currently linked \GLFW\ library. \end{refreturn} \begin{refdescription} This function returns the \GLFW\ library version. \end{refdescription} %------------------------------------------------------------------------- \pagebreak \section{Window Handling} The primary purpose of \GLFW\ is to provide a simple interface to \OpenGL\ context creation and window management. \GLFW\ supports one window at a time, which can be either a normal desktop window or a fullscreen window. %------------------------------------------------------------------------- \subsection{glfwOpenWindow} \textbf{C language syntax} \begin{lstlisting} int glfwOpenWindow( int width, int height, int redbits, int greenbits, int bluebits, int alphabits, int depthbits, int stencilbits, int mode ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{width}]\ \\ The width of the window. If \textit{width} is zero, it will be calculated as ${width=\frac{4}{3}height}$, if \textit{height} is not zero. If both \textit{width} and \textit{height} are zero, \textit{width} will be set to 640. \item [\textit{height}]\ \\ The height of the window. If \textit{height} is zero, it will be calculated as ${height=\frac{3}{4}width}$, if \textit{width} is not zero. If both \textit{width} and \textit{height} are zero, \textit{height} will be set to 480. \item [\textit{redbits, greenbits, bluebits}]\ \\ The number of bits to use for each color component of the color buffer (0 means default color depth). For instance, setting \textit{redbits=5, greenbits=6 and bluebits=5} will create a 16-bit color buffer, if possible. \item [\textit{alphabits}]\ \\ The number of bits to use for the alpha channel of the color buffer (0 means no alpha channel). \item [\textit{depthbits}]\ \\ The number of bits to use for the depth buffer (0 means no depth buffer). \item [\textit{stencilbits}]\ \\ The number of bits to use for the stencil buffer (0 means no stencil buffer). \item [\textit{mode}]\ \\ Selects which type of \OpenGL\ window to use. \textit{mode} must be either GLFW\_WINDOW, which will generate a normal desktop window, or GLFW\_FULLSCREEN, which will generate a window which covers the entire screen. When GLFW\_FULLSCREEN is selected, the video mode will be changed to the resolution that closest matches the \textit{width} and \textit{height} parameters. \end{description} \end{refparameters} \begin{refreturn} If the function succeeds, GL\_TRUE is returned.\\ If the function fails, GL\_FALSE is returned. \end{refreturn} \begin{refdescription} This function opens a window that best matches the parameters given to the function. How well the resulting window matches the desired window depends mostly on the available hardware and \OpenGL\ drivers. In general, selecting a fullscreen mode has better chances of generating a close match of buffers and channel sizes than does a normal desktop window, since \GLFW\ can freely select from all the available video modes. A desktop window is normally restricted to the video mode of the desktop. \end{refdescription} \begin{refnotes} For additional control of window properties, see \textbf{glfwOpenWindowHint}. In fullscreen mode the mouse cursor is hidden by default and the screensaver is prohibited from starting. In windowed mode the mouse cursor is visible and screensavers are allowed to start. To change the visibility of the mouse cursor, use \textbf{glfwEnable} or \textbf{glfwDisable} with the argument GLFW\_MOUSE\_CURSOR. In order to determine the actual properties of an opened window, use \textbf{glfwGetWindowParam} and \textbf{glfwGetWindowSize} (or \textbf{glfwSetWindowSizeCallback}). On Microsoft Windows, if the executable has an icon resource named \textbf{GLFW\_ICON}, it will be set as the icon for the window. If no such icon is present, the \textbf{IDI\_WINLOGO} icon will be used instead. On Mac OS X the \GLFW\ window has no icon, but programs using \GLFW\ will use the application bundle's icon. For more information on bundles, see the Bundle Programming Guide provided by Apple. For information on how the availability of different platform-specific extensions affect the behavior of this function, see appendix \ref{chap:compatibility}. \end{refnotes} %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|l|p{7.0cm}|} \hline \raggedright \textbf{Name} & \textbf{Default} & \textbf{Description} \\ \hline GLFW\_REFRESH\_RATE & 0 & Vertical monitor refresh rate in Hz (only used for fullscreen windows). Zero means system default.\\ \hline GLFW\_ACCUM\_RED\_BITS & 0 & Number of bits for the red channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_GREEN\_BITS & 0 & Number of bits for the green channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_BLUE\_BITS & 0 & Number of bits for the blue channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_ALPHA\_BITS & 0 & Number of bits for the alpha channel of the accumulation buffer.\\ \hline GLFW\_AUX\_BUFFERS & 0 & Number of auxiliary buffers.\\ \hline GLFW\_STEREO & GL\_FALSE & Specify if stereo rendering should be supported (can be GL\_TRUE or GL\_FALSE).\\ \hline GLFW\_WINDOW\_NO\_RESIZE & GL\_FALSE & Specify whether the window can be resized by the user (not used for fullscreen windows).\\ \hline GLFW\_FSAA\_SAMPLES & 0 & Number of samples to use for the multisampling buffer. Zero disables multisampling.\\ \hline GLFW\_OPENGL\_VERSION\_MAJOR & 1 & Major number of the desired minimum \OpenGL\ version.\\ \hline GLFW\_OPENGL\_VERSION\_MINOR & 1 & Minor number of the desired minimum \OpenGL\ version.\\ \hline GLFW\_OPENGL\_FORWARD\_COMPAT & GL\_FALSE & Specify whether the \OpenGL\ context should be forward-compatible (i.e. disallow legacy functionality). This should only be used when requesting \OpenGL\ version 3.0 or above.\\ \hline GLFW\_OPENGL\_DEBUG\_CONTEXT & GL\_FALSE & Specify whether a debug context should be created.\\ \hline GLFW\_OPENGL\_PROFILE & 0 & The \OpenGL\ profile the context should implement, or zero to let the system choose. Available profiles are GLFW\_OPENGL\_CORE\_PROFILE and GLFW\_OPENGL\_COMPAT\_PROFILE.\\ \hline \end{tabular} \end{center} \caption{Targets for \textbf{glfwOpenWindowHint}} \label{tab:winhints} \end{table} %------------------------------------------------------------------------- \subsection{glfwOpenWindowHint} \textbf{C language syntax} \begin{lstlisting} void glfwOpenWindowHint( int target, int hint ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{target}]\ \\ Can be any of the tokens in the table \ref{tab:winhints}. \item [\textit{hint}]\ \\ An integer giving the value of the corresponding token (see table \ref{tab:winhints}). \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets additional properties for a window that is to be opened. For a hint to take effect, it must be set \emph{before} calling \textbf{glfwOpenWindow}. When \textbf{glfwOpenWindow} is called, regardless of whether it succeeds, all window hints are reset to their default values. \end{refdescription} \begin{refnotes} All window hints are reset to their default values by each successful call to \textbf{glfwInit} and by each call to \textbf{glfwOpenWindow}, whether successful or not. In order to determine the actual properties of an opened window, use \textbf{glfwGetWindowParam} (after the window has been opened). GLFW\_STEREO is a hard constraint. If stereo rendering is requested, but no stereo rendering capable pixel formats / framebuffer configs are available, \textbf{glfwOpenWindow} will fail. The GLFW\_REFRESH\_RATE hint should be used with caution. Most systems have default values for monitor refresh rates that are optimal for the specific system. Specifying the refresh rate can override these settings, which can result in suboptimal operation. The monitor may be unable to display the resulting video signal, or in the worst case it may even be damaged! The GLFW\_WINDOW\_NO\_RESIZE hint applies only to manual resizing by the user. A window created with this hint enabled can still be resized by the application by calling \textbf{glfwSetWindowSize}. The GLFW\_OPENGL\_VERSION\_MAJOR and GLFW\_OPENGL\_VERSION\_MINOR hints specify the \OpenGL\ version that the created context must be compatible with, \emph{not} the exact version to use. It is therefore perfectly safe to use the default of version 1.1 for legacy code and you will still get backwards-compatible contexts of version 3.0 and above when available. To make the behavior of the above version hints consistent across both modern and legacy drivers, \textbf{glfwOpenWindow} will fail if the modern creation mechanism (as specified in \textbf{WGL\_ARB\_create\_context} and \textbf{GLX\_ARB\_create\_context}) is unavailable \emph{and} the created context is of a version lower than the one that was requested. At the time of release, the exact meaning of what a "debug context" is (as created using the GLFW\_OPENGL\_DEBUG\_CONTEXT hint) has yet to be defined by the Khronos ARB WG. For information on how the availability of different extensions affect the behavior of this function, see appendix \ref{chap:compatibility}. For full details on the workings of the \OpenGL\ version, forward-compatibility and debug hints, see the specifications for \textbf{WGL\_ARB\_create\_context} and \textbf{GLX\_ARB\_create\_context}, respectively. The relevant \GLFW\ hints map very closely to their platform-specific counterparts. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwCloseWindow} \textbf{C language syntax} \begin{lstlisting} void glfwCloseWindow( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function closes an opened window and destroys the associated \OpenGL\ context. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwSetWindowCloseCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called when a user requests that the window should be closed, typically by clicking the window close icon (e.g. the cross in the upper right corner of a window under Microsoft Windows), and on Mac OS X also when selecting \textbf{Quit} from the application menu. The function should have the following C language prototype: \texttt{int GLFWCALL functionname( void );} Where \textit{functionname} is the name of the callback function. The return value of the callback function indicates wether or not the window close action should continue. If the function returns GL\_TRUE, the window will be closed. If the function returns GL\_FALSE, the window will not be closed. If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for window close events. A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Window close events are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. The \OpenGL\ context is still valid when this function is called. Note that the window close callback function is not called when \textbf{glfwCloseWindow} is called, but only when the close request comes from the window manager. Do \emph{not} call \textbf{glfwCloseWindow} from a window close callback function. Close the window by returning GL\_TRUE from the function. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetWindowTitle} \textbf{C language syntax} \begin{lstlisting} void glfwSetWindowTitle( const char *title ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{title}]\ \\ Pointer to a null terminated ISO~8859-1 (8-bit Latin~1) string that holds the title of the window. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function changes the title of the opened window. \end{refdescription} \begin{refnotes} The title property of a window is often used in situations other than for the window title, such as the title of an application icon when it is in iconified state. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetWindowSize} \textbf{C language syntax} \begin{lstlisting} void glfwSetWindowSize( int width, int height ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{width}]\ \\ Width of the window. \item [\textit{height}]\ \\ Height of the window. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function changes the size of an opened window. The \textit{width} and \textit{height} parameters denote the size of the client area of the window (i.e. excluding any window borders and decorations). If the window is in fullscreen mode, the video mode will be changed to a resolution that closest matches the width and height parameters (the number of color bits will not be changed). \end{refdescription} \begin{refnotes} This function has no effect if the window is iconified. The \OpenGL\ context is guaranteed to be preserved after calling \textbf{glfwSetWindowSize}, even if the video mode is changed. This function is not affected by the value of the GLFW\_WINDOW\_NO\_RESIZE hint. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetWindowPos} \textbf{C language syntax} \begin{lstlisting} void glfwSetWindowPos( int x, int y ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{x}]\ \\ Horizontal position of the window, relative to the upper left corner of the desktop. \item [\textit{y}]\ \\ Vertical position of the window, relative to the upper left corner of the desktop. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function changes the position of an opened window. It does not have any effect on a fullscreen window. \end{refdescription} \begin{refnotes} This function has no effect if the window is iconified. The behaviour of this function on multi-monitor systems is ill-defined. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetWindowSize} \textbf{C language syntax} \begin{lstlisting} void glfwGetWindowSize( int *width, int *height ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{width}]\ \\ Pointer to an integer that will hold the width of the window. \item [\textit{height}]\ \\ Pointer to an integer that will hold the height of the window. \end{description} \end{refparameters} \begin{refreturn} The current width and height of the opened window is returned in the \textit{width} and \textit{height} parameters, respectively. \end{refreturn} \begin{refdescription} This function is used for determining the size of an opened window. The returned values are dimensions of the client area of the window (i.e. excluding any window borders and decorations). \end{refdescription} \begin{refnotes} Even if the size of a fullscreen window does not change once the window has been opened, it does not necessarily have to be the same as the size that was requested using \textbf{glfwOpenWindow}. Therefor it is wise to use this function to determine the true size of the window once it has been opened. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetWindowSizeCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called every time the window size changes. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( int width, int height );} Where \textit{functionname} is the name of the callback function, and \textit{width} and \textit{height} are the dimensions of the window client area. If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for window size change events. A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Window size changes are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. When a callback function is set, it will be called with the current window size before this function returns. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwIconifyWindow} \textbf{C language syntax} \begin{lstlisting} void glfwIconifyWindow( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} Iconify a window. If the window is in fullscreen mode, then the desktop video mode will be restored. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwRestoreWindow} \textbf{C language syntax} \begin{lstlisting} void glfwRestoreWindow( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} Restore an iconified window. If the window that is restored is in fullscreen mode, then the fullscreen video mode will be restored. \end{refdescription} %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|p{9.5cm}|} \hline \raggedright \textbf{Name} & \textbf{Description} \\ \hline GLFW\_OPENED & GL\_TRUE if window is opened, else GL\_FALSE.\\ \hline GLFW\_ACTIVE & GL\_TRUE if window has focus, else GL\_FALSE.\\ \hline GLFW\_ICONIFIED & GL\_TRUE if window is iconified, else GL\_FALSE.\\ \hline GLFW\_ACCELERATED & GL\_TRUE if window is hardware accelerated, else GL\_FALSE.\\ \hline GLFW\_RED\_BITS & Number of bits for the red color component.\\ \hline GLFW\_GREEN\_BITS & Number of bits for the green color component.\\ \hline GLFW\_BLUE\_BITS & Number of bits for the blue color component.\\ \hline GLFW\_ALPHA\_BITS & Number of bits for the alpha buffer.\\ \hline GLFW\_DEPTH\_BITS & Number of bits for the depth buffer.\\ \hline GLFW\_STENCIL\_BITS & Number of bits for the stencil buffer.\\ \hline GLFW\_REFRESH\_RATE & Vertical monitor refresh rate in Hz. Zero indicates an unknown or a default refresh rate.\\ \hline GLFW\_ACCUM\_RED\_BITS & Number of bits for the red channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_GREEN\_BITS & Number of bits for the green channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_BLUE\_BITS & Number of bits for the blue channel of the accumulation buffer.\\ \hline GLFW\_ACCUM\_ALPHA\_BITS & Number of bits for the alpha channel of the accumulation buffer.\\ \hline GLFW\_AUX\_BUFFERS & Number of auxiliary buffers.\\ \hline GLFW\_STEREO & GL\_TRUE if stereo rendering is supported, else GL\_FALSE.\\ \hline GLFW\_WINDOW\_NO\_RESIZE & GL\_TRUE if the window cannot be resized by the user, else GL\_FALSE.\\ \hline GLFW\_FSAA\_SAMPLES & Number of multisampling buffer samples. Zero indicated multisampling is disabled.\\ \hline GLFW\_OPENGL\_VERSION\_MAJOR & Major number of the actual version of the context.\\ \hline GLFW\_OPENGL\_VERSION\_MINOR & Minor number of the actual version of the context.\\ \hline GLFW\_OPENGL\_FORWARD\_COMPAT & GL\_TRUE if the context is forward-compatible, else GL\_FALSE.\\ \hline GLFW\_OPENGL\_DEBUG\_CONTEXT & GL\_TRUE if the context is a debug context.\\ \hline GLFW\_OPENGL\_PROFILE & The profile implemented by the context, or zero.\\ \hline \end{tabular} \end{center} \caption{Window parameters for \textbf{glfwGetWindowParam}} \label{tab:winparams} \end{table} %------------------------------------------------------------------------- \subsection{glfwGetWindowParam} \textbf{C language syntax} \begin{lstlisting} int glfwGetWindowParam( int param ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{param}]\ \\ A token selecting which parameter the function should return (see table \ref{tab:winparams}). \end{description} \end{refparameters} \begin{refreturn} The function returns the value the window parameter corresponding to the token \textit{param}. Table \ref{tab:winparams} lists the available tokens. \end{refreturn} \begin{refdescription} This function is used for acquiring various properties of an opened window. \end{refdescription} \begin{refnotes} GLFW\_ACCELERATED is only supported under Windows. Other systems will always return GL\_TRUE. Under Windows, GLFW\_ACCELERATED means that the \OpenGL\ renderer is a 3rd party renderer, rather than the fallback Microsoft software \OpenGL\ renderer. In other words, it is not a real guarantee that the \OpenGL\ renderer is actually hardware accelerated. GLFW\_OPENGL\_VERSION\_MAJOR and GLFW\_OPENGL\_VERSION\_MINOR always return the same values as those returned by \textbf{glfwGetGLVersion}. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSwapBuffers} \textbf{C language syntax} \begin{lstlisting} void glfwSwapBuffers( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function swaps the back and front color buffers of the window. If GLFW\_AUTO\_POLL\_EVENTS is enabled (which is the default), \textbf{glfwPollEvents} is called after swapping the front and back buffers. \end{refdescription} \begin{refnotes} In previous versions of \GLFW , \textbf{glfwPollEvents} was called \emph{before} buffer swap. This was changed in order to decrease input lag but may affect code that relied on the former behavior. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSwapInterval} \textbf{C language syntax} \begin{lstlisting} void glfwSwapInterval( int interval ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{interval}]\ \\ Minimum number of monitor vertical retraces between each buffer swap performed by \textbf{glfwSwapBuffers}. If \textit{interval} is zero, buffer swaps will not be synchronized to the vertical refresh of the monitor (also known as 'VSync off'). \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function selects the minimum number of monitor vertical retraces that should occur between two buffer swaps. If the selected swap interval is one, the rate of buffer swaps will never be higher than the vertical refresh rate of the monitor. If the selected swap interval is zero, the rate of buffer swaps is only limited by the speed of the software and the hardware. \end{refdescription} \begin{refnotes} This function will only have an effect on hardware and drivers that support user selection of the swap interval. ATI drivers in particular have been known to ignore this setting. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetWindowRefreshCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called when the window client area needs to be refreshed. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( void );} Where \textit{functionname} is the name of the callback function. If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for window refresh events, which occurs when any part of the window client area has been damaged, and needs to be repainted (for instance, if a part of the window that was previously occluded by another window has become visible). A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Window refresh events are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. Modern windowing systems using hardware compositing, such as Aqua, Aero and Compiz, very rarely need to refresh the contents of windows, so the specified callback will very rarely be called on such systems. \end{refnotes} %------------------------------------------------------------------------- \pagebreak \section{Video Modes} Since \GLFW\ supports video mode changes when using a fullscreen window, it also provides functionality for querying which video modes are supported on a system. %------------------------------------------------------------------------- \subsection{glfwGetVideoModes} \textbf{C language syntax} \begin{lstlisting} int glfwGetVideoModes( GLFWvidmode *list, int maxcount ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{list}]\ \\ A vector of \textit{GLFWvidmode} structures, which will be filled out by the function. \item [\textit{maxcount}]\ \\ Maximum number of video modes that \textit{list} vector can hold. \end{description} \end{refparameters} \begin{refreturn} The function returns the number of detected video modes (this number will never exceed \textit{maxcount}). The \textit{list} vector is filled out with the video modes that are supported by the system. \end{refreturn} \begin{refdescription} This function returns a list of supported video modes. Each video mode is represented by a \textit{GLFWvidmode} structure, which has the following definition: \begin{lstlisting} typedef struct { int Width, Height; // Video resolution int RedBits; // Number of red bits int GreenBits; // Number of green bits int BlueBits; // Number of blue bits } GLFWvidmode; \end{lstlisting} \end{refdescription} \begin{refnotes} The returned list is sorted, first by color depth ($RedBits + GreenBits + BlueBits$), and then by resolution ($Width \times Height$), with the lowest resolution, fewest bits per pixel mode first. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetDesktopMode} \textbf{C language syntax} \begin{lstlisting} void glfwGetDesktopMode( GLFWvidmode *mode ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{mode}]\ \\ Pointer to a \textit{GLFWvidmode} structure, which will be filled out by the function. \end{description} \end{refparameters} \begin{refreturn} The \textit{GLFWvidmode} structure pointed to by \textit{mode} is filled out with the desktop video mode. \end{refreturn} \begin{refdescription} This function returns the desktop video mode in a \textit{GLFWvidmode} structure. See \textbf{glfwGetVideoModes} for a definition of the \textit{GLFWvidmode} structure. \end{refdescription} \begin{refnotes} The color depth of the desktop display is always reported as the number of bits for each individual color component (red, green and blue), even if the desktop is not using an RGB or RGBA color format. For instance, an indexed 256 color display may report \textit{RedBits} = 3, \textit{GreenBits} = 3 and \textit{BlueBits} = 2, which adds up to 8 bits in total. The desktop video mode is the video mode used by the desktop at the time the \GLFW\ window was opened, \textit{not} the current video mode (which may differ from the desktop video mode if the \GLFW\ window is a fullscreen window). \end{refnotes} %------------------------------------------------------------------------- \pagebreak \section{Input Handling} \GLFW\ supports three channels of user input: keyboard input, mouse input and joystick input. Keyboard and mouse input can be treated either as events, using callback functions, or as state, using functions for polling specific keyboard and mouse states. Regardless of which method is used, all keyboard and mouse input is collected using window event polling. Joystick input is asynchronous to the keyboard and mouse input, and does not require event polling for keeping up to date joystick information. Also, joystick input is independent of any window, so a window does not have to be opened for joystick input to be used. %------------------------------------------------------------------------- \subsection{glfwPollEvents} \textbf{C language syntax} \begin{lstlisting} void glfwPollEvents( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function is used for polling for events, such as user input and window resize events. Upon calling this function, all window states, keyboard states and mouse states are updated. If any related callback functions are registered, these are called during the call to \textbf{glfwPollEvents}. \end{refdescription} \begin{refnotes} \textbf{glfwPollEvents} is called implicitly from \textbf{glfwSwapBuffers} if GLFW\_AUTO\_POLL\_EVENTS is enabled (as it is by default). Thus, if \textbf{glfwSwapBuffers} is called frequently, which is normally the case, there is no need to call \textbf{glfwPollEvents}. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwWaitEvents} \textbf{C language syntax} \begin{lstlisting} void glfwWaitEvents( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function is used for waiting for events, such as user input and window resize events. Upon calling this function, the calling thread will be put to sleep until any event appears in the event queue. When events are available, they will be processed just as they are processed by \textbf{glfwPollEvents}. If there are any events in the queue when the function is called, the function will behave exactly like \textbf{glfwPollEvents} (i.e. process all messages and then return, without blocking the calling thread). \end{refdescription} \begin{refnotes} It is guaranteed that \textbf{glfwWaitEvents} will wake up on any event that can be processed by \textbf{glfwPollEvents}. However, \GLFW\ receives many events that are only processed internally and the function may behave differently on different systems. Do not make any assumptions about when or why \textbf{glfwWaitEvents} will return. \end{refnotes} %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|l|} \hline \raggedright \textbf{Name} & \textbf{Description} \\ \hline GLFW\_KEY\_SPACE & Space\\ \hline GLFW\_KEY\_ESC & Escape\\ \hline GLFW\_KEY\_F\textit{n} & Function key \textit{n} (\textit{n} can be in the range 1..25)\\ \hline GLFW\_KEY\_UP & Cursor up\\ \hline GLFW\_KEY\_DOWN & Cursor down\\ \hline GLFW\_KEY\_LEFT & Cursor left\\ \hline GLFW\_KEY\_RIGHT & Cursor right\\ \hline GLFW\_KEY\_LSHIFT & Left shift key\\ \hline GLFW\_KEY\_RSHIFT & Right shift key\\ \hline GLFW\_KEY\_LCTRL & Left control key\\ \hline GLFW\_KEY\_RCTRL & Right control key\\ \hline GLFW\_KEY\_LALT & Left alternate function key\\ \hline GLFW\_KEY\_RALT & Right alternate function key\\ \hline GLFW\_KEY\_LSUPER & Left super key, WinKey, or command key\\ \hline GLFW\_KEY\_RSUPER & Right super key, WinKey, or command key\\ \hline GLFW\_KEY\_TAB & Tabulator\\ \hline GLFW\_KEY\_ENTER & Enter\\ \hline GLFW\_KEY\_BACKSPACE & Backspace\\ \hline GLFW\_KEY\_INSERT & Insert\\ \hline GLFW\_KEY\_DEL & Delete\\ \hline GLFW\_KEY\_PAGEUP & Page up\\ \hline GLFW\_KEY\_PAGEDOWN & Page down\\ \hline GLFW\_KEY\_HOME & Home\\ \hline GLFW\_KEY\_END & End\\ \hline GLFW\_KEY\_KP\_\textit{n} & Keypad numeric key \textit{n} (\textit{n} can be in the range 0..9)\\ \hline GLFW\_KEY\_KP\_DIVIDE & Keypad divide ($\div$)\\ \hline GLFW\_KEY\_KP\_MULTIPLY & Keypad multiply ($\times$)\\ \hline GLFW\_KEY\_KP\_SUBTRACT & Keypad subtract ($-$)\\ \hline GLFW\_KEY\_KP\_ADD & Keypad add ($+$)\\ \hline GLFW\_KEY\_KP\_DECIMAL & Keypad decimal (. or ,)\\ \hline GLFW\_KEY\_KP\_EQUAL & Keypad equal (=)\\ \hline GLFW\_KEY\_KP\_ENTER & Keypad enter\\ \hline GLFW\_KEY\_KP\_NUM\_LOCK & Keypad num lock\\ \hline GLFW\_KEY\_CAPS\_LOCK & Caps lock\\ \hline GLFW\_KEY\_SCROLL\_LOCK & Scroll lock\\ \hline GLFW\_KEY\_PAUSE & Pause key\\ \hline GLFW\_KEY\_MENU & Menu key\\ \hline \end{tabular} \end{center} \caption{Special key identifiers} \label{tab:keys} \end{table} %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|l|} \hline \raggedright \textbf{Name} & \textbf{Description} \\ \hline GLFW\_MOUSE\_BUTTON\_LEFT & Left mouse button (button 1) \\ \hline GLFW\_MOUSE\_BUTTON\_RIGHT & Right mouse button (button 2) \\ \hline GLFW\_MOUSE\_BUTTON\_MIDDLE & Middle mouse button (button 3) \\ \hline GLFW\_MOUSE\_BUTTON\_\textit{n} & Mouse button \textit{n} (\textit{n} can be in the range 1..8)\\ \hline \end{tabular} \end{center} \caption{Valid mouse button identifiers} \label{tab:mousebuttons} \end{table} %------------------------------------------------------------------------- \subsection{glfwGetKey} \textbf{C language syntax} \begin{lstlisting} int glfwGetKey( int key ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{key}]\ \\ A keyboard key identifier, which can be either an uppercase printable ISO~8859-1 (Latin~1) character (e.g. 'A', '3' or '.'), or a special key identifier. Table \ref{tab:keys} lists valid special key identifiers. \end{description} \end{refparameters} \begin{refreturn} The function returns GLFW\_PRESS if the key is held down, or GLFW\_RELEASE if the key is not held down. \end{refreturn} \begin{refdescription} This function queries the current state of a specific keyboard key. The physical location of each key depends on the system keyboard layout setting. \end{refdescription} \begin{refnotes} The constant GLFW\_KEY\_SPACE is equal to 32, which is the ISO~8859-1 code for space. This is the only named \GLFW\ key identifier with a value in the ISO~8859-1 range. Not all key codes are supported on all systems. Also, while some keys are available on some keyboard layouts, they may not be available on other keyboard layouts. For systems that do not distinguish between left and right versions of modifier keys (shift, alt and control), the left version is used (e.g. GLFW\_KEY\_LSHIFT). A window must be opened for the function to have any effect, and \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) must be called before any keyboard events are recorded and reported by \textbf{glfwGetKey}. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetMouseButton} \textbf{C language syntax} \begin{lstlisting} int glfwGetMouseButton( int button ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{button}]\ \\ A mouse button identifier, which can be one of the mouse button identifiers listed in table \ref{tab:mousebuttons}. \end{description} \end{refparameters} \begin{refreturn} The function returns GLFW\_PRESS if the mouse button is held down, or GLFW\_RELEASE if the mouse button is not held down. \end{refreturn} \begin{refdescription} This function queries the current state of a specific mouse button. \end{refdescription} \begin{refnotes} A window must be opened for the function to have any effect, and \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) must be called before any mouse button events are recorded and reported by \textbf{glfwGetMouseButton}. GLFW\_MOUSE\_BUTTON\_LEFT is equal to GLFW\_MOUSE\_BUTTON\_1. GLFW\_MOUSE\_BUTTON\_RIGHT is equal to GLFW\_MOUSE\_BUTTON\_2. GLFW\_MOUSE\_BUTTON\_MIDDLE is equal to GLFW\_MOUSE\_BUTTON\_3. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetMousePos} \textbf{C language syntax} \begin{lstlisting} void glfwGetMousePos( int *xpos, int *ypos ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{xpos}]\ \\ Pointer to an integer that will be set to the horizontal position of the mouse cursor. \item [\textit{ypos}]\ \\ Pointer to an integer that will be set to the vertical position of the mouse cursor. \end{description} \end{refparameters} \begin{refreturn} The function returns the current mouse cursor position in \textit{xpos} and \textit{ypos}. \end{refreturn} \begin{refdescription} This function returns the current mouse position. If the cursor is not hidden, the mouse position is the cursor position, relative to the upper left corner of the window and with the Y-axis down. If the cursor is hidden, the mouse position is a virtual absolute position, not limited to any boundaries except to those implied by the maximum number that can be represented by a signed integer. \end{refdescription} \begin{refnotes} A window must be opened for the function to have any effect, and \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) must be called before any mouse movements are recorded and reported by \textbf{glfwGetMousePos}. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetMousePos} \textbf{C language syntax} \begin{lstlisting} void glfwSetMousePos( int xpos, int ypos ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{xpos}]\ \\ Horizontal position of the mouse. \item [\textit{ypos}]\ \\ Vertical position of the mouse. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function changes the position of the mouse. If the cursor is visible (not disabled), the cursor will be moved to the specified position, relative to the upper left corner of the window client area and with the Y-axis down. If the cursor is hidden (disabled), only the mouse position that is reported by \GLFW\ is changed. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwGetMouseWheel} \textbf{C language syntax} \begin{lstlisting} int glfwGetMouseWheel( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} The function returns the current mouse wheel position. \end{refreturn} \begin{refdescription} This function returns the current mouse wheel position. The mouse wheel can be thought of as a third mouse axis, which is available as a separate wheel or up/down stick on some mice. \end{refdescription} \begin{refnotes} A window must be opened for the function to have any effect, and \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) must be called before any mouse wheel movements are recorded and reported by \textbf{glfwGetMouseWheel}. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetMouseWheel} \textbf{C language syntax} \begin{lstlisting} void glfwSetMouseWheel( int pos ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{pos}]\ \\ Position of the mouse wheel. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function changes the position of the mouse wheel. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwSetKeyCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetKeyCallback( GLFWkeyfun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called every time a key is pressed or released. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( int key, int action );} Where \textit{functionname} is the name of the callback function, \textit{key} is a key identifier, which is an uppercase printable ISO~8859-1 character or a special key identifier (see table \ref{tab:keys}), and \textit{action} is either GLFW\_PRESS or GLFW\_RELEASE. If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for keyboard key events. The callback function is called every time the state of a single key is changed (from released to pressed or vice versa). The reported keys are unaffected by any modifiers (such as shift or alt) and each modifier is reported as a separate key. A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Keyboard key events are not intended for text input and many languages will not be able to be input using it. Use Unicode character events for text input instead. Keyboard events are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetCharCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetCharCallback( GLFWcharfun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called every time a printable character is generated by the keyboard. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( int character, int action );} Where \textit{functionname} is the name of the callback function, \textit{character} is a Unicode (ISO~10646) character, and \textit{action} is either GLFW\_PRESS or GLFW\_RELEASE. If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for keyboard character events. The callback function is called every time a key that results in a printable Unicode character is pressed or released. Characters are affected by modifiers (such as shift or alt). A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Character events are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. Control characters such as tab and carriage return are not reported to the character callback function, since they are not part of the Unicode character set. Use the key callback function for such events (see \textbf{glfwSetKeyCallback}). The Unicode character set supports character codes above 255, so never cast a Unicode character to an eight bit data type (e.g. the C language 'char' type) without first checking that the character code is less than 256. Also note that Unicode character codes 0 to 255 are equal to ISO~8859-1 (Latin~1). \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetMouseButtonCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called every time a mouse button is pressed or released. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( int button, int action );} Where \textit{functionname} is the name of the callback function, \textit{button} is a mouse button identifier (see table \ref{tab:mousebuttons} on page \pageref{tab:mousebuttons}), and \textit{action} is either GLFW\_PRESS or GLFW\_RELEASE. If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for mouse button events. A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Mouse button events are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. GLFW\_MOUSE\_BUTTON\_LEFT is equal to GLFW\_MOUSE\_BUTTON\_1. GLFW\_MOUSE\_BUTTON\_RIGHT is equal to GLFW\_MOUSE\_BUTTON\_2. GLFW\_MOUSE\_BUTTON\_MIDDLE is equal to GLFW\_MOUSE\_BUTTON\_3. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetMousePosCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetMousePosCallback( GLFWmouseposfun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called every time the mouse is moved. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( int x, int y );} Where \textit{functionname} is the name of the callback function, and \textit{x} and \textit{y} are the mouse coordinates (see \textbf{glfwGetMousePos} for more information on mouse coordinates). If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for mouse motion events. A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Mouse motion events are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetMouseWheelCallback} \textbf{C language syntax} \begin{lstlisting} void glfwSetMouseWheelCallback( GLFWmousewheelfun cbfun ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cbfun}]\ \\ Pointer to a callback function that will be called every time the mouse wheel is moved. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( int pos );} Where \textit{functionname} is the name of the callback function, and \textit{pos} is the mouse wheel position. If \textit{cbfun} is NULL, any previously set callback function will be unset. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the callback for mouse wheel events. A window has to be opened for this function to have any effect. \end{refdescription} \begin{refnotes} Mouse wheel events are recorded continuously, but only reported when \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled) is called. \end{refnotes} %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|l|}\hline \raggedright \textbf{Name} & \textbf{Return value}\\ \hline GLFW\_PRESENT & GL\_TRUE if the joystick is connected, else GL\_FALSE.\\ \hline GLFW\_AXES & Number of axes supported by the joystick.\\ \hline GLFW\_BUTTONS & Number of buttons supported by the joystick.\\ \hline \end{tabular} \end{center} \caption{Joystick parameters for \textbf{glfwGetJoystickParam}} \label{tab:joyparams} \end{table} %------------------------------------------------------------------------- \subsection{glfwGetJoystickParam} \textbf{C language syntax} \begin{lstlisting} int glfwGetJoystickParam( int joy, int param ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{joy}]\ \\ A joystick identifier, which should be GLFW\_JOYSTICK\_\textit{n}, where \textit{n} is in the range 1 to 16. \item [\textit{param}]\ \\ A token selecting which parameter the function should return (see table \ref{tab:joyparams}). \end{description} \end{refparameters} \begin{refreturn} The function returns different parameters depending on the value of \textit{param}. Table \ref{tab:joyparams} lists valid \textit{param} values, and their corresponding return values. \end{refreturn} \begin{refdescription} This function is used for acquiring various properties of a joystick. \end{refdescription} \begin{refnotes} The joystick information is updated every time the function is called. No window has to be opened for joystick information to be available. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetJoystickPos} \textbf{C language syntax} \begin{lstlisting} int glfwGetJoystickPos( int joy, float *pos, int numaxes ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{joy}]\ \\ A joystick identifier, which should be GLFW\_JOYSTICK\_\textit{n}, where \textit{n} is in the range 1 to 16. \item [\textit{pos}]\ \\ An array that will hold the positional values for all requested axes. \item [\textit{numaxes}]\ \\ Specifies how many axes should be returned. \end{description} \end{refparameters} \begin{refreturn} The function returns the number of actually returned axes. This is the minimum of \textit{numaxes} and the number of axes supported by the joystick. If the joystick is not supported or connected, the function will return 0 (zero). \end{refreturn} \begin{refdescription} This function queries the current position of one or more axes of a joystick. The positional values are returned in an array, where the first element represents the first axis of the joystick (normally the X axis). Each position is in the range -1.0 to 1.0. Where applicable, the positive direction of an axis is right, forward or up, and the negative direction is left, back or down. If \textit{numaxes} exceeds the number of axes supported by the joystick, or if the joystick is not available, the unused elements in the \textit{pos} array will be set to 0.0 (zero). \end{refdescription} \begin{refnotes} The joystick state is updated every time the function is called, so there is no need to call \textbf{glfwPollEvents} or \textbf{glfwWaitEvents} for joystick state to be updated. Use \textbf{glfwGetJoystickParam} to retrieve joystick capabilities, such as joystick availability and number of supported axes. No window has to be opened for joystick input to be available. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetJoystickButtons} \textbf{C language syntax} \begin{lstlisting} int glfwGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{joy}]\ \\ A joystick identifier, which should be GLFW\_JOYSTICK\_\textit{n}, where \textit{n} is in the range 1 to 16. \item [\textit{buttons}]\ \\ An array that will hold the button states for all requested buttons. \item [\textit{numbuttons}]\ \\ Specifies how many buttons should be returned. \end{description} \end{refparameters} \begin{refreturn} The function returns the number of actually returned buttons. This is the minimum of \textit{numbuttons} and the number of buttons supported by the joystick. If the joystick is not supported or connected, the function will return 0 (zero). \end{refreturn} \begin{refdescription} This function queries the current state of one or more buttons of a joystick. The button states are returned in an array, where the first element represents the first button of the joystick. Each state can be either GLFW\_PRESS or GLFW\_RELEASE. If \textit{numbuttons} exceeds the number of buttons supported by the joystick, or if the joystick is not available, the unused elements in the \textit{buttons} array will be set to GLFW\_RELEASE. \end{refdescription} \begin{refnotes} The joystick state is updated every time the function is called, so there is no need to call \textbf{glfwPollEvents} or \textbf{glfwWaitEvents} for joystick state to be updated. Use \textbf{glfwGetJoystickParam} to retrieve joystick capabilities, such as joystick availability and number of supported buttons. No window has to be opened for joystick input to be available. \end{refnotes} %------------------------------------------------------------------------- \pagebreak \section{Timing} %------------------------------------------------------------------------- \subsection{glfwGetTime} \textbf{C language syntax} \begin{lstlisting} double glfwGetTime( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} The function returns the value of the high precision timer. The time is measured in seconds, and is returned as a double precision floating point value. \end{refreturn} \begin{refdescription} This function returns the state of a high precision timer. Unless the timer has been set by the \textbf{glfwSetTime} function, the time is measured as the number of seconds that have passed since \textbf{glfwInit} was called. \end{refdescription} \begin{refnotes} The resolution of the timer depends on which system the program is running on. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSetTime} \textbf{C language syntax} \begin{lstlisting} void glfwSetTime( double time ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{time}]\ \\ Time (in seconds) that the timer should be set to. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function sets the current time of the high precision timer to the specified time. Subsequent calls to \textbf{glfwGetTime} will be relative to this time. The time is given in seconds. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwSleep} \textbf{C language syntax} \begin{lstlisting} void glfwSleep( double time ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{time}]\ \\ Time, in seconds, to sleep. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function puts the calling thread to sleep for the requested period of time. Only the calling thread is put to sleep. Other threads within the same process can still execute. \end{refdescription} \begin{refnotes} There is usually a system dependent minimum time for which it is possible to sleep. This time is generally in the range 1~$ms$ to 20~$ms$, depending on thread sheduling time slot intervals etc. Using a shorter time as a parameter to \textbf{glfwSleep} can give one of two results: either the thread will sleep for the minimum possible sleep time, or the thread will not sleep at all (\textbf{glfwSleep} returns immediately). The latter should only happen when very short sleep times are specified, if at all. \end{refnotes} %------------------------------------------------------------------------- \pagebreak \section{Image and Texture Loading} In order to aid loading of image data into textures, \GLFW\ has basic support for loading images from files and memory buffers. %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|p{9.0cm}|} \hline \raggedright \textbf{Name} & \textbf{Description}\\ \hline GLFW\_NO\_RESCALE\_BIT & Do not rescale image to closest $2^m\times2^n$ resolution\\ \hline GLFW\_ORIGIN\_UL\_BIT & Specifies that the origin of the \textit{loaded} image should be in the upper left corner (default is the lower left corner)\\ \hline GLFW\_ALPHA\_MAP\_BIT & Treat single component images as alpha maps rather than luminance maps\\ \hline \end{tabular} \end{center} \caption{Flags for functions loading image data into textures} \label{tab:rdimgflags} \end{table} %------------------------------------------------------------------------- \subsection{glfwReadImage} \textbf{C language syntax} \begin{lstlisting} int glfwReadImage( const char *name, GLFWimage *img, int flags ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{name}]\ \\ A null terminated ISO~8859-1 string holding the name of the file that should be read. \item [\textit{img}]\ \\ Pointer to a GLFWimage struct, which will hold the information about the loaded image (if the read was successful). \item [\textit{flags}]\ \\ Flags for controlling the image reading process. Valid flags are listed in table \ref{tab:rdimgflags} \end{description} \end{refparameters} \begin{refreturn} The function returns GL\_TRUE if the image was loaded successfully. Otherwise GL\_FALSE is returned. \end{refreturn} \begin{refdescription} This function reads an image from the file specified by the parameter \textit{name} and returns the image information and data in a GLFWimage structure, which has the following definition: \begin{lstlisting} typedef struct { int Width, Height; // Image dimensions int Format; // OpenGL pixel format int BytesPerPixel; // Number of bytes per pixel unsigned char *Data; // Pointer to pixel data } GLFWimage; \end{lstlisting} \textit{Width} and \textit{Height} give the dimensions of the image. \textit{Format} specifies an \OpenGL\ pixel format, which can be GL\_LUMINANCE or GL\_ALPHA (for gray scale images), GL\_RGB or GL\_RGBA. \textit{BytesPerPixel} specifies the number of bytes per pixel. \textit{Data} is a pointer to the actual pixel data. By default the read image is rescaled to the nearest larger $2^m\times2^n$ resolution using bilinear interpolation, if necessary, which is useful if the image is to be used as an \OpenGL\ texture. This behavior can be disabled by setting the GLFW\_NO\_RESCALE\_BIT flag. Unless the flag GLFW\_ORIGIN\_UL\_BIT is set, the first pixel in \textit{img->Data} is the lower left corner of the image. If the flag GLFW\_ORIGIN\_UL\_BIT is set, however, the first pixel is the upper left corner. For single component images (i.e. gray scale), \textit{Format} is set to GL\_ALPHA if the flag GLFW\_ALPHA\_MAP\_BIT flag is set, otherwise \textit{Format} is set to GL\_LUMINANCE. \end{refdescription} \begin{refnotes} \textbf{glfwReadImage} supports the Truevision Targa version 1 file format (.TGA). Supported pixel formats are: 8-bit gray scale, 8-bit paletted (24/32-bit color), 24-bit true color and 32-bit true color + alpha. Paletted images are translated into true color or true color + alpha pixel formats. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwReadMemoryImage} \textbf{C language syntax} \begin{lstlisting} int glfwReadMemoryImage( const void *data, long size, GLFWimage *img, int flags ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{data}]\ \\ The memory buffer holding the contents of the file that should be read. \item [\textit{size}]\ \\ The size, in bytes, of the memory buffer. \item [\textit{img}]\ \\ Pointer to a GLFWimage struct, which will hold the information about the loaded image (if the read was successful). \item [\textit{flags}]\ \\ Flags for controlling the image reading process. Valid flags are listed in table \ref{tab:rdimgflags} \end{description} \end{refparameters} \begin{refreturn} The function returns GL\_TRUE if the image was loaded successfully. Otherwise GL\_FALSE is returned. \end{refreturn} \begin{refdescription} This function reads an image file from the memory buffer specified by the parameter \textit{data} and returns the image information and data in a GLFWimage structure. For more information on the \GLFW\ image struct, see \textbf{glfwReadImage}. \end{refdescription} \begin{refnotes} \textbf{glfwReadMemoryImage} supports the Truevision Targa version 1 file format (.TGA). Supported pixel formats are: 8-bit gray scale, 8-bit paletted (24/32-bit color), 24-bit true color and 32-bit true color + alpha. Paletted images are translated into true color or true color + alpha pixel formats. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwFreeImage} \textbf{C language syntax} \begin{lstlisting} void glfwFreeImage( GLFWimage *img ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{img}]\ \\ Pointer to a GLFWimage struct. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function frees any memory occupied by a loaded image, and clears all the fields of the GLFWimage struct. Any image that has been loaded by the \textbf{glfwReadImage} function should be deallocated using this function once the image is no longer needed. \end{refdescription} %------------------------------------------------------------------------- \begin{table}[p] \begin{center} \begin{tabular}{|l|p{9.0cm}|} \hline \raggedright \textbf{Name} & \textbf{Description}\\ \hline GLFW\_BUILD\_MIPMAPS\_BIT & Automatically build and upload all mipmap levels\\ \hline GLFW\_ORIGIN\_UL\_BIT & Specifies that the origin of the \textit{loaded} image should be in the upper left corner (default is the lower left corner)\\ \hline GLFW\_ALPHA\_MAP\_BIT & Treat single component images as alpha maps rather than luminance maps\\ \hline \end{tabular} \end{center} \caption{Flags for \textbf{glfwLoadTexture2D}} \label{tab:ldtexflags} \end{table} %------------------------------------------------------------------------- \subsection{glfwLoadTexture2D} \textbf{C language syntax} \begin{lstlisting} int glfwLoadTexture2D( const char *name, int flags ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{name}]\ \\ An ISO~8859-1 string holding the name of the file that should be loaded. \item [\textit{flags}]\ \\ Flags for controlling the texture loading process. Valid flags are listed in table \ref{tab:ldtexflags}. \end{description} \end{refparameters} \begin{refreturn} The function returns GL\_TRUE if the texture was loaded successfully. Otherwise GL\_FALSE is returned. \end{refreturn} \begin{refdescription} This function reads an image from the file specified by the parameter \textit{name} and uploads the image to \OpenGL\ texture memory (using the \textbf{glTexImage2D} function). If the GLFW\_BUILD\_MIPMAPS\_BIT flag is set, all mipmap levels for the loaded texture are generated and uploaded to texture memory. Unless the flag GLFW\_ORIGIN\_UL\_BIT is set, the origin of the texture is the lower left corner of the loaded image. If the flag GLFW\_ORIGIN\_UL\_BIT is set, however, the first pixel is the upper left corner. For single component images (i.e. gray scale), the texture is uploaded as an alpha mask if the flag GLFW\_ALPHA\_MAP\_BIT flag is set, otherwise it is uploaded as a luminance texture. \end{refdescription} \begin{refnotes} \textbf{glfwLoadTexture2D} supports the Truevision Targa version 1 file format (.TGA). Supported pixel formats are: 8-bit gray scale, 8-bit paletted (24/32-bit color), 24-bit true color and 32-bit true color + alpha. Paletted images are translated into true color or true color + alpha pixel formats. The read texture is always rescaled to the nearest larger $2^m\times2^n$ resolution using bilinear interpolation, if necessary, since \OpenGL\ requires textures to have a $2^m\times2^n$ resolution. If the GL\_SGIS\_generate\_mipmap extension, which is usually hardware accelerated, is supported by the \OpenGL\ implementation it will be used for mipmap generation. Otherwise the mipmaps will be generated by \GLFW\ in software. Since \OpenGL~1.0 does not support single component alpha maps, alpha map textures are converted to RGBA format under \OpenGL~1.0 when the GLFW\_ALPHA\_MAP\_BIT flag is set and the loaded texture is a single component texture. The red, green and blue components are set to 1.0. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwLoadMemoryTexture2D} \textbf{C language syntax} \begin{lstlisting} int glfwLoadMemoryTexture2D( const void *data, long size, int flags ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{data}]\ \\ The memory buffer holding the contents of the file that should be loaded. \item [\textit{size}]\ \\ The size, in bytes, of the memory buffer. \item [\textit{flags}]\ \\ Flags for controlling the texture loading process. Valid flags are listed in table \ref{tab:ldtexflags}. \end{description} \end{refparameters} \begin{refreturn} The function returns GL\_TRUE if the texture was loaded successfully. Otherwise GL\_FALSE is returned. \end{refreturn} \begin{refdescription} This function reads an image from the memory buffer specified by the parameter \textit{data} and uploads the image to \OpenGL\ texture memory (using the \textbf{glTexImage2D} function). If the GLFW\_BUILD\_MIPMAPS\_BIT flag is set, all mipmap levels for the loaded texture are generated and uploaded to texture memory. Unless the flag GLFW\_ORIGIN\_UL\_BIT is set, the origin of the texture is the lower left corner of the loaded image. If the flag GLFW\_ORIGIN\_UL\_BIT is set, however, the first pixel is the upper left corner. For single component images (i.e. gray scale), the texture is uploaded as an alpha mask if the flag GLFW\_ALPHA\_MAP\_BIT flag is set, otherwise it is uploaded as a luminance texture. \end{refdescription} \begin{refnotes} \textbf{glfwLoadMemoryTexture2D} supports the Truevision Targa version 1 file format (.TGA). Supported pixel formats are: 8-bit gray scale, 8-bit paletted (24/32-bit color), 24-bit true color and 32-bit true color + alpha. Paletted images are translated into true color or true color + alpha pixel formats. The read texture is always rescaled to the nearest larger $2^m\times2^n$ resolution using bilinear interpolation, if necessary, since \OpenGL\ requires textures to have a $2^m\times2^n$ resolution. If the GL\_SGIS\_generate\_mipmap extension, which is usually hardware accelerated, is supported by the \OpenGL\ implementation it will be used for mipmap generation. Otherwise the mipmaps will be generated by \GLFW\ in software. Since \OpenGL~1.0 does not support single component alpha maps, alpha map textures are converted to RGBA format under \OpenGL~1.0 when the GLFW\_ALPHA\_MAP\_BIT flag is set and the loaded texture is a single component texture. The red, green and blue components are set to 1.0. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwLoadTextureImage2D} \textbf{C language syntax} \begin{lstlisting} int glfwLoadTextureImage2D( GLFWimage *img, int flags ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{img}]\ \\ Pointer to a GLFWimage struct holding the information about the image to be loaded. \item [\textit{flags}]\ \\ Flags for controlling the texture loading process. Valid flags are listed in table \ref{tab:ldtexflags}. \end{description} \end{refparameters} \begin{refreturn} The function returns GL\_TRUE if the texture was loaded successfully. Otherwise GL\_FALSE is returned. \end{refreturn} \begin{refdescription} This function uploads the image specified by the parameter \textit{img} to \OpenGL\ texture memory (using the \textbf{glTexImage2D} function). If the GLFW\_BUILD\_MIPMAPS\_BIT flag is set, all mipmap levels for the loaded texture are generated and uploaded to texture memory. Unless the flag GLFW\_ORIGIN\_UL\_BIT is set, the origin of the texture is the lower left corner of the loaded image. If the flag GLFW\_ORIGIN\_UL\_BIT is set, however, the first pixel is the upper left corner. For single component images (i.e. gray scale), the texture is uploaded as an alpha mask if the flag GLFW\_ALPHA\_MAP\_BIT flag is set, otherwise it is uploaded as a luminance texture. \end{refdescription} \begin{refnotes} \textbf{glfwLoadTextureImage2D} supports the Truevision Targa version 1 file format (.TGA). Supported pixel formats are: 8-bit gray scale, 8-bit paletted (24/32-bit color), 24-bit true color and 32-bit true color + alpha. Paletted images are translated into true color or true color + alpha pixel formats. The read texture is always rescaled to the nearest larger $2^m\times2^n$ resolution using bilinear interpolation, if necessary, since \OpenGL\ requires textures to have a $2^m\times2^n$ resolution. If the GL\_SGIS\_generate\_mipmap extension, which is usually hardware accelerated, is supported by the \OpenGL\ implementation it will be used for mipmap generation. Otherwise the mipmaps will be generated by \GLFW\ in software. Since \OpenGL~1.0 does not support single component alpha maps, alpha map textures are converted to RGBA format under \OpenGL~1.0 when the GLFW\_ALPHA\_MAP\_BIT flag is set and the loaded texture is a single component texture. The red, green and blue components are set to 1.0. \end{refnotes} %------------------------------------------------------------------------- \pagebreak \section{OpenGL Extension Support} One of the great features of \OpenGL\ is its support for extensions, which allow independent vendors to supply non-standard functionality in their \OpenGL\ implementations. As the mechanism for querying extensions varies among systems, \GLFW\ provides an operating system independent interface for querying \OpenGL\ version, extensions and entry points. %------------------------------------------------------------------------- \subsection{glfwExtensionSupported} \textbf{C language syntax} \begin{lstlisting} int glfwExtensionSupported( const char *extension ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{extension}]\ \\ A null terminated ISO~8859-1 string containing the name of an \OpenGL\ extension. \end{description} \end{refparameters} \begin{refreturn} The function returns GL\_TRUE if the extension is supported. Otherwise it returns GL\_FALSE. \end{refreturn} \begin{refdescription} This function does a string search in the list of supported \OpenGL\ extensions to find if the specified extension is listed. \end{refdescription} \begin{refnotes} An \OpenGL\ context must be created before this function can be called (i.e. an \OpenGL\ window must have been opened with \textbf{glfwOpenWindow}). In addition to checking for \OpenGL\ extensions, \GLFW\ also checks for extensions in the operating system ``glue API'', such as WGL extensions under Microsoft Windows and GLX extensions under the X Window System. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetProcAddress} \textbf{C language syntax} \begin{lstlisting} void * glfwGetProcAddress( const char *procname ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{procname}]\ \\ A null terminated ISO~8859-1 string containing the name of an \OpenGL\ extension function. \end{description} \end{refparameters} \begin{refreturn} The function returns the address of the specified \OpenGL\ function, if it is available. Otherwise NULL is returned. \end{refreturn} \begin{refdescription} This function acquires the pointer to an \OpenGL\ extension function. Some (but not all) \OpenGL\ extensions define new API functions, which are usually not available through normal linking. It is therefore necessary to get access to those API functions at runtime. \end{refdescription} \begin{refnotes} An \OpenGL\ context must be created before this function can be called (i.e. an \OpenGL\ window must have been opened with \textbf{glfwOpenWindow}). Some systems do not support dynamic function pointer retrieval, in which case \textbf{glfwGetProcAddress} will always return NULL. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwGetGLVersion} \textbf{C language syntax} \begin{lstlisting} void glfwGetGLVersion( int *major, int *minor, int *rev ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{major}]\ \\ Pointer to an integer that will hold the major version number. \item [\textit{minor}]\ \\ Pointer to an integer that will hold the minor version number. \item [\textit{rev}]\ \\ Pointer to an integer that will hold the revision. \end{description} \end{refparameters} \begin{refreturn} The function returns the major and minor version numbers and the revision for the currently used \OpenGL\ implementation. \end{refreturn} \begin{refdescription} This function returns the \OpenGL\ implementation version. This is a convenient function that parses the version number information at the beginning of the string returned by calling \texttt{glGetString(~GL\_VERSION~)}. The \OpenGL\ version information can be used to determine what functionality is supported by the used \OpenGL\ implementation. \end{refdescription} \begin{refnotes} An \OpenGL\ context must be created before this function can be called (i.e. an \OpenGL\ window must have been opened with \textbf{glfwOpenWindow}). \end{refnotes} %------------------------------------------------------------------------- \pagebreak \section{Threads} A thread is a separate execution path within a process. All threads within a process share the same address space and resources. Threads execute in parallel, either virtually by means of time-sharing on a single processor, or truly in parallel on multiple processors. Even on a multi-processor system, time-sharing is employed in order to maximize processor utilization and to ensure fair scheduling. \GLFW\ provides an operating system independent interface to thread management. %------------------------------------------------------------------------- \subsection{glfwCreateThread} \textbf{C language syntax} \begin{lstlisting} GLFWthread glfwCreateThread( GLFWthreadfun fun, void *arg ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{fun}]\ \\ A pointer to a function that acts as the entry point for the new thread. The function should have the following C language prototype: \texttt{void GLFWCALL functionname( void *arg );} Where \textit{functionname} is the name of the thread function, and \textit{arg} is the user supplied argument (see below). \item [\textit{arg}]\ \\ An arbitrary argument for the thread. \textit{arg} will be passed as the argument to the thread function pointed to by \textit{fun}. For instance, \textit{arg} can point to data that is to be processed by the thread. \end{description} \end{refparameters} \begin{refreturn} The function returns a thread identification number if the thread was created successfully. This number is always positive. If the function fails, a negative number is returned. \end{refreturn} \begin{refdescription} This function creates a new thread, which executes within the same address space as the calling process. The thread entry point is specified with the \textit{fun} argument. Once the thread function \textit{fun} returns, the thread dies. \end{refdescription} \begin{refnotes} Even if the function returns a positive thread ID, indicating that the thread was created successfully, the thread may be unable to execute, for instance if the thread start address is not a valid thread entry point. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwDestroyThread} \textbf{C language syntax} \begin{lstlisting} void glfwDestroyThread( GLFWthread ID ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{ID}]\ \\ A thread identification handle, which is returned by \textbf{glfwCreateThread} or \textbf{glfwGetThreadID}. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function kills a running thread and removes it from the thread list. \end{refdescription} \begin{refnotes} This function is a very dangerous operation, which may interrupt a thread in the middle of an important operation, and its use is discouraged. You should always try to end a thread in a graceful way using thread communication, and use \textbf{glfwWaitThread} in order to wait for the thread to die. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwWaitThread} \textbf{C language syntax} \begin{lstlisting} int glfwWaitThread( GLFWthread ID, int waitmode ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{ID}]\ \\ A thread identification handle, which is returned by \textbf{glfwCreateThread} or \textbf{glfwGetThreadID}. \item [\textit{waitmode}]\ \\ Can be either GLFW\_WAIT or GLFW\_NOWAIT. \end{description} \end{refparameters} \begin{refreturn} The function returns GL\_TRUE if the specified thread died after the function was called, or the thread did not exist, in which case \textbf{glfwWaitThread} will return immediately regardless of \textit{waitmode}. The function returns GL\_FALSE if \textit{waitmode} is GLFW\_NOWAIT, and the specified thread exists and is still running. \end{refreturn} \begin{refdescription} If \textit{waitmode} is GLFW\_WAIT, the function waits for a thread to die. If \textit{waitmode} is GLFW\_NOWAIT, the function checks if a thread exists and returns immediately. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwGetThreadID} \textbf{C language syntax} \begin{lstlisting} GLFWthread glfwGetThreadID( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} The function returns a thread identification handle for the calling thread. \end{refreturn} \begin{refdescription} This function determines the thread ID for the calling thread. The ID is the same value as was returned by \textbf{glfwCreateThread} when the thread was created. \end{refdescription} %------------------------------------------------------------------------- \pagebreak \section{Mutexes} Mutexes are used to securely share data between threads. A mutex object can only be owned by one thread at a time. If more than one thread requires access to a mutex object, all but one thread will be put to sleep until they get access to it. %------------------------------------------------------------------------- \subsection{glfwCreateMutex} \textbf{C language syntax} \begin{lstlisting} GLFWmutex glfwCreateMutex( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} The function returns a mutex handle, or NULL if the mutex could not be created. \end{refreturn} \begin{refdescription} This function creates a mutex object, which can be used to control access to data that is shared between threads. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwDestroyMutex} \textbf{C language syntax} \begin{lstlisting} void glfwDestroyMutex( GLFWmutex mutex ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{mutex}]\ \\ A mutex object handle. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function destroys a mutex object. After a mutex object has been destroyed, it may no longer be used by any thread. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwLockMutex} \textbf{C language syntax} \begin{lstlisting} void glfwLockMutex( GLFWmutex mutex ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{mutex}]\ \\ A mutex object handle. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function will acquire a lock on the selected mutex object. If the mutex is already locked by another thread, the function will block the calling thread until it is released by the locking thread. Once the function returns, the calling thread has an exclusive lock on the mutex. To release the mutex, call \textbf{glfwUnlockMutex}. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwUnlockMutex} \textbf{C language syntax} \begin{lstlisting} void glfwUnlockMutex( GLFWmutex mutex ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{mutex}]\ \\ A mutex object handle. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function releases the lock of a locked mutex object. \end{refdescription} %------------------------------------------------------------------------- \pagebreak \section{Condition Variables} Condition variables are used to synchronize threads. A thread can wait for a condition variable to be signaled by another thread. %------------------------------------------------------------------------- \subsection{glfwCreateCond} \textbf{C language syntax} \begin{lstlisting} GLFWcond glfwCreateCond( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} The function returns a condition variable handle, or NULL if the condition variable could not be created. \end{refreturn} \begin{refdescription} This function creates a condition variable object, which can be used to synchronize threads. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwDestroyCond} \textbf{C language syntax} \begin{lstlisting} void glfwDestroyCond( GLFWcond cond ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cond}]\ \\ A condition variable object handle. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function destroys a condition variable object. After a condition variable object has been destroyed, it may no longer be used by any thread. \end{refdescription} %------------------------------------------------------------------------- \subsection{glfwWaitCond} \textbf{C language syntax} \begin{lstlisting} void glfwWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cond}]\ \\ A condition variable object handle. \item [\textit{mutex}]\ \\ A mutex object handle. \item [\textit{timeout}]\ \\ Maximum time to wait for the condition variable. The parameter can either be a positive time (in seconds), or GLFW\_INFINITY. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function atomically unlocks the mutex specified by \textit{mutex}, and waits for the condition variable \textit{cond} to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled or the amount of time specified by timeout has passed. If timeout is GLFW\_INFINITY, \textbf{glfwWaitCond} will wait forever for \textit{cond} to be signaled. Before returning to the calling thread, \textbf{glfwWaitCond} automatically re-acquires the mutex. \end{refdescription} \begin{refnotes} The mutex specified by \textit{mutex} must be locked by the calling thread before entrance to \textbf{glfwWaitCond}. A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwSignalCond} \textbf{C language syntax} \begin{lstlisting} void glfwSignalCond( GLFWcond cond ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cond}]\ \\ A condition variable object handle. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function restarts one of the threads that are waiting on the condition variable \textit{cond}. If no threads are waiting on \textit{cond}, nothing happens. If several threads are waiting on \textit{cond}, exactly one is restarted, but it is not specified which. \end{refdescription} \begin{refnotes} When several threads are waiting for the condition variable, which thread is started depends on operating system scheduling rules, and may vary from system to system and from time to time. \end{refnotes} %------------------------------------------------------------------------- \subsection{glfwBroadcastCond} \textbf{C language syntax} \begin{lstlisting} void glfwBroadcastCond( GLFWcond cond ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{cond}]\ \\ A condition variable object handle. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} This function restarts all the threads that are waiting on the condition variable \textit{cond}. If no threads are waiting on \textit{cond}, nothing happens. \end{refdescription} \begin{refnotes} When several threads are waiting for the condition variable, the order in which threads are started depends on operating system scheduling rules, and may vary from system to system and from time to time. \end{refnotes} %------------------------------------------------------------------------- \pagebreak \section{Miscellaneous} %------------------------------------------------------------------------- \subsection{glfwEnable/glfwDisable} \textbf{C language syntax} \begin{lstlisting} void glfwEnable( int token ) void glfwDisable( int token ) \end{lstlisting} \begin{refparameters} \begin{description} \item [\textit{token}]\ \\ A value specifying a feature to enable or disable. Valid tokens are listed in table \ref{tab:enable}. \end{description} \end{refparameters} \begin{refreturn} none \end{refreturn} \begin{refdescription} \textbf{glfwEnable} is used to enable a certain feature, while \textbf{glfwDisable} is used to disable it. Below follows a description of each feature. \end{refdescription} \begin{table}[p] \begin{center} \begin{tabular}{|l|p{5.0cm}|p{3.0cm}|} \hline \raggedright \textbf{Name} & \textbf{Controls} & \textbf{Default}\\ \hline \hyperlink{lnk:autopollevents}{GLFW\_AUTO\_POLL\_EVENTS} & Automatic event polling when \textbf{glfwSwapBuffers} is called & Enabled\\ \hline \hyperlink{lnk:keyrepeat}{GLFW\_KEY\_REPEAT} & Keyboard key repeat & Disabled\\ \hline \hyperlink{lnk:mousecursor}{GLFW\_MOUSE\_CURSOR} & Mouse cursor visibility & Enabled in windowed mode. Disabled in fullscreen mode.\\ \hline \hyperlink{lnk:stickykeys}{GLFW\_STICKY\_KEYS} & Keyboard key ``stickiness'' & Disabled\\ \hline \hyperlink{lnk:stickymousebuttons}{GLFW\_STICKY\_MOUSE\_BUTTONS} & Mouse button ``stickiness'' & Disabled\\ \hline \hyperlink{lnk:systemkeys}{GLFW\_SYSTEM\_KEYS} & Special system key actions & Enabled\\ \hline \end{tabular} \end{center} \caption{Tokens for \textbf{glfwEnable}/\textbf{glfwDisable}} \label{tab:enable} \end{table} \bigskip\begin{mysamepage}\hypertarget{lnk:autopollevents}{} \textbf{GLFW\_AUTO\_POLL\_EVENTS}\\ When GLFW\_AUTO\_POLL\_EVENTS is enabled, \textbf{glfwPollEvents} is automatically called each time that \textbf{glfwSwapBuffers} is called, immediately after the buffer swap itself. When GLFW\_AUTO\_POLL\_EVENTS is disabled, calling \textbf{glfwSwapBuffers} will not result in a call to \textbf{glfwPollEvents}. This can be useful if for example \textbf{glfwSwapBuffers} needs to be called from within a callback function, since calling \textbf{glfwPollEvents} from a callback function is not allowed. \end{mysamepage} \bigskip\begin{mysamepage}\hypertarget{lnk:keyrepeat}{} \textbf{GLFW\_KEY\_REPEAT}\\ When GLFW\_KEY\_REPEAT is enabled, the key and character callback functions are called repeatedly when a key is held down long enough (according to the system key repeat configuration). When GLFW\_KEY\_REPEAT is disabled, the key and character callback functions are only called once when a key is pressed (and once when it is released). \end{mysamepage} \bigskip\begin{mysamepage}\hypertarget{lnk:mousecursor}{} \textbf{GLFW\_MOUSE\_CURSOR}\\ When GLFW\_MOUSE\_CURSOR is enabled, the mouse cursor is visible, and mouse coordinates are relative to the upper left corner of the client area of the \GLFW\ window. The coordinates are limited to the client area of the window. When GLFW\_MOUSE\_CURSOR is disabled, the mouse cursor is invisible, and mouse coordinates are not limited to the drawing area of the window. It is as if the mouse coordinates are received directly from the mouse, without being restricted or manipulated by the windowing system. \end{mysamepage} \bigskip\begin{mysamepage}\hypertarget{lnk:stickykeys}{} \textbf{GLFW\_STICKY\_KEYS}\\ When GLFW\_STICKY\_KEYS is enabled, keys which are pressed will not be released until they are physically released and checked with \textbf{glfwGetKey}. This behavior makes it possible to catch keys that were pressed and then released again between two calls to \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers}, which would otherwise have been reported as released. Care should be taken when using this mode, since keys that are not checked with \textbf{glfwGetKey} will never be released. Note also that enabling GLFW\_STICKY\_KEYS does not affect the behavior of the keyboard callback functionality. When GLFW\_STICKY\_KEYS is disabled, the status of a key that is reported by \textbf{glfwGetKey} is always the physical state of the key. Disabling GLFW\_STICKY\_KEYS also clears the sticky information for all keys. \end{mysamepage} \bigskip\begin{mysamepage}\hypertarget{lnk:stickymousebuttons}{} \textbf{GLFW\_STICKY\_MOUSE\_BUTTONS}\\ When GLFW\_STICKY\_MOUSE\_BUTTONS is enabled, mouse buttons that are pressed will not be released until they are physically released and checked with \textbf{glfwGetMouseButton}. This behavior makes it possible to catch mouse buttons which were pressed and then released again between two calls to \textbf{glfwPollEvents}, \textbf{glfwWaitEvents} or \textbf{glfwSwapBuffers} (with GLFW\_AUTO\_POLL\_EVENTS enabled), which would otherwise have been reported as released. Care should be taken when using this mode, since mouse buttons that are not checked with \textbf{glfwGetMouseButton} will never be released. Note also that enabling GLFW\_STICKY\_MOUSE\_BUTTONS does not affect the behavior of the mouse button callback functionality. When GLFW\_STICKY\_MOUSE\_BUTTONS is disabled, the status of a mouse button that is reported by \textbf{glfwGetMouseButton} is always the physical state of the mouse button. Disabling GLFW\_STICKY\_MOUSE\_BUTTONS also clears the sticky information for all mouse buttons. \end{mysamepage} \bigskip\begin{mysamepage}\hypertarget{lnk:systemkeys}{} \textbf{GLFW\_SYSTEM\_KEYS}\\ When GLFW\_SYSTEM\_KEYS is enabled, pressing standard system key combinations, such as \texttt{Alt+Tab} under Windows, will give the normal behavior. Note that when \texttt{Alt+Tab} is issued under Windows in this mode so that the \GLFW\ application is deselected when \GLFW\ is operating in fullscreen mode, the \GLFW\ application window will be minimized and the video mode will be set to the original desktop mode. When the \GLFW\ application is re-selected, the video mode will be set to the \GLFW\ video mode again. When GLFW\_SYSTEM\_KEYS is disabled, pressing standard system key combinations will have no effect, since those key combinations are blocked by \GLFW . This mode can be useful in situations when the \GLFW\ program must not be interrupted (normally for games in fullscreen mode). \end{mysamepage} %------------------------------------------------------------------------- \subsection{glfwGetNumberOfProcessors} \textbf{C language syntax} \begin{lstlisting} int glfwGetNumberOfProcessors( void ) \end{lstlisting} \begin{refparameters} none \end{refparameters} \begin{refreturn} The function returns the number of active processors in the system. \end{refreturn} \begin{refdescription} This function determines the number of active processors in the system. \end{refdescription} \begin{refnotes} Systems with several logical processors per physical processor, also known as SMT (Symmetric Multi-Threading) processors, will report the number of logical processors. \end{refnotes} %------------------------------------------------------------------------- % GLFW Standards Conformance %------------------------------------------------------------------------- \appendix \chapter{GLFW Compatibility} \label{chap:compatibility} \thispagestyle{fancy} This chapter describes the various API extensions used by this version of \GLFW . It lists what are essentially implementation details, but which are nonetheless vital knowledge for developers wishing to deploy their applications on machines with varied specifications. Note that the information in this appendix is not a part of the API specification but merely list some of the preconditions for certain parts of the API to function on a given machine. As such, any part of it may change in future versions without this being considered a breaking API change. %------------------------------------------------------------------------- \section{ICCCM and EWMH Conformance} As \GLFW\ uses \textbf{Xlib}, directly, without any intervening toolkit library, it has sole responsibility for interacting well with the many and varied window managers in use on Unix-like systems. In order for applications and window managers to work well together, a number of standards and conventions have been developed that regulate behavior outside the scope of the X11 API; most importantly the \textbf{Inter-Client Communication Conventions Manual} (ICCCM) and \textbf{Extended Window Manager Hints} (EWMH) standards. \GLFW\ uses the ICCCM \textbf{WM\_DELETE\_WINDOW} protocol to intercept the user attempting to close the \GLFW\ window. If the running window manager does not support this protocol, the close callback will never be called. \GLFW\ uses the EWMH \textbf{\_NET\_WM\_PING} protocol, allowing the window manager notify the user when the application has stopped responding, i.e. when it has ceased to process events. If the running window manager does not support this protocol, the user will not be notified if the application locks up. \GLFW\ uses the EWMH \textbf{\_NET\_WM\_STATE} protocol to tell the window manager to make the \GLFW\ window fullscreen. If the running window manager does not support this protocol, fullscreen windows may not work properly. \GLFW\ has a fallback code path in case this protocol is unavailable, but every window manager behaves slightly differently in this regard. %------------------------------------------------------------------------- \section{GLX Extensions} The \textbf{GLX} API is used to create \OpenGL\ contexts on Unix-like systems using the X Window System. \GLFW\ uses the \textbf{GLXFBConfig} API to enumerate and select framebuffer pixel formats. This requires either \textbf{GLX} 1.3 or greater, or the \textbf{GLX\_SGIX\_fbconfig} extension. Where both are available, the SGIX extension is preferred. If neither is available, \GLFW\ will be unable to open windows. % This paragraph repeated almost verbatim below \GLFW\ uses the \textbf{GLX\_SGI\_swap\_control} extension to provide vertical retrace synchronization (or ``vsync''). Where this extension is unavailable, calling \textbf{glfwSwapInterval} will have no effect. % This paragraph repeated almost verbatim below \GLFW\ uses the \textbf{GLX\_ARB\_multisample} extension to create contexts with multisampling anti-aliasing. Where this extension is unavailable, the GLFW\_FSAA\_SAMPLES hint will have no effect. % This paragraph repeated almost verbatim below \GLFW\ uses the \textbf{GLX\_ARB\_create\_context} extension when available, even when creating \OpenGL\ contexts of version 2.1 and below. Where this extension is unavailable, the GLFW\_OPENGL\_VERSION\_MAJOR and GLFW\_OPENGL\_VERSION\_MINOR hints will only be partially supported, the GLFW\_OPENGL\_DEBUG\_CONTEXT hint will have no effect, and setting the GLFW\_OPENGL\_PROFILE or GLFW\_FORWARD\_COMPAT hints to a non-zero value will cause \textbf{glfwOpenWindow} to fail. % This paragraph repeated almost verbatim below \GLFW\ uses the \textbf{GLX\_ARB\_create\_context\_profile} extension to provide support for context profiles. Where this extension is unavailable, setting the GLFW\_OPENGL\_PROFILE hint to anything but zero will cause \textbf{glfwOpenWindow} to fail. %------------------------------------------------------------------------- \section{WGL Extensions} The \textbf{WGL} API is used to create \OpenGL\ contexts on Microsoft Windows and other implementations of the Win32 API, such as Wine. \GLFW\ uses either the \textbf{WGL\_EXT\_extension\_string} or the \textbf{WGL\_ARB\_extension\_string} extension to check for the presence of all other \textbf{WGL} extensions listed below. If both are available, the EXT one is preferred. If neither is available, no other extensions are used and many \GLFW\ features related to context creation will have no effect or cause errors when used. % This paragraph repeated almost verbatim above \GLFW\ uses the \textbf{WGL\_EXT\_swap\_control} extension to provide vertical retrace synchronization (or ``vsync''). Where this extension is unavailable, calling \textbf{glfwSwapInterval} will have no effect. % This paragraph repeated almost verbatim above \GLFW\ uses the \textbf{WGL\_ARB\_pixel\_format} and \textbf{WGL\_ARB\_multisample} extensions to create contexts with multisampling anti-aliasing. Where these extensions are unavailable, the GLFW\_FSAA\_SAMPLES hint will have no effect. % This paragraph repeated almost verbatim above \GLFW\ uses the \textbf{WGL\_ARB\_create\_context} extension when available, even when creating \OpenGL\ contexts of version 2.1 and below. Where this extension is unavailable, the GLFW\_OPENGL\_VERSION\_MAJOR and GLFW\_OPENGL\_VERSION\_MINOR hints will only be partially supported, the GLFW\_OPENGL\_DEBUG\_CONTEXT hint will have no effect, and setting the GLFW\_OPENGL\_PROFILE or GLFW\_FORWARD\_COMPAT hints to a non-zero value will cause \textbf{glfwOpenWindow} to fail. % This paragraph repeated almost verbatim above \GLFW\ uses the \textbf{WGL\_ARB\_create\_context\_profile} extension to provide support for context profiles. Where this extension is unavailable, setting the GLFW\_OPENGL\_PROFILE hint to anything but zero will cause \textbf{glfwOpenWindow} to fail. %------------------------------------------------------------------------- \section{OpenGL 3.0+ on Mac OS X} Support for OpenGL 3.0 and above was introduced with Mac OS X 10.7, and even then forward-compatible OpenGL 3.2 core profile contexts are supported and there is no mechanism for requesting debug contexts. Earlier versions of Mac OS X supports at most OpenGL version 2.1. Because of this, on Mac OS X 10.7, the GLFW\_OPENGL\_VERSION\_MAJOR and GLFW\_OPENGL\_VERSION\_MINOR hints will fail if given a version above 3.2, the GLFW\_OPENGL\_DEBUG\_CONTEXT and GLFW\_FORWARD\_COMPAT hints are ignored, and setting the GLFW\_OPENGL\_PROFILE hint to anything except zero or GLFW\_OPENGL\_CORE\_PROFILE will cause \textbf{glfwOpenWindow} to fail. Also, on Mac OS X 10.6 and below, the GLFW\_OPENGL\_VERSION\_MAJOR and GLFW\_OPENGL\_VERSION\_MINOR hints will fail if given a version above 2.1, the GLFW\_OPENGL\_DEBUG\_CONTEXT hint will have no effect, and setting the GLFW\_OPENGL\_PROFILE or GLFW\_FORWARD\_COMPAT hints to a non-zero value will cause \textbf{glfwOpenWindow} to fail. \end{document} glfw-2.7.2/docs/cleanup.bat0000644000175000017500000000132411613575614016533 0ustar elmindredaelmindreda@echo off REM ---------------------------------------------------------------------- REM Windows cleanup batch file for the GLFW documentation. REM ---------------------------------------------------------------------- REM GLFW Reference Manual if exist glfwrm.dvi del glfwrm.dvi if exist glfwrm.aux del glfwrm.aux if exist glfwrm.log del glfwrm.log if exist glfwrm.out del glfwrm.out if exist glfwrm.pdf del glfwrm.pdf if exist glfwrm.toc del glfwrm.toc if exist glfwrm.lot del glfwrm.lot REM GLFW Users Guide if exist glfwug.dvi del glfwug.dvi if exist glfwug.aux del glfwug.aux if exist glfwug.log del glfwug.log if exist glfwug.out del glfwug.out if exist glfwug.pdf del glfwug.pdf if exist glfwug.toc del glfwug.toc glfw-2.7.2/Makefile0000644000175000017500000001535611401735227015127 0ustar elmindredaelmindreda########################################################################### # GLFW top level Makefile # $Date: 2007-10-26 14:33:43 $ # $Revision: 1.11 $ # # This file works as a top level makefile for all supported systems and # compilers. It builds both the GLFW link library and the supplied example # programs. ########################################################################### ########################################################################### # If your make program does not set the $(MAKE) variable correctly, # uncomment the following line and make sure that the name of the make # tool is correct. ########################################################################### # MAKE = make ########################################################################### # If no system/compiler is specified, display a list of available options ########################################################################### default: @echo "This is the makefile for the GLFW link library and example programs." @echo "Type one of the following:" @echo "-----------------------------------------------------------------------------" @echo " $(MAKE) win32-mingw to compile GLFW on MinGW on Windows" @echo " $(MAKE) mingw-clean to remove any files generated by MinGW on Windows" @echo "-----------------------------------------------------------------------------" @echo " $(MAKE) win32-cygwin to compile GLFW on Windows native on Cygwin/MSYS" @echo " $(MAKE) cygwin-clean to remove any files generated by Cygwin/MSYS" @echo " $(MAKE) cygwin-install to install the GLFW library and header" @echo "-----------------------------------------------------------------------------" @echo " $(MAKE) win32-lcc to compile GLFW on LCC-Win32 for Windows" @echo " $(MAKE) win32-ow to compile GLFW on OpenWatcom for Windows" @echo " $(MAKE) win32-clean to remove any files generated by above compilers" @echo "-----------------------------------------------------------------------------" @echo " $(MAKE) cross-mgw for Unix-hosted MinGW cross-compile to Windows" @echo " $(MAKE) cross-mgw-clean to remove any files generated by MinGW for Unix" @echo " $(MAKE) cross-mgw-install to install the GLFW library and header" @echo "-----------------------------------------------------------------------------" @echo " $(MAKE) x11 to compile GLFW for X11 on Unix-like systems" @echo " $(MAKE) x11-clean to remove any files generated for Unix/X11" @echo " $(MAKE) x11-dist-clean to also removed the generated build files" @echo " $(MAKE) x11-install to install the GLFW library and header" @echo " $(MAKE) x11-dist-install to also install the GLFW shared library" @echo "-----------------------------------------------------------------------------" @echo " $(MAKE) cocoa to compile GLFW with GCC for Cocoa on Mac OS X" @echo " $(MAKE) cocoa-clean to remove any files generated for Cocoa on Mac OS X" @echo " $(MAKE) cocoa-install to install the GLFW library and header" @echo "-----------------------------------------------------------------------------" @echo " There are also Visual Studio 2008 project files available in support/msvc80" @echo "-----------------------------------------------------------------------------" ########################################################################### # Bare MinGW on Windows ########################################################################### win32-mingw: @.\\compile.bat $(MAKE) mingw mingw-clean: @.\\compile.bat CLEAN ########################################################################### # Cygwin on Windows ########################################################################### cygwin-install: win32-cygwin cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin install win32-cygwin: cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin cd examples && $(MAKE) -f Makefile.win32.cygwin cd tests && $(MAKE) -f Makefile.win32.cygwin cygwin-clean: cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin clean cd examples && $(MAKE) -f Makefile.win32.cygwin clean cd tests && $(MAKE) -f Makefile.win32.cygwin clean ########################################################################### # Various compilers on Windows ########################################################################### # Windows, LCC-Win32 win32-lcc: @.\\compile.bat $(MAKE) lcc # Windows, OpenWatcom win32-ow: @.\\compile.bat $(MAKE) ow # Cleanup for Windows win32-clean: @.\\compile.bat CLEAN ########################################################################### # MinGW cross-compile to Windows from Unix ########################################################################### cross-mgw-install: cross-mgw cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw install cross-mgw: cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw cd examples && $(MAKE) -f Makefile.win32.cross-mgw cd tests && $(MAKE) -f Makefile.win32.cross-mgw cross-mgw-clean: cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw clean cd examples && $(MAKE) -f Makefile.win32.cross-mgw clean cd tests && $(MAKE) -f Makefile.win32.cross-mgw clean ########################################################################### # X11 on Unix-like systems ########################################################################### MAKEFILES_X11_IN = lib/x11/Makefile.x11.in examples/Makefile.x11.in \ tests/Makefile.x11.in MAKEFILES_X11 = lib/x11/Makefile.x11 examples/Makefile.x11 tests/Makefile.x11 # Cleanup for X11 (must be here due to generated makefile) x11-clean: $(MAKEFILES_X11) cd lib/x11; $(MAKE) -f Makefile.x11 clean cd examples; $(MAKE) -f Makefile.x11 clean cd tests; $(MAKE) -f Makefile.x11 clean x11-dist-clean: x11-clean rm -f config.log rm -f $(MAKEFILES_X11) rm -f lib/x11/libglfw.pc.in # Auto configuration for X11 $(MAKEFILES_X11) : compile.sh $(MAKEFILES_X11_IN) @sh ./compile.sh # X11 x11: $(MAKEFILES_X11) cd lib/x11; $(MAKE) -f Makefile.x11 cd examples; $(MAKE) -f Makefile.x11 cd tests; $(MAKE) -f Makefile.x11 # X11 install x11-install: x11 cd lib/x11; $(MAKE) -f Makefile.x11 install # X11 dist install x11-dist-install: x11 cd lib/x11; $(MAKE) -f Makefile.x11 dist-install ########################################################################### # Cocoa on Mac OS X ########################################################################### cocoa: cd lib/cocoa; $(MAKE) -f Makefile.cocoa cd examples; $(MAKE) -f Makefile.cocoa cd tests; $(MAKE) -f Makefile.cocoa cocoa-clean: cd lib/cocoa; $(MAKE) -f Makefile.cocoa clean cd examples; $(MAKE) -f Makefile.cocoa clean cd tests; $(MAKE) -f Makefile.cocoa clean cocoa-install: cd lib/cocoa; $(MAKE) -f Makefile.cocoa install glfw-2.7.2/compile.sh0000644000175000017500000004442311602250260015440 0ustar elmindredaelmindreda#!/bin/sh ########################################################################## # compile.sh - Unix/X11 configuration script # $Date: 2007-09-20 23:16:57 $ # $Revision: 1.16 $ # # This is a minimalist configuration script for GLFW, which is used to # determine the availability of certain features. # # This script is not very nice at all (especially the Makefile generation # is very ugly and hardcoded). Hopefully it will be cleaned up in the # future, but for now it does a pretty good job. ########################################################################## ########################################################################## # Check arguments ########################################################################## silent=no for arg in "$@"; do { case "$arg" in # Silent? -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; esac; } done; ########################################################################## # Misc. ########################################################################## self=$0 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 5 compiler messages saved in config.log # 6 checking for... messages and results exec 5>./config.log if [ "x$silent" = xyes ]; then exec 6>/dev/null else exec 6>&1 fi echo "\ This file contains any messages produced by compilers while running $self, to aid debugging if $self makes a mistake. " 1>&5 ########################################################################## # Default compiler settings ########################################################################## if [ "x$CC" = x ]; then CC=cc fi # These will contain flags needed by both the GLFW library and programs # They are also used by the compile and link tests below # Note that CFLAGS and LFLAGS remain unmodified and are checked again # before file generation GLFW_CFLAGS="$CFLAGS" GLFW_LFLAGS="$LFLAGS -lGL" # These will contain flags needed by the GLFW library GLFW_LIB_CFLAGS= GLFW_LIB_LFLAGS= # These will contain flags needed by programs using GLFW GLFW_BIN_CFLAGS= GLFW_BIN_LFLAGS= # This will contain flags needed by the GLFW shared library SOFLAGS= ########################################################################## # Add system-specific flags ########################################################################## echo -n "Checking what kind of system this is... " 1>&6 case "x`uname 2> /dev/null`" in xLinux) GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_USE_LINUX_JOYSTICKS" SOFLAGS="-shared -Wl,-soname,libglfw.so" echo "Linux" 1>&6 ;; xDarwin) SOFLAGS="-flat_namespace -undefined suppress" echo "Mac OS X" 1>&6 ;; *) SOFLAGS="-shared -soname libglfw.so" echo "Generic Unix" 1>&6 ;; esac ########################################################################## # Check for X11 library directory ########################################################################## echo -n "Checking for X11 libraries location... " 1>&6 if [ -r "/usr/X11/lib" ]; then GLFW_LFLAGS="$GLFW_LFLAGS -L/usr/X11/lib" GLFW_CFLAGS="-I/usr/X11/include $GLFW_CFLAGS" echo "/usr/X11/lib" 1>&6 elif [ -r "/usr/X11R7/lib" ]; then GLFW_LFLAGS="$GLFW_LFLAGS -L/usr/X11R7/lib" GLFW_CFLAGS="-I/usr/X11R7/include $GLFW_CFLAGS" echo "/usr/X11R7/lib" 1>&6 elif [ -r "/usr/X11R6/lib" ]; then GLFW_LFLAGS="$GLFW_LFLAGS -L/usr/X11R6/lib" GLFW_CFLAGS="-I/usr/X11R6/include $GLFW_CFLAGS" echo "/usr/X11R6/lib" 1>&6 elif [ -r "/usr/X11R5/lib" ]; then GLFW_LFLAGS="$GLFW_LFLAGS -L/usr/X11R5/lib" GLFW_CFLAGS="-I/usr/X11R5/include $GLFW_CFLAGS" echo "/usr/X11R5/lib" 1>&6 elif [ -r "/opt/X11R6/lib" ]; then # This location is used on QNX GLFW_LFLAGS="$GLFW_LFLAGS -L/opt/X11R6/lib" GLFW_CFLAGS="-I/opt/X11R6/include $GLFW_CFLAGS" echo "/opt/X11R6/lib" 1>&6 elif [ -r "/usr/X/lib" ]; then GLFW_LFLAGS="$GLFW_LFLAGS -L/usr/X/lib" GLFW_CFLAGS="-I/usr/X/include $GLFW_CFLAGS" echo "/usr/X/lib" 1>&6 else # TODO: Detect and report X11R7 in /usr/lib echo "unknown (assuming linker will find them)" 1>&6 fi ########################################################################## # Compilation commands ########################################################################## compile='$CC -c $GLFW_CFLAGS conftest.c 1>&5' link='$CC -o conftest $GLFW_CFLAGS conftest.c $GLFW_LFLAGS 1>&5' ########################################################################## # Check if we are using GNU C (or something claiming it is) ########################################################################## echo -n "Checking whether we are using GNU C... " 1>&6 echo "$self: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then use_gcc=yes else use_gcc=no fi rm -f conftest* echo "$use_gcc" 1>&6 ########################################################################## # Check for X11 RandR availability ########################################################################## echo -n "Checking for X11 RandR support... " 1>&6 echo "$self: Checking for X11 RandR support" >&5 has_xrandr=no cat > conftest.c < #include int main() {; return 0;} EOF if { (eval echo $self: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then rm -rf conftest* has_xrandr=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi rm -f conftest* echo "$has_xrandr" 1>&6 if [ "x$has_xrandr" = xyes ]; then GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_XRANDR" GLFW_LIB_LFLAGS="$GLFW_LIB_LFLAGS -lXrandr" fi ########################################################################## # Check for X11 VidMode availability ########################################################################## if [ "x$has_xrandr" = xno ]; then echo -n "Checking for X11 VidMode support... " 1>&6 echo "$self: Checking for X11 VidMode support" >&5 has_xf86vm=no cat > conftest.c < #include #if defined(__APPLE_CC__) #error Not supported under Mac OS X #endif int main() {; return 0;} EOF if { (eval echo $self: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then rm -rf conftest* has_xf86vm=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi rm -f conftest* echo "$has_xf86vm" 1>&6 if [ "x$has_xf86vm" = xyes ]; then GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_XF86VIDMODE" GLFW_LIB_LFLAGS="$GLFW_LIB_LFLAGS -lXxf86vm -lXext" fi fi ########################################################################## # Check for pthread support ########################################################################## echo -n "Checking for pthread support... " 1>&6 echo "$self: Checking for pthread support" >&5 has_pthread=no cat > conftest.c < int main() {pthread_t posixID; posixID=pthread_self(); return 0;} EOF # Save original values CFLAGS_OLD="$GLFW_CFLAGS" LFLAGS_OLD="$GLFW_LFLAGS" # These will contain the extra flags, if any CFLAGS_THREAD= LFLAGS_THREAD= # Try -pthread (most systems) if [ "x$has_pthread" = xno ]; then CFLAGS_THREAD="-pthread" LFLAGS_THREAD="-pthread" GLFW_CFLAGS="$CFLAGS_OLD $CFLAGS_THREAD" GLFW_LFLAGS="$LFLAGS_OLD $LFLAGS_THREAD" if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_pthread=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi fi # Try -lpthread if [ "x$has_pthread" = xno ]; then CFLAGS_THREAD="-D_REENTRANT" LFLAGS_THREAD="-lpthread" GLFW_CFLAGS="$CFLAGS_OLD $CFLAGS_THREAD" GLFW_LFLAGS="$LFLAGS_OLD $LFLAGS_THREAD" if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_pthread=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi fi # Try -lsocket (e.g. QNX) if [ "x$has_pthread" = xno ]; then CFLAGS_THREAD= LFLAGS_THREAD="-lsocket" GLFW_CFLAGS="$CFLAGS_OLD $CFLAGS_THREAD" GLFW_LFLAGS="$LFLAGS_OLD $LFLAGS_THREAD" if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_pthread=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi fi # Restore original values GLFW_CFLAGS="$CFLAGS_OLD" GLFW_LFLAGS="$LFLAGS_OLD" echo "$has_pthread" 1>&6 if [ "x$has_pthread" = xyes ]; then GLFW_CFLAGS="$GLFW_CFLAGS $CFLAGS_THREAD" GLFW_LFLAGS="$GLFW_LFLAGS $LFLAGS_THREAD" GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_PTHREAD" fi ########################################################################## # Check for sched_yield support ########################################################################## if [ "x$has_pthread" = xyes ]; then echo -n "Checking for sched_yield... " 1>&6 echo "$self: Checking for sched_yield" >&5 has_sched_yield=no LFLAGS_OLD="$GLFW_LFLAGS" LFLAGS_THREAD= cat > conftest.c < int main() {sched_yield(); return 0;} EOF if { (eval echo $self: \"$compile\") 1>&5; (eval $compile) 2>&5; }; then has_sched_yield=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi if [ "x$has_sched_yield" = xno ]; then LFLAGS_THREAD="-lrt" GLFW_LFLAGS="$LFLAGS_OLD $LFLAGS_THREAD" if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -f conftest* has_sched_yield=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi fi GLFW_LFLAGS="$LFLAGS_OLD" echo "$has_sched_yield" 1>&6 if [ "x$has_sched_yield" = xyes ]; then GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_SCHED_YIELD" GLFW_LIB_LFLAGS="$GLFW_LIB_LFLAGS $LFLAGS_THREAD" fi fi ########################################################################## # Check for glXGetProcAddressXXX availability ########################################################################## echo -n "Checking for glXGetProcAddress variants... " 1>&6 echo "$self: Checking for glXGetProcAddress variants" >&5 has_glXGetProcAddress=no if [ "x$has_glXGetProcAddress" = xno ]; then # Check for plain glXGetProcAddress cat > conftest.c < #include #include int main() {void *ptr=(void*)glXGetProcAddress("glFun"); return 0;} EOF if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_glXGetProcAddress=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi rm -f conftest* if [ "x$has_glXGetProcAddress" = xyes ]; then echo "glXGetProcAddress" 1>&6 GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_GLXGETPROCADDRESS" fi fi if [ "x$has_glXGetProcAddress" = xno ]; then # Check for glXGetProcAddressARB cat > conftest.c < #include #include int main() {void *ptr=(void*)glXGetProcAddressARB("glFun"); return 0;} EOF if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_glXGetProcAddress=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi rm -f conftest* if [ "x$has_glXGetProcAddress" = xyes ]; then echo "glXGetProcAddressARB" 1>&6 GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_GLXGETPROCADDRESSARB" fi fi if [ "x$has_glXGetProcAddress" = xno ]; then # Check for glXGetProcAddressEXT cat > conftest.c < #include #include int main() {void *ptr=(void*)glXGetProcAddressEXT("glFun"); return 0;} EOF if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_glXGetProcAddress=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi rm -f conftest* if [ "x$has_glXGetProcAddress" = xyes ]; then echo "glXGetProcAddressEXT" 1>&6 GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_GLXGETPROCADDRESSEXT" fi fi if [ "x$has_glXGetProcAddress" = xno ]; then echo "no" 1>&6 fi ########################################################################## # Check for dlopen support if necessary ########################################################################## if [ "x$has_glXGetProcAddress" = xno ]; then echo -n "Checking for dlopen... " 1>&6 echo "$self: Checking for dlopen" >&5 has_dlopen=no cat > conftest.c < int main() {void *l=dlopen("libGL.so",RTLD_LAZY|RTLD_GLOBAL); return 0;} EOF # First try without -ldl if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_dlopen=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi # Now try with -ldl if the previous attempt failed if [ "x$has_dlopen" = xno ]; then LFLAGS_OLD="$GLFW_LFLAGS" GLFW_LFLAGS="$GLFW_LFLAGS -ldl" if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_dlopen=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi GLFW_LFLAGS="$LFLAGS_OLD" if [ "x$has_dlopen" = xyes ]; then GLFW_LIB_LFLAGS="$GLFW_LIB_LFLAGS -ldl" fi fi rm -f conftest* echo "$has_dlopen" 1>&6 if [ "x$has_dlopen" = xyes ]; then GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_DLOPEN" fi fi ########################################################################## # Check for sysconf support ########################################################################## echo -n "Checking for sysconf... " 1>&6 echo "$self: Checking for sysconf" >&5 has_sysconf=no cat > conftest.c < #ifndef _SC_NPROCESSORS_ONLN #ifndef _SC_NPROC_ONLN #error Neither _SC_NPROCESSORS_ONLN nor _SC_NPROC_ONLN available #endif #endif int main() {long x=sysconf(_SC_ARG_MAX); return 0; } EOF if { (eval echo $self: \"$link\") 1>&5; (eval $link) 2>&5; }; then rm -rf conftest* has_sysconf=yes else echo "$self: failed program was:" >&5 cat conftest.c >&5 fi rm -f conftest* echo "$has_sysconf" 1>&6 if [ "x$has_sysconf" = xyes ]; then GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_SYSCONF" fi ########################################################################## # Check for sysctl support ########################################################################## echo -n "Checking for sysctl support... " 1>&6 echo "$self: Checking for sysctl support" >&5 has_sysctl=no cat > conftest.c < #include #ifdef CTL_HW #ifdef HW_NCPU yes; #endif #endif EOF if { ac_try='$CC -E conftest.c'; { (eval echo $self: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then has_sysctl=yes fi rm -f conftest* echo "$has_sysctl" 1>&6 if [ "x$has_sysctl" = xyes ]; then GLFW_LIB_CFLAGS="$GLFW_LIB_CFLAGS -D_GLFW_HAS_SYSCTL" fi ########################################################################## # Last chance to change the flags before file generation ########################################################################## GLFW_LIB_CFLAGS="-c -I. -I.. $GLFW_LIB_CFLAGS" GLFW_BIN_CFLAGS="-I../include $GLFW_BIN_CFLAGS" if [ "x$CFLAGS" = x ]; then if [ "x$use_gcc" = xyes ]; then GLFW_CFLAGS="$GLFW_CFLAGS -O2 -Wall" else GLFW_CFLAGS="$GLFW_CFLAGS -O" fi fi GLFW_LFLAGS="$GLFW_LFLAGS -lm" GLFW_LIB_LFLAGS="$GLFW_LIB_LFLAGS -lX11" GLFW_BIN_LFLAGS="-lGLU $GLFW_BIN_LFLAGS" ########################################################################## # Create makefiles and pkg-config template file ########################################################################## # --------------------------------------------------------------------- # Create Makefile for GLFW library # --------------------------------------------------------------------- MKNAME='./lib/x11/Makefile.x11' echo "Creating $MKNAME" 1>&6 echo "$self: Creating $MKNAME" >&5 cat > "$MKNAME" <>$MKNAME # --------------------------------------------------------------------- # Create Makefile for examples # --------------------------------------------------------------------- MKNAME='./examples/Makefile.x11' echo "Creating $MKNAME" 1>&6 echo "$self: Creating $MKNAME" >&5 cat > "$MKNAME" <>$MKNAME # --------------------------------------------------------------------- # Create Makefile for test programs # --------------------------------------------------------------------- MKNAME='./tests/Makefile.x11' echo "Creating $MKNAME" 1>&6 echo "$self: Creating $MKNAME" >&5 cat > "$MKNAME" <>$MKNAME # --------------------------------------------------------------------- # Create pkg-config template file (which is used to create libglfw.pc) # --------------------------------------------------------------------- MKNAME="./lib/x11/libglfw.pc.in" echo "Creating $MKNAME" 1>&6 echo "$self: Creating $MKNAME" >&5 cat > "$MKNAME" < 1 then begin glfwTerminate; Exit; end; // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Disable vertical sync (on cards that support it) glfwSwapInterval( 0 ); Directory := ExtractFilePath(ParamStr(0)); if glfwLoadTexture2D(PChar(Directory + 'mipmaps.tga'), GLFW_BUILD_MIPMAPS_BIT) <> 1 then begin glfwTerminate; Exit; end; // Use trilinear interpolation (GL_LINEAR_MIPMAP_LINEAR) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); // Enable texturing glEnable( GL_TEXTURE_2D ); // Main loop running := 1; frames := 0; t0 := glfwGetTime; while running <> 0 do begin // Get time and mouse position t := glfwGetTime; glfwGetMousePos(x, y ); // Calculate and display FPS (frames per second) if ((t-t0) > 1.0) or (frames = 0) then begin fps := frames / (t-t0); titlestr := Format('Trilinear interpolation (%.1f FPS)', [fps]); glfwSetWindowTitle( PChar(titlestr) ); t0 := t; frames := 0; end; inc(frames); // Get window size (may be different than the requested size) glfwGetWindowSize( width, height ); if height < 1 then height := 1; // Set viewport glViewport( 0, 0, width, height ); // Clear color buffer glClearColor( 0.0, 0.0, 0.0, 0.0 ); glClear( GL_COLOR_BUFFER_BIT ); // Select and setup the projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity; gluPerspective( 65.0, width/height, 1.0, 50.0 ); // Select and setup the modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity; gluLookAt( 0.0, 3.0, -20.0, // Eye-position 0.0, -4.0, -11.0, // View-point 0.0, 1.0, 1.0 ); // Up-vector // Draw a textured quad glRotatef(0.05*x + t*5.0, 0.0, 1.0, 0.0); glBegin( GL_QUADS ); glTexCoord2f( -20.0, 20.0 ); glVertex3f( -50.0, 0.0, -50.0 ); glTexCoord2f( 20.0, 20.0 ); glVertex3f( 50.0, 0.0, -50.0 ); glTexCoord2f( 20.0, -20.0 ); glVertex3f( 50.0, 0.0, 50.0 ); glTexCoord2f( -20.0, -20.0 ); glVertex3f( -50.0, 0.0, 50.0 ); glEnd(); // Swap buffers glfwSwapBuffers; // Check if the ESC key was pressed or the window was closed running := (not glfwGetKey( GLFW_KEY_ESC )) and glfwGetWindowParam( GLFW_OPENED ); end; end. glfw-2.7.2/support/pascal/Triangle.dpr0000644000175000017500000000566311270015166020717 0ustar elmindredaelmindredaprogram Triangle; {$IFDEF FPC} {$IFDEF WIN32} {$APPTYPE GUI} {$ENDIF} {$ENDIF} //======================================================================== // This is a small test application for GLFW. // The program opens a window (640x480), and renders a spinning colored // triangle (it is controlled with both the GLFW timer and the mouse). It // also calculates the rendering speed (FPS), which is displayed in the // window title bar. // // Delphi conversion by Jarrod Davis (http://ww.jdsgames.com) //======================================================================== uses SysUtils, gl, glu, glfw; var width, height, running, frames, x, y: Integer; t, t0, fps: Double; titlestr: string; begin // Initialize GLFW glfwInit; // Open OpenGL window if glfwOpenWindow( 640, 480, 0,0,0,0, 0,0, GLFW_WINDOW ) <> 1 then begin glfwTerminate; Exit; end; // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Disable vertical sync (on cards that support it) glfwSwapInterval( 0 ); // Main loop running := 1; frames := 0; t0 := glfwGetTime; while running <> 0 do begin // Get time and mouse position t := glfwGetTime; glfwGetMousePos(x, y ); // Calculate and display FPS (frames per second) if ((t-t0) > 1.0) or (frames = 0) then begin fps := frames / (t-t0); titlestr := Format('Spinning Triangle (%.1f FPS)', [fps]); glfwSetWindowTitle( PChar(titlestr) ); t0 := t; frames := 0; end; inc(frames); // Get window size (may be different than the requested size) glfwGetWindowSize( width, height ); if height < 1 then height := 1; // Set viewport glViewport( 0, 0, width, height ); // Clear color buffer glClearColor( 0.0, 0.0, 0.0, 0.0 ); glClear( GL_COLOR_BUFFER_BIT ); // Select and setup the projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity; gluPerspective( 65.0, width/height, 1.0, 100.0 ); // Select and setup the modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity; gluLookAt( 0.0, 1.0, 0.0, // Eye-position 0.0, 20.0, 0.0, // View-point 0.0, 0.0, 1.0 ); // Up-vector // Draw a rotating colorful triangle glTranslatef( 0.0, 14.0, 0.0 ); glRotatef( 0.3*x + t*100.0, 0.0, 0.0, 1.0 ); glBegin( GL_TRIANGLES ); glColor3f( 1.0, 0.0, 0.0 ); glVertex3f( -5.0, 0.0, -4.0 ); glColor3f( 0.0, 1.0, 0.0 ); glVertex3f( 5.0, 0.0, -4.0 ); glColor3f( 0.0, 0.0, 1.0 ); glVertex3f( 0.0, 0.0, 6.0 ); glEnd; // Swap buffers glfwSwapBuffers; // Check if the ESC key was pressed or the window was closed running := (not glfwGetKey( GLFW_KEY_ESC )) and glfwGetWindowParam( GLFW_OPENED ); end; // Close OpenGL window and terminate GLFW glfwTerminate; end. glfw-2.7.2/support/pascal/glfw.pas0000644000175000017500000005214511427547437020123 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // Platform: Delphi/FPC + Windows/Linux/Mac OS // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== unit glfw; // Use standard linking method // This means links dynamically to glfw.dll on Windows, glfw.so on Linux // and statically on Mac OS X // // If you don't like that, comment this define {$DEFINE LINK_STANDARD} // If the define above is commented, remove the dot on your favorite option {.$DEFINE LINK_DYNAMIC} {.$DEFINE LINK_STATIC} {$IFDEF FPC} {$MODE DELPHI} {$ENDIF} interface const //======================================================================== // GLFW version //======================================================================== GLFW_VERSION_MAJOR = 2; GLFW_VERSION_MINOR = 7; GLFW_VERSION_REVISION = 0; //======================================================================== // Input handling definitions //======================================================================== // Key and button state/action definitions GLFW_RELEASE = 0; GLFW_PRESS = 1; // Keyboard key definitions: 8-bit ISO-8859-1 (Latin 1) encoding is used // for printable keys (such as A-Z, 0-9 etc), and values above 256 // represent special (non-printable) keys (e.g. F1, Page Up etc). GLFW_KEY_UNKNOWN = -1; GLFW_KEY_SPACE = 32; GLFW_KEY_SPECIAL = 256; GLFW_KEY_ESC = (GLFW_KEY_SPECIAL+1); GLFW_KEY_F1 = (GLFW_KEY_SPECIAL+2); GLFW_KEY_F2 = (GLFW_KEY_SPECIAL+3); GLFW_KEY_F3 = (GLFW_KEY_SPECIAL+4); GLFW_KEY_F4 = (GLFW_KEY_SPECIAL+5); GLFW_KEY_F5 = (GLFW_KEY_SPECIAL+6); GLFW_KEY_F6 = (GLFW_KEY_SPECIAL+7); GLFW_KEY_F7 = (GLFW_KEY_SPECIAL+8); GLFW_KEY_F8 = (GLFW_KEY_SPECIAL+9); GLFW_KEY_F9 = (GLFW_KEY_SPECIAL+10); GLFW_KEY_F10 = (GLFW_KEY_SPECIAL+11); GLFW_KEY_F11 = (GLFW_KEY_SPECIAL+12); GLFW_KEY_F12 = (GLFW_KEY_SPECIAL+13); GLFW_KEY_F13 = (GLFW_KEY_SPECIAL+14); GLFW_KEY_F14 = (GLFW_KEY_SPECIAL+15); GLFW_KEY_F15 = (GLFW_KEY_SPECIAL+16); GLFW_KEY_F16 = (GLFW_KEY_SPECIAL+17); GLFW_KEY_F17 = (GLFW_KEY_SPECIAL+18); GLFW_KEY_F18 = (GLFW_KEY_SPECIAL+19); GLFW_KEY_F19 = (GLFW_KEY_SPECIAL+20); GLFW_KEY_F20 = (GLFW_KEY_SPECIAL+21); GLFW_KEY_F21 = (GLFW_KEY_SPECIAL+22); GLFW_KEY_F22 = (GLFW_KEY_SPECIAL+23); GLFW_KEY_F23 = (GLFW_KEY_SPECIAL+24); GLFW_KEY_F24 = (GLFW_KEY_SPECIAL+25); GLFW_KEY_F25 = (GLFW_KEY_SPECIAL+26); GLFW_KEY_UP = (GLFW_KEY_SPECIAL+27); GLFW_KEY_DOWN = (GLFW_KEY_SPECIAL+28); GLFW_KEY_LEFT = (GLFW_KEY_SPECIAL+29); GLFW_KEY_RIGHT = (GLFW_KEY_SPECIAL+30); GLFW_KEY_LSHIFT = (GLFW_KEY_SPECIAL+31); GLFW_KEY_RSHIFT = (GLFW_KEY_SPECIAL+32); GLFW_KEY_LCTRL = (GLFW_KEY_SPECIAL+33); GLFW_KEY_RCTRL = (GLFW_KEY_SPECIAL+34); GLFW_KEY_LALT = (GLFW_KEY_SPECIAL+35); GLFW_KEY_RALT = (GLFW_KEY_SPECIAL+36); GLFW_KEY_TAB = (GLFW_KEY_SPECIAL+37); GLFW_KEY_ENTER = (GLFW_KEY_SPECIAL+38); GLFW_KEY_BACKSPACE = (GLFW_KEY_SPECIAL+39); GLFW_KEY_INSERT = (GLFW_KEY_SPECIAL+40); GLFW_KEY_DEL = (GLFW_KEY_SPECIAL+41); GLFW_KEY_PAGEUP = (GLFW_KEY_SPECIAL+42); GLFW_KEY_PAGEDOWN = (GLFW_KEY_SPECIAL+43); GLFW_KEY_HOME = (GLFW_KEY_SPECIAL+44); GLFW_KEY_END = (GLFW_KEY_SPECIAL+45); GLFW_KEY_KP_0 = (GLFW_KEY_SPECIAL+46); GLFW_KEY_KP_1 = (GLFW_KEY_SPECIAL+47); GLFW_KEY_KP_2 = (GLFW_KEY_SPECIAL+48); GLFW_KEY_KP_3 = (GLFW_KEY_SPECIAL+49); GLFW_KEY_KP_4 = (GLFW_KEY_SPECIAL+50); GLFW_KEY_KP_5 = (GLFW_KEY_SPECIAL+51); GLFW_KEY_KP_6 = (GLFW_KEY_SPECIAL+52); GLFW_KEY_KP_7 = (GLFW_KEY_SPECIAL+53); GLFW_KEY_KP_8 = (GLFW_KEY_SPECIAL+54); GLFW_KEY_KP_9 = (GLFW_KEY_SPECIAL+55); GLFW_KEY_KP_DIVIDE = (GLFW_KEY_SPECIAL+56); GLFW_KEY_KP_MULTIPLY = (GLFW_KEY_SPECIAL+57); GLFW_KEY_KP_SUBTRACT = (GLFW_KEY_SPECIAL+58); GLFW_KEY_KP_ADD = (GLFW_KEY_SPECIAL+59); GLFW_KEY_KP_DECIMAL = (GLFW_KEY_SPECIAL+60); GLFW_KEY_KP_EQUAL = (GLFW_KEY_SPECIAL+61); GLFW_KEY_KP_ENTER = (GLFW_KEY_SPECIAL+62); GLFW_KEY_KP_NUM_LOCK = (GLFW_KEY_SPECIAL+63); GLFW_KEY_CAPS_LOCK = (GLFW_KEY_SPECIAL+64); GLFW_KEY_SCROLL_LOCK = (GLFW_KEY_SPECIAL+65); GLFW_KEY_PAUSE = (GLFW_KEY_SPECIAL+66); GLFW_KEY_LSUPER = (GLFW_KEY_SPECIAL+67); GLFW_KEY_RSUPER = (GLFW_KEY_SPECIAL+68); GLFW_KEY_MENU = (GLFW_KEY_SPECIAL+69); GLFW_KEY_LAST = GLFW_KEY_MENU; // Mouse button definitions GLFW_MOUSE_BUTTON_1 = 0; GLFW_MOUSE_BUTTON_2 = 1; GLFW_MOUSE_BUTTON_3 = 2; GLFW_MOUSE_BUTTON_4 = 3; GLFW_MOUSE_BUTTON_5 = 4; GLFW_MOUSE_BUTTON_6 = 5; GLFW_MOUSE_BUTTON_7 = 6; GLFW_MOUSE_BUTTON_8 = 7; GLFW_MOUSE_BUTTON_LAST = GLFW_MOUSE_BUTTON_8; // Mouse button aliases GLFW_MOUSE_BUTTON_LEFT = GLFW_MOUSE_BUTTON_1; GLFW_MOUSE_BUTTON_RIGHT = GLFW_MOUSE_BUTTON_2; GLFW_MOUSE_BUTTON_MIDDLE = GLFW_MOUSE_BUTTON_3; // Joystick identifiers GLFW_JOYSTICK_1 = 0; GLFW_JOYSTICK_2 = 1; GLFW_JOYSTICK_3 = 2; GLFW_JOYSTICK_4 = 3; GLFW_JOYSTICK_5 = 4; GLFW_JOYSTICK_6 = 5; GLFW_JOYSTICK_7 = 6; GLFW_JOYSTICK_8 = 7; GLFW_JOYSTICK_9 = 8; GLFW_JOYSTICK_10 = 9; GLFW_JOYSTICK_11 = 10; GLFW_JOYSTICK_12 = 11; GLFW_JOYSTICK_13 = 12; GLFW_JOYSTICK_14 = 13; GLFW_JOYSTICK_15 = 14; GLFW_JOYSTICK_16 = 15; GLFW_JOYSTICK_LAST = GLFW_JOYSTICK_16; //======================================================================== // Other definitions //======================================================================== // glfwOpenWindow modes GLFW_WINDOW = $00010001; GLFW_FULLSCREEN = $00010002; // glfwGetWindowParam tokens GLFW_OPENED = $00020001; GLFW_ACTIVE = $00020002; GLFW_ICONIFIED = $00020003; GLFW_ACCELERATED = $00020004; GLFW_RED_BITS = $00020005; GLFW_GREEN_BITS = $00020006; GLFW_BLUE_BITS = $00020007; GLFW_ALPHA_BITS = $00020008; GLFW_DEPTH_BITS = $00020009; GLFW_STENCIL_BITS = $0002000A; // The following constants are used for both glfwGetWindowParam // and glfwOpenWindowHint GLFW_REFRESH_RATE = $0002000B; GLFW_ACCUM_RED_BITS = $0002000C; GLFW_ACCUM_GREEN_BITS = $0002000D; GLFW_ACCUM_BLUE_BITS = $0002000E; GLFW_ACCUM_ALPHA_BITS = $0002000F; GLFW_AUX_BUFFERS = $00020010; GLFW_STEREO = $00020011; GLFW_WINDOW_NO_RESIZE = $00020012; GLFW_FSAA_SAMPLES = $00020013; GLFW_OPENGL_VERSION_MAJOR = $00020014; GLFW_OPENGL_VERSION_MINOR = $00020015; GLFW_OPENGL_FORWARD_COMPAT= $00020016; GLFW_DEBUG_CONTEXT = $00020017; GLFW_OPENGL_PROFILE = $00020018; // GLFW_OPENGL_PROFILE tokens GLFW_OPENGL_CORE_PROFILE = $00050001; GLFW_OPENGL_COMPAT_PROFILE = $00050002; // glfwEnable/glfwDisable tokens GLFW_MOUSE_CURSOR = $00030001; GLFW_STICKY_KEYS = $00030002; GLFW_STICKY_MOUSE_BUTTONS = $00030003; GLFW_SYSTEM_KEYS = $00030004; GLFW_KEY_REPEAT = $00030005; GLFW_AUTO_POLL_EVENTS = $00030006; // glfwWaitThread wait modes GLFW_WAIT = $00040001; GLFW_NOWAIT = $00040002; // glfwGetJoystickParam tokens GLFW_PRESENT = $00050001; GLFW_AXES = $00050002; GLFW_BUTTONS = $00050003; // glfwReadImage/glfwLoadTexture2D flags GLFW_NO_RESCALE_BIT = $00000001; // Only for glfwReadImage GLFW_ORIGIN_UL_BIT = $00000002; GLFW_BUILD_MIPMAPS_BIT = $00000004; // Only for glfwLoadTexture2D GLFW_ALPHA_MAP_BIT = $00000008; // Time spans longer than this (seconds) are considered to be infinity GLFW_INFINITY = 100000.0; //======================================================================== // Typedefs //======================================================================== type // The video mode structure used by glfwGetVideoModes() GLFWvidmode = packed record Width, Height : Integer; RedBits, BlueBits, GreenBits: Integer; end; PGLFWvidmode = ^GLFWvidmode; // Image/texture information GLFWimage = packed record Width, Height: Integer; Format : Integer; BytesPerPixel: Integer; Data : PChar; end; PGLFWimage = ^GLFWimage; // Thread ID GLFWthread = Integer; // Mutex object GLFWmutex = Pointer; // Condition variable object GLFWcond = Pointer; // Function pointer types GLFWwindowsizefun = procedure(Width, Height: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWwindowclosefun = function: Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWwindowrefreshfun = procedure; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWmousebuttonfun = procedure(Button, Action: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWmouseposfun = procedure(X, Y: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWmousewheelfun = procedure(Pos: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWkeyfun = procedure(Key, Action: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWcharfun = procedure(Character, Action: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} GLFWthreadfun = procedure(Arg: Pointer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} //======================================================================== // Prototypes //======================================================================== {$IFDEF LINK_DYNAMIC} const {$IFDEF WIN32} DLLNAME = 'glfw.dll'; {$ELSE} {$IFDEF DARWIN} DLLNAME = 'libglfw.dylib'; {$ELSE} DLLNAME = 'libglfw.so'; {$ENDIF} {$ENDIF} {$ENDIF} // GLFW initialization, termination and version querying function glfwInit: Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwTerminate; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwGetVersion(var major: Integer; var minor: Integer; var Rev: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Window handling function glfwOpenWindow(width, height, redbits, greenbits, bluebits, alphabits, depthbits, stencilbits, mode: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwOpenWindowHint(target, hint: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwCloseWindow; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetWindowTitle(title: PChar); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwGetWindowSize(var width: Integer; var height: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetWindowSize(width, height: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetWindowPos(x, y: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwIconifyWindow; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwRestoreWindow; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSwapBuffers; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSwapInterval(interval: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetWindowParam(Param: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetWindowSizeCallback(cbfun: GLFWwindowsizefun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetWindowCloseCallback(cbfun: GLFWwindowclosefun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetWindowRefreshCallback(cbfun: GLFWwindowrefreshfun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Video mode functions function glfwGetVideoModes(list: PGLFWvidmode; maxcount: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwGetDesktopMode(mode: PGLFWvidmode); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Input handling procedure glfwPollEvents; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwWaitEvents; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetKey(key: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetMouseButton(button: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwGetMousePos(var xpos: Integer; var ypos: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetMousePos(xpos, ypos: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetMouseWheel: Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetMouseWheel(pos: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetKeyCallback( cbfun: GLFWkeyfun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetCharCallback( cbfun: GLFWcharfun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetMouseButtonCallback( cbfun: GLFWmousebuttonfun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetMousePosCallback( cbfun: GLFWmouseposfun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetMouseWheelCallback( cbfun: GLFWmousewheelfun); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Joystick input function glfwGetJoystickParam(joy, param: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetJoystickPos(joy: Integer; var pos: Single; numaxes: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetJoystickButtons(joy: Integer; buttons: PChar; numbuttons: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Time function glfwGetTime: Double; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSetTime(time: Double); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSleep(time: Double); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Extension support function glfwExtensionSupported(extension: PChar): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetProcAddress(procname: PChar): Pointer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwGetGLVersion(var major: Integer; var minor: Integer; var Rev: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Threading support function glfwCreateThread(fun: GLFWthreadfun; arg: Pointer): GLFWthread; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwDestroyThread(Id: GLFWthread); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwWaitThread(Id: GLFWthread; waitmode: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetThreadID: GLFWthread; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwCreateMutex: GLFWmutex; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwDestroyMutex( mutex: GLFWmutex); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwLockMutex(mutex: GLFWmutex); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwUnlockMutex(mutex: GLFWmutex); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwCreateCond: GLFWcond; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwDestroyCond(cond: GLFWcond); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwWaitCond(cond: GLFWcond; mutex: GLFWmutex; timeout: Double); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwSignalCond(cond: GLFWcond); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwBroadcastCond(cond: GLFWcond); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwGetNumberOfProcessors: Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Enable/disable functions procedure glfwEnable(token: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwDisable(token: Integer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; // Image/texture I/O support function glfwReadImage(name: PChar; image: PGLFWimage; flags: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwReadMemoryImage(data: Pointer; size: LongInt; img: PGLFWimage; flags: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; procedure glfwFreeImage(img: PGLFWimage); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwLoadTexture2D(name: PChar; flags: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwLoadMemoryTexture2D(data: Pointer; size: LongInt; flags: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; function glfwLoadTextureImage2D(img: PGLFWimage; flags: Integer): Integer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} external {$IFDEF LINK_DYNAMIC} DLLNAME {$ENDIF}; implementation end. glfw-2.7.2/support/d/0000755000175000017500000000000011621215252015407 5ustar elmindredaelmindredaglfw-2.7.2/support/d/lib/0000755000175000017500000000000011621215252016155 5ustar elmindredaelmindredaglfw-2.7.2/support/d/lib/makefile0000644000175000017500000000034010021720240017641 0ustar elmindredaelmindredaall: glfwdll.lib opengl32.lib glu32.lib IFLAGS = glfwdll.lib: glfwdll.def implib $(IFLAGS) $@ glfwdll.def opengl32.lib: opengl32.def implib $(IFLAGS) $@ opengl32.def glu32.lib: glu32.def implib $(IFLAGS) $@ glu32.def glfw-2.7.2/support/d/lib/opengl32.def0000644000175000017500000002702610021720240020264 0ustar elmindredaelmindredaLIBRARY opengl32 EXETYPE NT SUBSYSTEM WINDOWS EXPORTS _GlmfBeginGlsBlock@4 = GlmfBeginGlsBlock _GlmfCloseMetaFile@4 = GlmfCloseMetaFile _GlmfEndGlsBlock@4 = GlmfEndGlsBlock _GlmfEndPlayback@4 = GlmfEndPlayback _GlmfInitPlayback@12 = GlmfInitPlayback _GlmfPlayGlsRecord@16 = GlmfPlayGlsRecord _glAccum@8 = glAccum _glAlphaFunc@8 = glAlphaFunc _glAreTexturesResident@12 = glAreTexturesResident _glArrayElement@4 = glArrayElement _glBegin@4 = glBegin _glBindTexture@8 = glBindTexture _glBitmap@28 = glBitmap _glBlendFunc@8 = glBlendFunc _glCallList@4 = glCallList _glCallLists@12 = glCallLists _glClear@4 = glClear _glClearAccum@16 = glClearAccum _glClearColor@16 = glClearColor _glClearDepth@8 = glClearDepth _glClearIndex@4 = glClearIndex _glClearStencil@4 = glClearStencil _glClipPlane@8 = glClipPlane _glColor3b@12 = glColor3b _glColor3bv@4 = glColor3bv _glColor3d@24 = glColor3d _glColor3dv@4 = glColor3dv _glColor3f@12 = glColor3f _glColor3fv@4 = glColor3fv _glColor3i@12 = glColor3i _glColor3iv@4 = glColor3iv _glColor3s@12 = glColor3s _glColor3sv@4 = glColor3sv _glColor3ub@12 = glColor3ub _glColor3ubv@4 = glColor3ubv _glColor3ui@12 = glColor3ui _glColor3uiv@4 = glColor3uiv _glColor3us@12 = glColor3us _glColor3usv@4 = glColor3usv _glColor4b@16 = glColor4b _glColor4bv@4 = glColor4bv _glColor4d@32 = glColor4d _glColor4dv@4 = glColor4dv _glColor4f@16 = glColor4f _glColor4fv@4 = glColor4fv _glColor4i@16 = glColor4i _glColor4iv@4 = glColor4iv _glColor4s@16 = glColor4s _glColor4sv@4 = glColor4sv _glColor4ub@16 = glColor4ub _glColor4ubv@4 = glColor4ubv _glColor4ui@16 = glColor4ui _glColor4uiv@4 = glColor4uiv _glColor4us@16 = glColor4us _glColor4usv@4 = glColor4usv _glColorMask@16 = glColorMask _glColorMaterial@8 = glColorMaterial _glColorPointer@16 = glColorPointer _glCopyPixels@20 = glCopyPixels _glCopyTexImage1D@28 = glCopyTexImage1D _glCopyTexImage2D@32 = glCopyTexImage2D _glCopyTexSubImage1D@24 = glCopyTexSubImage1D _glCopyTexSubImage2D@32 = glCopyTexSubImage2D _glCullFace@4 = glCullFace _glDebugEntry@8 = glDebugEntry _glDeleteLists@8 = glDeleteLists _glDeleteTextures@8 = glDeleteTextures _glDepthFunc@4 = glDepthFunc _glDepthMask@4 = glDepthMask _glDepthRange@16 = glDepthRange _glDisable@4 = glDisable _glDisableClientState@4 = glDisableClientState _glDrawArrays@12 = glDrawArrays _glDrawBuffer@4 = glDrawBuffer _glDrawElements@16 = glDrawElements _glDrawPixels@20 = glDrawPixels _glEdgeFlag@4 = glEdgeFlag _glEdgeFlagPointer@8 = glEdgeFlagPointer _glEdgeFlagv@4 = glEdgeFlagv _glEnable@4 = glEnable _glEnableClientState@4 = glEnableClientState _glEnd@0 = glEnd _glEndList@0 = glEndList _glEvalCoord1d@8 = glEvalCoord1d _glEvalCoord1dv@4 = glEvalCoord1dv _glEvalCoord1f@4 = glEvalCoord1f _glEvalCoord1fv@4 = glEvalCoord1fv _glEvalCoord2d@16 = glEvalCoord2d _glEvalCoord2dv@4 = glEvalCoord2dv _glEvalCoord2f@8 = glEvalCoord2f _glEvalCoord2fv@4 = glEvalCoord2fv _glEvalMesh1@12 = glEvalMesh1 _glEvalMesh2@20 = glEvalMesh2 _glEvalPoint1@4 = glEvalPoint1 _glEvalPoint2@8 = glEvalPoint2 _glFeedbackBuffer@12 = glFeedbackBuffer _glFinish@0 = glFinish _glFlush@0 = glFlush _glFogf@8 = glFogf _glFogfv@8 = glFogfv _glFogi@8 = glFogi _glFogiv@8 = glFogiv _glFrontFace@4 = glFrontFace _glFrustum@48 = glFrustum _glGenLists@4 = glGenLists _glGenTextures@8 = glGenTextures _glGetBooleanv@8 = glGetBooleanv _glGetClipPlane@8 = glGetClipPlane _glGetDoublev@8 = glGetDoublev _glGetError@0 = glGetError _glGetFloatv@8 = glGetFloatv _glGetIntegerv@8 = glGetIntegerv _glGetLightfv@12 = glGetLightfv _glGetLightiv@12 = glGetLightiv _glGetMapdv@12 = glGetMapdv _glGetMapfv@12 = glGetMapfv _glGetMapiv@12 = glGetMapiv _glGetMaterialfv@12 = glGetMaterialfv _glGetMaterialiv@12 = glGetMaterialiv _glGetPixelMapfv@8 = glGetPixelMapfv _glGetPixelMapuiv@8 = glGetPixelMapuiv _glGetPixelMapusv@8 = glGetPixelMapusv _glGetPointerv@8 = glGetPointerv _glGetPolygonStipple@4 = glGetPolygonStipple _glGetString@4 = glGetString _glGetTexEnvfv@12 = glGetTexEnvfv _glGetTexEnviv@12 = glGetTexEnviv _glGetTexGendv@12 = glGetTexGendv _glGetTexGenfv@12 = glGetTexGenfv _glGetTexGeniv@12 = glGetTexGeniv _glGetTexImage@20 = glGetTexImage _glGetTexLevelParameterfv@16 = glGetTexLevelParameterfv _glGetTexLevelParameteriv@16 = glGetTexLevelParameteriv _glGetTexParameterfv@12 = glGetTexParameterfv _glGetTexParameteriv@12 = glGetTexParameteriv _glHint@8 = glHint _glIndexMask@4 = glIndexMask _glIndexPointer@12 = glIndexPointer _glIndexd@8 = glIndexd _glIndexdv@4 = glIndexdv _glIndexf@4 = glIndexf _glIndexfv@4 = glIndexfv _glIndexi@4 = glIndexi _glIndexiv@4 = glIndexiv _glIndexs@4 = glIndexs _glIndexsv@4 = glIndexsv _glIndexub@4 = glIndexub _glIndexubv@4 = glIndexubv _glInitNames@0 = glInitNames _glInterleavedArrays@12 = glInterleavedArrays _glIsEnabled@4 = glIsEnabled _glIsList@4 = glIsList _glIsTexture@4 = glIsTexture _glLightModelf@8 = glLightModelf _glLightModelfv@8 = glLightModelfv _glLightModeli@8 = glLightModeli _glLightModeliv@8 = glLightModeliv _glLightf@12 = glLightf _glLightfv@12 = glLightfv _glLighti@12 = glLighti _glLightiv@12 = glLightiv _glLineStipple@8 = glLineStipple _glLineWidth@4 = glLineWidth _glListBase@4 = glListBase _glLoadIdentity@0 = glLoadIdentity _glLoadMatrixd@4 = glLoadMatrixd _glLoadMatrixf@4 = glLoadMatrixf _glLoadName@4 = glLoadName _glLogicOp@4 = glLogicOp _glMap1d@32 = glMap1d _glMap1f@24 = glMap1f _glMap2d@56 = glMap2d _glMap2f@40 = glMap2f _glMapGrid1d@20 = glMapGrid1d _glMapGrid1f@12 = glMapGrid1f _glMapGrid2d@40 = glMapGrid2d _glMapGrid2f@24 = glMapGrid2f _glMaterialf@12 = glMaterialf _glMaterialfv@12 = glMaterialfv _glMateriali@12 = glMateriali _glMaterialiv@12 = glMaterialiv _glMatrixMode@4 = glMatrixMode _glMultMatrixd@4 = glMultMatrixd _glMultMatrixf@4 = glMultMatrixf _glNewList@8 = glNewList _glNormal3b@12 = glNormal3b _glNormal3bv@4 = glNormal3bv _glNormal3d@24 = glNormal3d _glNormal3dv@4 = glNormal3dv _glNormal3f@12 = glNormal3f _glNormal3fv@4 = glNormal3fv _glNormal3i@12 = glNormal3i _glNormal3iv@4 = glNormal3iv _glNormal3s@12 = glNormal3s _glNormal3sv@4 = glNormal3sv _glNormalPointer@12 = glNormalPointer _glOrtho@48 = glOrtho _glPassThrough@4 = glPassThrough _glPixelMapfv@12 = glPixelMapfv _glPixelMapuiv@12 = glPixelMapuiv _glPixelMapusv@12 = glPixelMapusv _glPixelStoref@8 = glPixelStoref _glPixelStorei@8 = glPixelStorei _glPixelTransferf@8 = glPixelTransferf _glPixelTransferi@8 = glPixelTransferi _glPixelZoom@8 = glPixelZoom _glPointSize@4 = glPointSize _glPolygonMode@8 = glPolygonMode _glPolygonOffset@8 = glPolygonOffset _glPolygonStipple@4 = glPolygonStipple _glPopAttrib@0 = glPopAttrib _glPopClientAttrib@0 = glPopClientAttrib _glPopMatrix@0 = glPopMatrix _glPopName@0 = glPopName _glPrioritizeTextures@12 = glPrioritizeTextures _glPushAttrib@4 = glPushAttrib _glPushClientAttrib@4 = glPushClientAttrib _glPushMatrix@0 = glPushMatrix _glPushName@4 = glPushName _glRasterPos2d@16 = glRasterPos2d _glRasterPos2dv@4 = glRasterPos2dv _glRasterPos2f@8 = glRasterPos2f _glRasterPos2fv@4 = glRasterPos2fv _glRasterPos2i@8 = glRasterPos2i _glRasterPos2iv@4 = glRasterPos2iv _glRasterPos2s@8 = glRasterPos2s _glRasterPos2sv@4 = glRasterPos2sv _glRasterPos3d@24 = glRasterPos3d _glRasterPos3dv@4 = glRasterPos3dv _glRasterPos3f@12 = glRasterPos3f _glRasterPos3fv@4 = glRasterPos3fv _glRasterPos3i@12 = glRasterPos3i _glRasterPos3iv@4 = glRasterPos3iv _glRasterPos3s@12 = glRasterPos3s _glRasterPos3sv@4 = glRasterPos3sv _glRasterPos4d@32 = glRasterPos4d _glRasterPos4dv@4 = glRasterPos4dv _glRasterPos4f@16 = glRasterPos4f _glRasterPos4fv@4 = glRasterPos4fv _glRasterPos4i@16 = glRasterPos4i _glRasterPos4iv@4 = glRasterPos4iv _glRasterPos4s@16 = glRasterPos4s _glRasterPos4sv@4 = glRasterPos4sv _glReadBuffer@4 = glReadBuffer _glReadPixels@28 = glReadPixels _glRectd@32 = glRectd _glRectdv@8 = glRectdv _glRectf@16 = glRectf _glRectfv@8 = glRectfv _glRecti@16 = glRecti _glRectiv@8 = glRectiv _glRects@16 = glRects _glRectsv@8 = glRectsv _glRenderMode@4 = glRenderMode _glRotated@32 = glRotated _glRotatef@16 = glRotatef _glScaled@24 = glScaled _glScalef@12 = glScalef _glScissor@16 = glScissor _glSelectBuffer@8 = glSelectBuffer _glShadeModel@4 = glShadeModel _glStencilFunc@12 = glStencilFunc _glStencilMask@4 = glStencilMask _glStencilOp@12 = glStencilOp _glTexCoord1d@8 = glTexCoord1d _glTexCoord1dv@4 = glTexCoord1dv _glTexCoord1f@4 = glTexCoord1f _glTexCoord1fv@4 = glTexCoord1fv _glTexCoord1i@4 = glTexCoord1i _glTexCoord1iv@4 = glTexCoord1iv _glTexCoord1s@4 = glTexCoord1s _glTexCoord1sv@4 = glTexCoord1sv _glTexCoord2d@16 = glTexCoord2d _glTexCoord2dv@4 = glTexCoord2dv _glTexCoord2f@8 = glTexCoord2f _glTexCoord2fv@4 = glTexCoord2fv _glTexCoord2i@8 = glTexCoord2i _glTexCoord2iv@4 = glTexCoord2iv _glTexCoord2s@8 = glTexCoord2s _glTexCoord2sv@4 = glTexCoord2sv _glTexCoord3d@24 = glTexCoord3d _glTexCoord3dv@4 = glTexCoord3dv _glTexCoord3f@12 = glTexCoord3f _glTexCoord3fv@4 = glTexCoord3fv _glTexCoord3i@12 = glTexCoord3i _glTexCoord3iv@4 = glTexCoord3iv _glTexCoord3s@12 = glTexCoord3s _glTexCoord3sv@4 = glTexCoord3sv _glTexCoord4d@32 = glTexCoord4d _glTexCoord4dv@4 = glTexCoord4dv _glTexCoord4f@16 = glTexCoord4f _glTexCoord4fv@4 = glTexCoord4fv _glTexCoord4i@16 = glTexCoord4i _glTexCoord4iv@4 = glTexCoord4iv _glTexCoord4s@16 = glTexCoord4s _glTexCoord4sv@4 = glTexCoord4sv _glTexCoordPointer@16 = glTexCoordPointer _glTexEnvf@12 = glTexEnvf _glTexEnvfv@12 = glTexEnvfv _glTexEnvi@12 = glTexEnvi _glTexEnviv@12 = glTexEnviv _glTexGend@16 = glTexGend _glTexGendv@12 = glTexGendv _glTexGenf@12 = glTexGenf _glTexGenfv@12 = glTexGenfv _glTexGeni@12 = glTexGeni _glTexGeniv@12 = glTexGeniv _glTexImage1D@32 = glTexImage1D _glTexImage2D@36 = glTexImage2D _glTexParameterf@12 = glTexParameterf _glTexParameterfv@12 = glTexParameterfv _glTexParameteri@12 = glTexParameteri _glTexParameteriv@12 = glTexParameteriv _glTexSubImage1D@28 = glTexSubImage1D _glTexSubImage2D@36 = glTexSubImage2D _glTranslated@24 = glTranslated _glTranslatef@12 = glTranslatef _glVertex2d@16 = glVertex2d _glVertex2dv@4 = glVertex2dv _glVertex2f@8 = glVertex2f _glVertex2fv@4 = glVertex2fv _glVertex2i@8 = glVertex2i _glVertex2iv@4 = glVertex2iv _glVertex2s@8 = glVertex2s _glVertex2sv@4 = glVertex2sv _glVertex3d@24 = glVertex3d _glVertex3dv@4 = glVertex3dv _glVertex3f@12 = glVertex3f _glVertex3fv@4 = glVertex3fv _glVertex3i@12 = glVertex3i _glVertex3iv@4 = glVertex3iv _glVertex3s@12 = glVertex3s _glVertex3sv@4 = glVertex3sv _glVertex4d@32 = glVertex4d _glVertex4dv@4 = glVertex4dv _glVertex4f@16 = glVertex4f _glVertex4fv@4 = glVertex4fv _glVertex4i@16 = glVertex4i _glVertex4iv@4 = glVertex4iv _glVertex4s@16 = glVertex4s _glVertex4sv@4 = glVertex4sv _glVertexPointer@16 = glVertexPointer _glViewport@16 = glViewport _wglChoosePixelFormat@8 = wglChoosePixelFormat _wglCopyContext@12 = wglCopyContext _wglCreateContext@4 = wglCreateContext _wglCreateLayerContext@8 = wglCreateLayerContext _wglDeleteContext@4 = wglDeleteContext _wglDescribeLayerPlane@20 = wglDescribeLayerPlane _wglDescribePixelFormat@16 = wglDescribePixelFormat _wglGetCurrentContext@0 = wglGetCurrentContext _wglGetCurrentDC@0 = wglGetCurrentDC _wglGetDefaultProcAddress@4 = wglGetDefaultProcAddress _wglGetLayerPaletteEntries@20 = wglGetLayerPaletteEntries _wglGetPixelFormat@4 = wglGetPixelFormat _wglGetProcAddress@4 = wglGetProcAddress _wglMakeCurrent@8 = wglMakeCurrent _wglRealizeLayerPalette@12 = wglRealizeLayerPalette _wglSetLayerPaletteEntries@20 = wglSetLayerPaletteEntries _wglSetPixelFormat@12 = wglSetPixelFormat _wglShareLists@8 = wglShareLists _wglSwapBuffers@4 = wglSwapBuffers _wglSwapLayerBuffers@8 = wglSwapLayerBuffers _wglSwapMultipleBuffers@8 = wglSwapMultipleBuffers _wglUseFontBitmapsA@16 = wglUseFontBitmapsA _wglUseFontBitmapsW@16 = wglUseFontBitmapsW _wglUseFontOutlinesA@32 = wglUseFontOutlinesA _wglUseFontOutlinesW@32 = wglUseFontOutlinesW glfw-2.7.2/support/d/lib/glfwdll.def0000644000175000017500000000463210115147764020306 0ustar elmindredaelmindredaLIBRARY glfw EXETYPE NT SUBSYSTEM WINDOWS EXPORTS _glfwBroadcastCond@4 = glfwBroadcastCond _glfwCloseWindow@0 = glfwCloseWindow _glfwCreateCond@0 = glfwCreateCond _glfwCreateMutex@0 = glfwCreateMutex _glfwCreateThread@8 = glfwCreateThread _glfwDestroyCond@4 = glfwDestroyCond _glfwDestroyMutex@4 = glfwDestroyMutex _glfwDestroyThread@4 = glfwDestroyThread _glfwDisable@4 = glfwDisable _glfwEnable@4 = glfwEnable _glfwExtensionSupported@4 = glfwExtensionSupported _glfwFreeImage@4 = glfwFreeImage _glfwGetDesktopMode@4 = glfwGetDesktopMode _glfwGetJoystickButtons@12 = glfwGetJoystickButtons _glfwGetJoystickParam@8 = glfwGetJoystickParam _glfwGetJoystickPos@12 = glfwGetJoystickPos _glfwGetKey@4 = glfwGetKey _glfwGetMouseButton@4 = glfwGetMouseButton _glfwGetMousePos@8 = glfwGetMousePos _glfwGetMouseWheel@0 = glfwGetMouseWheel _glfwGetNumberOfProcessors@0 = glfwGetNumberOfProcessors _glfwGetProcAddress@4 = glfwGetProcAddress _glfwGetThreadID@0 = glfwGetThreadID _glfwGetTime@0 = glfwGetTime _glfwGetVersion@12 = glfwGetVersion _glfwGetVideoModes@8 = glfwGetVideoModes _glfwGetWindowParam@4 = glfwGetWindowParam _glfwGetWindowSize@8 = glfwGetWindowSize _glfwIconifyWindow@0 = glfwIconifyWindow _glfwInit@0 = glfwInit _glfwLoadTexture2D@8 = glfwLoadTexture2D _glfwLockMutex@4 = glfwLockMutex _glfwOpenWindow@36 = glfwOpenWindow _glfwOpenWindowHint@8 = glfwOpenWindowHint _glfwPollEvents@0 = glfwPollEvents _glfwReadImage@12 = glfwReadImage _glfwRestoreWindow@0 = glfwRestoreWindow _glfwSetCharCallback@4 = glfwSetCharCallback _glfwSetKeyCallback@4 = glfwSetKeyCallback _glfwSetMouseButtonCallback@4 = glfwSetMouseButtonCallback _glfwSetMousePos@8 = glfwSetMousePos _glfwSetMousePosCallback@4 = glfwSetMousePosCallback _glfwSetMouseWheel@4 = glfwSetMouseWheel _glfwSetMouseWheelCallback@4 = glfwSetMouseWheelCallback _glfwSetTime@8 = glfwSetTime _glfwSetWindowCloseCallback@4 = glfwSetWindowCloseCallback _glfwSetWindowRefreshCallback@4 = glfwSetWindowRefreshCallback _glfwSetWindowPos@8 = glfwSetWindowPos _glfwSetWindowSize@8 = glfwSetWindowSize _glfwSetWindowSizeCallback@4 = glfwSetWindowSizeCallback _glfwSetWindowTitle@4 = glfwSetWindowTitle _glfwSignalCond@4 = glfwSignalCond _glfwSleep@8 = glfwSleep _glfwSwapBuffers@0 = glfwSwapBuffers _glfwSwapInterval@4 = glfwSwapInterval _glfwTerminate@0 = glfwTerminate _glfwUnlockMutex@4 = glfwUnlockMutex _glfwWaitCond@16 = glfwWaitCond _glfwWaitEvents@0 = glfwWaitEvents _glfwWaitThread@8 = glfwWaitThread glfw-2.7.2/support/d/lib/glu32.def0000644000175000017500000000366510021720240017572 0ustar elmindredaelmindredaLIBRARY glu32 EXETYPE NT SUBSYSTEM WINDOWS EXPORTS _gluBeginCurve@4 = gluBeginCurve _gluBeginPolygon@4 = gluBeginPolygon _gluBeginSurface@4 = gluBeginSurface _gluBeginTrim@4 = gluBeginTrim _gluBuild1DMipmaps@24 = gluBuild1DMipmaps _gluBuild2DMipmaps@28 = gluBuild2DMipmaps _gluCylinder@36 = gluCylinder _gluDeleteNurbsRenderer@4 = gluDeleteNurbsRenderer _gluDeleteQuadric@4 = gluDeleteQuadric _gluDeleteTess@4 = gluDeleteTess _gluDisk@28 = gluDisk _gluEndCurve@4 = gluEndCurve _gluEndPolygon@4 = gluEndPolygon _gluEndSurface@4 = gluEndSurface _gluEndTrim@4 = gluEndTrim _gluErrorString@4 = gluErrorString _gluErrorUnicodeStringEXT@4 = gluErrorUnicodeStringEXT _gluGetNurbsProperty@12 = gluGetNurbsProperty _gluGetString@4 = gluGetString _gluGetTessProperty@12 = gluGetTessProperty _gluLoadSamplingMatrices@16 = gluLoadSamplingMatrices _gluLookAt@72 = gluLookAt _gluNewNurbsRenderer@0 = gluNewNurbsRenderer _gluNewQuadric@0 = gluNewQuadric _gluNewTess@0 = gluNewTess _gluNextContour@8 = gluNextContour _gluNurbsCallback@12 = gluNurbsCallback _gluNurbsCurve@28 = gluNurbsCurve _gluNurbsProperty@12 = gluNurbsProperty _gluNurbsSurface@44 = gluNurbsSurface _gluOrtho2D@32 = gluOrtho2D _gluPartialDisk@44 = gluPartialDisk _gluPerspective@32 = gluPerspective _gluPickMatrix@36 = gluPickMatrix _gluProject@48 = gluProject _gluPwlCurve@20 = gluPwlCurve _gluQuadricCallback@12 = gluQuadricCallback _gluQuadricDrawStyle@8 = gluQuadricDrawStyle _gluQuadricNormals@8 = gluQuadricNormals _gluQuadricOrientation@8 = gluQuadricOrientation _gluQuadricTexture@8 = gluQuadricTexture _gluScaleImage@36 = gluScaleImage _gluSphere@20 = gluSphere _gluTessBeginContour@4 = gluTessBeginContour _gluTessBeginPolygon@8 = gluTessBeginPolygon _gluTessCallback@12 = gluTessCallback _gluTessEndContour@4 = gluTessEndContour _gluTessEndPolygon@4 = gluTessEndPolygon _gluTessNormal@28 = gluTessNormal _gluTessProperty@16 = gluTessProperty _gluTessVertex@12 = gluTessVertex _gluUnProject@48 = gluUnProject glfw-2.7.2/support/d/imports/0000755000175000017500000000000011621215252017104 5ustar elmindredaelmindredaglfw-2.7.2/support/d/imports/glfw.d0000644000175000017500000003443611427547437020243 0ustar elmindredaelmindreda//======================================================================== // GLFW - An OpenGL framework // API version: 2.7 // WWW: http://www.glfw.org/ //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2010 Camilla Berglund // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== public import gl, glu; extern(System): //======================================================================== // GLFW version //======================================================================== const int GLFW_VERSION_MAJOR = 2; const int GLFW_VERSION_MINOR = 7; const int GLFW_VERSION_REVISION = 0; //======================================================================== // Input handling definitions //======================================================================== // Key and button state/action definitions const int GLFW_RELEASE = 0; const int GLFW_PRESS = 1; // Keyboard key definitions: 8-bit ISO-8859-1 (Latin 1) encoding is used // for printable keys (such as A-Z, 0-9 etc), and values above 256 // represent special (non-printable) keys (e.g. F1, Page Up etc). const int GLFW_KEY_UNKNOWN = -1; const int GLFW_KEY_SPACE = 32; const int GLFW_KEY_SPECIAL = 256; const int GLFW_KEY_ESC = (GLFW_KEY_SPECIAL+1); const int GLFW_KEY_F1 = (GLFW_KEY_SPECIAL+2); const int GLFW_KEY_F2 = (GLFW_KEY_SPECIAL+3); const int GLFW_KEY_F3 = (GLFW_KEY_SPECIAL+4); const int GLFW_KEY_F4 = (GLFW_KEY_SPECIAL+5); const int GLFW_KEY_F5 = (GLFW_KEY_SPECIAL+6); const int GLFW_KEY_F6 = (GLFW_KEY_SPECIAL+7); const int GLFW_KEY_F7 = (GLFW_KEY_SPECIAL+8); const int GLFW_KEY_F8 = (GLFW_KEY_SPECIAL+9); const int GLFW_KEY_F9 = (GLFW_KEY_SPECIAL+10); const int GLFW_KEY_F10 = (GLFW_KEY_SPECIAL+11); const int GLFW_KEY_F11 = (GLFW_KEY_SPECIAL+12); const int GLFW_KEY_F12 = (GLFW_KEY_SPECIAL+13); const int GLFW_KEY_F13 = (GLFW_KEY_SPECIAL+14); const int GLFW_KEY_F14 = (GLFW_KEY_SPECIAL+15); const int GLFW_KEY_F15 = (GLFW_KEY_SPECIAL+16); const int GLFW_KEY_F16 = (GLFW_KEY_SPECIAL+17); const int GLFW_KEY_F17 = (GLFW_KEY_SPECIAL+18); const int GLFW_KEY_F18 = (GLFW_KEY_SPECIAL+19); const int GLFW_KEY_F19 = (GLFW_KEY_SPECIAL+20); const int GLFW_KEY_F20 = (GLFW_KEY_SPECIAL+21); const int GLFW_KEY_F21 = (GLFW_KEY_SPECIAL+22); const int GLFW_KEY_F22 = (GLFW_KEY_SPECIAL+23); const int GLFW_KEY_F23 = (GLFW_KEY_SPECIAL+24); const int GLFW_KEY_F24 = (GLFW_KEY_SPECIAL+25); const int GLFW_KEY_F25 = (GLFW_KEY_SPECIAL+26); const int GLFW_KEY_UP = (GLFW_KEY_SPECIAL+27); const int GLFW_KEY_DOWN = (GLFW_KEY_SPECIAL+28); const int GLFW_KEY_LEFT = (GLFW_KEY_SPECIAL+29); const int GLFW_KEY_RIGHT = (GLFW_KEY_SPECIAL+30); const int GLFW_KEY_LSHIFT = (GLFW_KEY_SPECIAL+31); const int GLFW_KEY_RSHIFT = (GLFW_KEY_SPECIAL+32); const int GLFW_KEY_LCTRL = (GLFW_KEY_SPECIAL+33); const int GLFW_KEY_RCTRL = (GLFW_KEY_SPECIAL+34); const int GLFW_KEY_LALT = (GLFW_KEY_SPECIAL+35); const int GLFW_KEY_RALT = (GLFW_KEY_SPECIAL+36); const int GLFW_KEY_TAB = (GLFW_KEY_SPECIAL+37); const int GLFW_KEY_ENTER = (GLFW_KEY_SPECIAL+38); const int GLFW_KEY_BACKSPACE = (GLFW_KEY_SPECIAL+39); const int GLFW_KEY_INSERT = (GLFW_KEY_SPECIAL+40); const int GLFW_KEY_DEL = (GLFW_KEY_SPECIAL+41); const int GLFW_KEY_PAGEUP = (GLFW_KEY_SPECIAL+42); const int GLFW_KEY_PAGEDOWN = (GLFW_KEY_SPECIAL+43); const int GLFW_KEY_HOME = (GLFW_KEY_SPECIAL+44); const int GLFW_KEY_END = (GLFW_KEY_SPECIAL+45); const int GLFW_KEY_KP_0 = (GLFW_KEY_SPECIAL+46); const int GLFW_KEY_KP_1 = (GLFW_KEY_SPECIAL+47); const int GLFW_KEY_KP_2 = (GLFW_KEY_SPECIAL+48); const int GLFW_KEY_KP_3 = (GLFW_KEY_SPECIAL+49); const int GLFW_KEY_KP_4 = (GLFW_KEY_SPECIAL+50); const int GLFW_KEY_KP_5 = (GLFW_KEY_SPECIAL+51); const int GLFW_KEY_KP_6 = (GLFW_KEY_SPECIAL+52); const int GLFW_KEY_KP_7 = (GLFW_KEY_SPECIAL+53); const int GLFW_KEY_KP_8 = (GLFW_KEY_SPECIAL+54); const int GLFW_KEY_KP_9 = (GLFW_KEY_SPECIAL+55); const int GLFW_KEY_KP_DIVIDE = (GLFW_KEY_SPECIAL+56); const int GLFW_KEY_KP_MULTIPLY = (GLFW_KEY_SPECIAL+57); const int GLFW_KEY_KP_SUBTRACT = (GLFW_KEY_SPECIAL+58); const int GLFW_KEY_KP_ADD = (GLFW_KEY_SPECIAL+59); const int GLFW_KEY_KP_DECIMAL = (GLFW_KEY_SPECIAL+60); const int GLFW_KEY_KP_EQUAL = (GLFW_KEY_SPECIAL+61); const int GLFW_KEY_KP_ENTER = (GLFW_KEY_SPECIAL+62); const int GLFW_KEY_KP_NUM_LOCK = (GLFW_KEY_SPECIAL+63); const int GLFW_KEY_CAPS_LOCK = (GLFW_KEY_SPECIAL+64); const int GLFW_KEY_SCROLL_LOCK = (GLFW_KEY_SPECIAL+65); const int GLFW_KEY_PAUSE = (GLFW_KEY_SPECIAL+66); const int GLFW_KEY_LSUPER = (GLFW_KEY_SPECIAL+67); const int GLFW_KEY_RSUPER = (GLFW_KEY_SPECIAL+68); const int GLFW_KEY_MENU = (GLFW_KEY_SPECIAL+69); const int GLFW_KEY_LAST = GLFW_KEY_MENU; // Mouse button definitions const int GLFW_MOUSE_BUTTON_1 = 0; const int GLFW_MOUSE_BUTTON_2 = 1; const int GLFW_MOUSE_BUTTON_3 = 2; const int GLFW_MOUSE_BUTTON_4 = 3; const int GLFW_MOUSE_BUTTON_5 = 4; const int GLFW_MOUSE_BUTTON_6 = 5; const int GLFW_MOUSE_BUTTON_7 = 6; const int GLFW_MOUSE_BUTTON_8 = 7; const int GLFW_MOUSE_BUTTON_LAST = GLFW_MOUSE_BUTTON_8; // Mouse button aliases const int GLFW_MOUSE_BUTTON_LEFT = GLFW_MOUSE_BUTTON_1; const int GLFW_MOUSE_BUTTON_RIGHT = GLFW_MOUSE_BUTTON_2; const int GLFW_MOUSE_BUTTON_MIDDLE = GLFW_MOUSE_BUTTON_3; // Joystick identifiers const int GLFW_JOYSTICK_1 = 0; const int GLFW_JOYSTICK_2 = 1; const int GLFW_JOYSTICK_3 = 2; const int GLFW_JOYSTICK_4 = 3; const int GLFW_JOYSTICK_5 = 4; const int GLFW_JOYSTICK_6 = 5; const int GLFW_JOYSTICK_7 = 6; const int GLFW_JOYSTICK_8 = 7; const int GLFW_JOYSTICK_9 = 8; const int GLFW_JOYSTICK_10 = 9; const int GLFW_JOYSTICK_11 = 10; const int GLFW_JOYSTICK_12 = 11; const int GLFW_JOYSTICK_13 = 12; const int GLFW_JOYSTICK_14 = 13; const int GLFW_JOYSTICK_15 = 14; const int GLFW_JOYSTICK_16 = 15; const int GLFW_JOYSTICK_LAST = GLFW_JOYSTICK_16; //======================================================================== // Other definitions //======================================================================== // glfwOpenWindow modes const int GLFW_WINDOW = 0x00010001; const int GLFW_FULLSCREEN = 0x00010002; // glfwGetWindowParam tokens const int GLFW_OPENED = 0x00020001; const int GLFW_ACTIVE = 0x00020002; const int GLFW_ICONIFIED = 0x00020003; const int GLFW_ACCELERATED = 0x00020004; const int GLFW_RED_BITS = 0x00020005; const int GLFW_GREEN_BITS = 0x00020006; const int GLFW_BLUE_BITS = 0x00020007; const int GLFW_ALPHA_BITS = 0x00020008; const int GLFW_DEPTH_BITS = 0x00020009; const int GLFW_STENCIL_BITS = 0x0002000A; // The following constants are used for both glfwGetWindowParam // and glfwOpenWindowHint const int GLFW_REFRESH_RATE = 0x0002000B; const int GLFW_ACCUM_RED_BITS = 0x0002000C; const int GLFW_ACCUM_GREEN_BITS = 0x0002000D; const int GLFW_ACCUM_BLUE_BITS = 0x0002000E; const int GLFW_ACCUM_ALPHA_BITS = 0x0002000F; const int GLFW_AUX_BUFFERS = 0x00020010; const int GLFW_STEREO = 0x00020011; const int GLFW_WINDOW_NO_RESIZE = 0x00020012; const int GLFW_FSAA_SAMPLES = 0x00020013; const int GLFW_OPENGL_VERSION_MAJOR = 0x00020014; const int GLFW_OPENGL_VERSION_MINOR = 0x00020015; const int GLFW_OPENGL_FORWARD_COMPAT = 0x00020016; const int GLFW_OPENGL_DEBUG_CONTEXT = 0x00020017; const int GLFW_OPENGL_PROFILE = 0x00020018; // GLFW_OPENGL_PROFILE tokens const int GLFW_OPENGL_CORE_PROFILE = 0x00050001; const int GLFW_OPENGL_COMPAT_PROFILE = 0x00050002; // glfwEnable/glfwDisable tokens const int GLFW_MOUSE_CURSOR = 0x00030001; const int GLFW_STICKY_KEYS = 0x00030002; const int GLFW_STICKY_MOUSE_BUTTONS = 0x00030003; const int GLFW_SYSTEM_KEYS = 0x00030004; const int GLFW_KEY_REPEAT = 0x00030005; const int GLFW_AUTO_POLL_EVENTS = 0x00030006; // glfwWaitThread wait modes const int GLFW_WAIT = 0x00040001; const int GLFW_NOWAIT = 0x00040002; // glfwGetJoystickParam tokens const int GLFW_PRESENT = 0x00050001; const int GLFW_AXES = 0x00050002; const int GLFW_BUTTONS = 0x00050003; // glfwReadImage/glfwLoadTexture2D flags const int GLFW_NO_RESCALE_BIT = 0x00000001; // Only for glfwReadImage const int GLFW_ORIGIN_UL_BIT = 0x00000002; const int GLFW_BUILD_MIPMAPS_BIT = 0x00000004; // Only for glfwLoadTexture2D const int GLFW_ALPHA_MAP_BIT = 0x00000008; // Time spans longer than this (seconds) are considered to be infinity const double GLFW_INFINITY = 100000.0; //======================================================================== // Typedefs //======================================================================== // The video mode structure used by glfwGetVideoModes() struct GLFWvidmode { int Width, Height; int RedBits, BlueBits, GreenBits; } // Image/texture information struct GLFWimage { int Width, Height; int Format; int BytesPerPixel; char *Data; } // Thread ID alias int GLFWthread; // Mutex object alias void* GLFWmutex; // Condition variable object alias void* GLFWcond; // Function pointer types typedef void (* GLFWwindowsizefun)(int, int); typedef int (* GLFWwindowclosefun)(); typedef void (* GLFWwindowrefreshfun)(); typedef void (* GLFWmousebuttonfun)(int, int); typedef void (* GLFWmouseposfun)(int, int); typedef void (* GLFWmousewheelfun)(int); typedef void (* GLFWkeyfun)(int, int); typedef void (* GLFWcharfun)(int, int); typedef void (* GLFWthreadfun)(void *); //======================================================================== // Prototypes //======================================================================== // GLFW initialization, termination and version querying int glfwInit(); void glfwTerminate(); void glfwGetVersion( int *major, int *minor, int *rev ); // Window handling int glfwOpenWindow( int width, int height, int redbits, int greenbits, int bluebits, int alphabits, int depthbits, int stencilbits, int mode ); void glfwOpenWindowHint( int target, int hint ); void glfwCloseWindow(); void glfwSetWindowTitle( char *title ); void glfwGetWindowSize( int *width, int *height ); void glfwSetWindowSize( int width, int height ); void glfwSetWindowPos( int x, int y ); void glfwIconifyWindow(); void glfwRestoreWindow(); void glfwSwapBuffers(); void glfwSwapInterval( int interval ); int glfwGetWindowParam( int param ); void glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ); void glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun ); void glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun ); // Video mode functions int glfwGetVideoModes( GLFWvidmode *list, int maxcount ); void glfwGetDesktopMode( GLFWvidmode *mode ); // Input handling void glfwPollEvents(); void glfwWaitEvents(); int glfwGetKey( int key ); int glfwGetMouseButton( int button ); void glfwGetMousePos( int *xpos, int *ypos ); void glfwSetMousePos( int xpos, int ypos ); int glfwGetMouseWheel(); void glfwSetMouseWheel( int pos ); void glfwSetKeyCallback( GLFWkeyfun cbfun ); void glfwSetCharCallback( GLFWcharfun cbfun ); void glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun ); void glfwSetMousePosCallback( GLFWmouseposfun cbfun ); void glfwSetMouseWheelCallback( GLFWmousewheelfun cbfun ); // Joystick input int glfwGetJoystickParam( int joy, int param ); int glfwGetJoystickPos( int joy, float *pos, int numaxes ); int glfwGetJoystickButtons( int joy, char *buttons, int numbuttons ); // Time double glfwGetTime(); void glfwSetTime( double time ); void glfwSleep( double time ); // Extension support int glfwExtensionSupported( char *extension ); void* glfwGetProcAddress( char *procname ); void glfwGetGLVersion( int *major, int *minor, int *rev ); // Threading support GLFWthread glfwCreateThread( GLFWthreadfun fun, void *arg ); void glfwDestroyThread( GLFWthread ID ); int glfwWaitThread( GLFWthread ID, int waitmode ); GLFWthread glfwGetThreadID(); GLFWmutex glfwCreateMutex(); void glfwDestroyMutex( GLFWmutex mutex ); void glfwLockMutex( GLFWmutex mutex ); void glfwUnlockMutex( GLFWmutex mutex ); GLFWcond glfwCreateCond(); void glfwDestroyCond( GLFWcond cond ); void glfwWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ); void glfwSignalCond( GLFWcond cond ); void glfwBroadcastCond( GLFWcond cond ); int glfwGetNumberOfProcessors(); // Enable/disable functions void glfwEnable( int token ); void glfwDisable( int token ); // Image/texture I/O support int glfwReadImage( char *name, GLFWimage *img, int flags ); int glfwReadMemoryImage( void *data, long size, GLFWimage *img, int flags ); void glfwFreeImage( GLFWimage *img ); int glfwLoadTexture2D( char *name, int flags ); int glfwLoadMemoryTexture2D( void *data, long size, int flags ); int glfwLoadTextureImage2D( GLFWimage *img, int flags ); glfw-2.7.2/support/d/imports/glu.d0000644000175000017500000003646710625531326020066 0ustar elmindredaelmindreda/************************************************************************ * * GLU 1.0 - 1.3 module for the D programming language * (http://www.digitalmars.com/d/) * * Conversion by Marcus Geelnard * * Originally based on glu.h from the SGI Open Source Sample * Implementation. * ************************************************************************/ import gl; version (Win32) { extern (Windows): } version (linux) { extern (C): } /************************************************************************ * * GLU versions supported by this module (1.0 is assumed, and requires * no further introduction) * ************************************************************************/ const uint GLU_VERSION_1_1 = 1; const uint GLU_VERSION_1_2 = 1; const uint GLU_VERSION_1_3 = 1; /************************************************************************ * * Datatypes * ************************************************************************/ alias void GLUnurbs; alias void GLUquadric; alias void GLUtesselator; alias GLUnurbs GLUnurbsObj; alias GLUquadric GLUquadricObj; alias GLUtesselator GLUtesselatorObj; alias GLUtesselator GLUtriangulatorObj; /* Internal convenience typedef */ typedef void (* _GLUfuncptr)(); /************************************************************************ * * Constants * ************************************************************************/ /* Boolean */ const uint GLU_FALSE = 0; const uint GLU_TRUE = 1; /* StringName */ const uint GLU_VERSION = 100800; const uint GLU_EXTENSIONS = 100801; /* ErrorCode */ const uint GLU_INVALID_ENUM = 100900; const uint GLU_INVALID_VALUE = 100901; const uint GLU_OUT_OF_MEMORY = 100902; const uint GLU_INVALID_OPERATION = 100904; /* NurbsDisplay */ /* GLU_FILL */ const uint GLU_OUTLINE_POLYGON = 100240; const uint GLU_OUTLINE_PATCH = 100241; /* NurbsCallback */ const uint GLU_NURBS_ERROR = 100103; const uint GLU_ERROR = 100103; const uint GLU_NURBS_BEGIN = 100164; const uint GLU_NURBS_BEGIN_EXT = 100164; const uint GLU_NURBS_VERTEX = 100165; const uint GLU_NURBS_VERTEX_EXT = 100165; const uint GLU_NURBS_NORMAL = 100166; const uint GLU_NURBS_NORMAL_EXT = 100166; const uint GLU_NURBS_COLOR = 100167; const uint GLU_NURBS_COLOR_EXT = 100167; const uint GLU_NURBS_TEXTURE_COORD = 100168; const uint GLU_NURBS_TEX_COORD_EXT = 100168; const uint GLU_NURBS_END = 100169; const uint GLU_NURBS_END_EXT = 100169; const uint GLU_NURBS_BEGIN_DATA = 100170; const uint GLU_NURBS_BEGIN_DATA_EXT = 100170; const uint GLU_NURBS_VERTEX_DATA = 100171; const uint GLU_NURBS_VERTEX_DATA_EXT = 100171; const uint GLU_NURBS_NORMAL_DATA = 100172; const uint GLU_NURBS_NORMAL_DATA_EXT = 100172; const uint GLU_NURBS_COLOR_DATA = 100173; const uint GLU_NURBS_COLOR_DATA_EXT = 100173; const uint GLU_NURBS_TEXTURE_COORD_DATA = 100174; const uint GLU_NURBS_TEX_COORD_DATA_EXT = 100174; const uint GLU_NURBS_END_DATA = 100175; const uint GLU_NURBS_END_DATA_EXT = 100175; /* NurbsError */ const uint GLU_NURBS_ERROR1 = 100251; const uint GLU_NURBS_ERROR2 = 100252; const uint GLU_NURBS_ERROR3 = 100253; const uint GLU_NURBS_ERROR4 = 100254; const uint GLU_NURBS_ERROR5 = 100255; const uint GLU_NURBS_ERROR6 = 100256; const uint GLU_NURBS_ERROR7 = 100257; const uint GLU_NURBS_ERROR8 = 100258; const uint GLU_NURBS_ERROR9 = 100259; const uint GLU_NURBS_ERROR10 = 100260; const uint GLU_NURBS_ERROR11 = 100261; const uint GLU_NURBS_ERROR12 = 100262; const uint GLU_NURBS_ERROR13 = 100263; const uint GLU_NURBS_ERROR14 = 100264; const uint GLU_NURBS_ERROR15 = 100265; const uint GLU_NURBS_ERROR16 = 100266; const uint GLU_NURBS_ERROR17 = 100267; const uint GLU_NURBS_ERROR18 = 100268; const uint GLU_NURBS_ERROR19 = 100269; const uint GLU_NURBS_ERROR20 = 100270; const uint GLU_NURBS_ERROR21 = 100271; const uint GLU_NURBS_ERROR22 = 100272; const uint GLU_NURBS_ERROR23 = 100273; const uint GLU_NURBS_ERROR24 = 100274; const uint GLU_NURBS_ERROR25 = 100275; const uint GLU_NURBS_ERROR26 = 100276; const uint GLU_NURBS_ERROR27 = 100277; const uint GLU_NURBS_ERROR28 = 100278; const uint GLU_NURBS_ERROR29 = 100279; const uint GLU_NURBS_ERROR30 = 100280; const uint GLU_NURBS_ERROR31 = 100281; const uint GLU_NURBS_ERROR32 = 100282; const uint GLU_NURBS_ERROR33 = 100283; const uint GLU_NURBS_ERROR34 = 100284; const uint GLU_NURBS_ERROR35 = 100285; const uint GLU_NURBS_ERROR36 = 100286; const uint GLU_NURBS_ERROR37 = 100287; /* NurbsProperty */ const uint GLU_AUTO_LOAD_MATRIX = 100200; const uint GLU_CULLING = 100201; const uint GLU_SAMPLING_TOLERANCE = 100203; const uint GLU_DISPLAY_MODE = 100204; const uint GLU_PARAMETRIC_TOLERANCE = 100202; const uint GLU_SAMPLING_METHOD = 100205; const uint GLU_U_STEP = 100206; const uint GLU_V_STEP = 100207; const uint GLU_NURBS_MODE = 100160; const uint GLU_NURBS_MODE_EXT = 100160; const uint GLU_NURBS_TESSELLATOR = 100161; const uint GLU_NURBS_TESSELLATOR_EXT = 100161; const uint GLU_NURBS_RENDERER = 100162; const uint GLU_NURBS_RENDERER_EXT = 100162; /* NurbsSampling */ const uint GLU_OBJECT_PARAMETRIC_ERROR = 100208; const uint GLU_OBJECT_PARAMETRIC_ERROR_EXT = 100208; const uint GLU_OBJECT_PATH_LENGTH = 100209; const uint GLU_OBJECT_PATH_LENGTH_EXT = 100209; const uint GLU_PATH_LENGTH = 100215; const uint GLU_PARAMETRIC_ERROR = 100216; const uint GLU_DOMAIN_DISTANCE = 100217; /* NurbsTrim */ const uint GLU_MAP1_TRIM_2 = 100210; const uint GLU_MAP1_TRIM_3 = 100211; /* QuadricDrawStyle */ const uint GLU_POINT = 100010; const uint GLU_LINE = 100011; const uint GLU_FILL = 100012; const uint GLU_SILHOUETTE = 100013; /* QuadricCallback */ /* GLU_ERROR */ /* QuadricNormal */ const uint GLU_SMOOTH = 100000; const uint GLU_FLAT = 100001; const uint GLU_NONE = 100002; /* QuadricOrientation */ const uint GLU_OUTSIDE = 100020; const uint GLU_INSIDE = 100021; /* TessCallback */ const uint GLU_TESS_BEGIN = 100100; const uint GLU_BEGIN = 100100; const uint GLU_TESS_VERTEX = 100101; const uint GLU_VERTEX = 100101; const uint GLU_TESS_END = 100102; const uint GLU_END = 100102; const uint GLU_TESS_ERROR = 100103; const uint GLU_TESS_EDGE_FLAG = 100104; const uint GLU_EDGE_FLAG = 100104; const uint GLU_TESS_COMBINE = 100105; const uint GLU_TESS_BEGIN_DATA = 100106; const uint GLU_TESS_VERTEX_DATA = 100107; const uint GLU_TESS_END_DATA = 100108; const uint GLU_TESS_ERROR_DATA = 100109; const uint GLU_TESS_EDGE_FLAG_DATA = 100110; const uint GLU_TESS_COMBINE_DATA = 100111; /* TessContour */ const uint GLU_CW = 100120; const uint GLU_CCW = 100121; const uint GLU_INTERIOR = 100122; const uint GLU_EXTERIOR = 100123; const uint GLU_UNKNOWN = 100124; /* TessProperty */ const uint GLU_TESS_WINDING_RULE = 100140; const uint GLU_TESS_BOUNDARY_ONLY = 100141; const uint GLU_TESS_TOLERANCE = 100142; /* TessError */ const uint GLU_TESS_ERROR1 = 100151; const uint GLU_TESS_ERROR2 = 100152; const uint GLU_TESS_ERROR3 = 100153; const uint GLU_TESS_ERROR4 = 100154; const uint GLU_TESS_ERROR5 = 100155; const uint GLU_TESS_ERROR6 = 100156; const uint GLU_TESS_ERROR7 = 100157; const uint GLU_TESS_ERROR8 = 100158; const uint GLU_TESS_MISSING_BEGIN_POLYGON = 100151; const uint GLU_TESS_MISSING_BEGIN_CONTOUR = 100152; const uint GLU_TESS_MISSING_END_POLYGON = 100153; const uint GLU_TESS_MISSING_END_CONTOUR = 100154; const uint GLU_TESS_COORD_TOO_LARGE = 100155; const uint GLU_TESS_NEED_COMBINE_CALLBACK = 100156; /* TessWinding */ const uint GLU_TESS_WINDING_ODD = 100130; const uint GLU_TESS_WINDING_NONZERO = 100131; const uint GLU_TESS_WINDING_POSITIVE = 100132; const uint GLU_TESS_WINDING_NEGATIVE = 100133; const uint GLU_TESS_WINDING_ABS_GEQ_TWO = 100134; /************************************************************************ * * Extensions * ************************************************************************/ const uint GLU_EXT_object_space_tess = 1; const uint GLU_EXT_nurbs_tessellator = 1; const double GLU_TESS_MAX_COORD = 1.0e150; /************************************************************************ * * Function prototypes * ************************************************************************/ void gluBeginCurve (GLUnurbs* nurb); void gluBeginPolygon (GLUtesselator* tess); void gluBeginSurface (GLUnurbs* nurb); void gluBeginTrim (GLUnurbs* nurb); GLint gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data); GLint gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, void *data); GLint gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data); GLint gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, void *data); GLint gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data); GLint gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *data); GLboolean gluCheckExtension (GLubyte *extName, GLubyte *extString); void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); void gluDeleteNurbsRenderer (GLUnurbs* nurb); void gluDeleteQuadric (GLUquadric* quad); void gluDeleteTess (GLUtesselator* tess); void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); void gluEndCurve (GLUnurbs* nurb); void gluEndPolygon (GLUtesselator* tess); void gluEndSurface (GLUnurbs* nurb); void gluEndTrim (GLUnurbs* nurb); GLubyte * gluErrorString (GLenum error); void gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data); GLubyte * gluGetString (GLenum name); void gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data); void gluLoadSamplingMatrices (GLUnurbs* nurb, GLfloat *model, GLfloat *perspective, GLint *view); void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); GLUnurbs* gluNewNurbsRenderer (); GLUquadric* gluNewQuadric (); GLUtesselator* gluNewTess (); void gluNextContour (GLUtesselator* tess, GLenum type); void gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc); void gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData); void gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData); void gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type); void gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value); void gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type); void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); void gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); void gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport); GLint gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, GLdouble *model, GLdouble *proj, GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); void gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type); void gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc); void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw); void gluQuadricNormals (GLUquadric* quad, GLenum normal); void gluQuadricOrientation (GLUquadric* quad, GLenum orientation); void gluQuadricTexture (GLUquadric* quad, GLboolean texture); GLint gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks); void gluTessBeginContour (GLUtesselator* tess); void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data); void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); void gluTessEndContour (GLUtesselator* tess); void gluTessEndPolygon (GLUtesselator* tess); void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data); void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data); GLint gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble *model, GLdouble *proj, GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ); 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); glfw-2.7.2/support/d/imports/gl.d0000644000175000017500000075241610642002240017663 0ustar elmindredaelmindreda/************************************************************************ * * OpenGL 1.0 - 1.4 module for the D programming language * (http://www.digitalmars.com/d/) * * Conversion by Marcus Geelnard * * Originally based on gl.h from the Mesa 4.0 distribution by Brian Paul, * and glext.h from the SGI Open Source Sample Implementation. * * This file contains constants for OpenGL 1.0 - 1.4, aswell as for over * 200 different OpenGL extensions. Function declarations exist for * OpenGL 1.0 - 1.1, and function pointer type definitions exist for * OpenGL 1.2 - 1.4 and all the OpenGL extensions. * ************************************************************************/ version (Win32) { extern (Windows): } version (linux) { extern (C): } /************************************************************************ * * OpenGL versions supported by this module (1.0 is assumed, and requires * no further introduction) * ************************************************************************/ const uint GL_VERSION_1_1 = 1; const uint GL_VERSION_1_2 = 1; const uint GL_VERSION_1_3 = 1; const uint GL_VERSION_1_4 = 1; /************************************************************************ * * Datatypes * ************************************************************************/ alias uint GLenum; alias ubyte GLboolean; alias uint GLbitfield; alias void GLvoid; alias byte GLbyte; /* 1-byte signed */ alias short GLshort; /* 2-byte signed */ alias int GLint; /* 4-byte signed */ alias ubyte GLubyte; /* 1-byte unsigned */ alias ushort GLushort; /* 2-byte unsigned */ alias uint GLuint; /* 4-byte unsigned */ alias int GLsizei; /* 4-byte signed */ alias float GLfloat; /* single precision float */ alias float GLclampf; /* single precision float in [0,1] */ alias double GLdouble; /* double precision float */ alias double GLclampd; /* double precision float in [0,1] */ /************************************************************************ * * Constants * ************************************************************************/ /* Boolean values */ const uint GL_FALSE = 0x0; const uint GL_TRUE = 0x1; /* Data types */ const uint GL_BYTE = 0x1400; const uint GL_UNSIGNED_BYTE = 0x1401; const uint GL_SHORT = 0x1402; const uint GL_UNSIGNED_SHORT = 0x1403; const uint GL_INT = 0x1404; const uint GL_UNSIGNED_INT = 0x1405; const uint GL_FLOAT = 0x1406; const uint GL_DOUBLE = 0x140A; const uint GL_2_BYTES = 0x1407; const uint GL_3_BYTES = 0x1408; const uint GL_4_BYTES = 0x1409; /* Primitives */ const uint GL_POINTS = 0x0000; const uint GL_LINES = 0x0001; const uint GL_LINE_LOOP = 0x0002; const uint GL_LINE_STRIP = 0x0003; const uint GL_TRIANGLES = 0x0004; const uint GL_TRIANGLE_STRIP = 0x0005; const uint GL_TRIANGLE_FAN = 0x0006; const uint GL_QUADS = 0x0007; const uint GL_QUAD_STRIP = 0x0008; const uint GL_POLYGON = 0x0009; /* Vertex Arrays */ const uint GL_VERTEX_ARRAY = 0x8074; const uint GL_NORMAL_ARRAY = 0x8075; const uint GL_COLOR_ARRAY = 0x8076; const uint GL_INDEX_ARRAY = 0x8077; const uint GL_TEXTURE_COORD_ARRAY = 0x8078; const uint GL_EDGE_FLAG_ARRAY = 0x8079; const uint GL_VERTEX_ARRAY_SIZE = 0x807A; const uint GL_VERTEX_ARRAY_TYPE = 0x807B; const uint GL_VERTEX_ARRAY_STRIDE = 0x807C; const uint GL_NORMAL_ARRAY_TYPE = 0x807E; const uint GL_NORMAL_ARRAY_STRIDE = 0x807F; const uint GL_COLOR_ARRAY_SIZE = 0x8081; const uint GL_COLOR_ARRAY_TYPE = 0x8082; const uint GL_COLOR_ARRAY_STRIDE = 0x8083; const uint GL_INDEX_ARRAY_TYPE = 0x8085; const uint GL_INDEX_ARRAY_STRIDE = 0x8086; const uint GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088; const uint GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089; const uint GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A; const uint GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C; const uint GL_VERTEX_ARRAY_POINTER = 0x808E; const uint GL_NORMAL_ARRAY_POINTER = 0x808F; const uint GL_COLOR_ARRAY_POINTER = 0x8090; const uint GL_INDEX_ARRAY_POINTER = 0x8091; const uint GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092; const uint GL_EDGE_FLAG_ARRAY_POINTER = 0x8093; const uint GL_V2F = 0x2A20; const uint GL_V3F = 0x2A21; const uint GL_C4UB_V2F = 0x2A22; const uint GL_C4UB_V3F = 0x2A23; const uint GL_C3F_V3F = 0x2A24; const uint GL_N3F_V3F = 0x2A25; const uint GL_C4F_N3F_V3F = 0x2A26; const uint GL_T2F_V3F = 0x2A27; const uint GL_T4F_V4F = 0x2A28; const uint GL_T2F_C4UB_V3F = 0x2A29; const uint GL_T2F_C3F_V3F = 0x2A2A; const uint GL_T2F_N3F_V3F = 0x2A2B; const uint GL_T2F_C4F_N3F_V3F = 0x2A2C; const uint GL_T4F_C4F_N3F_V4F = 0x2A2D; /* Matrix Mode */ const uint GL_MATRIX_MODE = 0x0BA0; const uint GL_MODELVIEW = 0x1700; const uint GL_PROJECTION = 0x1701; const uint GL_TEXTURE = 0x1702; /* Points */ const uint GL_POINT_SMOOTH = 0x0B10; const uint GL_POINT_SIZE = 0x0B11; const uint GL_POINT_SIZE_GRANULARITY = 0x0B13; const uint GL_POINT_SIZE_RANGE = 0x0B12; /* Lines */ const uint GL_LINE_SMOOTH = 0x0B20; const uint GL_LINE_STIPPLE = 0x0B24; const uint GL_LINE_STIPPLE_PATTERN = 0x0B25; const uint GL_LINE_STIPPLE_REPEAT = 0x0B26; const uint GL_LINE_WIDTH = 0x0B21; const uint GL_LINE_WIDTH_GRANULARITY = 0x0B23; const uint GL_LINE_WIDTH_RANGE = 0x0B22; /* Polygons */ const uint GL_POINT = 0x1B00; const uint GL_LINE = 0x1B01; const uint GL_FILL = 0x1B02; const uint GL_CW = 0x0900; const uint GL_CCW = 0x0901; const uint GL_FRONT = 0x0404; const uint GL_BACK = 0x0405; const uint GL_POLYGON_MODE = 0x0B40; const uint GL_POLYGON_SMOOTH = 0x0B41; const uint GL_POLYGON_STIPPLE = 0x0B42; const uint GL_EDGE_FLAG = 0x0B43; const uint GL_CULL_FACE = 0x0B44; const uint GL_CULL_FACE_MODE = 0x0B45; const uint GL_FRONT_FACE = 0x0B46; const uint GL_POLYGON_OFFSET_FACTOR = 0x8038; const uint GL_POLYGON_OFFSET_UNITS = 0x2A00; const uint GL_POLYGON_OFFSET_POINT = 0x2A01; const uint GL_POLYGON_OFFSET_LINE = 0x2A02; const uint GL_POLYGON_OFFSET_FILL = 0x8037; /* Display Lists */ const uint GL_COMPILE = 0x1300; const uint GL_COMPILE_AND_EXECUTE = 0x1301; const uint GL_LIST_BASE = 0x0B32; const uint GL_LIST_INDEX = 0x0B33; const uint GL_LIST_MODE = 0x0B30; /* Depth buffer */ const uint GL_NEVER = 0x0200; const uint GL_LESS = 0x0201; const uint GL_EQUAL = 0x0202; const uint GL_LEQUAL = 0x0203; const uint GL_GREATER = 0x0204; const uint GL_NOTEQUAL = 0x0205; const uint GL_GEQUAL = 0x0206; const uint GL_ALWAYS = 0x0207; const uint GL_DEPTH_TEST = 0x0B71; const uint GL_DEPTH_BITS = 0x0D56; const uint GL_DEPTH_CLEAR_VALUE = 0x0B73; const uint GL_DEPTH_FUNC = 0x0B74; const uint GL_DEPTH_RANGE = 0x0B70; const uint GL_DEPTH_WRITEMASK = 0x0B72; const uint GL_DEPTH_COMPONENT = 0x1902; /* Lighting */ const uint GL_LIGHTING = 0x0B50; const uint GL_LIGHT0 = 0x4000; const uint GL_LIGHT1 = 0x4001; const uint GL_LIGHT2 = 0x4002; const uint GL_LIGHT3 = 0x4003; const uint GL_LIGHT4 = 0x4004; const uint GL_LIGHT5 = 0x4005; const uint GL_LIGHT6 = 0x4006; const uint GL_LIGHT7 = 0x4007; const uint GL_SPOT_EXPONENT = 0x1205; const uint GL_SPOT_CUTOFF = 0x1206; const uint GL_CONSTANT_ATTENUATION = 0x1207; const uint GL_LINEAR_ATTENUATION = 0x1208; const uint GL_QUADRATIC_ATTENUATION = 0x1209; const uint GL_AMBIENT = 0x1200; const uint GL_DIFFUSE = 0x1201; const uint GL_SPECULAR = 0x1202; const uint GL_SHININESS = 0x1601; const uint GL_EMISSION = 0x1600; const uint GL_POSITION = 0x1203; const uint GL_SPOT_DIRECTION = 0x1204; const uint GL_AMBIENT_AND_DIFFUSE = 0x1602; const uint GL_COLOR_INDEXES = 0x1603; const uint GL_LIGHT_MODEL_TWO_SIDE = 0x0B52; const uint GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51; const uint GL_LIGHT_MODEL_AMBIENT = 0x0B53; const uint GL_FRONT_AND_BACK = 0x0408; const uint GL_SHADE_MODEL = 0x0B54; const uint GL_FLAT = 0x1D00; const uint GL_SMOOTH = 0x1D01; const uint GL_COLOR_MATERIAL = 0x0B57; const uint GL_COLOR_MATERIAL_FACE = 0x0B55; const uint GL_COLOR_MATERIAL_PARAMETER = 0x0B56; const uint GL_NORMALIZE = 0x0BA1; /* User clipping planes */ const uint GL_CLIP_PLANE0 = 0x3000; const uint GL_CLIP_PLANE1 = 0x3001; const uint GL_CLIP_PLANE2 = 0x3002; const uint GL_CLIP_PLANE3 = 0x3003; const uint GL_CLIP_PLANE4 = 0x3004; const uint GL_CLIP_PLANE5 = 0x3005; /* Accumulation buffer */ const uint GL_ACCUM_RED_BITS = 0x0D58; const uint GL_ACCUM_GREEN_BITS = 0x0D59; const uint GL_ACCUM_BLUE_BITS = 0x0D5A; const uint GL_ACCUM_ALPHA_BITS = 0x0D5B; const uint GL_ACCUM_CLEAR_VALUE = 0x0B80; const uint GL_ACCUM = 0x0100; const uint GL_ADD = 0x0104; const uint GL_LOAD = 0x0101; const uint GL_MULT = 0x0103; const uint GL_RETURN = 0x0102; /* Alpha testing */ const uint GL_ALPHA_TEST = 0x0BC0; const uint GL_ALPHA_TEST_REF = 0x0BC2; const uint GL_ALPHA_TEST_FUNC = 0x0BC1; /* Blending */ const uint GL_BLEND = 0x0BE2; const uint GL_BLEND_SRC = 0x0BE1; const uint GL_BLEND_DST = 0x0BE0; const uint GL_ZERO = 0x0; const uint GL_ONE = 0x1; const uint GL_SRC_COLOR = 0x0300; const uint GL_ONE_MINUS_SRC_COLOR = 0x0301; const uint GL_SRC_ALPHA = 0x0302; const uint GL_ONE_MINUS_SRC_ALPHA = 0x0303; const uint GL_DST_ALPHA = 0x0304; const uint GL_ONE_MINUS_DST_ALPHA = 0x0305; const uint GL_DST_COLOR = 0x0306; const uint GL_ONE_MINUS_DST_COLOR = 0x0307; const uint GL_SRC_ALPHA_SATURATE = 0x0308; /* const uint GL_CONSTANT_COLOR = 0x8001; const uint GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; const uint GL_CONSTANT_ALPHA = 0x8003; const uint GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; */ /* Render Mode */ const uint GL_FEEDBACK = 0x1C01; const uint GL_RENDER = 0x1C00; const uint GL_SELECT = 0x1C02; /* Feedback */ const uint GL_2D = 0x0600; const uint GL_3D = 0x0601; const uint GL_3D_COLOR = 0x0602; const uint GL_3D_COLOR_TEXTURE = 0x0603; const uint GL_4D_COLOR_TEXTURE = 0x0604; const uint GL_POINT_TOKEN = 0x0701; const uint GL_LINE_TOKEN = 0x0702; const uint GL_LINE_RESET_TOKEN = 0x0707; const uint GL_POLYGON_TOKEN = 0x0703; const uint GL_BITMAP_TOKEN = 0x0704; const uint GL_DRAW_PIXEL_TOKEN = 0x0705; const uint GL_COPY_PIXEL_TOKEN = 0x0706; const uint GL_PASS_THROUGH_TOKEN = 0x0700; const uint GL_FEEDBACK_BUFFER_POINTER = 0x0DF0; const uint GL_FEEDBACK_BUFFER_SIZE = 0x0DF1; const uint GL_FEEDBACK_BUFFER_TYPE = 0x0DF2; /* Selection */ const uint GL_SELECTION_BUFFER_POINTER = 0x0DF3; const uint GL_SELECTION_BUFFER_SIZE = 0x0DF4; /* Fog */ const uint GL_FOG = 0x0B60; const uint GL_FOG_MODE = 0x0B65; const uint GL_FOG_DENSITY = 0x0B62; const uint GL_FOG_COLOR = 0x0B66; const uint GL_FOG_INDEX = 0x0B61; const uint GL_FOG_START = 0x0B63; const uint GL_FOG_END = 0x0B64; const uint GL_LINEAR = 0x2601; const uint GL_EXP = 0x0800; const uint GL_EXP2 = 0x0801; /* Logic Ops */ const uint GL_LOGIC_OP = 0x0BF1; const uint GL_INDEX_LOGIC_OP = 0x0BF1; const uint GL_COLOR_LOGIC_OP = 0x0BF2; const uint GL_LOGIC_OP_MODE = 0x0BF0; const uint GL_CLEAR = 0x1500; const uint GL_SET = 0x150F; const uint GL_COPY = 0x1503; const uint GL_COPY_INVERTED = 0x150C; const uint GL_NOOP = 0x1505; const uint GL_INVERT = 0x150A; const uint GL_AND = 0x1501; const uint GL_NAND = 0x150E; const uint GL_OR = 0x1507; const uint GL_NOR = 0x1508; const uint GL_XOR = 0x1506; const uint GL_EQUIV = 0x1509; const uint GL_AND_REVERSE = 0x1502; const uint GL_AND_INVERTED = 0x1504; const uint GL_OR_REVERSE = 0x150B; const uint GL_OR_INVERTED = 0x150D; /* Stencil */ const uint GL_STENCIL_TEST = 0x0B90; const uint GL_STENCIL_WRITEMASK = 0x0B98; const uint GL_STENCIL_BITS = 0x0D57; const uint GL_STENCIL_FUNC = 0x0B92; const uint GL_STENCIL_VALUE_MASK = 0x0B93; const uint GL_STENCIL_REF = 0x0B97; const uint GL_STENCIL_FAIL = 0x0B94; const uint GL_STENCIL_PASS_DEPTH_PASS = 0x0B96; const uint GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95; const uint GL_STENCIL_CLEAR_VALUE = 0x0B91; const uint GL_STENCIL_INDEX = 0x1901; const uint GL_KEEP = 0x1E00; const uint GL_REPLACE = 0x1E01; const uint GL_INCR = 0x1E02; const uint GL_DECR = 0x1E03; /* Buffers, Pixel Drawing/Reading */ const uint GL_NONE = 0x0; const uint GL_LEFT = 0x0406; const uint GL_RIGHT = 0x0407; /* GL_FRONT = 0x0404; */ /* GL_BACK = 0x0405; */ /* GL_FRONT_AND_BACK = 0x0408; */ const uint GL_FRONT_LEFT = 0x0400; const uint GL_FRONT_RIGHT = 0x0401; const uint GL_BACK_LEFT = 0x0402; const uint GL_BACK_RIGHT = 0x0403; const uint GL_AUX0 = 0x0409; const uint GL_AUX1 = 0x040A; const uint GL_AUX2 = 0x040B; const uint GL_AUX3 = 0x040C; const uint GL_COLOR_INDEX = 0x1900; const uint GL_RED = 0x1903; const uint GL_GREEN = 0x1904; const uint GL_BLUE = 0x1905; const uint GL_ALPHA = 0x1906; const uint GL_LUMINANCE = 0x1909; const uint GL_LUMINANCE_ALPHA = 0x190A; const uint GL_ALPHA_BITS = 0x0D55; const uint GL_RED_BITS = 0x0D52; const uint GL_GREEN_BITS = 0x0D53; const uint GL_BLUE_BITS = 0x0D54; const uint GL_INDEX_BITS = 0x0D51; const uint GL_SUBPIXEL_BITS = 0x0D50; const uint GL_AUX_BUFFERS = 0x0C00; const uint GL_READ_BUFFER = 0x0C02; const uint GL_DRAW_BUFFER = 0x0C01; const uint GL_DOUBLEBUFFER = 0x0C32; const uint GL_STEREO = 0x0C33; const uint GL_BITMAP = 0x1A00; const uint GL_COLOR = 0x1800; const uint GL_DEPTH = 0x1801; const uint GL_STENCIL = 0x1802; const uint GL_DITHER = 0x0BD0; const uint GL_RGB = 0x1907; const uint GL_RGBA = 0x1908; /* Implementation limits */ const uint GL_MAX_LIST_NESTING = 0x0B31; const uint GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35; const uint GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36; const uint GL_MAX_NAME_STACK_DEPTH = 0x0D37; const uint GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38; const uint GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39; const uint GL_MAX_EVAL_ORDER = 0x0D30; const uint GL_MAX_LIGHTS = 0x0D31; const uint GL_MAX_CLIP_PLANES = 0x0D32; const uint GL_MAX_TEXTURE_SIZE = 0x0D33; const uint GL_MAX_PIXEL_MAP_TABLE = 0x0D34; const uint GL_MAX_VIEWPORT_DIMS = 0x0D3A; const uint GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B; /* Gets */ const uint GL_ATTRIB_STACK_DEPTH = 0x0BB0; const uint GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1; const uint GL_COLOR_CLEAR_VALUE = 0x0C22; const uint GL_COLOR_WRITEMASK = 0x0C23; const uint GL_CURRENT_INDEX = 0x0B01; const uint GL_CURRENT_COLOR = 0x0B00; const uint GL_CURRENT_NORMAL = 0x0B02; const uint GL_CURRENT_RASTER_COLOR = 0x0B04; const uint GL_CURRENT_RASTER_DISTANCE = 0x0B09; const uint GL_CURRENT_RASTER_INDEX = 0x0B05; const uint GL_CURRENT_RASTER_POSITION = 0x0B07; const uint GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06; const uint GL_CURRENT_RASTER_POSITION_VALID = 0x0B08; const uint GL_CURRENT_TEXTURE_COORDS = 0x0B03; const uint GL_INDEX_CLEAR_VALUE = 0x0C20; const uint GL_INDEX_MODE = 0x0C30; const uint GL_INDEX_WRITEMASK = 0x0C21; const uint GL_MODELVIEW_MATRIX = 0x0BA6; const uint GL_MODELVIEW_STACK_DEPTH = 0x0BA3; const uint GL_NAME_STACK_DEPTH = 0x0D70; const uint GL_PROJECTION_MATRIX = 0x0BA7; const uint GL_PROJECTION_STACK_DEPTH = 0x0BA4; const uint GL_RENDER_MODE = 0x0C40; const uint GL_RGBA_MODE = 0x0C31; const uint GL_TEXTURE_MATRIX = 0x0BA8; const uint GL_TEXTURE_STACK_DEPTH = 0x0BA5; const uint GL_VIEWPORT = 0x0BA2; /* Evaluators */ const uint GL_AUTO_NORMAL = 0x0D80; const uint GL_MAP1_COLOR_4 = 0x0D90; const uint GL_MAP1_GRID_DOMAIN = 0x0DD0; const uint GL_MAP1_GRID_SEGMENTS = 0x0DD1; const uint GL_MAP1_INDEX = 0x0D91; const uint GL_MAP1_NORMAL = 0x0D92; const uint GL_MAP1_TEXTURE_COORD_1 = 0x0D93; const uint GL_MAP1_TEXTURE_COORD_2 = 0x0D94; const uint GL_MAP1_TEXTURE_COORD_3 = 0x0D95; const uint GL_MAP1_TEXTURE_COORD_4 = 0x0D96; const uint GL_MAP1_VERTEX_3 = 0x0D97; const uint GL_MAP1_VERTEX_4 = 0x0D98; const uint GL_MAP2_COLOR_4 = 0x0DB0; const uint GL_MAP2_GRID_DOMAIN = 0x0DD2; const uint GL_MAP2_GRID_SEGMENTS = 0x0DD3; const uint GL_MAP2_INDEX = 0x0DB1; const uint GL_MAP2_NORMAL = 0x0DB2; const uint GL_MAP2_TEXTURE_COORD_1 = 0x0DB3; const uint GL_MAP2_TEXTURE_COORD_2 = 0x0DB4; const uint GL_MAP2_TEXTURE_COORD_3 = 0x0DB5; const uint GL_MAP2_TEXTURE_COORD_4 = 0x0DB6; const uint GL_MAP2_VERTEX_3 = 0x0DB7; const uint GL_MAP2_VERTEX_4 = 0x0DB8; const uint GL_COEFF = 0x0A00; const uint GL_DOMAIN = 0x0A02; const uint GL_ORDER = 0x0A01; /* Hints */ const uint GL_FOG_HINT = 0x0C54; const uint GL_LINE_SMOOTH_HINT = 0x0C52; const uint GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50; const uint GL_POINT_SMOOTH_HINT = 0x0C51; const uint GL_POLYGON_SMOOTH_HINT = 0x0C53; const uint GL_DONT_CARE = 0x1100; const uint GL_FASTEST = 0x1101; const uint GL_NICEST = 0x1102; /* Scissor box */ const uint GL_SCISSOR_TEST = 0x0C11; const uint GL_SCISSOR_BOX = 0x0C10; /* Pixel Mode / Transfer */ const uint GL_MAP_COLOR = 0x0D10; const uint GL_MAP_STENCIL = 0x0D11; const uint GL_INDEX_SHIFT = 0x0D12; const uint GL_INDEX_OFFSET = 0x0D13; const uint GL_RED_SCALE = 0x0D14; const uint GL_RED_BIAS = 0x0D15; const uint GL_GREEN_SCALE = 0x0D18; const uint GL_GREEN_BIAS = 0x0D19; const uint GL_BLUE_SCALE = 0x0D1A; const uint GL_BLUE_BIAS = 0x0D1B; const uint GL_ALPHA_SCALE = 0x0D1C; const uint GL_ALPHA_BIAS = 0x0D1D; const uint GL_DEPTH_SCALE = 0x0D1E; const uint GL_DEPTH_BIAS = 0x0D1F; const uint GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1; const uint GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0; const uint GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2; const uint GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3; const uint GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4; const uint GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5; const uint GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6; const uint GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7; const uint GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8; const uint GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9; const uint GL_PIXEL_MAP_S_TO_S = 0x0C71; const uint GL_PIXEL_MAP_I_TO_I = 0x0C70; const uint GL_PIXEL_MAP_I_TO_R = 0x0C72; const uint GL_PIXEL_MAP_I_TO_G = 0x0C73; const uint GL_PIXEL_MAP_I_TO_B = 0x0C74; const uint GL_PIXEL_MAP_I_TO_A = 0x0C75; const uint GL_PIXEL_MAP_R_TO_R = 0x0C76; const uint GL_PIXEL_MAP_G_TO_G = 0x0C77; const uint GL_PIXEL_MAP_B_TO_B = 0x0C78; const uint GL_PIXEL_MAP_A_TO_A = 0x0C79; const uint GL_PACK_ALIGNMENT = 0x0D05; const uint GL_PACK_LSB_FIRST = 0x0D01; const uint GL_PACK_ROW_LENGTH = 0x0D02; const uint GL_PACK_SKIP_PIXELS = 0x0D04; const uint GL_PACK_SKIP_ROWS = 0x0D03; const uint GL_PACK_SWAP_BYTES = 0x0D00; const uint GL_UNPACK_ALIGNMENT = 0x0CF5; const uint GL_UNPACK_LSB_FIRST = 0x0CF1; const uint GL_UNPACK_ROW_LENGTH = 0x0CF2; const uint GL_UNPACK_SKIP_PIXELS = 0x0CF4; const uint GL_UNPACK_SKIP_ROWS = 0x0CF3; const uint GL_UNPACK_SWAP_BYTES = 0x0CF0; const uint GL_ZOOM_X = 0x0D16; const uint GL_ZOOM_Y = 0x0D17; /* Texture mapping */ const uint GL_TEXTURE_ENV = 0x2300; const uint GL_TEXTURE_ENV_MODE = 0x2200; const uint GL_TEXTURE_1D = 0x0DE0; const uint GL_TEXTURE_2D = 0x0DE1; const uint GL_TEXTURE_WRAP_S = 0x2802; const uint GL_TEXTURE_WRAP_T = 0x2803; const uint GL_TEXTURE_MAG_FILTER = 0x2800; const uint GL_TEXTURE_MIN_FILTER = 0x2801; const uint GL_TEXTURE_ENV_COLOR = 0x2201; const uint GL_TEXTURE_GEN_S = 0x0C60; const uint GL_TEXTURE_GEN_T = 0x0C61; const uint GL_TEXTURE_GEN_MODE = 0x2500; const uint GL_TEXTURE_BORDER_COLOR = 0x1004; const uint GL_TEXTURE_WIDTH = 0x1000; const uint GL_TEXTURE_HEIGHT = 0x1001; const uint GL_TEXTURE_BORDER = 0x1005; const uint GL_TEXTURE_COMPONENTS = 0x1003; const uint GL_TEXTURE_RED_SIZE = 0x805C; const uint GL_TEXTURE_GREEN_SIZE = 0x805D; const uint GL_TEXTURE_BLUE_SIZE = 0x805E; const uint GL_TEXTURE_ALPHA_SIZE = 0x805F; const uint GL_TEXTURE_LUMINANCE_SIZE = 0x8060; const uint GL_TEXTURE_INTENSITY_SIZE = 0x8061; const uint GL_NEAREST_MIPMAP_NEAREST = 0x2700; const uint GL_NEAREST_MIPMAP_LINEAR = 0x2702; const uint GL_LINEAR_MIPMAP_NEAREST = 0x2701; const uint GL_LINEAR_MIPMAP_LINEAR = 0x2703; const uint GL_OBJECT_LINEAR = 0x2401; const uint GL_OBJECT_PLANE = 0x2501; const uint GL_EYE_LINEAR = 0x2400; const uint GL_EYE_PLANE = 0x2502; const uint GL_SPHERE_MAP = 0x2402; const uint GL_DECAL = 0x2101; const uint GL_MODULATE = 0x2100; const uint GL_NEAREST = 0x2600; const uint GL_REPEAT = 0x2901; const uint GL_CLAMP = 0x2900; const uint GL_S = 0x2000; const uint GL_T = 0x2001; const uint GL_R = 0x2002; const uint GL_Q = 0x2003; const uint GL_TEXTURE_GEN_R = 0x0C62; const uint GL_TEXTURE_GEN_Q = 0x0C63; /* Utility */ const uint GL_VENDOR = 0x1F00; const uint GL_RENDERER = 0x1F01; const uint GL_VERSION = 0x1F02; const uint GL_EXTENSIONS = 0x1F03; /* Errors */ const uint GL_NO_ERROR = 0x0; const uint GL_INVALID_VALUE = 0x0501; const uint GL_INVALID_ENUM = 0x0500; const uint GL_INVALID_OPERATION = 0x0502; const uint GL_STACK_OVERFLOW = 0x0503; const uint GL_STACK_UNDERFLOW = 0x0504; const uint GL_OUT_OF_MEMORY = 0x0505; /* glPush/PopAttrib bits */ const uint GL_CURRENT_BIT = 0x00000001; const uint GL_POINT_BIT = 0x00000002; const uint GL_LINE_BIT = 0x00000004; const uint GL_POLYGON_BIT = 0x00000008; const uint GL_POLYGON_STIPPLE_BIT = 0x00000010; const uint GL_PIXEL_MODE_BIT = 0x00000020; const uint GL_LIGHTING_BIT = 0x00000040; const uint GL_FOG_BIT = 0x00000080; const uint GL_DEPTH_BUFFER_BIT = 0x00000100; const uint GL_ACCUM_BUFFER_BIT = 0x00000200; const uint GL_STENCIL_BUFFER_BIT = 0x00000400; const uint GL_VIEWPORT_BIT = 0x00000800; const uint GL_TRANSFORM_BIT = 0x00001000; const uint GL_ENABLE_BIT = 0x00002000; const uint GL_COLOR_BUFFER_BIT = 0x00004000; const uint GL_HINT_BIT = 0x00008000; const uint GL_EVAL_BIT = 0x00010000; const uint GL_LIST_BIT = 0x00020000; const uint GL_TEXTURE_BIT = 0x00040000; const uint GL_SCISSOR_BIT = 0x00080000; const uint GL_ALL_ATTRIB_BITS = 0x000FFFFF; /* OpenGL 1.1 */ const uint GL_PROXY_TEXTURE_1D = 0x8063; const uint GL_PROXY_TEXTURE_2D = 0x8064; const uint GL_TEXTURE_PRIORITY = 0x8066; const uint GL_TEXTURE_RESIDENT = 0x8067; const uint GL_TEXTURE_BINDING_1D = 0x8068; const uint GL_TEXTURE_BINDING_2D = 0x8069; const uint GL_TEXTURE_INTERNAL_FORMAT = 0x1003; const uint GL_ALPHA4 = 0x803B; const uint GL_ALPHA8 = 0x803C; const uint GL_ALPHA12 = 0x803D; const uint GL_ALPHA16 = 0x803E; const uint GL_LUMINANCE4 = 0x803F; const uint GL_LUMINANCE8 = 0x8040; const uint GL_LUMINANCE12 = 0x8041; const uint GL_LUMINANCE16 = 0x8042; const uint GL_LUMINANCE4_ALPHA4 = 0x8043; const uint GL_LUMINANCE6_ALPHA2 = 0x8044; const uint GL_LUMINANCE8_ALPHA8 = 0x8045; const uint GL_LUMINANCE12_ALPHA4 = 0x8046; const uint GL_LUMINANCE12_ALPHA12 = 0x8047; const uint GL_LUMINANCE16_ALPHA16 = 0x8048; const uint GL_INTENSITY = 0x8049; const uint GL_INTENSITY4 = 0x804A; const uint GL_INTENSITY8 = 0x804B; const uint GL_INTENSITY12 = 0x804C; const uint GL_INTENSITY16 = 0x804D; const uint GL_R3_G3_B2 = 0x2A10; const uint GL_RGB4 = 0x804F; const uint GL_RGB5 = 0x8050; const uint GL_RGB8 = 0x8051; const uint GL_RGB10 = 0x8052; const uint GL_RGB12 = 0x8053; const uint GL_RGB16 = 0x8054; const uint GL_RGBA2 = 0x8055; const uint GL_RGBA4 = 0x8056; const uint GL_RGB5_A1 = 0x8057; const uint GL_RGBA8 = 0x8058; const uint GL_RGB10_A2 = 0x8059; const uint GL_RGBA12 = 0x805A; const uint GL_RGBA16 = 0x805B; const uint GL_CLIENT_PIXEL_STORE_BIT = 0x00000001; const uint GL_CLIENT_VERTEX_ARRAY_BIT = 0x00000002; const uint GL_ALL_CLIENT_ATTRIB_BITS = 0xFFFFFFFF; const uint GL_CLIENT_ALL_ATTRIB_BITS = 0xFFFFFFFF; /************************************************************************ * OpenGL 1.2 -> 1.4 constants * Note: Proper OpenGL extension/version checking must be performed to * use these under Windows. ************************************************************************/ /* OpenGL 1.2 */ const uint GL_RESCALE_NORMAL = 0x803A; const uint GL_CLAMP_TO_EDGE = 0x812F; const uint GL_MAX_ELEMENTS_VERTICES = 0x80E8; const uint GL_MAX_ELEMENTS_INDICES = 0x80E9; const uint GL_BGR = 0x80E0; const uint GL_BGRA = 0x80E1; const uint GL_UNSIGNED_BYTE_3_3_2 = 0x8032; const uint GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; const uint GL_UNSIGNED_SHORT_5_6_5 = 0x8363; const uint GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; const uint GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; const uint GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; const uint GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; const uint GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; const uint GL_UNSIGNED_INT_8_8_8_8 = 0x8035; const uint GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; const uint GL_UNSIGNED_INT_10_10_10_2 = 0x8036; const uint GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; const uint GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8; const uint GL_SINGLE_COLOR = 0x81F9; const uint GL_SEPARATE_SPECULAR_COLOR = 0x81FA; const uint GL_TEXTURE_MIN_LOD = 0x813A; const uint GL_TEXTURE_MAX_LOD = 0x813B; const uint GL_TEXTURE_BASE_LEVEL = 0x813C; const uint GL_TEXTURE_MAX_LEVEL = 0x813D; const uint GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12; const uint GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13; const uint GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22; const uint GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23; const uint GL_ALIASED_POINT_SIZE_RANGE = 0x846D; const uint GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; const uint GL_PACK_SKIP_IMAGES = 0x806B; const uint GL_PACK_IMAGE_HEIGHT = 0x806C; const uint GL_UNPACK_SKIP_IMAGES = 0x806D; const uint GL_UNPACK_IMAGE_HEIGHT = 0x806E; const uint GL_TEXTURE_3D = 0x806F; const uint GL_PROXY_TEXTURE_3D = 0x8070; const uint GL_TEXTURE_DEPTH = 0x8071; const uint GL_TEXTURE_WRAP_R = 0x8072; const uint GL_MAX_3D_TEXTURE_SIZE = 0x8073; const uint GL_TEXTURE_BINDING_3D = 0x806A; /* OpenGL 1.3 */ /* multitexture */ const uint GL_TEXTURE0 = 0x84C0; const uint GL_TEXTURE1 = 0x84C1; const uint GL_TEXTURE2 = 0x84C2; const uint GL_TEXTURE3 = 0x84C3; const uint GL_TEXTURE4 = 0x84C4; const uint GL_TEXTURE5 = 0x84C5; const uint GL_TEXTURE6 = 0x84C6; const uint GL_TEXTURE7 = 0x84C7; const uint GL_TEXTURE8 = 0x84C8; const uint GL_TEXTURE9 = 0x84C9; const uint GL_TEXTURE10 = 0x84CA; const uint GL_TEXTURE11 = 0x84CB; const uint GL_TEXTURE12 = 0x84CC; const uint GL_TEXTURE13 = 0x84CD; const uint GL_TEXTURE14 = 0x84CE; const uint GL_TEXTURE15 = 0x84CF; const uint GL_TEXTURE16 = 0x84D0; const uint GL_TEXTURE17 = 0x84D1; const uint GL_TEXTURE18 = 0x84D2; const uint GL_TEXTURE19 = 0x84D3; const uint GL_TEXTURE20 = 0x84D4; const uint GL_TEXTURE21 = 0x84D5; const uint GL_TEXTURE22 = 0x84D6; const uint GL_TEXTURE23 = 0x84D7; const uint GL_TEXTURE24 = 0x84D8; const uint GL_TEXTURE25 = 0x84D9; const uint GL_TEXTURE26 = 0x84DA; const uint GL_TEXTURE27 = 0x84DB; const uint GL_TEXTURE28 = 0x84DC; const uint GL_TEXTURE29 = 0x84DD; const uint GL_TEXTURE30 = 0x84DE; const uint GL_TEXTURE31 = 0x84DF; const uint GL_ACTIVE_TEXTURE = 0x84E0; const uint GL_CLIENT_ACTIVE_TEXTURE = 0x84E1; const uint GL_MAX_TEXTURE_UNITS = 0x84E2; /* texture_cube_map */ const uint GL_NORMAL_MAP = 0x8511; const uint GL_REFLECTION_MAP = 0x8512; const uint GL_TEXTURE_CUBE_MAP = 0x8513; const uint GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; const uint GL_PROXY_TEXTURE_CUBE_MAP = 0x851B; const uint GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; /* texture_compression */ const uint GL_COMPRESSED_ALPHA = 0x84E9; const uint GL_COMPRESSED_LUMINANCE = 0x84EA; const uint GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB; const uint GL_COMPRESSED_INTENSITY = 0x84EC; const uint GL_COMPRESSED_RGB = 0x84ED; const uint GL_COMPRESSED_RGBA = 0x84EE; const uint GL_TEXTURE_COMPRESSION_HINT = 0x84EF; const uint GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0; const uint GL_TEXTURE_COMPRESSED = 0x86A1; const uint GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; const uint GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; /* multisample */ const uint GL_MULTISAMPLE = 0x809D; const uint GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E; const uint GL_SAMPLE_ALPHA_TO_ONE = 0x809F; const uint GL_SAMPLE_COVERAGE = 0x80A0; const uint GL_SAMPLE_BUFFERS = 0x80A8; const uint GL_SAMPLES = 0x80A9; const uint GL_SAMPLE_COVERAGE_VALUE = 0x80AA; const uint GL_SAMPLE_COVERAGE_INVERT = 0x80AB; const uint GL_MULTISAMPLE_BIT = 0x20000000; /* transpose_matrix */ const uint GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3; const uint GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4; const uint GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5; const uint GL_TRANSPOSE_COLOR_MATRIX = 0x84E6; /* texture_env_combine */ const uint GL_COMBINE = 0x8570; const uint GL_COMBINE_RGB = 0x8571; const uint GL_COMBINE_ALPHA = 0x8572; const uint GL_SOURCE0_RGB = 0x8580; const uint GL_SOURCE1_RGB = 0x8581; const uint GL_SOURCE2_RGB = 0x8582; const uint GL_SOURCE0_ALPHA = 0x8588; const uint GL_SOURCE1_ALPHA = 0x8589; const uint GL_SOURCE2_ALPHA = 0x858A; const uint GL_OPERAND0_RGB = 0x8590; const uint GL_OPERAND1_RGB = 0x8591; const uint GL_OPERAND2_RGB = 0x8592; const uint GL_OPERAND0_ALPHA = 0x8598; const uint GL_OPERAND1_ALPHA = 0x8599; const uint GL_OPERAND2_ALPHA = 0x859A; const uint GL_RGB_SCALE = 0x8573; const uint GL_ADD_SIGNED = 0x8574; const uint GL_INTERPOLATE = 0x8575; const uint GL_SUBTRACT = 0x84E7; const uint GL_CONSTANT = 0x8576; const uint GL_PRIMARY_COLOR = 0x8577; const uint GL_PREVIOUS = 0x8578; /* texture_env_dot3 */ const uint GL_DOT3_RGB = 0x86AE; const uint GL_DOT3_RGBA = 0x86AF; /* texture_border_clamp */ const uint GL_CLAMP_TO_BORDER = 0x812D; /* OpenGL 1.4 */ const uint GL_GENERATE_MIPMAP = 0x8191; const uint GL_GENERATE_MIPMAP_HINT = 0x8192; const uint GL_DEPTH_COMPONENT16 = 0x81A5; const uint GL_DEPTH_COMPONENT24 = 0x81A6; const uint GL_DEPTH_COMPONENT32 = 0x81A7; const uint GL_TEXTURE_DEPTH_SIZE = 0x884A; const uint GL_DEPTH_TEXTURE_MODE = 0x884B; const uint GL_TEXTURE_COMPARE_MODE = 0x884C; const uint GL_TEXTURE_COMPARE_FUNC = 0x884D; const uint GL_COMPARE_R_TO_TEXTURE = 0x884E; const uint GL_FOG_COORDINATE_SOURCE = 0x8450; const uint GL_FOG_COORDINATE = 0x8451; const uint GL_FRAGMENT_DEPTH = 0x8452; const uint GL_CURRENT_FOG_COORDINATE = 0x8453; const uint GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454; const uint GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455; const uint GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456; const uint GL_FOG_COORDINATE_ARRAY = 0x8457; const uint GL_POINT_SIZE_MIN = 0x8126; const uint GL_POINT_SIZE_MAX = 0x8127; const uint GL_POINT_FADE_THRESHOLD_SIZE = 0x8128; const uint GL_POINT_DISTANCE_ATTENUATION = 0x8129; const uint GL_COLOR_SUM = 0x8458; const uint GL_CURRENT_SECONDARY_COLOR = 0x8459; const uint GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A; const uint GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B; const uint GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C; const uint GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D; const uint GL_SECONDARY_COLOR_ARRAY = 0x845E; const uint GL_BLEND_DST_RGB = 0x80C8; const uint GL_BLEND_SRC_RGB = 0x80C9; const uint GL_BLEND_DST_ALPHA = 0x80CA; const uint GL_BLEND_SRC_ALPHA = 0x80CB; const uint GL_INCR_WRAP = 0x8507; const uint GL_DECR_WRAP = 0x8508; const uint GL_TEXTURE_FILTER_CONTROL = 0x8500; const uint GL_TEXTURE_LOD_BIAS = 0x8501; const uint GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; const uint GL_MIRRORED_REPEAT = 0x8370; /************************************************************************ * * Function prototypes * ************************************************************************/ /* Miscellaneous */ void glClearIndex( GLfloat c ); void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); void glClear( GLbitfield mask ); void glIndexMask( GLuint mask ); void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); void glAlphaFunc( GLenum func, GLclampf reference ); void glBlendFunc( GLenum sfactor, GLenum dfactor ); void glLogicOp( GLenum opcode ); void glCullFace( GLenum mode ); void glFrontFace( GLenum mode ); void glPointSize( GLfloat size ); void glLineWidth( GLfloat width ); void glLineStipple( GLint factor, GLushort pattern ); void glPolygonMode( GLenum face, GLenum mode ); void glPolygonOffset( GLfloat factor, GLfloat units ); void glPolygonStipple( in GLubyte *mask ); void glGetPolygonStipple( GLubyte *mask ); void glEdgeFlag( GLboolean flag ); void glEdgeFlagv( in GLboolean *flag ); void glScissor( GLint x, GLint y, GLsizei width, GLsizei height); void glClipPlane( GLenum plane, in GLdouble *equation ); void glGetClipPlane( GLenum plane, GLdouble *equation ); void glDrawBuffer( GLenum mode ); void glReadBuffer( GLenum mode ); void glEnable( GLenum cap ); void glDisable( GLenum cap ); GLboolean glIsEnabled( GLenum cap ); void glEnableClientState( GLenum cap ); /* 1.1 */ void glDisableClientState( GLenum cap ); /* 1.1 */ void glGetBooleanv( GLenum pname, GLboolean *params ); void glGetDoublev( GLenum pname, GLdouble *params ); void glGetFloatv( GLenum pname, GLfloat *params ); void glGetIntegerv( GLenum pname, GLint *params ); void glPushAttrib( GLbitfield mask ); void glPopAttrib(); void glPushClientAttrib( GLbitfield mask ); /* 1.1 */ void glPopClientAttrib(); /* 1.1 */ GLint glRenderMode( GLenum mode ); GLenum glGetError(); GLubyte* glGetString( GLenum name ); void glFinish(); void glFlush(); void glHint( GLenum target, GLenum mode ); /* Depth Buffer */ void glClearDepth( GLclampd depth ); void glDepthFunc( GLenum func ); void glDepthMask( GLboolean flag ); void glDepthRange( GLclampd near_val, GLclampd far_val ); /* Accumulation Buffer */ void glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); void glAccum( GLenum op, GLfloat value ); /* Transformation */ void glMatrixMode( GLenum mode ); void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ); void glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ); void glViewport( GLint x, GLint y, GLsizei width, GLsizei height ); void glPushMatrix(); void glPopMatrix(); void glLoadIdentity(); void glLoadMatrixd( in GLdouble *m ); void glLoadMatrixf( in GLfloat *m ); void glMultMatrixd( in GLdouble *m ); void glMultMatrixf( in GLfloat *m ); void glRotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z ); void glRotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ); void glScaled( GLdouble x, GLdouble y, GLdouble z ); void glScalef( GLfloat x, GLfloat y, GLfloat z ); void glTranslated( GLdouble x, GLdouble y, GLdouble z ); void glTranslatef( GLfloat x, GLfloat y, GLfloat z ); /* Display Lists */ GLboolean glIsList( GLuint list ); void glDeleteLists( GLuint list, GLsizei range ); GLuint glGenLists( GLsizei range ); void glNewList( GLuint list, GLenum mode ); void glEndList(); void glCallList( GLuint list ); void glCallLists( GLsizei n, GLenum type, in GLvoid *lists ); void glListBase( GLuint base ); /* Drawing Functions */ void glBegin( GLenum mode ); void glEnd(); void glVertex2d( GLdouble x, GLdouble y ); void glVertex2f( GLfloat x, GLfloat y ); void glVertex2i( GLint x, GLint y ); void glVertex2s( GLshort x, GLshort y ); void glVertex3d( GLdouble x, GLdouble y, GLdouble z ); void glVertex3f( GLfloat x, GLfloat y, GLfloat z ); void glVertex3i( GLint x, GLint y, GLint z ); void glVertex3s( GLshort x, GLshort y, GLshort z ); void glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); void glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); void glVertex4i( GLint x, GLint y, GLint z, GLint w ); void glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); void glVertex2dv( in GLdouble *v ); void glVertex2fv( in GLfloat *v ); void glVertex2iv( in GLint *v ); void glVertex2sv( in GLshort *v ); void glVertex3dv( in GLdouble *v ); void glVertex3fv( in GLfloat *v ); void glVertex3iv( in GLint *v ); void glVertex3sv( in GLshort *v ); void glVertex4dv( in GLdouble *v ); void glVertex4fv( in GLfloat *v ); void glVertex4iv( in GLint *v ); void glVertex4sv( in GLshort *v ); void glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); void glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); void glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); void glNormal3i( GLint nx, GLint ny, GLint nz ); void glNormal3s( GLshort nx, GLshort ny, GLshort nz ); void glNormal3bv( in GLbyte *v ); void glNormal3dv( in GLdouble *v ); void glNormal3fv( in GLfloat *v ); void glNormal3iv( in GLint *v ); void glNormal3sv( in GLshort *v ); void glIndexd( GLdouble c ); void glIndexf( GLfloat c ); void glIndexi( GLint c ); void glIndexs( GLshort c ); void glIndexub( GLubyte c ); /* 1.1 */ void glIndexdv( in GLdouble *c ); void glIndexfv( in GLfloat *c ); void glIndexiv( in GLint *c ); void glIndexsv( in GLshort *c ); void glIndexubv( in GLubyte *c ); /* 1.1 */ void glColor3b( GLbyte red, GLbyte green, GLbyte blue ); void glColor3d( GLdouble red, GLdouble green, GLdouble blue ); void glColor3f( GLfloat red, GLfloat green, GLfloat blue ); void glColor3i( GLint red, GLint green, GLint blue ); void glColor3s( GLshort red, GLshort green, GLshort blue ); void glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); void glColor3ui( GLuint red, GLuint green, GLuint blue ); void glColor3us( GLushort red, GLushort green, GLushort blue ); void glColor4b( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha ); void glColor4d( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ); void glColor4f( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); void glColor4i( GLint red, GLint green, GLint blue, GLint alpha ); void glColor4s( GLshort red, GLshort green, GLshort blue, GLshort alpha ); void glColor4ub( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ); void glColor4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha ); void glColor4us( GLushort red, GLushort green, GLushort blue, GLushort alpha ); void glColor3bv( in GLbyte *v ); void glColor3dv( in GLdouble *v ); void glColor3fv( in GLfloat *v ); void glColor3iv( in GLint *v ); void glColor3sv( in GLshort *v ); void glColor3ubv( in GLubyte *v ); void glColor3uiv( in GLuint *v ); void glColor3usv( in GLushort *v ); void glColor4bv( in GLbyte *v ); void glColor4dv( in GLdouble *v ); void glColor4fv( in GLfloat *v ); void glColor4iv( in GLint *v ); void glColor4sv( in GLshort *v ); void glColor4ubv( in GLubyte *v ); void glColor4uiv( in GLuint *v ); void glColor4usv( in GLushort *v ); void glTexCoord1d( GLdouble s ); void glTexCoord1f( GLfloat s ); void glTexCoord1i( GLint s ); void glTexCoord1s( GLshort s ); void glTexCoord2d( GLdouble s, GLdouble t ); void glTexCoord2f( GLfloat s, GLfloat t ); void glTexCoord2i( GLint s, GLint t ); void glTexCoord2s( GLshort s, GLshort t ); void glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); void glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); void glTexCoord3i( GLint s, GLint t, GLint r ); void glTexCoord3s( GLshort s, GLshort t, GLshort r ); void glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); void glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); void glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); void glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); void glTexCoord1dv( in GLdouble *v ); void glTexCoord1fv( in GLfloat *v ); void glTexCoord1iv( in GLint *v ); void glTexCoord1sv( in GLshort *v ); void glTexCoord2dv( in GLdouble *v ); void glTexCoord2fv( in GLfloat *v ); void glTexCoord2iv( in GLint *v ); void glTexCoord2sv( in GLshort *v ); void glTexCoord3dv( in GLdouble *v ); void glTexCoord3fv( in GLfloat *v ); void glTexCoord3iv( in GLint *v ); void glTexCoord3sv( in GLshort *v ); void glTexCoord4dv( in GLdouble *v ); void glTexCoord4fv( in GLfloat *v ); void glTexCoord4iv( in GLint *v ); void glTexCoord4sv( in GLshort *v ); void glRasterPos2d( GLdouble x, GLdouble y ); void glRasterPos2f( GLfloat x, GLfloat y ); void glRasterPos2i( GLint x, GLint y ); void glRasterPos2s( GLshort x, GLshort y ); void glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); void glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); void glRasterPos3i( GLint x, GLint y, GLint z ); void glRasterPos3s( GLshort x, GLshort y, GLshort z ); void glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); void glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); void glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); void glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); void glRasterPos2dv( in GLdouble *v ); void glRasterPos2fv( in GLfloat *v ); void glRasterPos2iv( in GLint *v ); void glRasterPos2sv( in GLshort *v ); void glRasterPos3dv( in GLdouble *v ); void glRasterPos3fv( in GLfloat *v ); void glRasterPos3iv( in GLint *v ); void glRasterPos3sv( in GLshort *v ); void glRasterPos4dv( in GLdouble *v ); void glRasterPos4fv( in GLfloat *v ); void glRasterPos4iv( in GLint *v ); void glRasterPos4sv( in GLshort *v ); void glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); void glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); void glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); void glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); void glRectdv( in GLdouble *v1, in GLdouble *v2 ); void glRectfv( in GLfloat *v1, in GLfloat *v2 ); void glRectiv( in GLint *v1, in GLint *v2 ); void glRectsv( in GLshort *v1, in GLshort *v2 ); /* Lighting */ void glShadeModel( GLenum mode ); void glLightf( GLenum light, GLenum pname, GLfloat param ); void glLighti( GLenum light, GLenum pname, GLint param ); void glLightfv( GLenum light, GLenum pname, in GLfloat *params ); void glLightiv( GLenum light, GLenum pname, in GLint *params ); void glGetLightfv( GLenum light, GLenum pname, GLfloat *params ); void glGetLightiv( GLenum light, GLenum pname, GLint *params ); void glLightModelf( GLenum pname, GLfloat param ); void glLightModeli( GLenum pname, GLint param ); void glLightModelfv( GLenum pname, in GLfloat *params ); void glLightModeliv( GLenum pname, in GLint *params ); void glMaterialf( GLenum face, GLenum pname, GLfloat param ); void glMateriali( GLenum face, GLenum pname, GLint param ); void glMaterialfv( GLenum face, GLenum pname, in GLfloat *params ); void glMaterialiv( GLenum face, GLenum pname, in GLint *params ); void glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); void glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); void glColorMaterial( GLenum face, GLenum mode ); /* Raster functions */ void glPixelZoom( GLfloat xfactor, GLfloat yfactor ); void glPixelStoref( GLenum pname, GLfloat param ); void glPixelStorei( GLenum pname, GLint param ); void glPixelTransferf( GLenum pname, GLfloat param ); void glPixelTransferi( GLenum pname, GLint param ); void glPixelMapfv( GLenum map, GLint mapsize, in GLfloat *values ); void glPixelMapuiv( GLenum map, GLint mapsize, in GLuint *values ); void glPixelMapusv( GLenum map, GLint mapsize, in GLushort *values ); void glGetPixelMapfv( GLenum map, GLfloat *values ); void glGetPixelMapuiv( GLenum map, GLuint *values ); void glGetPixelMapusv( GLenum map, GLushort *values ); void glBitmap( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte *bitmap ); void glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ); void glDrawPixels( GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ); void glCopyPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ); /* Stenciling */ void glStencilFunc( GLenum func, GLint reference, GLuint mask ); void glStencilMask( GLuint mask ); void glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); void glClearStencil( GLint s ); /* Texture mapping */ void glTexGend( GLenum coord, GLenum pname, GLdouble param ); void glTexGenf( GLenum coord, GLenum pname, GLfloat param ); void glTexGeni( GLenum coord, GLenum pname, GLint param ); void glTexGendv( GLenum coord, GLenum pname, in GLdouble *params ); void glTexGenfv( GLenum coord, GLenum pname, in GLfloat *params ); void glTexGeniv( GLenum coord, GLenum pname, in GLint *params ); void glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); void glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); void glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); void glTexEnvf( GLenum target, GLenum pname, GLfloat param ); void glTexEnvi( GLenum target, GLenum pname, GLint param ); void glTexEnvfv( GLenum target, GLenum pname, in GLfloat *params ); void glTexEnviv( GLenum target, GLenum pname, in GLint *params ); void glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); void glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); void glTexParameterf( GLenum target, GLenum pname, GLfloat param ); void glTexParameteri( GLenum target, GLenum pname, GLint param ); void glTexParameterfv( GLenum target, GLenum pname, in GLfloat *params ); void glTexParameteriv( GLenum target, GLenum pname, in GLint *params ); void glGetTexParameterfv( GLenum target, GLenum pname, GLfloat *params); void glGetTexParameteriv( GLenum target, GLenum pname, GLint *params ); void glGetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat *params ); void glGetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint *params ); void glTexImage1D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, in GLvoid *pixels ); void glTexImage2D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, in GLvoid *pixels ); void glGetTexImage( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels ); /* Evaluators */ void glMap1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, in GLdouble *points ); void glMap1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, in GLfloat *points ); void glMap2d( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, in GLdouble *points ); void glMap2f( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, in GLfloat *points ); void glGetMapdv( GLenum target, GLenum query, GLdouble *v ); void glGetMapfv( GLenum target, GLenum query, GLfloat *v ); void glGetMapiv( GLenum target, GLenum query, GLint *v ); void glEvalCoord1d( GLdouble u ); void glEvalCoord1f( GLfloat u ); void glEvalCoord1dv( in GLdouble *u ); void glEvalCoord1fv( in GLfloat *u ); void glEvalCoord2d( GLdouble u, GLdouble v ); void glEvalCoord2f( GLfloat u, GLfloat v ); void glEvalCoord2dv( in GLdouble *u ); void glEvalCoord2fv( in GLfloat *u ); void glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); void glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); void glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ); void glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ); void glEvalPoint1( GLint i ); void glEvalPoint2( GLint i, GLint j ); void glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); void glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); /* Fog */ void glFogf( GLenum pname, GLfloat param ); void glFogi( GLenum pname, GLint param ); void glFogfv( GLenum pname, in GLfloat *params ); void glFogiv( GLenum pname, in GLint *params ); /* Selection and Feedback */ void glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); void glPassThrough( GLfloat token ); void glSelectBuffer( GLsizei size, GLuint *buffer ); void glInitNames(); void glLoadName( GLuint name ); void glPushName( GLuint name ); void glPopName(); /* OpenGL 1.1 functions */ /* texture objects */ void glGenTextures( GLsizei n, GLuint *textures ); void glDeleteTextures( GLsizei n, in GLuint *textures ); void glBindTexture( GLenum target, GLuint texture ); void glPrioritizeTextures( GLsizei n, in GLuint *textures, in GLclampf *priorities ); GLboolean glAreTexturesResident( GLsizei n, in GLuint *textures, GLboolean *residences ); GLboolean glIsTexture( GLuint texture ); /* texture mapping */ void glTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid *pixels ); void glTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ); void glCopyTexImage1D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border ); void glCopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ); void glCopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ); void glCopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ); /* vertex arrays */ void glVertexPointer( GLint size, GLenum type, GLsizei stride, in GLvoid *ptr ); void glNormalPointer( GLenum type, GLsizei stride, in GLvoid *ptr ); void glColorPointer( GLint size, GLenum type, GLsizei stride, in GLvoid *ptr ); void glIndexPointer( GLenum type, GLsizei stride, in GLvoid *ptr ); void glTexCoordPointer( GLint size, GLenum type, GLsizei stride, in GLvoid *ptr ); void glEdgeFlagPointer( GLsizei stride, in GLvoid *ptr ); void glGetPointerv( GLenum pname, GLvoid **params ); void glArrayElement( GLint i ); void glDrawArrays( GLenum mode, GLint first, GLsizei count ); void glDrawElements( GLenum mode, GLsizei count, GLenum type, in GLvoid *indices ); void glInterleavedArrays( GLenum format, GLsizei stride, in GLvoid *pointer ); /************************************************************************ * OpenGL 1.2 -> 1.4 function pointer types * Note: Proper OpenGL version checking must be performed to use these. ************************************************************************/ /* OpenGL 1.2 */ typedef void (* PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); typedef void (* PFNGLBLENDEQUATIONPROC) (GLenum mode); typedef void (* PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices); typedef void (* PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid *table); typedef void (* PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (* PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); typedef void (* PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid *data); typedef void (* PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); typedef void (* PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid *image); typedef void (* PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *image); typedef void (* PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); typedef void (* PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); typedef void (* PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (* PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (* PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); typedef void (* PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); typedef void (* PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *row, GLvoid *column); typedef void (* PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (* PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (* PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); typedef void (* PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); typedef void (* PFNGLRESETHISTOGRAMPROC) (GLenum target); typedef void (* PFNGLRESETMINMAXPROC) (GLenum target); typedef void (* PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid *pixels); typedef void (* PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *pixels); typedef void (* PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* OpenGL 1.3 */ typedef void (* PFNGLACTIVETEXTUREPROC) (GLenum texture); typedef void (* PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); typedef void (* PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); typedef void (* PFNGLMULTITEXCOORD1DVPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); typedef void (* PFNGLMULTITEXCOORD1FVPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); typedef void (* PFNGLMULTITEXCOORD1IVPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); typedef void (* PFNGLMULTITEXCOORD1SVPROC) (GLenum target, GLshort *v); typedef void (* PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); typedef void (* PFNGLMULTITEXCOORD2DVPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); typedef void (* PFNGLMULTITEXCOORD2FVPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); typedef void (* PFNGLMULTITEXCOORD2IVPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); typedef void (* PFNGLMULTITEXCOORD2SVPROC) (GLenum target, GLshort *v); typedef void (* PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); typedef void (* PFNGLMULTITEXCOORD3DVPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); typedef void (* PFNGLMULTITEXCOORD3FVPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); typedef void (* PFNGLMULTITEXCOORD3IVPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); typedef void (* PFNGLMULTITEXCOORD3SVPROC) (GLenum target, GLshort *v); typedef void (* PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); typedef void (* PFNGLMULTITEXCOORD4DVPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); typedef void (* PFNGLMULTITEXCOORD4FVPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); typedef void (* PFNGLMULTITEXCOORD4IVPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); typedef void (* PFNGLMULTITEXCOORD4SVPROC) (GLenum target, GLshort *v); typedef void (* PFNGLLOADTRANSPOSEMATRIXFPROC) (GLfloat *m); typedef void (* PFNGLLOADTRANSPOSEMATRIXDPROC) (GLdouble *m); typedef void (* PFNGLMULTTRANSPOSEMATRIXFPROC) (GLfloat *m); typedef void (* PFNGLMULTTRANSPOSEMATRIXDPROC) (GLdouble *m); typedef void (* PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); typedef void (* PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); /* OpenGL 1.4 */ typedef void (* PFNGLFOGCOORDFPROC) (GLfloat coord); typedef void (* PFNGLFOGCOORDFVPROC) (GLfloat *coord); typedef void (* PFNGLFOGCOORDDPROC) (GLdouble coord); typedef void (* PFNGLFOGCOORDDVPROC) (GLdouble *coord); typedef void (* PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, GLvoid *pointer); typedef void (* PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void (* PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, GLsizei *count, GLenum type, GLvoid **indices, GLsizei primcount); typedef void (* PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLPOINTPARAMETERFVPROC) (GLenum pname, GLfloat *params); typedef void (* PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); typedef void (* PFNGLSECONDARYCOLOR3BVPROC) (GLbyte *v); typedef void (* PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); typedef void (* PFNGLSECONDARYCOLOR3DVPROC) (GLdouble *v); typedef void (* PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); typedef void (* PFNGLSECONDARYCOLOR3FVPROC) (GLfloat *v); typedef void (* PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); typedef void (* PFNGLSECONDARYCOLOR3IVPROC) (GLint *v); typedef void (* PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); typedef void (* PFNGLSECONDARYCOLOR3SVPROC) (GLshort *v); typedef void (* PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); typedef void (* PFNGLSECONDARYCOLOR3UBVPROC) (GLubyte *v); typedef void (* PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); typedef void (* PFNGLSECONDARYCOLOR3UIVPROC) (GLuint *v); typedef void (* PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); typedef void (* PFNGLSECONDARYCOLOR3USVPROC) (GLushort *v); typedef void (* PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); typedef void (* PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); typedef void (* PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); typedef void (* PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); typedef void (* PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); typedef void (* PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); typedef void (* PFNGLWINDOWPOS2DVPROC) (GLdouble *p); typedef void (* PFNGLWINDOWPOS2FVPROC) (GLfloat *p); typedef void (* PFNGLWINDOWPOS2IVPROC) (GLint *p); typedef void (* PFNGLWINDOWPOS2SVPROC) (GLshort *p); typedef void (* PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void (* PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); typedef void (* PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); typedef void (* PFNGLWINDOWPOS3DVPROC) (GLdouble *p); typedef void (* PFNGLWINDOWPOS3FVPROC) (GLfloat *p); typedef void (* PFNGLWINDOWPOS3IVPROC) (GLint *p); typedef void (* PFNGLWINDOWPOS3SVPROC) (GLshort *p); /************************************************************************ * * Extension Constants * * Note: Proper OpenGL extension checking must be performed to use these. * ************************************************************************/ /*----------------------------------------------------------------------- * ARB *----------------------------------------------------------------------*/ const uint GL_ARB_depth_texture = 1; const uint GL_DEPTH_COMPONENT16_ARB = 0x81A5; const uint GL_DEPTH_COMPONENT24_ARB = 0x81A6; const uint GL_DEPTH_COMPONENT32_ARB = 0x81A7; const uint GL_TEXTURE_DEPTH_SIZE_ARB = 0x884A; const uint GL_DEPTH_TEXTURE_MODE_ARB = 0x884B; const uint GL_ARB_fragment_program = 1; const uint GL_FRAGMENT_PROGRAM_ARB = 0x8804; const uint GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805; const uint GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806; const uint GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807; const uint GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808; const uint GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809; const uint GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A; const uint GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B; const uint GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C; const uint GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D; const uint GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E; const uint GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F; const uint GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810; const uint GL_MAX_TEXTURE_COORDS_ARB = 0x8871; const uint GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; /* OpenGL 1.2 imaging subset */ const uint GL_ARB_imaging = 1; const uint GL_CONSTANT_COLOR = 0x8001; const uint GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; const uint GL_CONSTANT_ALPHA = 0x8003; const uint GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; const uint GL_BLEND_COLOR = 0x8005; const uint GL_FUNC_ADD = 0x8006; const uint GL_MIN = 0x8007; const uint GL_MAX = 0x8008; const uint GL_BLEND_EQUATION = 0x8009; const uint GL_FUNC_SUBTRACT = 0x800A; const uint GL_FUNC_REVERSE_SUBTRACT = 0x800B; const uint GL_CONVOLUTION_1D = 0x8010; const uint GL_CONVOLUTION_2D = 0x8011; const uint GL_SEPARABLE_2D = 0x8012; const uint GL_CONVOLUTION_BORDER_MODE = 0x8013; const uint GL_CONVOLUTION_FILTER_SCALE = 0x8014; const uint GL_CONVOLUTION_FILTER_BIAS = 0x8015; const uint GL_REDUCE = 0x8016; const uint GL_CONVOLUTION_FORMAT = 0x8017; const uint GL_CONVOLUTION_WIDTH = 0x8018; const uint GL_CONVOLUTION_HEIGHT = 0x8019; const uint GL_MAX_CONVOLUTION_WIDTH = 0x801A; const uint GL_MAX_CONVOLUTION_HEIGHT = 0x801B; const uint GL_POST_CONVOLUTION_RED_SCALE = 0x801C; const uint GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D; const uint GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E; const uint GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F; const uint GL_POST_CONVOLUTION_RED_BIAS = 0x8020; const uint GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021; const uint GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022; const uint GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023; const uint GL_HISTOGRAM = 0x8024; const uint GL_PROXY_HISTOGRAM = 0x8025; const uint GL_HISTOGRAM_WIDTH = 0x8026; const uint GL_HISTOGRAM_FORMAT = 0x8027; const uint GL_HISTOGRAM_RED_SIZE = 0x8028; const uint GL_HISTOGRAM_GREEN_SIZE = 0x8029; const uint GL_HISTOGRAM_BLUE_SIZE = 0x802A; const uint GL_HISTOGRAM_ALPHA_SIZE = 0x802B; const uint GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C; const uint GL_HISTOGRAM_SINK = 0x802D; const uint GL_MINMAX = 0x802E; const uint GL_MINMAX_FORMAT = 0x802F; const uint GL_MINMAX_SINK = 0x8030; const uint GL_TABLE_TOO_LARGE = 0x8031; const uint GL_COLOR_MATRIX = 0x80B1; const uint GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2; const uint GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3; const uint GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4; const uint GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5; const uint GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6; const uint GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7; const uint GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8; const uint GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9; const uint GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA; const uint GL_POST_COLOR_MATIX_ALPHA_BIAS = 0x80BB; const uint GL_COLOR_TABLE = 0x80D0; const uint GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1; const uint GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2; const uint GL_PROXY_COLOR_TABLE = 0x80D3; const uint GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4; const uint GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5; const uint GL_COLOR_TABLE_SCALE = 0x80D6; const uint GL_COLOR_TABLE_BIAS = 0x80D7; const uint GL_COLOR_TABLE_FORMAT = 0x80D8; const uint GL_COLOR_TABLE_WIDTH = 0x80D9; const uint GL_COLOR_TABLE_RED_SIZE = 0x80DA; const uint GL_COLOR_TABLE_GREEN_SIZE = 0x80DB; const uint GL_COLOR_TABLE_BLUE_SIZE = 0x80DC; const uint GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD; const uint GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE; const uint GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF; const uint GL_IGNORE_BORDER = 0x8150; const uint GL_CONSTANT_BORDER = 0x8151; const uint GL_WRAP_BORDER = 0x8152; const uint GL_REPLICATE_BORDER = 0x8153; const uint GL_CONVOLUTION_BORDER_COLOR = 0x8154; const uint GL_ARB_matrix_palette = 1; const uint GL_MATRIX_PALETTE_ARB = 0x8840; const uint GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841; const uint GL_MAX_PALETTE_MATRICES_ARB = 0x8842; const uint GL_CURRENT_PALETTE_MATRIX_ARB = 0x8843; const uint GL_MATRIX_INDEX_ARRAY_ARB = 0x8844; const uint GL_CURRENT_MATRIX_INDEX_ARB = 0x8845; const uint GL_MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846; const uint GL_MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847; const uint GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848; const uint GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849; const uint GL_ARB_multisample = 1; const uint GL_MULTISAMPLE_ARB = 0x809D; const uint GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E; const uint GL_SAMPLE_ALPHA_TO_ONE_ARB = 0x809F; const uint GL_SAMPLE_COVERAGE_ARB = 0x80A0; const uint GL_SAMPLE_BUFFERS_ARB = 0x80A8; const uint GL_SAMPLES_ARB = 0x80A9; const uint GL_SAMPLE_COVERAGE_VALUE_ARB = 0x80AA; const uint GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB; const uint GL_MULTISAMPLE_BIT_ARB = 0x20000000; const uint GL_ARB_multitexture = 1; const uint GL_TEXTURE0_ARB = 0x84C0; const uint GL_TEXTURE1_ARB = 0x84C1; const uint GL_TEXTURE2_ARB = 0x84C2; const uint GL_TEXTURE3_ARB = 0x84C3; const uint GL_TEXTURE4_ARB = 0x84C4; const uint GL_TEXTURE5_ARB = 0x84C5; const uint GL_TEXTURE6_ARB = 0x84C6; const uint GL_TEXTURE7_ARB = 0x84C7; const uint GL_TEXTURE8_ARB = 0x84C8; const uint GL_TEXTURE9_ARB = 0x84C9; const uint GL_TEXTURE10_ARB = 0x84CA; const uint GL_TEXTURE11_ARB = 0x84CB; const uint GL_TEXTURE12_ARB = 0x84CC; const uint GL_TEXTURE13_ARB = 0x84CD; const uint GL_TEXTURE14_ARB = 0x84CE; const uint GL_TEXTURE15_ARB = 0x84CF; const uint GL_TEXTURE16_ARB = 0x84D0; const uint GL_TEXTURE17_ARB = 0x84D1; const uint GL_TEXTURE18_ARB = 0x84D2; const uint GL_TEXTURE19_ARB = 0x84D3; const uint GL_TEXTURE20_ARB = 0x84D4; const uint GL_TEXTURE21_ARB = 0x84D5; const uint GL_TEXTURE22_ARB = 0x84D6; const uint GL_TEXTURE23_ARB = 0x84D7; const uint GL_TEXTURE24_ARB = 0x84D8; const uint GL_TEXTURE25_ARB = 0x84D9; const uint GL_TEXTURE26_ARB = 0x84DA; const uint GL_TEXTURE27_ARB = 0x84DB; const uint GL_TEXTURE28_ARB = 0x84DC; const uint GL_TEXTURE29_ARB = 0x84DD; const uint GL_TEXTURE30_ARB = 0x84DE; const uint GL_TEXTURE31_ARB = 0x84DF; const uint GL_ACTIVE_TEXTURE_ARB = 0x84E0; const uint GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1; const uint GL_MAX_TEXTURE_UNITS_ARB = 0x84E2; const uint GL_ARB_point_parameters = 1; const uint GL_POINT_SIZE_MIN_ARB = 0x8126; const uint GL_POINT_SIZE_MIN_EXT = 0x8126; const uint GL_POINT_SIZE_MIN_SGIS = 0x8126; const uint GL_POINT_SIZE_MAX_ARB = 0x8127; const uint GL_POINT_SIZE_MAX_EXT = 0x8127; const uint GL_POINT_SIZE_MAX_SGIS = 0x8127; const uint GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128; const uint GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128; const uint GL_POINT_FADE_THRESHOLD_SIZE_SGIS = 0x8128; const uint GL_POINT_DISTANCE_ATTENUATION_ARB = 0x8129; const uint GL_DISTANCE_ATTENUATION_EXT = 0x8129; const uint GL_DISTANCE_ATTENUATION_SGIS = 0x8129; const uint GL_ARB_shadow = 1; const uint GL_TEXTURE_COMPARE_MODE_ARB = 0x884C; const uint GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D; const uint GL_COMPARE_R_TO_TEXTURE_ARB = 0x884E; const uint GL_ARB_shadow_ambient = 1; const uint GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF; const uint GL_ARB_texture_border_clamp = 1; const uint GL_CLAMP_TO_BORDER_ARB = 0x812D; const uint GL_ARB_texture_compression = 1; const uint GL_COMPRESSED_ALPHA_ARB = 0x84E9; const uint GL_COMPRESSED_LUMINANCE_ARB = 0x84EA; const uint GL_COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB; const uint GL_COMPRESSED_INTENSITY_ARB = 0x84EC; const uint GL_COMPRESSED_RGB_ARB = 0x84ED; const uint GL_COMPRESSED_RGBA_ARB = 0x84EE; const uint GL_TEXTURE_COMPRESSION_HINT_ARB = 0x84EF; const uint GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0; const uint GL_TEXTURE_COMPRESSED_ARB = 0x86A1; const uint GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2; const uint GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3; const uint GL_ARB_texture_cube_map = 1; const uint GL_NORMAL_MAP_ARB = 0x8511; const uint GL_REFLECTION_MAP_ARB = 0x8512; const uint GL_TEXTURE_CUBE_MAP_ARB = 0x8513; const uint GL_TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A; const uint GL_PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B; const uint GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C; const uint GL_ARB_texture_env_add = 1; const uint GL_ARB_texture_env_combine = 1; const uint GL_COMBINE_ARB = 0x8570; const uint GL_COMBINE_RGB_ARB = 0x8571; const uint GL_COMBINE_ALPHA_ARB = 0x8572; const uint GL_SOURCE0_RGB_ARB = 0x8580; const uint GL_SOURCE1_RGB_ARB = 0x8581; const uint GL_SOURCE2_RGB_ARB = 0x8582; const uint GL_SOURCE0_ALPHA_ARB = 0x8588; const uint GL_SOURCE1_ALPHA_ARB = 0x8589; const uint GL_SOURCE2_ALPHA_ARB = 0x858A; const uint GL_OPERAND0_RGB_ARB = 0x8590; const uint GL_OPERAND1_RGB_ARB = 0x8591; const uint GL_OPERAND2_RGB_ARB = 0x8592; const uint GL_OPERAND0_ALPHA_ARB = 0x8598; const uint GL_OPERAND1_ALPHA_ARB = 0x8599; const uint GL_OPERAND2_ALPHA_ARB = 0x859A; const uint GL_RGB_SCALE_ARB = 0x8573; const uint GL_ADD_SIGNED_ARB = 0x8574; const uint GL_INTERPOLATE_ARB = 0x8575; const uint GL_SUBTRACT_ARB = 0x84E7; const uint GL_CONSTANT_ARB = 0x8576; const uint GL_PRIMARY_COLOR_ARB = 0x8577; const uint GL_PREVIOUS_ARB = 0x8578; const uint GL_ARB_texture_env_crossbar = 1; const uint GL_ARB_texture_env_dot3 = 1; const uint GL_DOT3_RGB_ARB = 0x86AE; const uint GL_DOT3_RGBA_ARB = 0x86AF; const uint GL_ARB_texture_mirrored_repeat = 1; const uint GL_MIRRORED_REPEAT_ARB = 0x8370; const uint GL_ARB_transpose_matrix = 1; const uint GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3; const uint GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4; const uint GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5; const uint GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6; const uint GL_ARB_vertex_blend = 1; const uint GL_MAX_VERTEX_UNITS_ARB = 0x86A4; const uint GL_ACTIVE_VERTEX_UNITS_ARB = 0x86A5; const uint GL_WEIGHT_SUM_UNITY_ARB = 0x86A6; const uint GL_VERTEX_BLEND_ARB = 0x86A7; const uint GL_CURRENT_WEIGHT_ARB = 0x86A8; const uint GL_WEIGHT_ARRAY_TYPE_ARB = 0x86A9; const uint GL_WEIGHT_ARRAY_STRIDE_ARB = 0x86AA; const uint GL_WEIGHT_ARRAY_SIZE_ARB = 0x86AB; const uint GL_WEIGHT_ARRAY_POINTER_ARB = 0x86AC; const uint GL_WEIGHT_ARRAY_ARB = 0x86AD; const uint GL_MODELVIEW0_ARB = 0x1700; const uint GL_MODELVIEW1_ARB = 0x850A; const uint GL_MODELVIEW2_ARB = 0x8722; const uint GL_MODELVIEW3_ARB = 0x8723; const uint GL_MODELVIEW4_ARB = 0x8724; const uint GL_MODELVIEW5_ARB = 0x8725; const uint GL_MODELVIEW6_ARB = 0x8726; const uint GL_MODELVIEW7_ARB = 0x8727; const uint GL_MODELVIEW8_ARB = 0x8728; const uint GL_MODELVIEW9_ARB = 0x8729; const uint GL_MODELVIEW10_ARB = 0x872A; const uint GL_MODELVIEW11_ARB = 0x872B; const uint GL_MODELVIEW12_ARB = 0x872C; const uint GL_MODELVIEW13_ARB = 0x872D; const uint GL_MODELVIEW14_ARB = 0x872E; const uint GL_MODELVIEW15_ARB = 0x872F; const uint GL_MODELVIEW16_ARB = 0x8730; const uint GL_MODELVIEW17_ARB = 0x8731; const uint GL_MODELVIEW18_ARB = 0x8732; const uint GL_MODELVIEW19_ARB = 0x8733; const uint GL_MODELVIEW20_ARB = 0x8734; const uint GL_MODELVIEW21_ARB = 0x8735; const uint GL_MODELVIEW22_ARB = 0x8736; const uint GL_MODELVIEW23_ARB = 0x8737; const uint GL_MODELVIEW24_ARB = 0x8738; const uint GL_MODELVIEW25_ARB = 0x8739; const uint GL_MODELVIEW26_ARB = 0x873A; const uint GL_MODELVIEW27_ARB = 0x873B; const uint GL_MODELVIEW28_ARB = 0x873C; const uint GL_MODELVIEW29_ARB = 0x873D; const uint GL_MODELVIEW30_ARB = 0x873E; const uint GL_MODELVIEW31_ARB = 0x873F; const uint GL_ARB_vertex_buffer_object = 1; const uint GL_ARRAY_BUFFER_ARB = 0x8892; const uint GL_ELEMENT_ARRAY_BUFFER_ARB = 0x8893; const uint GL_ARRAY_BUFFER_BINDING_ARB = 0x8894; const uint GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895; const uint GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896; const uint GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897; const uint GL_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898; const uint GL_INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899; const uint GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A; const uint GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B; const uint GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C; const uint GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D; const uint GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E; const uint GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F; const uint GL_STREAM_DRAW_ARB = 0x88E0; const uint GL_STREAM_READ_ARB = 0x88E1; const uint GL_STREAM_COPY_ARB = 0x88E2; const uint GL_STATIC_DRAW_ARB = 0x88E4; const uint GL_STATIC_READ_ARB = 0x88E5; const uint GL_STATIC_COPY_ARB = 0x88E6; const uint GL_DYNAMIC_DRAW_ARB = 0x88E8; const uint GL_DYNAMIC_READ_ARB = 0x88E9; const uint GL_DYNAMIC_COPY_ARB = 0x88EA; const uint GL_READ_ONLY_ARB = 0x88B8; const uint GL_WRITE_ONLY_ARB = 0x88B9; const uint GL_READ_WRITE_ARB = 0x88BA; const uint GL_BUFFER_SIZE_ARB = 0x8764; const uint GL_BUFFER_USAGE_ARB = 0x8765; const uint GL_BUFFER_ACCESS_ARB = 0x88BB; const uint GL_BUFFER_MAPPED_ARB = 0x88BC; const uint GL_BUFFER_MAP_POINTER_ARB = 0x88BD; const uint GL_ARB_vertex_program = 1; const uint GL_VERTEX_PROGRAM_ARB = 0x8620; const uint GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642; const uint GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643; const uint GL_COLOR_SUM_ARB = 0x8458; const uint GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875; const uint GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622; const uint GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623; const uint GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624; const uint GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625; const uint GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A; const uint GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626; const uint GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645; const uint GL_PROGRAM_LENGTH_ARB = 0x8627; const uint GL_PROGRAM_FORMAT_ARB = 0x8876; const uint GL_PROGRAM_BINDING_ARB = 0x8677; const uint GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0; const uint GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1; const uint GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2; const uint GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3; const uint GL_PROGRAM_TEMPORARIES_ARB = 0x88A4; const uint GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5; const uint GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6; const uint GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7; const uint GL_PROGRAM_PARAMETERS_ARB = 0x88A8; const uint GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9; const uint GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA; const uint GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB; const uint GL_PROGRAM_ATTRIBS_ARB = 0x88AC; const uint GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD; const uint GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE; const uint GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF; const uint GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0; const uint GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1; const uint GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2; const uint GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3; const uint GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4; const uint GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5; const uint GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6; const uint GL_PROGRAM_STRING_ARB = 0x8628; const uint GL_PROGRAM_ERROR_POSITION_ARB = 0x864B; const uint GL_CURRENT_MATRIX_ARB = 0x8641; const uint GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7; const uint GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640; const uint GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869; const uint GL_MAX_PROGRAM_MATRICES_ARB = 0x862F; const uint GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E; const uint GL_PROGRAM_ERROR_STRING_ARB = 0x8874; const uint GL_MATRIX0_ARB = 0x88C0; const uint GL_MATRIX1_ARB = 0x88C1; const uint GL_MATRIX2_ARB = 0x88C2; const uint GL_MATRIX3_ARB = 0x88C3; const uint GL_MATRIX4_ARB = 0x88C4; const uint GL_MATRIX5_ARB = 0x88C5; const uint GL_MATRIX6_ARB = 0x88C6; const uint GL_MATRIX7_ARB = 0x88C7; const uint GL_MATRIX8_ARB = 0x88C8; const uint GL_MATRIX9_ARB = 0x88C9; const uint GL_MATRIX10_ARB = 0x88CA; const uint GL_MATRIX11_ARB = 0x88CB; const uint GL_MATRIX12_ARB = 0x88CC; const uint GL_MATRIX13_ARB = 0x88CD; const uint GL_MATRIX14_ARB = 0x88CE; const uint GL_MATRIX15_ARB = 0x88CF; const uint GL_MATRIX16_ARB = 0x88D0; const uint GL_MATRIX17_ARB = 0x88D1; const uint GL_MATRIX18_ARB = 0x88D2; const uint GL_MATRIX19_ARB = 0x88D3; const uint GL_MATRIX20_ARB = 0x88D4; const uint GL_MATRIX21_ARB = 0x88D5; const uint GL_MATRIX22_ARB = 0x88D6; const uint GL_MATRIX23_ARB = 0x88D7; const uint GL_MATRIX24_ARB = 0x88D8; const uint GL_MATRIX25_ARB = 0x88D9; const uint GL_MATRIX26_ARB = 0x88DA; const uint GL_MATRIX27_ARB = 0x88DB; const uint GL_MATRIX28_ARB = 0x88DC; const uint GL_MATRIX29_ARB = 0x88DD; const uint GL_MATRIX30_ARB = 0x88DE; const uint GL_MATRIX31_ARB = 0x88DF; const uint GL_ARB_window_pos = 1; /*----------------------------------------------------------------------- * EXT *----------------------------------------------------------------------*/ const uint GL_EXT_422_pixels = 1; const uint GL_422_EXT = 0x80CC; const uint GL_422_REV_EXT = 0x80CD; const uint GL_422_AVERAGE_EXT = 0x80CE; const uint GL_422_REV_AVERAGE_EXT = 0x80CF; const uint GL_EXT_abgr = 1; const uint GL_ABGR_EXT = 0x8000; const uint GL_EXT_bgra = 1; const uint GL_BGR_EXT = 0x80E0; const uint GL_BGRA_EXT = 0x80E1; const uint GL_EXT_blend_color = 1; const uint GL_CONSTANT_COLOR_EXT = 0x8001; const uint GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002; const uint GL_CONSTANT_ALPHA_EXT = 0x8003; const uint GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004; const uint GL_BLEND_COLOR_EXT = 0x8005; const uint GL_EXT_blend_func_separate = 1; const uint GL_BLEND_DST_RGB_EXT = 0x80C8; const uint GL_BLEND_SRC_RGB_EXT = 0x80C9; const uint GL_BLEND_DST_ALPHA_EXT = 0x80CA; const uint GL_BLEND_SRC_ALPHA_EXT = 0x80CB; const uint GL_EXT_blend_logic_op = 1; const uint GL_EXT_blend_minmax = 1; const uint GL_FUNC_ADD_EXT = 0x8006; const uint GL_MIN_EXT = 0x8007; const uint GL_MAX_EXT = 0x8008; const uint GL_BLEND_EQUATION_EXT = 0x8009; const uint GL_EXT_blend_subtract = 1; const uint GL_FUNC_SUBTRACT_EXT = 0x800A; const uint GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B; const uint GL_EXT_clip_volume_hint = 1; const uint GL_CLIP_VOLUME_CLIPPING_HINT_EXT = 0x80F0; const uint GL_EXT_cmyka = 1; const uint GL_CMYK_EXT = 0x800C; const uint GL_CMYKA_EXT = 0x800D; const uint GL_PACK_CMYK_HINT_EXT = 0x800E; const uint GL_UNPACK_CMYK_HINT_EXT = 0x800F; const uint GL_EXT_color_subtable = 1; const uint GL_EXT_compiled_vertex_array = 1; const uint GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8; const uint GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9; const uint GL_EXT_convolution = 1; const uint GL_CONVOLUTION_1D_EXT = 0x8010; const uint GL_CONVOLUTION_2D_EXT = 0x8011; const uint GL_SEPARABLE_2D_EXT = 0x8012; const uint GL_CONVOLUTION_BORDER_MODE_EXT = 0x8013; const uint GL_CONVOLUTION_FILTER_SCALE_EXT = 0x8014; const uint GL_CONVOLUTION_FILTER_BIAS_EXT = 0x8015; const uint GL_REDUCE_EXT = 0x8016; const uint GL_CONVOLUTION_FORMAT_EXT = 0x8017; const uint GL_CONVOLUTION_WIDTH_EXT = 0x8018; const uint GL_CONVOLUTION_HEIGHT_EXT = 0x8019; const uint GL_MAX_CONVOLUTION_WIDTH_EXT = 0x801A; const uint GL_MAX_CONVOLUTION_HEIGHT_EXT = 0x801B; const uint GL_POST_CONVOLUTION_RED_SCALE_EXT = 0x801C; const uint GL_POST_CONVOLUTION_GREEN_SCALE_EXT = 0x801D; const uint GL_POST_CONVOLUTION_BLUE_SCALE_EXT = 0x801E; const uint GL_POST_CONVOLUTION_ALPHA_SCALE_EXT = 0x801F; const uint GL_POST_CONVOLUTION_RED_BIAS_EXT = 0x8020; const uint GL_POST_CONVOLUTION_GREEN_BIAS_EXT = 0x8021; const uint GL_POST_CONVOLUTION_BLUE_BIAS_EXT = 0x8022; const uint GL_POST_CONVOLUTION_ALPHA_BIAS_EXT = 0x8023; const uint GL_EXT_coordinate_frame = 1; const uint GL_TANGENT_ARRAY_EXT = 0x8439; const uint GL_BINORMAL_ARRAY_EXT = 0x843A; const uint GL_CURRENT_TANGENT_EXT = 0x843B; const uint GL_CURRENT_BINORMAL_EXT = 0x843C; const uint GL_TANGENT_ARRAY_TYPE_EXT = 0x843E; const uint GL_TANGENT_ARRAY_STRIDE_EXT = 0x843F; const uint GL_BINORMAL_ARRAY_TYPE_EXT = 0x8440; const uint GL_BINORMAL_ARRAY_STRIDE_EXT = 0x8441; const uint GL_TANGENT_ARRAY_POINTER_EXT = 0x8442; const uint GL_BINORMAL_ARRAY_POINTER_EXT = 0x8443; const uint GL_MAP1_TANGENT_EXT = 0x8444; const uint GL_MAP2_TANGENT_EXT = 0x8445; const uint GL_MAP1_BINORMAL_EXT = 0x8446; const uint GL_MAP2_BINORMAL_EXT = 0x8447; const uint GL_EXT_copy_texture = 1; const uint GL_EXT_cull_vertex = 1; const uint GL_CULL_VERTEX_EXT = 0x81AA; const uint GL_CULL_VERTEX_EYE_POSITION_EXT = 0x81AB; const uint GL_CULL_VERTEX_OBJECT_POSITION_EXT = 0x81AC; const uint GL_EXT_draw_range_elements = 1; const uint GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8; const uint GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9; const uint GL_EXT_fog_coord = 1; const uint GL_FOG_COORDINATE_SOURCE_EXT = 0x8450; const uint GL_FOG_COORDINATE_EXT = 0x8451; const uint GL_FRAGMENT_DEPTH_EXT = 0x8452; const uint GL_CURRENT_FOG_COORDINATE_EXT = 0x8453; const uint GL_FOG_COORDINATE_ARRAY_TYPE_EXT = 0x8454; const uint GL_FOG_COORDINATE_ARRAY_STRIDE_EXT = 0x8455; const uint GL_FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456; const uint GL_FOG_COORDINATE_ARRAY_EXT = 0x8457; const uint GL_EXT_histogram = 1; const uint GL_HISTOGRAM_EXT = 0x8024; const uint GL_PROXY_HISTOGRAM_EXT = 0x8025; const uint GL_HISTOGRAM_WIDTH_EXT = 0x8026; const uint GL_HISTOGRAM_FORMAT_EXT = 0x8027; const uint GL_HISTOGRAM_RED_SIZE_EXT = 0x8028; const uint GL_HISTOGRAM_GREEN_SIZE_EXT = 0x8029; const uint GL_HISTOGRAM_BLUE_SIZE_EXT = 0x802A; const uint GL_HISTOGRAM_ALPHA_SIZE_EXT = 0x802B; const uint GL_HISTOGRAM_LUMINANCE_SIZE_EXT = 0x802C; const uint GL_HISTOGRAM_SINK_EXT = 0x802D; const uint GL_MINMAX_EXT = 0x802E; const uint GL_MINMAX_FORMAT_EXT = 0x802F; const uint GL_MINMAX_SINK_EXT = 0x8030; const uint GL_TABLE_TOO_LARGE_EXT = 0x8031; const uint GL_EXT_index_array_formats = 1; const uint GL_IUI_V2F_EXT = 0x81AD; const uint GL_IUI_V3F_EXT = 0x81AE; const uint GL_IUI_N3F_V2F_EXT = 0x81AF; const uint GL_IUI_N3F_V3F_EXT = 0x81B0; const uint GL_T2F_IUI_V2F_EXT = 0x81B1; const uint GL_T2F_IUI_V3F_EXT = 0x81B2; const uint GL_T2F_IUI_N3F_V2F_EXT = 0x81B3; const uint GL_T2F_IUI_N3F_V3F_EXT = 0x81B4; const uint GL_EXT_index_func = 1; const uint GL_INDEX_TEST_EXT = 0x81B5; const uint GL_INDEX_TEST_FUNC_EXT = 0x81B6; const uint GL_INDEX_TEST_REF_EXT = 0x81B7; const uint GL_EXT_index_material = 1; const uint GL_INDEX_MATERIAL_EXT = 0x81B8; const uint GL_INDEX_MATERIAL_PARAMETER_EXT = 0x81B9; const uint GL_INDEX_MATERIAL_FACE_EXT = 0x81BA; const uint GL_EXT_index_texture = 1; const uint GL_EXT_light_texture = 1; const uint GL_FRAGMENT_MATERIAL_EXT = 0x8349; const uint GL_FRAGMENT_NORMAL_EXT = 0x834A; const uint GL_FRAGMENT_COLOR_EXT = 0x834C; const uint GL_ATTENUATION_EXT = 0x834D; const uint GL_SHADOW_ATTENUATION_EXT = 0x834E; const uint GL_TEXTURE_APPLICATION_MODE_EXT = 0x834F; const uint GL_TEXTURE_LIGHT_EXT = 0x8350; const uint GL_TEXTURE_MATERIAL_FACE_EXT = 0x8351; const uint GL_TEXTURE_MATERIAL_PARAMETER_EXT = 0x8352; /* reuse GL_FRAGMENT_DEPTH_EXT */ const uint GL_EXT_misc_attribute = 1; const uint GL_EXT_multi_draw_arrays = 1; const uint GL_EXT_multisample = 1; const uint GL_MULTISAMPLE_EXT = 0x809D; const uint GL_SAMPLE_ALPHA_TO_MASK_EXT = 0x809E; const uint GL_SAMPLE_ALPHA_TO_ONE_EXT = 0x809F; const uint GL_SAMPLE_MASK_EXT = 0x80A0; const uint GL_1PASS_EXT = 0x80A1; const uint GL_2PASS_0_EXT = 0x80A2; const uint GL_2PASS_1_EXT = 0x80A3; const uint GL_4PASS_0_EXT = 0x80A4; const uint GL_4PASS_1_EXT = 0x80A5; const uint GL_4PASS_2_EXT = 0x80A6; const uint GL_4PASS_3_EXT = 0x80A7; const uint GL_SAMPLE_BUFFERS_EXT = 0x80A8; const uint GL_SAMPLES_EXT = 0x80A9; const uint GL_SAMPLE_MASK_VALUE_EXT = 0x80AA; const uint GL_SAMPLE_MASK_INVERT_EXT = 0x80AB; const uint GL_SAMPLE_PATTERN_EXT = 0x80AC; const uint GL_MULTISAMPLE_BIT_EXT = 0x20000000; const uint GL_EXT_packed_pixels = 1; const uint GL_UNSIGNED_BYTE_3_3_2_EXT = 0x8032; const uint GL_UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033; const uint GL_UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034; const uint GL_UNSIGNED_INT_8_8_8_8_EXT = 0x8035; const uint GL_UNSIGNED_INT_10_10_10_2_EXT = 0x8036; const uint GL_EXT_paletted_texture = 1; const uint GL_COLOR_INDEX1_EXT = 0x80E2; const uint GL_COLOR_INDEX2_EXT = 0x80E3; const uint GL_COLOR_INDEX4_EXT = 0x80E4; const uint GL_COLOR_INDEX8_EXT = 0x80E5; const uint GL_COLOR_INDEX12_EXT = 0x80E6; const uint GL_COLOR_INDEX16_EXT = 0x80E7; const uint GL_TEXTURE_INDEX_SIZE_EXT = 0x80ED; const uint GL_EXT_pixel_transform = 1; const uint GL_PIXEL_TRANSFORM_2D_EXT = 0x8330; const uint GL_PIXEL_MAG_FILTER_EXT = 0x8331; const uint GL_PIXEL_MIN_FILTER_EXT = 0x8332; const uint GL_PIXEL_CUBIC_WEIGHT_EXT = 0x8333; const uint GL_CUBIC_EXT = 0x8334; const uint GL_AVERAGE_EXT = 0x8335; const uint GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8336; const uint GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8337; const uint GL_PIXEL_TRANSFORM_2D_MATRIX_EXT = 0x8338; const uint GL_EXT_pixel_transform_color_table = 1; const uint GL_EXT_polygon_offset = 1; const uint GL_POLYGON_OFFSET_EXT = 0x8037; const uint GL_POLYGON_OFFSET_FACTOR_EXT = 0x8038; const uint GL_POLYGON_OFFSET_BIAS_EXT = 0x8039; const uint GL_EXT_rescale_normal = 1; const uint GL_RESCALE_NORMAL_EXT = 0x803A; const uint GL_EXT_secondary_color = 1; const uint GL_COLOR_SUM_EXT = 0x8458; const uint GL_CURRENT_SECONDARY_COLOR_EXT = 0x8459; const uint GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A; const uint GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B; const uint GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C; const uint GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D; const uint GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E; const uint GL_EXT_separate_specular_color = 1; const uint GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8; const uint GL_SINGLE_COLOR_EXT = 0x81F9; const uint GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA; const uint GL_EXT_shadow_funcs = 1; const uint GL_EXT_shared_texture_palette = 1; const uint GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; const uint GL_EXT_stencil_two_side = 1; const uint GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910; const uint GL_ACTIVE_STENCIL_FACE_EXT = 0x8911; const uint GL_EXT_stencil_wrap = 1; const uint GL_INCR_WRAP_EXT = 0x8507; const uint GL_DECR_WRAP_EXT = 0x8508; const uint GL_EXT_subtexture = 1; const uint GL_EXT_texture = 1; const uint GL_ALPHA4_EXT = 0x803B; const uint GL_ALPHA8_EXT = 0x803C; const uint GL_ALPHA12_EXT = 0x803D; const uint GL_ALPHA16_EXT = 0x803E; const uint GL_LUMINANCE4_EXT = 0x803F; const uint GL_LUMINANCE8_EXT = 0x8040; const uint GL_LUMINANCE12_EXT = 0x8041; const uint GL_LUMINANCE16_EXT = 0x8042; const uint GL_LUMINANCE4_ALPHA4_EXT = 0x8043; const uint GL_LUMINANCE6_ALPHA2_EXT = 0x8044; const uint GL_LUMINANCE8_ALPHA8_EXT = 0x8045; const uint GL_LUMINANCE12_ALPHA4_EXT = 0x8046; const uint GL_LUMINANCE12_ALPHA12_EXT = 0x8047; const uint GL_LUMINANCE16_ALPHA16_EXT = 0x8048; const uint GL_INTENSITY_EXT = 0x8049; const uint GL_INTENSITY4_EXT = 0x804A; const uint GL_INTENSITY8_EXT = 0x804B; const uint GL_INTENSITY12_EXT = 0x804C; const uint GL_INTENSITY16_EXT = 0x804D; const uint GL_RGB2_EXT = 0x804E; const uint GL_RGB4_EXT = 0x804F; const uint GL_RGB5_EXT = 0x8050; const uint GL_RGB8_EXT = 0x8051; const uint GL_RGB10_EXT = 0x8052; const uint GL_RGB12_EXT = 0x8053; const uint GL_RGB16_EXT = 0x8054; const uint GL_RGBA2_EXT = 0x8055; const uint GL_RGBA4_EXT = 0x8056; const uint GL_RGB5_A1_EXT = 0x8057; const uint GL_RGBA8_EXT = 0x8058; const uint GL_RGB10_A2_EXT = 0x8059; const uint GL_RGBA12_EXT = 0x805A; const uint GL_RGBA16_EXT = 0x805B; const uint GL_TEXTURE_RED_SIZE_EXT = 0x805C; const uint GL_TEXTURE_GREEN_SIZE_EXT = 0x805D; const uint GL_TEXTURE_BLUE_SIZE_EXT = 0x805E; const uint GL_TEXTURE_ALPHA_SIZE_EXT = 0x805F; const uint GL_TEXTURE_LUMINANCE_SIZE_EXT = 0x8060; const uint GL_TEXTURE_INTENSITY_SIZE_EXT = 0x8061; const uint GL_REPLACE_EXT = 0x8062; const uint GL_PROXY_TEXTURE_1D_EXT = 0x8063; const uint GL_PROXY_TEXTURE_2D_EXT = 0x8064; const uint GL_TEXTURE_TOO_LARGE_EXT = 0x8065; const uint GL_EXT_texture_compression_s3tc = 1; const uint GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; const uint GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; const uint GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; const uint GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; const uint GL_EXT_texture_cube_map = 1; const uint GL_NORMAL_MAP_EXT = 0x8511; const uint GL_REFLECTION_MAP_EXT = 0x8512; const uint GL_TEXTURE_CUBE_MAP_EXT = 0x8513; const uint GL_TEXTURE_BINDING_CUBE_MAP_EXT = 0x8514; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT = 0x8515; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT = 0x8516; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT = 0x8517; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT = 0x8518; const uint GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT = 0x8519; const uint GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT = 0x851A; const uint GL_PROXY_TEXTURE_CUBE_MAP_EXT = 0x851B; const uint GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT = 0x851C; const uint GL_EXT_texture_env_add = 1; const uint GL_EXT_texture_env_combine = 1; const uint GL_COMBINE_EXT = 0x8570; const uint GL_COMBINE_RGB_EXT = 0x8571; const uint GL_COMBINE_ALPHA_EXT = 0x8572; const uint GL_RGB_SCALE_EXT = 0x8573; const uint GL_ADD_SIGNED_EXT = 0x8574; const uint GL_INTERPOLATE_EXT = 0x8575; const uint GL_CONSTANT_EXT = 0x8576; const uint GL_PRIMARY_COLOR_EXT = 0x8577; const uint GL_PREVIOUS_EXT = 0x8578; const uint GL_SOURCE0_RGB_EXT = 0x8580; const uint GL_SOURCE1_RGB_EXT = 0x8581; const uint GL_SOURCE2_RGB_EXT = 0x8582; const uint GL_SOURCE0_ALPHA_EXT = 0x8588; const uint GL_SOURCE1_ALPHA_EXT = 0x8589; const uint GL_SOURCE2_ALPHA_EXT = 0x858A; const uint GL_OPERAND0_RGB_EXT = 0x8590; const uint GL_OPERAND1_RGB_EXT = 0x8591; const uint GL_OPERAND2_RGB_EXT = 0x8592; const uint GL_OPERAND0_ALPHA_EXT = 0x8598; const uint GL_OPERAND1_ALPHA_EXT = 0x8599; const uint GL_OPERAND2_ALPHA_EXT = 0x859A; const uint GL_EXT_texture_env_dot3 = 1; const uint GL_DOT3_RGB_EXT = 0x8740; const uint GL_DOT3_RGBA_EXT = 0x8741; const uint GL_EXT_texture_filter_anisotropic = 1; const uint GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; const uint GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; const uint GL_EXT_texture_lod_bias = 1; const uint GL_MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD; const uint GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500; const uint GL_TEXTURE_LOD_BIAS_EXT = 0x8501; const uint GL_EXT_texture_object = 1; const uint GL_TEXTURE_PRIORITY_EXT = 0x8066; const uint GL_TEXTURE_RESIDENT_EXT = 0x8067; const uint GL_TEXTURE_1D_BINDING_EXT = 0x8068; const uint GL_TEXTURE_2D_BINDING_EXT = 0x8069; const uint GL_TEXTURE_3D_BINDING_EXT = 0x806A; const uint GL_EXT_texture_perturb_normal = 1; const uint GL_PERTURB_EXT = 0x85AE; const uint GL_TEXTURE_NORMAL_EXT = 0x85AF; const uint GL_EXT_texture3D = 1; const uint GL_PACK_SKIP_IMAGES_EXT = 0x806B; const uint GL_PACK_IMAGE_HEIGHT_EXT = 0x806C; const uint GL_UNPACK_SKIP_IMAGES_EXT = 0x806D; const uint GL_UNPACK_IMAGE_HEIGHT_EXT = 0x806E; const uint GL_TEXTURE_3D_EXT = 0x806F; const uint GL_PROXY_TEXTURE_3D_EXT = 0x8070; const uint GL_TEXTURE_DEPTH_EXT = 0x8071; const uint GL_TEXTURE_WRAP_R_EXT = 0x8072; const uint GL_MAX_3D_TEXTURE_SIZE_EXT = 0x8073; const uint GL_EXT_vertex_array = 1; const uint GL_VERTEX_ARRAY_EXT = 0x8074; const uint GL_NORMAL_ARRAY_EXT = 0x8075; const uint GL_COLOR_ARRAY_EXT = 0x8076; const uint GL_INDEX_ARRAY_EXT = 0x8077; const uint GL_TEXTURE_COORD_ARRAY_EXT = 0x8078; const uint GL_EDGE_FLAG_ARRAY_EXT = 0x8079; const uint GL_VERTEX_ARRAY_SIZE_EXT = 0x807A; const uint GL_VERTEX_ARRAY_TYPE_EXT = 0x807B; const uint GL_VERTEX_ARRAY_STRIDE_EXT = 0x807C; const uint GL_VERTEX_ARRAY_COUNT_EXT = 0x807D; const uint GL_NORMAL_ARRAY_TYPE_EXT = 0x807E; const uint GL_NORMAL_ARRAY_STRIDE_EXT = 0x807F; const uint GL_NORMAL_ARRAY_COUNT_EXT = 0x8080; const uint GL_COLOR_ARRAY_SIZE_EXT = 0x8081; const uint GL_COLOR_ARRAY_TYPE_EXT = 0x8082; const uint GL_COLOR_ARRAY_STRIDE_EXT = 0x8083; const uint GL_COLOR_ARRAY_COUNT_EXT = 0x8084; const uint GL_INDEX_ARRAY_TYPE_EXT = 0x8085; const uint GL_INDEX_ARRAY_STRIDE_EXT = 0x8086; const uint GL_INDEX_ARRAY_COUNT_EXT = 0x8087; const uint GL_TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088; const uint GL_TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089; const uint GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A; const uint GL_TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B; const uint GL_EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C; const uint GL_EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D; const uint GL_VERTEX_ARRAY_POINTER_EXT = 0x808E; const uint GL_NORMAL_ARRAY_POINTER_EXT = 0x808F; const uint GL_COLOR_ARRAY_POINTER_EXT = 0x8090; const uint GL_INDEX_ARRAY_POINTER_EXT = 0x8091; const uint GL_TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092; const uint GL_EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093; const uint GL_EXT_vertex_shader = 1; const uint GL_VERTEX_SHADER_EXT = 0x8780; const uint GL_VERTEX_SHADER_BINDING_EXT = 0x8781; const uint GL_OP_INDEX_EXT = 0x8782; const uint GL_OP_NEGATE_EXT = 0x8783; const uint GL_OP_DOT3_EXT = 0x8784; const uint GL_OP_DOT4_EXT = 0x8785; const uint GL_OP_MUL_EXT = 0x8786; const uint GL_OP_ADD_EXT = 0x8787; const uint GL_OP_MADD_EXT = 0x8788; const uint GL_OP_FRAC_EXT = 0x8789; const uint GL_OP_MAX_EXT = 0x878A; const uint GL_OP_MIN_EXT = 0x878B; const uint GL_OP_SET_GE_EXT = 0x878C; const uint GL_OP_SET_LT_EXT = 0x878D; const uint GL_OP_CLAMP_EXT = 0x878E; const uint GL_OP_FLOOR_EXT = 0x878F; const uint GL_OP_ROUND_EXT = 0x8790; const uint GL_OP_EXP_BASE_2_EXT = 0x8791; const uint GL_OP_LOG_BASE_2_EXT = 0x8792; const uint GL_OP_POWER_EXT = 0x8793; const uint GL_OP_RECIP_EXT = 0x8794; const uint GL_OP_RECIP_SQRT_EXT = 0x8795; const uint GL_OP_SUB_EXT = 0x8796; const uint GL_OP_CROSS_PRODUCT_EXT = 0x8797; const uint GL_OP_MULTIPLY_MATRIX_EXT = 0x8798; const uint GL_OP_MOV_EXT = 0x8799; const uint GL_OUTPUT_VERTEX_EXT = 0x879A; const uint GL_OUTPUT_COLOR0_EXT = 0x879B; const uint GL_OUTPUT_COLOR1_EXT = 0x879C; const uint GL_OUTPUT_TEXTURE_COORD0_EXT = 0x879D; const uint GL_OUTPUT_TEXTURE_COORD1_EXT = 0x879E; const uint GL_OUTPUT_TEXTURE_COORD2_EXT = 0x879F; const uint GL_OUTPUT_TEXTURE_COORD3_EXT = 0x87A0; const uint GL_OUTPUT_TEXTURE_COORD4_EXT = 0x87A1; const uint GL_OUTPUT_TEXTURE_COORD5_EXT = 0x87A2; const uint GL_OUTPUT_TEXTURE_COORD6_EXT = 0x87A3; const uint GL_OUTPUT_TEXTURE_COORD7_EXT = 0x87A4; const uint GL_OUTPUT_TEXTURE_COORD8_EXT = 0x87A5; const uint GL_OUTPUT_TEXTURE_COORD9_EXT = 0x87A6; const uint GL_OUTPUT_TEXTURE_COORD10_EXT = 0x87A7; const uint GL_OUTPUT_TEXTURE_COORD11_EXT = 0x87A8; const uint GL_OUTPUT_TEXTURE_COORD12_EXT = 0x87A9; const uint GL_OUTPUT_TEXTURE_COORD13_EXT = 0x87AA; const uint GL_OUTPUT_TEXTURE_COORD14_EXT = 0x87AB; const uint GL_OUTPUT_TEXTURE_COORD15_EXT = 0x87AC; const uint GL_OUTPUT_TEXTURE_COORD16_EXT = 0x87AD; const uint GL_OUTPUT_TEXTURE_COORD17_EXT = 0x87AE; const uint GL_OUTPUT_TEXTURE_COORD18_EXT = 0x87AF; const uint GL_OUTPUT_TEXTURE_COORD19_EXT = 0x87B0; const uint GL_OUTPUT_TEXTURE_COORD20_EXT = 0x87B1; const uint GL_OUTPUT_TEXTURE_COORD21_EXT = 0x87B2; const uint GL_OUTPUT_TEXTURE_COORD22_EXT = 0x87B3; const uint GL_OUTPUT_TEXTURE_COORD23_EXT = 0x87B4; const uint GL_OUTPUT_TEXTURE_COORD24_EXT = 0x87B5; const uint GL_OUTPUT_TEXTURE_COORD25_EXT = 0x87B6; const uint GL_OUTPUT_TEXTURE_COORD26_EXT = 0x87B7; const uint GL_OUTPUT_TEXTURE_COORD27_EXT = 0x87B8; const uint GL_OUTPUT_TEXTURE_COORD28_EXT = 0x87B9; const uint GL_OUTPUT_TEXTURE_COORD29_EXT = 0x87BA; const uint GL_OUTPUT_TEXTURE_COORD30_EXT = 0x87BB; const uint GL_OUTPUT_TEXTURE_COORD31_EXT = 0x87BC; const uint GL_OUTPUT_FOG_EXT = 0x87BD; const uint GL_SCALAR_EXT = 0x87BE; const uint GL_VECTOR_EXT = 0x87BF; const uint GL_MATRIX_EXT = 0x87C0; const uint GL_VARIANT_EXT = 0x87C1; const uint GL_INVARIANT_EXT = 0x87C2; const uint GL_LOCAL_CONSTANT_EXT = 0x87C3; const uint GL_LOCAL_EXT = 0x87C4; const uint GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5; const uint GL_MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6; const uint GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7; const uint GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8; const uint GL_MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9; const uint GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA; const uint GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB; const uint GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CC; const uint GL_MAX_OPTIMIZED_VERTEX_SHADER_INARIANTS_EXT = 0x87CD; const uint GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE; const uint GL_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF; const uint GL_VERTEX_SHADER_VARIANTS_EXT = 0x87D0; const uint GL_VERTEX_SHADER_INVARIANTS_EXT = 0x87D1; const uint GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2; const uint GL_VERTEX_SHADER_LOCALS_EXT = 0x87D3; const uint GL_VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4; const uint GL_X_EXT = 0x87D5; const uint GL_Y_EXT = 0x87D6; const uint GL_Z_EXT = 0x87D7; const uint GL_W_EXT = 0x87D8; const uint GL_NEGATIVE_X_EXT = 0x87D9; const uint GL_NEGATIVE_Y_EXT = 0x87DA; const uint GL_NEGATIVE_Z_EXT = 0x87DB; const uint GL_NEGATIVE_W_EXT = 0x87DC; const uint GL_ZERO_EXT = 0x87DD; const uint GL_ONE_EXT = 0x87DE; const uint GL_NEGATIVE_ONE_EXT = 0x87DF; const uint GL_NORMALIZED_RANGE_EXT = 0x87E0; const uint GL_FULL_RANGE_EXT = 0x87E1; const uint GL_CURRENT_VERTEX_EXT = 0x87E2; const uint GL_MVP_MATRIX_EXT = 0x87E3; const uint GL_VARIANT_VALUE_EXT = 0x87E4; const uint GL_VARIANT_DATATYPE_EXT = 0x87E5; const uint GL_VARIANT_ARRAY_STRIDE_EXT = 0x87E6; const uint GL_VARIANT_ARRAY_TYPE_EXT = 0x87E7; const uint GL_VARIANT_ARRAY_EXT = 0x87E8; const uint GL_VARIANT_ARRAY_POINTER_EXT = 0x87E9; const uint GL_INVARIANT_VALUE_EXT = 0x87EA; const uint GL_INVARIANT_DATATYPE_EXT = 0x87EB; const uint GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC; const uint GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED; const uint GL_EXT_vertex_weighting = 1; const uint GL_MODELVIEW0_STACK_DEPTH_EXT = GL_MODELVIEW_STACK_DEPTH; const uint GL_MODELVIEW1_STACK_DEPTH_EXT = 0x8502; const uint GL_MODELVIEW0_MATRIX_EXT = GL_MODELVIEW_MATRIX; const uint GL_MODELVIEW1_MATRIX_EXT = 0x8506; const uint GL_VERTEX_WEIGHTING_EXT = 0x8509; const uint GL_MODELVIEW0_EXT = GL_MODELVIEW; const uint GL_MODELVIEW1_EXT = 0x850A; const uint GL_CURRENT_VERTEX_WEIGHT_EXT = 0x850B; const uint GL_VERTEX_WEIGHT_ARRAY_EXT = 0x850C; const uint GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D; const uint GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E; const uint GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F; const uint GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510; /*----------------------------------------------------------------------- * 3DFX *----------------------------------------------------------------------*/ const uint GL_3DFX_multisample = 1; const uint GL_MULTISAMPLE_3DFX = 0x86B2; const uint GL_SAMPLE_BUFFERS_3DFX = 0x86B3; const uint GL_SAMPLES_3DFX = 0x86B4; const uint GL_MULTISAMPLE_BIT_3DFX = 0x20000000; const uint GL_3DFX_tbuffer = 1; const uint GL_3DFX_texture_compression_FXT1 = 1; const uint GL_COMPRESSED_RGB_FXT1_3DFX = 0x86B0; const uint GL_COMPRESSED_RGBA_FXT1_3DFX = 0x86B1; /*----------------------------------------------------------------------- * APPLE *----------------------------------------------------------------------*/ const uint GL_APPLE_specular_vector = 1; const uint GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE = 0x85B0; const uint GL_APPLE_transform_hint = 1; const uint GL_TRANSFORM_HINT_APPLE = 0x85B1; /*----------------------------------------------------------------------- * ATI *----------------------------------------------------------------------*/ const uint GL_ATI_element_array = 1; const uint GL_ELEMENT_ARRAY_ATI = 0x8768; const uint GL_ELEMENT_ARRAY_TYPE_ATI = 0x8769; const uint GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A; const uint GL_ATI_envmap_bumpmap = 1; const uint GL_BUMP_ROT_MATRIX_ATI = 0x8775; const uint GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776; const uint GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777; const uint GL_BUMP_TEX_UNITS_ATI = 0x8778; const uint GL_DUDV_ATI = 0x8779; const uint GL_DU8DV8_ATI = 0x877A; const uint GL_BUMP_ENVMAP_ATI = 0x877B; const uint GL_BUMP_TARGET_ATI = 0x877C; const uint GL_ATI_fragment_shader = 1; const uint GL_FRAGMENT_SHADER_ATI = 0x8920; const uint GL_REG_0_ATI = 0x8921; const uint GL_REG_1_ATI = 0x8922; const uint GL_REG_2_ATI = 0x8923; const uint GL_REG_3_ATI = 0x8924; const uint GL_REG_4_ATI = 0x8925; const uint GL_REG_5_ATI = 0x8926; const uint GL_REG_6_ATI = 0x8927; const uint GL_REG_7_ATI = 0x8928; const uint GL_REG_8_ATI = 0x8929; const uint GL_REG_9_ATI = 0x892A; const uint GL_REG_10_ATI = 0x892B; const uint GL_REG_11_ATI = 0x892C; const uint GL_REG_12_ATI = 0x892D; const uint GL_REG_13_ATI = 0x892E; const uint GL_REG_14_ATI = 0x892F; const uint GL_REG_15_ATI = 0x8930; const uint GL_REG_16_ATI = 0x8931; const uint GL_REG_17_ATI = 0x8932; const uint GL_REG_18_ATI = 0x8933; const uint GL_REG_19_ATI = 0x8934; const uint GL_REG_20_ATI = 0x8935; const uint GL_REG_21_ATI = 0x8936; const uint GL_REG_22_ATI = 0x8937; const uint GL_REG_23_ATI = 0x8938; const uint GL_REG_24_ATI = 0x8939; const uint GL_REG_25_ATI = 0x893A; const uint GL_REG_26_ATI = 0x893B; const uint GL_REG_27_ATI = 0x893C; const uint GL_REG_28_ATI = 0x893D; const uint GL_REG_29_ATI = 0x893E; const uint GL_REG_30_ATI = 0x893F; const uint GL_REG_31_ATI = 0x8940; const uint GL_CON_0_ATI = 0x8941; const uint GL_CON_1_ATI = 0x8942; const uint GL_CON_2_ATI = 0x8943; const uint GL_CON_3_ATI = 0x8944; const uint GL_CON_4_ATI = 0x8945; const uint GL_CON_5_ATI = 0x8946; const uint GL_CON_6_ATI = 0x8947; const uint GL_CON_7_ATI = 0x8948; const uint GL_CON_8_ATI = 0x8949; const uint GL_CON_9_ATI = 0x894A; const uint GL_CON_10_ATI = 0x894B; const uint GL_CON_11_ATI = 0x894C; const uint GL_CON_12_ATI = 0x894D; const uint GL_CON_13_ATI = 0x894E; const uint GL_CON_14_ATI = 0x894F; const uint GL_CON_15_ATI = 0x8950; const uint GL_CON_16_ATI = 0x8951; const uint GL_CON_17_ATI = 0x8952; const uint GL_CON_18_ATI = 0x8953; const uint GL_CON_19_ATI = 0x8954; const uint GL_CON_20_ATI = 0x8955; const uint GL_CON_21_ATI = 0x8956; const uint GL_CON_22_ATI = 0x8957; const uint GL_CON_23_ATI = 0x8958; const uint GL_CON_24_ATI = 0x8959; const uint GL_CON_25_ATI = 0x895A; const uint GL_CON_26_ATI = 0x895B; const uint GL_CON_27_ATI = 0x895C; const uint GL_CON_28_ATI = 0x895D; const uint GL_CON_29_ATI = 0x895E; const uint GL_CON_30_ATI = 0x895F; const uint GL_CON_31_ATI = 0x8960; const uint GL_MOV_ATI = 0x8961; const uint GL_ADD_ATI = 0x8963; const uint GL_MUL_ATI = 0x8964; const uint GL_SUB_ATI = 0x8965; const uint GL_DOT3_ATI = 0x8966; const uint GL_DOT4_ATI = 0x8967; const uint GL_MAD_ATI = 0x8968; const uint GL_LERP_ATI = 0x8969; const uint GL_CND_ATI = 0x896A; const uint GL_CND0_ATI = 0x896B; const uint GL_DOT2_ADD_ATI = 0x896C; const uint GL_SECONDARY_INTERPOLATOR_ATI = 0x896D; const uint GL_NUM_FRAGMENT_REGISTERS_ATI = 0x896E; const uint GL_NUM_FRAGMENT_CONSTANTS_ATI = 0x896F; const uint GL_NUM_PASSES_ATI = 0x8970; const uint GL_NUM_INSTRUCTIONS_PER_PASS_ATI = 0x8971; const uint GL_NUM_INSTRUCTIONS_TOTAL_ATI = 0x8972; const uint GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = 0x8973; const uint GL_NUM_LOOPBACK_COMPONENTS_ATI = 0x8974; const uint GL_COLOR_ALPHA_PAIRING_ATI = 0x8975; const uint GL_SWIZZLE_STR_ATI = 0x8976; const uint GL_SWIZZLE_STQ_ATI = 0x8977; const uint GL_SWIZZLE_STR_DR_ATI = 0x8978; const uint GL_SWIZZLE_STQ_DQ_ATI = 0x8979; const uint GL_SWIZZLE_STRQ_ATI = 0x897A; const uint GL_SWIZZLE_STRQ_DQ_ATI = 0x897B; const uint GL_RED_BIT_ATI = 0x00000001; const uint GL_GREEN_BIT_ATI = 0x00000002; const uint GL_BLUE_BIT_ATI = 0x00000004; const uint GL_2X_BIT_ATI = 0x00000001; const uint GL_4X_BIT_ATI = 0x00000002; const uint GL_8X_BIT_ATI = 0x00000004; const uint GL_HALF_BIT_ATI = 0x00000008; const uint GL_QUARTER_BIT_ATI = 0x00000010; const uint GL_EIGHTH_BIT_ATI = 0x00000020; const uint GL_SATURATE_BIT_ATI = 0x00000040; const uint GL_COMP_BIT_ATI = 0x00000002; const uint GL_NEGATE_BIT_ATI = 0x00000004; const uint GL_BIAS_BIT_ATI = 0x00000008; const uint GL_ATI_pn_triangles = 1; const uint GL_PN_TRIANGLES_ATI = 0x87F0; const uint GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1; const uint GL_PN_TRIANGLES_POINT_MODE_ATI = 0x87F2; const uint GL_PN_TRIANGLES_NORMAL_MODE_ATI = 0x87F3; const uint GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F4; const uint GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI = 0x87F5; const uint GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6; const uint GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7; const uint GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8; const uint GL_ATI_texture_mirror_once = 1; const uint GL_MIRROR_CLAMP_ATI = 0x8742; const uint GL_MIRROR_CLAMP_TO_EDGE_ATI = 0x8743; const uint GL_ATI_vertex_array_object = 1; const uint GL_STATIC_ATI = 0x8760; const uint GL_DYNAMIC_ATI = 0x8761; const uint GL_PRESERVE_ATI = 0x8762; const uint GL_DISCARD_ATI = 0x8763; const uint GL_OBJECT_BUFFER_SIZE_ATI = 0x8764; const uint GL_OBJECT_BUFFER_USAGE_ATI = 0x8765; const uint GL_ARRAY_OBJECT_BUFFER_ATI = 0x8766; const uint GL_ARRAY_OBJECT_OFFSET_ATI = 0x8767; const uint GL_ATI_vertex_streams = 1; const uint GL_MAX_VERTEX_STREAMS_ATI = 0x876B; const uint GL_VERTEX_STREAM0_ATI = 0x876C; const uint GL_VERTEX_STREAM1_ATI = 0x876D; const uint GL_VERTEX_STREAM2_ATI = 0x876E; const uint GL_VERTEX_STREAM3_ATI = 0x876F; const uint GL_VERTEX_STREAM4_ATI = 0x8770; const uint GL_VERTEX_STREAM5_ATI = 0x8771; const uint GL_VERTEX_STREAM6_ATI = 0x8772; const uint GL_VERTEX_STREAM7_ATI = 0x8773; const uint GL_VERTEX_SOURCE_ATI = 0x8774; /*----------------------------------------------------------------------- * HP (Hewlett Packard) *----------------------------------------------------------------------*/ const uint GL_HP_convolution_border_modes = 1; const uint GL_IGNORE_BORDER_HP = 0x8150; const uint GL_CONSTANT_BORDER_HP = 0x8151; const uint GL_REPLICATE_BORDER_HP = 0x8153; const uint GL_CONVOLUTION_BORDER_COLOR_HP = 0x8154; const uint GL_HP_image_transform = 1; const uint GL_IMAGE_SCALE_X_HP = 0x8155; const uint GL_IMAGE_SCALE_Y_HP = 0x8156; const uint GL_IMAGE_TRANSLATE_X_HP = 0x8157; const uint GL_IMAGE_TRANSLATE_Y_HP = 0x8158; const uint GL_IMAGE_ROTATE_ANGLE_HP = 0x8159; const uint GL_IMAGE_ROTATE_ORIGIN_X_HP = 0x815A; const uint GL_IMAGE_ROTATE_ORIGIN_Y_HP = 0x815B; const uint GL_IMAGE_MAG_FILTER_HP = 0x815C; const uint GL_IMAGE_MIN_FILTER_HP = 0x815D; const uint GL_IMAGE_CUBIC_WEIGHT_HP = 0x815E; const uint GL_CUBIC_HP = 0x815F; const uint GL_AVERAGE_HP = 0x8160; const uint GL_IMAGE_TRANSFORM_2D_HP = 0x8161; const uint GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8162; const uint GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8163; const uint GL_HP_occlusion_test = 1; const uint GL_OCCLUSION_TEST_HP = 0x8165; const uint GL_OCCLUSION_TEST_RESULT_HP = 0x8166; const uint GL_HP_texture_lighting = 1; const uint GL_TEXTURE_LIGHTING_MODE_HP = 0x8167; const uint GL_TEXTURE_POST_SPECULAR_HP = 0x8168; const uint GL_TEXTURE_PRE_SPECULAR_HP = 0x8169; /*----------------------------------------------------------------------- * IBM *----------------------------------------------------------------------*/ const uint GL_IBM_cull_vertex = 1; const uint GL_CULL_VERTEX_IBM = 103050; const uint GL_IBM_multimode_draw_arrays = 1; const uint GL_IBM_rasterpos_clip = 1; const uint GL_RASTER_POSITION_UNCLIPPED_IBM = 0x19262; const uint GL_IBM_texture_mirrored_repeat = 1; const uint GL_MIRRORED_REPEAT_IBM = 0x8370; const uint GL_IBM_vertex_array_lists = 1; const uint GL_VERTEX_ARRAY_LIST_IBM = 103070; const uint GL_NORMAL_ARRAY_LIST_IBM = 103071; const uint GL_COLOR_ARRAY_LIST_IBM = 103072; const uint GL_INDEX_ARRAY_LIST_IBM = 103073; const uint GL_TEXTURE_COORD_ARRAY_LIST_IBM = 103074; const uint GL_EDGE_FLAG_ARRAY_LIST_IBM = 103075; const uint GL_FOG_COORDINATE_ARRAY_LIST_IBM = 103076; const uint GL_SECONDARY_COLOR_ARRAY_LIST_IBM = 103077; const uint GL_VERTEX_ARRAY_LIST_STRIDE_IBM = 103080; const uint GL_NORMAL_ARRAY_LIST_STRIDE_IBM = 103081; const uint GL_COLOR_ARRAY_LIST_STRIDE_IBM = 103082; const uint GL_INDEX_ARRAY_LIST_STRIDE_IBM = 103083; const uint GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = 103084; const uint GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = 103085; const uint GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = 103086; const uint GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = 103087; /*----------------------------------------------------------------------- * INGR *----------------------------------------------------------------------*/ const uint GL_INGR_color_clamp = 1; const uint GL_RED_MIN_CLAMP_INGR = 0x8560; const uint GL_GREEN_MIN_CLAMP_INGR = 0x8561; const uint GL_BLUE_MIN_CLAMP_INGR = 0x8562; const uint GL_ALPHA_MIN_CLAMP_INGR = 0x8563; const uint GL_RED_MAX_CLAMP_INGR = 0x8564; const uint GL_GREEN_MAX_CLAMP_INGR = 0x8565; const uint GL_BLUE_MAX_CLAMP_INGR = 0x8566; const uint GL_ALPHA_MAX_CLAMP_INGR = 0x8567; const uint GL_INGR_interlace_read = 1; const uint GL_INTERLACE_READ_INGR = 0x8568; const uint GL_INGR_palette_buffer = 1; /*----------------------------------------------------------------------- * INTEL *----------------------------------------------------------------------*/ const uint GL_INTEL_parallel_arrays = 1; const uint GL_PARALLEL_ARRAYS_INTEL = 0x83F4; const uint GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F5; const uint GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F6; const uint GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F7; const uint GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F8; const uint GL_INTEL_texture_scissor = 1; /*----------------------------------------------------------------------- * MESA (Brian Pauls Mesa3D) *----------------------------------------------------------------------*/ const uint GL_MESA_resize_buffers = 1; const uint GL_MESA_window_pos = 1; /*----------------------------------------------------------------------- * NV (nVidia) *----------------------------------------------------------------------*/ const uint GL_NV_blend_square = 1; const uint GL_NV_copy_depth_to_color = 1; const uint GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E; const uint GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F; const uint GL_NV_depth_clamp = 1; const uint GL_DEPTH_CLAMP_NV = 0x864F; const uint GL_NV_element_array = 1; const uint GL_ELEMENT_ARRAY_TYPE_NV = 0x8769; const uint GL_ELEMENT_ARRAY_POINTER_NV = 0x876A; const uint GL_NV_evaluators = 1; const uint GL_EVAL_2D_NV = 0x86C0; const uint GL_EVAL_TRIANGULAR_2D_NV = 0x86C1; const uint GL_MAP_TESSELLATION_NV = 0x86C2; const uint GL_MAP_ATTRIB_U_ORDER_NV = 0x86C3; const uint GL_MAP_ATTRIB_V_ORDER_NV = 0x86C4; const uint GL_EVAL_FRACTIONAL_TESSELLATION_NV = 0x86C5; const uint GL_EVAL_VERTEX_ATTRIB0_NV = 0x86C6; const uint GL_EVAL_VERTEX_ATTRIB1_NV = 0x86C7; const uint GL_EVAL_VERTEX_ATTRIB2_NV = 0x86C8; const uint GL_EVAL_VERTEX_ATTRIB3_NV = 0x86C9; const uint GL_EVAL_VERTEX_ATTRIB4_NV = 0x86CA; const uint GL_EVAL_VERTEX_ATTRIB5_NV = 0x86CB; const uint GL_EVAL_VERTEX_ATTRIB6_NV = 0x86CC; const uint GL_EVAL_VERTEX_ATTRIB7_NV = 0x86CD; const uint GL_EVAL_VERTEX_ATTRIB8_NV = 0x86CE; const uint GL_EVAL_VERTEX_ATTRIB9_NV = 0x86CF; const uint GL_EVAL_VERTEX_ATTRIB10_NV = 0x86D0; const uint GL_EVAL_VERTEX_ATTRIB11_NV = 0x86D1; const uint GL_EVAL_VERTEX_ATTRIB12_NV = 0x86D2; const uint GL_EVAL_VERTEX_ATTRIB13_NV = 0x86D3; const uint GL_EVAL_VERTEX_ATTRIB14_NV = 0x86D4; const uint GL_EVAL_VERTEX_ATTRIB15_NV = 0x86D5; const uint GL_MAX_MAP_TESSELLATION_NV = 0x86D6; const uint GL_MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7; const uint GL_NV_fence = 1; const uint GL_ALL_COMPLETED_NV = 0x84F2; const uint GL_FENCE_STATUS_NV = 0x84F3; const uint GL_FENCE_CONDITION_NV = 0x84F4; const uint GL_NV_float_buffer = 1; const uint GL_FLOAT_R_NV = 0x8880; const uint GL_FLOAT_RG_NV = 0x8881; const uint GL_FLOAT_RGB_NV = 0x8882; const uint GL_FLOAT_RGBA_NV = 0x8883; const uint GL_FLOAT_R16_NV = 0x8884; const uint GL_FLOAT_R32_NV = 0x8885; const uint GL_FLOAT_RG16_NV = 0x8886; const uint GL_FLOAT_RG32_NV = 0x8887; const uint GL_FLOAT_RGB16_NV = 0x8888; const uint GL_FLOAT_RGB32_NV = 0x8889; const uint GL_FLOAT_RGBA16_NV = 0x888A; const uint GL_FLOAT_RGBA32_NV = 0x888B; const uint GL_TEXTURE_FLOAT_COMPONENTS_NV = 0x888C; const uint GL_FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D; const uint GL_FLOAT_RGBA_MODE_NV = 0x888E; const uint GL_NV_fog_distance = 1; const uint GL_FOG_DISTANCE_MODE_NV = 0x855A; const uint GL_EYE_RADIAL_NV = 0x855B; const uint GL_EYE_PLANE_ABSOLUTE_NV = 0x855C; /* reuse GL_EYE_PLANE */ const uint GL_NV_fragment_program = 1; const uint GL_FRAGMENT_PROGRAM_NV = 0x8870; const uint GL_MAX_TEXTURE_COORDS_NV = 0x8871; const uint GL_MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872; const uint GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873; const uint GL_PROGRAM_ERROR_STRING_NV = 0x8874; const uint GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868; const uint GL_NV_half_float = 1; const uint GL_HALF_FLOAT_NV = 0x140B; const uint GL_NV_light_max_exponent = 1; const uint GL_MAX_SHININESS_NV = 0x8504; const uint GL_MAX_SPOT_EXPONENT_NV = 0x8505; const uint GL_NV_multisample_filter_hint = 1; const uint GL_MULTISAMPLE_FILTER_HINT_NV = 0x8534; const uint GL_NV_occlusion_query = 1; const uint GL_PIXEL_COUNTER_BITS_NV = 0x8864; const uint GL_CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865; const uint GL_PIXEL_COUNT_NV = 0x8866; const uint GL_PIXEL_COUNT_AVAILABLE_NV = 0x8867; const uint GL_NV_packed_depth_stencil = 1; const uint GL_DEPTH_STENCIL_NV = 0x84F9; const uint GL_UNSIGNED_INT_24_8_NV = 0x84FA; const uint GL_NV_pixel_data_range = 1; const uint GL_WRITE_PIXEL_DATA_RANGE_NV = 0x8878; const uint GL_READ_PIXEL_DATA_RANGE_NV = 0x8879; const uint GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A; const uint GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B; const uint GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C; const uint GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D; const uint GL_NV_point_sprite = 1; const uint GL_POINT_SPRITE_NV = 0x8861; const uint GL_COORD_REPLACE_NV = 0x8862; const uint GL_POINT_SPRITE_R_MODE_NV = 0x8863; const uint GL_NV_primitive_restart = 1; const uint GL_PRIMITIVE_RESTART_NV = 0x8558; const uint GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559; const uint GL_NV_register_combiners = 1; const uint GL_REGISTER_COMBINERS_NV = 0x8522; const uint GL_VARIABLE_A_NV = 0x8523; const uint GL_VARIABLE_B_NV = 0x8524; const uint GL_VARIABLE_C_NV = 0x8525; const uint GL_VARIABLE_D_NV = 0x8526; const uint GL_VARIABLE_E_NV = 0x8527; const uint GL_VARIABLE_F_NV = 0x8528; const uint GL_VARIABLE_G_NV = 0x8529; const uint GL_CONSTANT_COLOR0_NV = 0x852A; const uint GL_CONSTANT_COLOR1_NV = 0x852B; const uint GL_PRIMARY_COLOR_NV = 0x852C; const uint GL_SECONDARY_COLOR_NV = 0x852D; const uint GL_SPARE0_NV = 0x852E; const uint GL_SPARE1_NV = 0x852F; const uint GL_DISCARD_NV = 0x8530; const uint GL_E_TIMES_F_NV = 0x8531; const uint GL_SPARE0_PLUS_SECONDARY_COLOR_NV = 0x8532; const uint GL_UNSIGNED_IDENTITY_NV = 0x8536; const uint GL_UNSIGNED_INVERT_NV = 0x8537; const uint GL_EXPAND_NORMAL_NV = 0x8538; const uint GL_EXPAND_NEGATE_NV = 0x8539; const uint GL_HALF_BIAS_NORMAL_NV = 0x853A; const uint GL_HALF_BIAS_NEGATE_NV = 0x853B; const uint GL_SIGNED_IDENTITY_NV = 0x853C; const uint GL_SIGNED_NEGATE_NV = 0x853D; const uint GL_SCALE_BY_TWO_NV = 0x853E; const uint GL_SCALE_BY_FOUR_NV = 0x853F; const uint GL_SCALE_BY_ONE_HALF_NV = 0x8540; const uint GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = 0x8541; const uint GL_COMBINER_INPUT_NV = 0x8542; const uint GL_COMBINER_MAPPING_NV = 0x8543; const uint GL_COMBINER_COMPONENT_USAGE_NV = 0x8544; const uint GL_COMBINER_AB_DOT_PRODUCT_NV = 0x8545; const uint GL_COMBINER_CD_DOT_PRODUCT_NV = 0x8546; const uint GL_COMBINER_MUX_SUM_NV = 0x8547; const uint GL_COMBINER_SCALE_NV = 0x8548; const uint GL_COMBINER_BIAS_NV = 0x8549; const uint GL_COMBINER_AB_OUTPUT_NV = 0x854A; const uint GL_COMBINER_CD_OUTPUT_NV = 0x854B; const uint GL_COMBINER_SUM_OUTPUT_NV = 0x854C; const uint GL_MAX_GENERAL_COMBINERS_NV = 0x854D; const uint GL_NUM_GENERAL_COMBINERS_NV = 0x854E; const uint GL_COLOR_SUM_CLAMP_NV = 0x854F; const uint GL_COMBINER0_NV = 0x8550; const uint GL_COMBINER1_NV = 0x8551; const uint GL_COMBINER2_NV = 0x8552; const uint GL_COMBINER3_NV = 0x8553; const uint GL_COMBINER4_NV = 0x8554; const uint GL_COMBINER5_NV = 0x8555; const uint GL_COMBINER6_NV = 0x8556; const uint GL_COMBINER7_NV = 0x8557; /* reuse GL_TEXTURE0_ARB */ /* reuse GL_TEXTURE1_ARB */ /* reuse GL_ZERO */ /* reuse GL_NONE */ /* reuse GL_FOG */ const uint GL_NV_register_combiners2 = 1; const uint GL_PER_STAGE_CONSTANTS_NV = 0x8535; const uint GL_NV_stencil_two_side = 1; const uint GL_STENCIL_TEST_TWO_SIDE_NV = 0x8910; const uint GL_ACTIVE_STENCIL_FACE_NV = 0x8911; const uint GL_NV_texgen_emboss = 1; const uint GL_EMBOSS_LIGHT_NV = 0x855D; const uint GL_EMBOSS_CONSTANT_NV = 0x855E; const uint GL_EMBOSS_MAP_NV = 0x855F; const uint GL_NV_texgen_reflection = 1; const uint GL_NORMAL_MAP_NV = 0x8511; const uint GL_REFLECTION_MAP_NV = 0x8512; const uint GL_NV_texture_compression_vtc = 1; const uint GL_NV_texture_env_combine4 = 1; const uint GL_COMBINE4_NV = 0x8503; const uint GL_SOURCE3_RGB_NV = 0x8583; const uint GL_SOURCE3_ALPHA_NV = 0x858B; const uint GL_OPERAND3_RGB_NV = 0x8593; const uint GL_OPERAND3_ALPHA_NV = 0x859B; const uint GL_NV_texture_rectangle = 1; const uint GL_TEXTURE_RECTANGLE_NV = 0x84F5; const uint GL_TEXTURE_BINDING_RECTANGLE_NV = 0x84F6; const uint GL_PROXY_TEXTURE_RECTANGLE_NV = 0x84F7; const uint GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8; const uint GL_NV_texture_shader = 1; const uint GL_OFFSET_TEXTURE_RECTANGLE_NV = 0x864C; const uint GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D; const uint GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E; const uint GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9; const uint GL_UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA; const uint GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB; const uint GL_DSDT_MAG_INTENSITY_NV = 0x86DC; const uint GL_SHADER_CONSISTENT_NV = 0x86DD; const uint GL_TEXTURE_SHADER_NV = 0x86DE; const uint GL_SHADER_OPERATION_NV = 0x86DF; const uint GL_CULL_MODES_NV = 0x86E0; const uint GL_OFFSET_TEXTURE_MATRIX_NV = 0x86E1; const uint GL_OFFSET_TEXTURE_SCALE_NV = 0x86E2; const uint GL_OFFSET_TEXTURE_BIAS_NV = 0x86E3; const uint GL_OFFSET_TEXTURE_2D_MATRIX_NV = GL_OFFSET_TEXTURE_MATRIX_NV; const uint GL_OFFSET_TEXTURE_2D_SCALE_NV = GL_OFFSET_TEXTURE_SCALE_NV; const uint GL_OFFSET_TEXTURE_2D_BIAS_NV = GL_OFFSET_TEXTURE_BIAS_NV; const uint GL_PREVIOUS_TEXTURE_INPUT_NV = 0x86E4; const uint GL_CONST_EYE_NV = 0x86E5; const uint GL_PASS_THROUGH_NV = 0x86E6; const uint GL_CULL_FRAGMENT_NV = 0x86E7; const uint GL_OFFSET_TEXTURE_2D_NV = 0x86E8; const uint GL_DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9; const uint GL_DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA; const uint GL_DOT_PRODUCT_NV = 0x86EC; const uint GL_DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED; const uint GL_DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE; const uint GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF; const uint GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0; const uint GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1; const uint GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2; const uint GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3; const uint GL_HILO_NV = 0x86F4; const uint GL_DSDT_NV = 0x86F5; const uint GL_DSDT_MAG_NV = 0x86F6; const uint GL_DSDT_MAG_VIB_NV = 0x86F7; const uint GL_HILO16_NV = 0x86F8; const uint GL_SIGNED_HILO_NV = 0x86F9; const uint GL_SIGNED_HILO16_NV = 0x86FA; const uint GL_SIGNED_RGBA_NV = 0x86FB; const uint GL_SIGNED_RGBA8_NV = 0x86FC; const uint GL_SIGNED_RGB_NV = 0x86FE; const uint GL_SIGNED_RGB8_NV = 0x86FF; const uint GL_SIGNED_LUMINANCE_NV = 0x8701; const uint GL_SIGNED_LUMINANCE8_NV = 0x8702; const uint GL_SIGNED_LUMINANCE_ALPHA_NV = 0x8703; const uint GL_SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704; const uint GL_SIGNED_ALPHA_NV = 0x8705; const uint GL_SIGNED_ALPHA8_NV = 0x8706; const uint GL_SIGNED_INTENSITY_NV = 0x8707; const uint GL_SIGNED_INTENSITY8_NV = 0x8708; const uint GL_DSDT8_NV = 0x8709; const uint GL_DSDT8_MAG8_NV = 0x870A; const uint GL_DSDT8_MAG8_INTENSITY8_NV = 0x870B; const uint GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C; const uint GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D; const uint GL_HI_SCALE_NV = 0x870E; const uint GL_LO_SCALE_NV = 0x870F; const uint GL_DS_SCALE_NV = 0x8710; const uint GL_DT_SCALE_NV = 0x8711; const uint GL_MAGNITUDE_SCALE_NV = 0x8712; const uint GL_VIBRANCE_SCALE_NV = 0x8713; const uint GL_HI_BIAS_NV = 0x8714; const uint GL_LO_BIAS_NV = 0x8715; const uint GL_DS_BIAS_NV = 0x8716; const uint GL_DT_BIAS_NV = 0x8717; const uint GL_MAGNITUDE_BIAS_NV = 0x8718; const uint GL_VIBRANCE_BIAS_NV = 0x8719; const uint GL_TEXTURE_BORDER_VALUES_NV = 0x871A; const uint GL_TEXTURE_HI_SIZE_NV = 0x871B; const uint GL_TEXTURE_LO_SIZE_NV = 0x871C; const uint GL_TEXTURE_DS_SIZE_NV = 0x871D; const uint GL_TEXTURE_DT_SIZE_NV = 0x871E; const uint GL_TEXTURE_MAG_SIZE_NV = 0x871F; const uint GL_NV_texture_shader2 = 1; const uint GL_NV_texture_shader3 = 1; const uint GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850; const uint GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851; const uint GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852; const uint GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853; const uint GL_OFFSET_HILO_TEXTURE_2D_NV = 0x8854; const uint GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855; const uint GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856; const uint GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857; const uint GL_DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858; const uint GL_DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859; const uint GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A; const uint GL_DOT_PRODUCT_PASS_THROUGH_NV = 0x885B; const uint GL_DOT_PRODUCT_TEXTURE_1D_NV = 0x885C; const uint GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D; const uint GL_HILO8_NV = 0x885E; const uint GL_SIGNED_HILO8_NV = 0x885F; const uint GL_FORCE_BLUE_TO_ONE_NV = 0x8860; const uint GL_NV_vertex_array_range = 1; const uint GL_VERTEX_ARRAY_RANGE_NV = 0x851D; const uint GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E; const uint GL_VERTEX_ARRAY_RANGE_VALID_NV = 0x851F; const uint GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520; const uint GL_VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521; const uint GL_NV_vertex_array_range2 = 1; const uint GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533; const uint GL_NV_vertex_program = 1; const uint GL_VERTEX_PROGRAM_NV = 0x8620; const uint GL_VERTEX_STATE_PROGRAM_NV = 0x8621; const uint GL_ATTRIB_ARRAY_SIZE_NV = 0x8623; const uint GL_ATTRIB_ARRAY_STRIDE_NV = 0x8624; const uint GL_ATTRIB_ARRAY_TYPE_NV = 0x8625; const uint GL_CURRENT_ATTRIB_NV = 0x8626; const uint GL_PROGRAM_LENGTH_NV = 0x8627; const uint GL_PROGRAM_STRING_NV = 0x8628; const uint GL_MODELVIEW_PROJECTION_NV = 0x8629; const uint GL_IDENTITY_NV = 0x862A; const uint GL_INVERSE_NV = 0x862B; const uint GL_TRANSPOSE_NV = 0x862C; const uint GL_INVERSE_TRANSPOSE_NV = 0x862D; const uint GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E; const uint GL_MAX_TRACK_MATRICES_NV = 0x862F; const uint GL_MATRIX0_NV = 0x8630; const uint GL_MATRIX1_NV = 0x8631; const uint GL_MATRIX2_NV = 0x8632; const uint GL_MATRIX3_NV = 0x8633; const uint GL_MATRIX4_NV = 0x8634; const uint GL_MATRIX5_NV = 0x8635; const uint GL_MATRIX6_NV = 0x8636; const uint GL_MATRIX7_NV = 0x8637; const uint GL_CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640; const uint GL_CURRENT_MATRIX_NV = 0x8641; const uint GL_VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642; const uint GL_VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643; const uint GL_PROGRAM_PARAMETER_NV = 0x8644; const uint GL_ATTRIB_ARRAY_POINTER_NV = 0x8645; const uint GL_PROGRAM_TARGET_NV = 0x8646; const uint GL_PROGRAM_RESIDENT_NV = 0x8647; const uint GL_TRACK_MATRIX_NV = 0x8648; const uint GL_TRACK_MATRIX_TRANSFORM_NV = 0x8649; const uint GL_VERTEX_PROGRAM_BINDING_NV = 0x864A; const uint GL_PROGRAM_ERROR_POSITION_NV = 0x864B; const uint GL_VERTEX_ATTRIB_ARRAY0_NV = 0x8650; const uint GL_VERTEX_ATTRIB_ARRAY1_NV = 0x8651; const uint GL_VERTEX_ATTRIB_ARRAY2_NV = 0x8652; const uint GL_VERTEX_ATTRIB_ARRAY3_NV = 0x8653; const uint GL_VERTEX_ATTRIB_ARRAY4_NV = 0x8654; const uint GL_VERTEX_ATTRIB_ARRAY5_NV = 0x8655; const uint GL_VERTEX_ATTRIB_ARRAY6_NV = 0x8656; const uint GL_VERTEX_ATTRIB_ARRAY7_NV = 0x8657; const uint GL_VERTEX_ATTRIB_ARRAY8_NV = 0x8658; const uint GL_VERTEX_ATTRIB_ARRAY9_NV = 0x8659; const uint GL_VERTEX_ATTRIB_ARRAY10_NV = 0x865A; const uint GL_VERTEX_ATTRIB_ARRAY11_NV = 0x865B; const uint GL_VERTEX_ATTRIB_ARRAY12_NV = 0x865C; const uint GL_VERTEX_ATTRIB_ARRAY13_NV = 0x865D; const uint GL_VERTEX_ATTRIB_ARRAY14_NV = 0x865E; const uint GL_VERTEX_ATTRIB_ARRAY15_NV = 0x865F; const uint GL_MAP1_VERTEX_ATTRIB0_4_NV = 0x8660; const uint GL_MAP1_VERTEX_ATTRIB1_4_NV = 0x8661; const uint GL_MAP1_VERTEX_ATTRIB2_4_NV = 0x8662; const uint GL_MAP1_VERTEX_ATTRIB3_4_NV = 0x8663; const uint GL_MAP1_VERTEX_ATTRIB4_4_NV = 0x8664; const uint GL_MAP1_VERTEX_ATTRIB5_4_NV = 0x8665; const uint GL_MAP1_VERTEX_ATTRIB6_4_NV = 0x8666; const uint GL_MAP1_VERTEX_ATTRIB7_4_NV = 0x8667; const uint GL_MAP1_VERTEX_ATTRIB8_4_NV = 0x8668; const uint GL_MAP1_VERTEX_ATTRIB9_4_NV = 0x8669; const uint GL_MAP1_VERTEX_ATTRIB10_4_NV = 0x866A; const uint GL_MAP1_VERTEX_ATTRIB11_4_NV = 0x866B; const uint GL_MAP1_VERTEX_ATTRIB12_4_NV = 0x866C; const uint GL_MAP1_VERTEX_ATTRIB13_4_NV = 0x866D; const uint GL_MAP1_VERTEX_ATTRIB14_4_NV = 0x866E; const uint GL_MAP1_VERTEX_ATTRIB15_4_NV = 0x866F; const uint GL_MAP2_VERTEX_ATTRIB0_4_NV = 0x8670; const uint GL_MAP2_VERTEX_ATTRIB1_4_NV = 0x8671; const uint GL_MAP2_VERTEX_ATTRIB2_4_NV = 0x8672; const uint GL_MAP2_VERTEX_ATTRIB3_4_NV = 0x8673; const uint GL_MAP2_VERTEX_ATTRIB4_4_NV = 0x8674; const uint GL_MAP2_VERTEX_ATTRIB5_4_NV = 0x8675; const uint GL_MAP2_VERTEX_ATTRIB6_4_NV = 0x8676; const uint GL_MAP2_VERTEX_ATTRIB7_4_NV = 0x8677; const uint GL_MAP2_VERTEX_ATTRIB8_4_NV = 0x8678; const uint GL_MAP2_VERTEX_ATTRIB9_4_NV = 0x8679; const uint GL_MAP2_VERTEX_ATTRIB10_4_NV = 0x867A; const uint GL_MAP2_VERTEX_ATTRIB11_4_NV = 0x867B; const uint GL_MAP2_VERTEX_ATTRIB12_4_NV = 0x867C; const uint GL_MAP2_VERTEX_ATTRIB13_4_NV = 0x867D; const uint GL_MAP2_VERTEX_ATTRIB14_4_NV = 0x867E; const uint GL_MAP2_VERTEX_ATTRIB15_4_NV = 0x867F; const uint GL_NV_vertex_program1_1 = 1; const uint GL_NV_vertex_program2 = 1; /*----------------------------------------------------------------------- * OML (OpenML) *----------------------------------------------------------------------*/ const uint GL_OML_interlace = 1; const uint GL_INTERLACE_OML = 0x8980; const uint GL_INTERLACE_READ_OML = 0x8981; const uint GL_OML_subsample = 1; const uint GL_FORMAT_SUBSAMPLE_24_24_OML = 0x8982; const uint GL_FORMAT_SUBSAMPLE_244_244_OML = 0x8983; const uint GL_OML_resample = 1; const uint GL_PACK_RESAMPLE_OML = 0x8984; const uint GL_UNPACK_RESAMPLE_OML = 0x8985; const uint GL_RESAMPLE_REPLICATE_OML = 0x8986; const uint GL_RESAMPLE_ZERO_FILL_OML = 0x8987; const uint GL_RESAMPLE_AVERAGE_OML = 0x8988; const uint GL_RESAMPLE_DECIMATE_OML = 0x8989; /*----------------------------------------------------------------------- * PGI *----------------------------------------------------------------------*/ const uint GL_PGI_misc_hints = 1; const uint GL_PREFER_DOUBLEBUFFER_HINT_PGI = 0x1A1F8; const uint GL_CONSERVE_MEMORY_HINT_PGI = 0x1A1FD; const uint GL_RECLAIM_MEMORY_HINT_PGI = 0x1A1FE; const uint GL_NATIVE_GRAPHICS_HANDLE_PGI = 0x1A202; const uint GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI = 0x1A203; const uint GL_NATIVE_GRAPHICS_END_HINT_PGI = 0x1A204; const uint GL_ALWAYS_FAST_HINT_PGI = 0x1A20C; const uint GL_ALWAYS_SOFT_HINT_PGI = 0x1A20D; const uint GL_ALLOW_DRAW_OBJ_HINT_PGI = 0x1A20E; const uint GL_ALLOW_DRAW_WIN_HINT_PGI = 0x1A20F; const uint GL_ALLOW_DRAW_FRG_HINT_PGI = 0x1A210; const uint GL_ALLOW_DRAW_MEM_HINT_PGI = 0x1A211; const uint GL_STRICT_DEPTHFUNC_HINT_PGI = 0x1A216; const uint GL_STRICT_LIGHTING_HINT_PGI = 0x1A217; const uint GL_STRICT_SCISSOR_HINT_PGI = 0x1A218; const uint GL_FULL_STIPPLE_HINT_PGI = 0x1A219; const uint GL_CLIP_NEAR_HINT_PGI = 0x1A220; const uint GL_CLIP_FAR_HINT_PGI = 0x1A221; const uint GL_WIDE_LINE_HINT_PGI = 0x1A222; const uint GL_BACK_NORMALS_HINT_PGI = 0x1A223; const uint GL_PGI_vertex_hints = 1; const uint GL_VERTEX_DATA_HINT_PGI = 0x1A22A; const uint GL_VERTEX_CONSISTENT_HINT_PGI = 0x1A22B; const uint GL_MATERIAL_SIDE_HINT_PGI = 0x1A22C; const uint GL_MAX_VERTEX_HINT_PGI = 0x1A22D; const uint GL_COLOR3_BIT_PGI = 0x00010000; const uint GL_COLOR4_BIT_PGI = 0x00020000; const uint GL_EDGEFLAG_BIT_PGI = 0x00040000; const uint GL_INDEX_BIT_PGI = 0x00080000; const uint GL_MAT_AMBIENT_BIT_PGI = 0x00100000; const uint GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI = 0x00200000; const uint GL_MAT_DIFFUSE_BIT_PGI = 0x00400000; const uint GL_MAT_EMISSION_BIT_PGI = 0x00800000; const uint GL_MAT_COLOR_INDEXES_BIT_PGI = 0x01000000; const uint GL_MAT_SHININESS_BIT_PGI = 0x02000000; const uint GL_MAT_SPECULAR_BIT_PGI = 0x04000000; const uint GL_NORMAL_BIT_PGI = 0x08000000; const uint GL_TEXCOORD1_BIT_PGI = 0x10000000; const uint GL_TEXCOORD2_BIT_PGI = 0x20000000; const uint GL_TEXCOORD3_BIT_PGI = 0x40000000; const uint GL_TEXCOORD4_BIT_PGI = 0x80000000; const uint GL_VERTEX23_BIT_PGI = 0x00000004; const uint GL_VERTEX4_BIT_PGI = 0x00000008; /*----------------------------------------------------------------------- * REND *----------------------------------------------------------------------*/ const uint GL_REND_screen_coordinates = 1; const uint GL_SCREEN_COORDINATES_REND = 0x8490; const uint GL_INVERTED_SCREEN_W_REND = 0x8491; /*----------------------------------------------------------------------- * SGI (Silicon Graphics Inc) *----------------------------------------------------------------------*/ const uint GL_SGI_color_matrix = 1; const uint GL_COLOR_MATRIX_SGI = 0x80B1; const uint GL_COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B2; const uint GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B3; const uint GL_POST_COLOR_MATRIX_RED_SCALE_SGI = 0x80B4; const uint GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI = 0x80B5; const uint GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI = 0x80B6; const uint GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI = 0x80B7; const uint GL_POST_COLOR_MATRIX_RED_BIAS_SGI = 0x80B8; const uint GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI = 0x80B9; const uint GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI = 0x80BA; const uint GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI = 0x80BB; const uint GL_SGI_color_table = 1; const uint GL_COLOR_TABLE_SGI = 0x80D0; const uint GL_POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D1; const uint GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D2; const uint GL_PROXY_COLOR_TABLE_SGI = 0x80D3; const uint GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D4; const uint GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D5; const uint GL_COLOR_TABLE_SCALE_SGI = 0x80D6; const uint GL_COLOR_TABLE_BIAS_SGI = 0x80D7; const uint GL_COLOR_TABLE_FORMAT_SGI = 0x80D8; const uint GL_COLOR_TABLE_WIDTH_SGI = 0x80D9; const uint GL_COLOR_TABLE_RED_SIZE_SGI = 0x80DA; const uint GL_COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB; const uint GL_COLOR_TABLE_BLUE_SIZE_SGI = 0x80DC; const uint GL_COLOR_TABLE_ALPHA_SIZE_SGI = 0x80DD; const uint GL_COLOR_TABLE_LUMINANCE_SIZE_SGI = 0x80DE; const uint GL_COLOR_TABLE_INTENSITY_SIZE_SGI = 0x80DF; const uint GL_SGI_depth_pass_instrument = 1; const uint GL_DEPTH_PASS_INSTRUMENT_SGIX = 0x8310; const uint GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX = 0x8311; const uint GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX = 0x8312; const uint GL_SGI_texture_color_table = 1; const uint GL_TEXTURE_COLOR_TABLE_SGI = 0x80BC; const uint GL_PROXY_TEXTURE_COLOR_TABLE_SGI = 0x80BD; const uint GL_SGIS_detail_texture = 1; const uint GL_DETAIL_TEXTURE_2D_SGIS = 0x8095; const uint GL_DETAIL_TEXTURE_2D_BINDING_SGIS = 0x8096; const uint GL_LINEAR_DETAIL_SGIS = 0x8097; const uint GL_LINEAR_DETAIL_ALPHA_SGIS = 0x8098; const uint GL_LINEAR_DETAIL_COLOR_SGIS = 0x8099; const uint GL_DETAIL_TEXTURE_LEVEL_SGIS = 0x809A; const uint GL_DETAIL_TEXTURE_MODE_SGIS = 0x809B; const uint GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C; const uint GL_SGIS_fog_function = 1; const uint GL_FOG_FUNC_SGIS = 0x812A; const uint GL_FOG_FUNC_POINTS_SGIS = 0x812B; const uint GL_MAX_FOG_FUNC_POINTS_SGIS = 0x812C; const uint GL_SGIS_generate_mipmap = 1; const uint GL_GENERATE_MIPMAP_SGIS = 0x8191; const uint GL_GENERATE_MIPMAP_HINT_SGIS = 0x8192; const uint GL_SGIS_multisample = 1; const uint GL_MULTISAMPLE_SGIS = 0x809D; const uint GL_SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E; const uint GL_SAMPLE_ALPHA_TO_ONE_SGIS = 0x809F; const uint GL_SAMPLE_MASK_SGIS = 0x80A0; const uint GL_1PASS_SGIS = 0x80A1; const uint GL_2PASS_0_SGIS = 0x80A2; const uint GL_2PASS_1_SGIS = 0x80A3; const uint GL_4PASS_0_SGIS = 0x80A4; const uint GL_4PASS_1_SGIS = 0x80A5; const uint GL_4PASS_2_SGIS = 0x80A6; const uint GL_4PASS_3_SGIS = 0x80A7; const uint GL_SAMPLE_BUFFERS_SGIS = 0x80A8; const uint GL_SAMPLES_SGIS = 0x80A9; const uint GL_SAMPLE_MASK_VALUE_SGIS = 0x80AA; const uint GL_SAMPLE_MASK_INVERT_SGIS = 0x80AB; const uint GL_SAMPLE_PATTERN_SGIS = 0x80AC; const uint GL_SGIS_pixel_texture = 1; const uint GL_PIXEL_TEXTURE_SGIS = 0x8353; const uint GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS = 0x8354; const uint GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = 0x8355; const uint GL_PIXEL_GROUP_COLOR_SGIS = 0x8356; const uint GL_SGIS_point_line_texgen = 1; const uint GL_EYE_DISTANCE_TO_POINT_SGIS = 0x81F0; const uint GL_OBJECT_DISTANCE_TO_POINT_SGIS = 0x81F1; const uint GL_EYE_DISTANCE_TO_LINE_SGIS = 0x81F2; const uint GL_OBJECT_DISTANCE_TO_LINE_SGIS = 0x81F3; const uint GL_EYE_POINT_SGIS = 0x81F4; const uint GL_OBJECT_POINT_SGIS = 0x81F5; const uint GL_EYE_LINE_SGIS = 0x81F6; const uint GL_OBJECT_LINE_SGIS = 0x81F7; const uint GL_SGIS_sharpen_texture = 1; const uint GL_LINEAR_SHARPEN_SGIS = 0x80AD; const uint GL_LINEAR_SHARPEN_ALPHA_SGIS = 0x80AE; const uint GL_LINEAR_SHARPEN_COLOR_SGIS = 0x80AF; const uint GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS = 0x80B0; const uint GL_SGIS_texture_border_clamp = 1; const uint GL_CLAMP_TO_BORDER_SGIS = 0x812D; const uint GL_SGIS_texture_color_mask = 1; const uint GL_TEXTURE_COLOR_WRITEMASK_SGIS = 0x81EF; const uint GL_SGIS_texture_edge_clamp = 1; const uint GL_CLAMP_TO_EDGE_SGIS = 0x812F; const uint GL_SGIS_texture_filter4 = 1; const uint GL_FILTER4_SGIS = 0x8146; const uint GL_TEXTURE_FILTER4_SIZE_SGIS = 0x8147; const uint GL_SGIS_texture_lod = 1; const uint GL_TEXTURE_MIN_LOD_SGIS = 0x813A; const uint GL_TEXTURE_MAX_LOD_SGIS = 0x813B; const uint GL_TEXTURE_BASE_LEVEL_SGIS = 0x813C; const uint GL_TEXTURE_MAX_LEVEL_SGIS = 0x813D; const uint GL_SGIS_texture_select = 1; const uint GL_DUAL_ALPHA4_SGIS = 0x8110; const uint GL_DUAL_ALPHA8_SGIS = 0x8111; const uint GL_DUAL_ALPHA12_SGIS = 0x8112; const uint GL_DUAL_ALPHA16_SGIS = 0x8113; const uint GL_DUAL_LUMINANCE4_SGIS = 0x8114; const uint GL_DUAL_LUMINANCE8_SGIS = 0x8115; const uint GL_DUAL_LUMINANCE12_SGIS = 0x8116; const uint GL_DUAL_LUMINANCE16_SGIS = 0x8117; const uint GL_DUAL_INTENSITY4_SGIS = 0x8118; const uint GL_DUAL_INTENSITY8_SGIS = 0x8119; const uint GL_DUAL_INTENSITY12_SGIS = 0x811A; const uint GL_DUAL_INTENSITY16_SGIS = 0x811B; const uint GL_DUAL_LUMINANCE_ALPHA4_SGIS = 0x811C; const uint GL_DUAL_LUMINANCE_ALPHA8_SGIS = 0x811D; const uint GL_QUAD_ALPHA4_SGIS = 0x811E; const uint GL_QUAD_ALPHA8_SGIS = 0x811F; const uint GL_QUAD_LUMINANCE4_SGIS = 0x8120; const uint GL_QUAD_LUMINANCE8_SGIS = 0x8121; const uint GL_QUAD_INTENSITY4_SGIS = 0x8122; const uint GL_QUAD_INTENSITY8_SGIS = 0x8123; const uint GL_DUAL_TEXTURE_SELECT_SGIS = 0x8124; const uint GL_QUAD_TEXTURE_SELECT_SGIS = 0x8125; const uint GL_SGIS_texture4D = 1; const uint GL_PACK_SKIP_VOLUMES_SGIS = 0x8130; const uint GL_PACK_IMAGE_DEPTH_SGIS = 0x8131; const uint GL_UNPACK_SKIP_VOLUMES_SGIS = 0x8132; const uint GL_UNPACK_IMAGE_DEPTH_SGIS = 0x8133; const uint GL_TEXTURE_4D_SGIS = 0x8134; const uint GL_PROXY_TEXTURE_4D_SGIS = 0x8135; const uint GL_TEXTURE_4DSIZE_SGIS = 0x8136; const uint GL_TEXTURE_WRAP_Q_SGIS = 0x8137; const uint GL_MAX_4D_TEXTURE_SIZE_SGIS = 0x8138; const uint GL_TEXTURE_4D_BINDING_SGIS = 0x814F; const uint GL_SGIX_async = 1; const uint GL_ASYNC_MARKER_SGIX = 0x8329; const uint GL_SGIX_async_histogram = 1; const uint GL_ASYNC_HISTOGRAM_SGIX = 0x832C; const uint GL_MAX_ASYNC_HISTOGRAM_SGIX = 0x832D; const uint GL_SGIX_async_pixel = 1; const uint GL_ASYNC_TEX_IMAGE_SGIX = 0x835C; const uint GL_ASYNC_DRAW_PIXELS_SGIX = 0x835D; const uint GL_ASYNC_READ_PIXELS_SGIX = 0x835E; const uint GL_MAX_ASYNC_TEX_IMAGE_SGIX = 0x835F; const uint GL_MAX_ASYNC_DRAW_PIXELS_SGIX = 0x8360; const uint GL_MAX_ASYNC_READ_PIXELS_SGIX = 0x8361; const uint GL_SGIX_blend_alpha_minmax = 1; const uint GL_ALPHA_MIN_SGIX = 0x8320; const uint GL_ALPHA_MAX_SGIX = 0x8321; const uint GL_SGIX_calligraphic_fragment = 1; const uint GL_CALLIGRAPHIC_FRAGMENT_SGIX = 0x8183; const uint GL_SGIX_clipmap = 1; const uint GL_LINEAR_CLIPMAP_LINEAR_SGIX = 0x8170; const uint GL_TEXTURE_CLIPMAP_CENTER_SGIX = 0x8171; const uint GL_TEXTURE_CLIPMAP_FRAME_SGIX = 0x8172; const uint GL_TEXTURE_CLIPMAP_OFFSET_SGIX = 0x8173; const uint GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8174; const uint GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX = 0x8175; const uint GL_TEXTURE_CLIPMAP_DEPTH_SGIX = 0x8176; const uint GL_MAX_CLIPMAP_DEPTH_SGIX = 0x8177; const uint GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8178; const uint GL_NEAREST_CLIPMAP_NEAREST_SGIX = 0x844D; const uint GL_NEAREST_CLIPMAP_LINEAR_SGIX = 0x844E; const uint GL_LINEAR_CLIPMAP_NEAREST_SGIX = 0x844F; const uint GL_SGIX_convolution_accuracy = 1; const uint GL_CONVOLUTION_HINT_SGIX = 0x8316; const uint GL_SGIX_depth_texture = 1; const uint GL_DEPTH_COMPONENT16_SGIX = 0x81A5; const uint GL_DEPTH_COMPONENT24_SGIX = 0x81A6; const uint GL_DEPTH_COMPONENT32_SGIX = 0x81A7; const uint GL_SGIX_flush_raster = 1; const uint GL_SGIX_fog_offset = 1; const uint GL_FOG_OFFSET_SGIX = 0x8198; const uint GL_FOG_OFFSET_VALUE_SGIX = 0x8199; const uint GL_SGIX_fog_scale = 1; const uint GL_FOG_SCALE_SGIX = 0x81FC; const uint GL_FOG_SCALE_VALUE_SGIX = 0x81FD; const uint GL_SGIX_fragment_lighting = 1; const uint GL_FRAGMENT_LIGHTING_SGIX = 0x8400; const uint GL_FRAGMENT_COLOR_MATERIAL_SGIX = 0x8401; const uint GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX = 0x8402; const uint GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX = 0x8403; const uint GL_MAX_FRAGMENT_LIGHTS_SGIX = 0x8404; const uint GL_MAX_ACTIVE_LIGHTS_SGIX = 0x8405; const uint GL_CURRENT_RASTER_NORMAL_SGIX = 0x8406; const uint GL_LIGHT_ENV_MODE_SGIX = 0x8407; const uint GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX = 0x8408; const uint GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX = 0x8409; const uint GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX = 0x840A; const uint GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX = 0x840B; const uint GL_FRAGMENT_LIGHT0_SGIX = 0x840C; const uint GL_FRAGMENT_LIGHT1_SGIX = 0x840D; const uint GL_FRAGMENT_LIGHT2_SGIX = 0x840E; const uint GL_FRAGMENT_LIGHT3_SGIX = 0x840F; const uint GL_FRAGMENT_LIGHT4_SGIX = 0x8410; const uint GL_FRAGMENT_LIGHT5_SGIX = 0x8411; const uint GL_FRAGMENT_LIGHT6_SGIX = 0x8412; const uint GL_FRAGMENT_LIGHT7_SGIX = 0x8413; const uint GL_SGIX_framezoom = 1; const uint GL_FRAMEZOOM_SGIX = 0x818B; const uint GL_FRAMEZOOM_FACTOR_SGIX = 0x818C; const uint GL_MAX_FRAMEZOOM_FACTOR_SGIX = 0x818D; const uint GL_SGIX_impact_pixel_texture = 1; const uint GL_PIXEL_TEX_GEN_Q_CEILING_SGIX = 0x8184; const uint GL_PIXEL_TEX_GEN_Q_ROUND_SGIX = 0x8185; const uint GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX = 0x8186; const uint GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX = 0x8187; const uint GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX = 0x8188; const uint GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX = 0x8189; const uint GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX = 0x818A; const uint GL_SGIX_instruments = 1; const uint GL_INSTRUMENT_BUFFER_POINTER_SGIX = 0x8180; const uint GL_INSTRUMENT_MEASUREMENTS_SGIX = 0x8181; const uint GL_SGIX_interlace = 1; const uint GL_INTERLACE_SGIX = 0x8094; const uint GL_SGIX_ir_instrument1 = 1; const uint GL_IR_INSTRUMENT1_SGIX = 0x817F; const uint GL_SGIX_list_priority = 1; const uint GL_LIST_PRIORITY_SGIX = 0x8182; const uint GL_SGIX_pixel_texture = 1; const uint GL_PIXEL_TEX_GEN_SGIX = 0x8139; const uint GL_PIXEL_TEX_GEN_MODE_SGIX = 0x832B; const uint GL_SGIX_pixel_tiles = 1; const uint GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX = 0x813E; const uint GL_PIXEL_TILE_CACHE_INCREMENT_SGIX = 0x813F; const uint GL_PIXEL_TILE_WIDTH_SGIX = 0x8140; const uint GL_PIXEL_TILE_HEIGHT_SGIX = 0x8141; const uint GL_PIXEL_TILE_GRID_WIDTH_SGIX = 0x8142; const uint GL_PIXEL_TILE_GRID_HEIGHT_SGIX = 0x8143; const uint GL_PIXEL_TILE_GRID_DEPTH_SGIX = 0x8144; const uint GL_PIXEL_TILE_CACHE_SIZE_SGIX = 0x8145; const uint GL_SGIX_polynomial_ffd = 1; const uint GL_GEOMETRY_DEFORMATION_SGIX = 0x8194; const uint GL_TEXTURE_DEFORMATION_SGIX = 0x8195; const uint GL_DEFORMATIONS_MASK_SGIX = 0x8196; const uint GL_MAX_DEFORMATION_ORDER_SGIX = 0x8197; const uint GL_SGIX_reference_plane = 1; const uint GL_REFERENCE_PLANE_SGIX = 0x817D; const uint GL_REFERENCE_PLANE_EQUATION_SGIX = 0x817E; const uint GL_SGIX_resample = 1; const uint GL_PACK_RESAMPLE_SGIX = 0x842C; const uint GL_UNPACK_RESAMPLE_SGIX = 0x842D; const uint GL_RESAMPLE_REPLICATE_SGIX = 0x842E; const uint GL_RESAMPLE_ZERO_FILL_SGIX = 0x842F; const uint GL_RESAMPLE_DECIMATE_SGIX = 0x8430; const uint GL_SGIX_scalebias_hint = 1; const uint GL_SCALEBIAS_HINT_SGIX = 0x8322; const uint GL_SGIX_shadow = 1; const uint GL_TEXTURE_COMPARE_SGIX = 0x819A; const uint GL_TEXTURE_COMPARE_OPERATOR_SGIX = 0x819B; const uint GL_TEXTURE_LEQUAL_R_SGIX = 0x819C; const uint GL_TEXTURE_GEQUAL_R_SGIX = 0x819D; const uint GL_SGIX_shadow_ambient = 1; const uint GL_SHADOW_AMBIENT_SGIX = 0x80BF; const uint GL_SGIX_sprite = 1; const uint GL_SPRITE_SGIX = 0x8148; const uint GL_SPRITE_MODE_SGIX = 0x8149; const uint GL_SPRITE_AXIS_SGIX = 0x814A; const uint GL_SPRITE_TRANSLATION_SGIX = 0x814B; const uint GL_SPRITE_AXIAL_SGIX = 0x814C; const uint GL_SPRITE_OBJECT_ALIGNED_SGIX = 0x814D; const uint GL_SPRITE_EYE_ALIGNED_SGIX = 0x814E; const uint GL_SGIX_subsample = 1; const uint GL_PACK_SUBSAMPLE_RATE_SGIX = 0x85A0; const uint GL_UNPACK_SUBSAMPLE_RATE_SGIX = 0x85A1; const uint GL_PIXEL_SUBSAMPLE_4444_SGIX = 0x85A2; const uint GL_PIXEL_SUBSAMPLE_2424_SGIX = 0x85A3; const uint GL_PIXEL_SUBSAMPLE_4242_SGIX = 0x85A4; const uint GL_SGIX_tag_sample_buffer = 1; const uint GL_SGIX_texture_add_env = 1; const uint GL_TEXTURE_ENV_BIAS_SGIX = 0x80BE; const uint GL_SGIX_texture_coordinate_clamp = 1; const uint GL_TEXTURE_MAX_CLAMP_S_SGIX = 0x8369; const uint GL_TEXTURE_MAX_CLAMP_T_SGIX = 0x836A; const uint GL_TEXTURE_MAX_CLAMP_R_SGIX = 0x836B; const uint GL_SGIX_texture_lod_bias = 1; const uint GL_TEXTURE_LOD_BIAS_S_SGIX = 0x818E; const uint GL_TEXTURE_LOD_BIAS_T_SGIX = 0x818F; const uint GL_TEXTURE_LOD_BIAS_R_SGIX = 0x8190; const uint GL_SGIX_texture_multi_buffer = 1; const uint GL_TEXTURE_MULTI_BUFFER_HINT_SGIX = 0x812E; const uint GL_SGIX_texture_scale_bias = 1; const uint GL_POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179; const uint GL_POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A; const uint GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B; const uint GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C; const uint GL_SGIX_vertex_preclip = 1; const uint GL_VERTEX_PRECLIP_SGIX = 0x83EE; const uint GL_VERTEX_PRECLIP_HINT_SGIX = 0x83EF; const uint GL_SGIX_ycrcb = 1; const uint GL_YCRCB_422_SGIX = 0x81BB; const uint GL_YCRCB_444_SGIX = 0x81BC; const uint GL_SGIX_ycrcb_subsample = 1; const uint GL_SGIX_ycrcba = 1; const uint GL_YCRCB_SGIX = 0x8318; const uint GL_YCRCBA_SGIX = 0x8319; /*----------------------------------------------------------------------- * SUN *----------------------------------------------------------------------*/ const uint GL_SUN_convolution_border_modes = 1; const uint GL_WRAP_BORDER_SUN = 0x81D4; const uint GL_SUN_global_alpha = 1; const uint GL_GLOBAL_ALPHA_SUN = 0x81D9; const uint GL_GLOBAL_ALPHA_FACTOR_SUN = 0x81DA; const uint GL_SUN_mesh_array = 1; const uint GL_QUAD_MESH_SUN = 0x8614; const uint GL_TRIANGLE_MESH_SUN = 0x8615; const uint GL_SUN_slice_accum = 1; const uint GL_SLICE_ACCUM_SUN = 0x85CC; const uint GL_SUN_triangle_list = 1; const uint GL_RESTART_SUN = 0x0001; const uint GL_REPLACE_MIDDLE_SUN = 0x0002; const uint GL_REPLACE_OLDEST_SUN = 0x0003; const uint GL_TRIANGLE_LIST_SUN = 0x81D7; const uint GL_REPLACEMENT_CODE_SUN = 0x81D8; const uint GL_REPLACEMENT_CODE_ARRAY_SUN = 0x85C0; const uint GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN = 0x85C1; const uint GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN = 0x85C2; const uint GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN = 0x85C3; const uint GL_R1UI_V3F_SUN = 0x85C4; const uint GL_R1UI_C4UB_V3F_SUN = 0x85C5; const uint GL_R1UI_C3F_V3F_SUN = 0x85C6; const uint GL_R1UI_N3F_V3F_SUN = 0x85C7; const uint GL_R1UI_C4F_N3F_V3F_SUN = 0x85C8; const uint GL_R1UI_T2F_V3F_SUN = 0x85C9; const uint GL_R1UI_T2F_N3F_V3F_SUN = 0x85CA; const uint GL_R1UI_T2F_C4F_N3F_V3F_SUN = 0x85CB; const uint GL_SUN_vertex = 1; const uint GL_SUNX_constant_data = 1; const uint GL_UNPACK_CONSTANT_DATA_SUNX = 0x81D5; const uint GL_TEXTURE_CONSTANT_DATA_SUNX = 0x81D6; /*----------------------------------------------------------------------- * WIN (Microsoft) *----------------------------------------------------------------------*/ const uint GL_WIN_phong_shading = 1; const uint GL_PHONG_WIN = 0x80EA; const uint GL_PHONG_HINT_WIN = 0x80EB; const uint GL_WIN_specular_fog = 1; const uint GL_FOG_SPECULAR_TEXTURE_WIN = 0x80EC; /************************************************************************ * * Extension function pointer types * * Note: Proper OpenGL extension checking must be performed to use these. * ************************************************************************/ /* GL_ARB_multitexture */ typedef void (* PFNGLACTIVETEXTUREARBPROC) (GLenum texture); typedef void (* PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); typedef void (* PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); typedef void (* PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); typedef void (* PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); typedef void (* PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); typedef void (* PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, GLshort *v); typedef void (* PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); typedef void (* PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); typedef void (* PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); typedef void (* PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); typedef void (* PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, GLshort *v); typedef void (* PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); typedef void (* PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); typedef void (* PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); typedef void (* PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); typedef void (* PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, GLshort *v); typedef void (* PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); typedef void (* PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, GLdouble *v); typedef void (* PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); typedef void (* PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, GLfloat *v); typedef void (* PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); typedef void (* PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, GLint *v); typedef void (* PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); typedef void (* PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, GLshort *v); /* GL_ARB_transpose_matrix */ typedef void (* PFNGLLOADTRANSPOSEMATRIXFARBPROC) (GLfloat *m); typedef void (* PFNGLLOADTRANSPOSEMATRIXDARBPROC) (GLdouble *m); typedef void (* PFNGLMULTTRANSPOSEMATRIXFARBPROC) (GLfloat *m); typedef void (* PFNGLMULTTRANSPOSEMATRIXDARBPROC) (GLdouble *m); /* GL_ARB_multisample */ typedef void (* PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); /* GL_ARB_texture_compression */ typedef void (* PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid *data); typedef void (* PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img); /* GL_ARB_point_parameters */ typedef void (* PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, GLfloat *params); /* GL_ARB_vertex_blend */ typedef void (* PFNGLWEIGHTBVARBPROC) (GLint size, GLbyte *weights); typedef void (* PFNGLWEIGHTSVARBPROC) (GLint size, GLshort *weights); typedef void (* PFNGLWEIGHTIVARBPROC) (GLint size, GLint *weights); typedef void (* PFNGLWEIGHTFVARBPROC) (GLint size, GLfloat *weights); typedef void (* PFNGLWEIGHTDVARBPROC) (GLint size, GLdouble *weights); typedef void (* PFNGLWEIGHTUBVARBPROC) (GLint size, GLubyte *weights); typedef void (* PFNGLWEIGHTUSVARBPROC) (GLint size, GLushort *weights); typedef void (* PFNGLWEIGHTUIVARBPROC) (GLint size, GLuint *weights); typedef void (* PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); typedef void (* PFNGLVERTEXBLENDARBPROC) (GLint count); /* GL_ARB_matrix_palette */ typedef void (* PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); typedef void (* PFNGLMATRIXINDEXUBVARBPROC) (GLint size, GLubyte *indices); typedef void (* PFNGLMATRIXINDEXUSVARBPROC) (GLint size, GLushort *indices); typedef void (* PFNGLMATRIXINDEXUIVARBPROC) (GLint size, GLuint *indices); typedef void (* PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); /* GL_ARB_window_pos */ typedef void (* PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); typedef void (* PFNGLWINDOWPOS2DVARBPROC) (GLdouble *v); typedef void (* PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); typedef void (* PFNGLWINDOWPOS2FVARBPROC) (GLfloat *v); typedef void (* PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); typedef void (* PFNGLWINDOWPOS2IVARBPROC) (GLint *v); typedef void (* PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); typedef void (* PFNGLWINDOWPOS2SVARBPROC) (GLshort *v); typedef void (* PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void (* PFNGLWINDOWPOS3DVARBPROC) (GLdouble *v); typedef void (* PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLWINDOWPOS3FVARBPROC) (GLfloat *v); typedef void (* PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); typedef void (* PFNGLWINDOWPOS3IVARBPROC) (GLint *v); typedef void (* PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); typedef void (* PFNGLWINDOWPOS3SVARBPROC) (GLshort *v); /* GL_ARB_vertex_program */ typedef void (* PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); typedef void (* PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); typedef void (* PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); typedef void (* PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); typedef void (* PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); typedef void (* PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); typedef void (* PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void (* PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void (* PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void (* PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void (* PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, GLbyte *v); typedef void (* PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, GLint *v); typedef void (* PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, GLubyte *v); typedef void (* PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, GLushort *v); typedef void (* PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, GLuint *v); typedef void (* PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, GLbyte *v); typedef void (* PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, GLint *v); typedef void (* PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, GLubyte *v); typedef void (* PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, GLushort *v); typedef void (* PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, GLuint *v); typedef void (* PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid *pointer); typedef void (* PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); typedef void (* PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); typedef void (* PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, GLvoid *string); typedef void (* PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); typedef void (* PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, GLuint *programs); typedef void (* PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); typedef void (* PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, GLdouble *params); typedef void (* PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, GLfloat *params); typedef void (* PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, GLdouble *params); typedef void (* PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, GLfloat *params); typedef void (* PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); typedef void (* PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); typedef void (* PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); typedef void (* PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); typedef void (* PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); typedef void (* PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); typedef void (* PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); typedef void (* PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); typedef void (* PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid **pointer); typedef GLboolean (* PFNGLISPROGRAMARBPROC) (GLuint program); /* GL_ARB_vertex_buffer_object */ typedef int GLsizeiptrARB; typedef int GLintptrARB; typedef void (* PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); typedef void (* PFNGLDELETEBUFFERSARBPROC) (GLsizei n, GLuint *buffers); typedef void (* PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); typedef GLboolean (* PFNGLISBUFFERARBPROC) (GLuint buffer); typedef void (* PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, void *data, GLenum usage); typedef void (* PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); typedef void (* PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data); typedef void * (* PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); typedef GLboolean (* PFNGLUNMAPBUFFERARBPROC) (GLenum target); typedef void (* PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params); /* GL_EXT_blend_color */ typedef void (* PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* GL_EXT_polygon_offset */ typedef void (* PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); /* GL_EXT_texture3D */ typedef void (* PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid *pixels); typedef void (* PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *pixels); /* GL_SGIS_texture_filter4 */ typedef void (* PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); typedef void (* PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, GLfloat *weights); /* GL_EXT_subtexture */ typedef void (* PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid *pixels); typedef void (* PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); /* GL_EXT_copy_texture */ typedef void (* PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); typedef void (* PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); typedef void (* PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); typedef void (* PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (* PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* GL_EXT_histogram */ typedef void (* PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (* PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (* PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); typedef void (* PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); typedef void (* PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); typedef void (* PFNGLRESETMINMAXEXTPROC) (GLenum target); /* GL_EXT_convolution */ typedef void (* PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid *image); typedef void (* PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *image); typedef void (* PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); typedef void (* PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); typedef void (* PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (* PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (* PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); typedef void (* PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); typedef void (* PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *row, GLvoid *column); /* GL_EXT_texture_object */ typedef GLboolean (* PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, GLuint *textures, GLboolean *residences); typedef void (* PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); typedef void (* PFNGLDELETETEXTURESEXTPROC) (GLsizei n, GLuint *textures); typedef void (* PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); typedef GLboolean (* PFNGLISTEXTUREEXTPROC) (GLuint texture); typedef void (* PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, GLuint *textures, GLclampf *priorities); /* GL_EXT_vertex_array */ typedef void (* PFNGLARRAYELEMENTEXTPROC) (GLint i); typedef void (* PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); typedef void (* PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); typedef void (* PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, GLboolean *pointer); typedef void (* PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); typedef void (* PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); typedef void (* PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); typedef void (* PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); typedef void (* PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer); /* GL_EXT_blend_minmax */ typedef void (* PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); /* GL_EXT_point_parameters */ typedef void (* PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); /* GL_EXT_color_subtable */ typedef void (* PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid *data); typedef void (* PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* GL_EXT_paletted_texture */ typedef void (* PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, GLvoid *table); typedef void (* PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); typedef void (* PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); /* GL_EXT_index_material */ typedef void (* PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); /* GL_EXT_index_func */ typedef void (* PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf reference); /* GL_EXT_compiled_vertex_array */ typedef void (* PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); typedef void (* PFNGLUNLOCKARRAYSEXTPROC) (); /* GL_EXT_cull_vertex */ typedef void (* PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); typedef void (* PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); /* GL_EXT_draw_range_elements */ typedef void (* PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices); /* GL_EXT_light_texture */ typedef void (* PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); typedef void (* PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); typedef void (* PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); /* GL_EXT_pixel_transform */ typedef void (* PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); typedef void (* PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); typedef void (* PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); /* GL_EXT_secondary_color */ typedef void (* PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); typedef void (* PFNGLSECONDARYCOLOR3BVEXTPROC) (GLbyte *v); typedef void (* PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); typedef void (* PFNGLSECONDARYCOLOR3DVEXTPROC) (GLdouble *v); typedef void (* PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); typedef void (* PFNGLSECONDARYCOLOR3FVEXTPROC) (GLfloat *v); typedef void (* PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); typedef void (* PFNGLSECONDARYCOLOR3IVEXTPROC) (GLint *v); typedef void (* PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); typedef void (* PFNGLSECONDARYCOLOR3SVEXTPROC) (GLshort *v); typedef void (* PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); typedef void (* PFNGLSECONDARYCOLOR3UBVEXTPROC) (GLubyte *v); typedef void (* PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); typedef void (* PFNGLSECONDARYCOLOR3UIVEXTPROC) (GLuint *v); typedef void (* PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); typedef void (* PFNGLSECONDARYCOLOR3USVEXTPROC) (GLushort *v); typedef void (* PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); /* GL_EXT_texture_perturb_normal */ typedef void (* PFNGLTEXTURENORMALEXTPROC) (GLenum mode); /* GL_EXT_multi_draw_arrays */ typedef void (* PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void (* PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, GLsizei *count, GLenum type, GLvoid* *indices, GLsizei primcount); /* GL_EXT_fog_coord */ typedef void (* PFNGLFOGCOORDFEXTPROC) (GLfloat coord); typedef void (* PFNGLFOGCOORDFVEXTPROC) (GLfloat *coord); typedef void (* PFNGLFOGCOORDDEXTPROC) (GLdouble coord); typedef void (* PFNGLFOGCOORDDVEXTPROC) (GLdouble *coord); typedef void (* PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, GLvoid *pointer); /* GL_EXT_coordinate_frame */ typedef void (* PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); typedef void (* PFNGLTANGENT3BVEXTPROC) (GLbyte *v); typedef void (* PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); typedef void (* PFNGLTANGENT3DVEXTPROC) (GLdouble *v); typedef void (* PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); typedef void (* PFNGLTANGENT3FVEXTPROC) (GLfloat *v); typedef void (* PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); typedef void (* PFNGLTANGENT3IVEXTPROC) (GLint *v); typedef void (* PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); typedef void (* PFNGLTANGENT3SVEXTPROC) (GLshort *v); typedef void (* PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); typedef void (* PFNGLBINORMAL3BVEXTPROC) (GLbyte *v); typedef void (* PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); typedef void (* PFNGLBINORMAL3DVEXTPROC) (GLdouble *v); typedef void (* PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); typedef void (* PFNGLBINORMAL3FVEXTPROC) (GLfloat *v); typedef void (* PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); typedef void (* PFNGLBINORMAL3IVEXTPROC) (GLint *v); typedef void (* PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); typedef void (* PFNGLBINORMAL3SVEXTPROC) (GLshort *v); typedef void (* PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, GLvoid *pointer); typedef void (* PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLvoid *pointer); /* GL_EXT_blend_func_separate */ typedef void (* PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); typedef void (* PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* GL_EXT_vertex_weighting */ typedef void (* PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); typedef void (* PFNGLVERTEXWEIGHTFVEXTPROC) (GLfloat *weight); typedef void (* PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, GLvoid *pointer); /* GL_EXT_multisample */ typedef void (* PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); typedef void (* PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); /* GL_EXT_vertex_shader */ typedef void (* PFNGLBEGINVERTEXSHADEREXTPROC) (); typedef void (* PFNGLENDVERTEXSHADEREXTPROC) (); typedef void (* PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); typedef GLuint (* PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); typedef void (* PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); typedef void (* PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); typedef void (* PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); typedef void (* PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); typedef void (* PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in_, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); typedef void (* PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in_, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); typedef void (* PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); typedef void (* PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); typedef GLuint (* PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); typedef void (* PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, void *addr); typedef void (* PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, void *addr); typedef void (* PFNGLVARIANTBVEXTPROC) (GLuint id, GLbyte *addr); typedef void (* PFNGLVARIANTSVEXTPROC) (GLuint id, GLshort *addr); typedef void (* PFNGLVARIANTIVEXTPROC) (GLuint id, GLint *addr); typedef void (* PFNGLVARIANTFVEXTPROC) (GLuint id, GLfloat *addr); typedef void (* PFNGLVARIANTDVEXTPROC) (GLuint id, GLdouble *addr); typedef void (* PFNGLVARIANTUBVEXTPROC) (GLuint id, GLubyte *addr); typedef void (* PFNGLVARIANTUSVEXTPROC) (GLuint id, GLushort *addr); typedef void (* PFNGLVARIANTUIVEXTPROC) (GLuint id, GLuint *addr); typedef void (* PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, void *addr); typedef void (* PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); typedef void (* PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); typedef GLuint (* PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); typedef GLuint (* PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); typedef GLuint (* PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); typedef GLuint (* PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); typedef GLuint (* PFNGLBINDPARAMETEREXTPROC) (GLenum value); typedef GLboolean (* PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); typedef void (* PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (* PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (* PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void (* PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); typedef void (* PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (* PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (* PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void (* PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (* PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (* PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); /* GL_EXT_stencil_two_side */ typedef void (* PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); /* GL_SGI_color_table */ typedef void (* PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid *table); typedef void (* PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (* PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); typedef void (* PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); /* GL_SGIX_pixel_texture */ typedef void (* PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); /* GL_SGIS_pixel_texture */ typedef void (* PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); typedef void (* PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); typedef void (* PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); typedef void (* PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); typedef void (* PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); /* GL_SGIS_texture4D */ typedef void (* PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, GLvoid *pixels); typedef void (* PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, GLvoid *pixels); /* GL_SGIS_detail_texture */ typedef void (* PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, GLfloat *points); typedef void (* PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); /* GL_SGIS_sharpen_texture */ typedef void (* PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, GLfloat *points); typedef void (* PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); /* GL_SGIS_multisample */ typedef void (* PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); typedef void (* PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); /* GL_SGIX_sprite */ typedef void (* PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, GLfloat *params); typedef void (* PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); typedef void (* PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, GLint *params); /* GL_SGIS_point_parameters */ typedef void (* PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); /* GL_SGIX_instruments */ typedef GLint (* PFNGLGETINSTRUMENTSSGIXPROC) (); typedef void (* PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); typedef GLint (* PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); typedef void (* PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); typedef void (* PFNGLSTARTINSTRUMENTSSGIXPROC) (); typedef void (* PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); /* GL_SGIX_framezoom */ typedef void (* PFNGLFRAMEZOOMSGIXPROC) (GLint factor); /* GL_SGIX_tag_sample_buffer */ typedef void (* PFNGLTAGSAMPLEBUFFERSGIXPROC) (); /* GL_SGIX_polynomial_ffd */ typedef void (* PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, GLdouble *points); typedef void (* PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, GLfloat *points); typedef void (* PFNGLDEFORMSGIXPROC) (GLbitfield mask); typedef void (* PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); /* GL_SGIX_reference_plane */ typedef void (* PFNGLREFERENCEPLANESGIXPROC) (GLdouble *equation); /* GL_SGIX_flush_raster */ typedef void (* PFNGLFLUSHRASTERSGIXPROC) (); /* GL_SGIS_fog_function */ typedef void (* PFNGLFOGFUNCSGISPROC) (GLsizei n, GLfloat *points); typedef void (* PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); /* GL_HP_image_transform */ typedef void (* PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); typedef void (* PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); typedef void (* PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); /* GL_PGI_misc_hints */ typedef void (* PFNGLHINTPGIPROC) (GLenum target, GLint mode); /* GL_SGIX_list_priority */ typedef void (* PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); typedef void (* PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); typedef void (* PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); typedef void (* PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); typedef void (* PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); typedef void (* PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); /* GL_SGIX_fragment_lighting */ typedef void (* PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); typedef void (* PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); typedef void (* PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); typedef void (* PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GLfloat *params); typedef void (* PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); typedef void (* PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GLint *params); typedef void (* PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); typedef void (* PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); typedef void (* PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); typedef void (* PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); typedef void (* PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); typedef void (* PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); typedef void (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); typedef void (* PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); typedef void (* PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); /* GL_SGIX_async */ typedef void (* PFNGLASYNCMARKERSGIXPROC) (GLuint marker); typedef GLint (* PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); typedef GLint (* PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); typedef GLuint (* PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); typedef void (* PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); typedef GLboolean (* PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); /* GL_INTEL_parallel_arrays */ typedef void (* PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, GLvoid* *pointer); typedef void (* PFNGLNORMALPOINTERVINTELPROC) (GLenum type, GLvoid* *pointer); typedef void (* PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, GLvoid* *pointer); typedef void (* PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, GLvoid* *pointer); /* GL_SUNX_constant_data */ typedef void (* PFNGLFINISHTEXTURESUNXPROC) (); /* GL_SUN_global_alpha */ typedef void (* PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); typedef void (* PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); typedef void (* PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); typedef void (* PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); typedef void (* PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); typedef void (* PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); typedef void (* PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); typedef void (* PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); /* GL_SUN_triangle_list */ typedef void (* PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); typedef void (* PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); typedef void (* PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); typedef void (* PFNGLREPLACEMENTCODEUIVSUNPROC) (GLuint *code); typedef void (* PFNGLREPLACEMENTCODEUSVSUNPROC) (GLushort *code); typedef void (* PFNGLREPLACEMENTCODEUBVSUNPROC) (GLubyte *code); typedef void (* PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, GLvoid* *pointer); /* GL_SUN_vertex */ typedef void (* PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); typedef void (* PFNGLCOLOR4UBVERTEX2FVSUNPROC) (GLubyte *c, GLfloat *v); typedef void (* PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLCOLOR4UBVERTEX3FVSUNPROC) (GLubyte *c, GLfloat *v); typedef void (* PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLCOLOR3FVERTEX3FVSUNPROC) (GLfloat *c, GLfloat *v); typedef void (* PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLNORMAL3FVERTEX3FVSUNPROC) (GLfloat *n, GLfloat *v); typedef void (* PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (GLfloat *c, GLfloat *n, GLfloat *v); typedef void (* PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (GLfloat *tc, GLfloat *v); typedef void (* PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (GLfloat *tc, GLfloat *v); typedef void (* PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (GLfloat *tc, GLubyte *c, GLfloat *v); typedef void (* PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (GLfloat *tc, GLfloat *c, GLfloat *v); typedef void (* PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (GLfloat *tc, GLfloat *n, GLfloat *v); typedef void (* PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (GLfloat *tc, GLfloat *c, GLfloat *n, GLfloat *v); typedef void (* PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (GLfloat *tc, GLfloat *c, GLfloat *n, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (GLuint *rc, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (GLuint *rc, GLubyte *c, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (GLuint *rc, GLfloat *c, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (GLuint *rc, GLfloat *n, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (GLuint *rc, GLfloat *c, GLfloat *n, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (GLuint *rc, GLfloat *tc, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (GLuint *rc, GLfloat *tc, GLfloat *n, GLfloat *v); typedef void (* PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (GLuint *rc, GLfloat *tc, GLfloat *c, GLfloat *n, GLfloat *v); /* GL_NV_vertex_array_range */ typedef void (* PFNGLFLUSHVERTEXARRAYRANGENVPROC) (); typedef void (* PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, GLvoid *pointer); /* GL_NV_primitive_restart */ typedef void (* PFNGLPRIMITIVERESTARTNVPROC) (); typedef void (* PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); /* GL_NV_register_combiners */ typedef void (* PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, GLfloat *params); typedef void (* PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); typedef void (* PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, GLint *params); typedef void (* PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); typedef void (* PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); typedef void (* PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); typedef void (* PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); typedef void (* PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); typedef void (* PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); typedef void (* PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); typedef void (* PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); typedef void (* PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); typedef void (* PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); /* GL_NV_fragment_program */ typedef void (* PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, GLubyte *name, GLfloat v[]); typedef void (* PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, GLubyte *name, GLdouble v[]); typedef void (* PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, GLubyte *name, GLfloat *params); typedef void (* PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, GLubyte *name, GLdouble *params); /* GL_NV_half_float */ typedef ushort GLhalf; typedef void (* PFNGLVERTEX2HNVPROC) (GLhalf x, GLhalf y); typedef void (* PFNGLVERTEX2HVNVPROC) (GLhalf *v); typedef void (* PFNGLVERTEX3HNVPROC) (GLhalf x, GLhalf y, GLhalf z); typedef void (* PFNGLVERTEX3HVNVPROC) (GLhalf *v); typedef void (* PFNGLVERTEX4HNVPROC) (GLhalf x, GLhalf y, GLhalf z, GLhalf w); typedef void (* PFNGLVERTEX4HVNVPROC) (GLhalf *v); typedef void (* PFNGLNORMAL3HNVPROC) (GLhalf nx, GLhalf ny, GLhalf nz); typedef void (* PFNGLNORMAL3HVNVPROC) (GLhalf *v); typedef void (* PFNGLCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue); typedef void (* PFNGLCOLOR3HVNVPROC) (GLhalf *v); typedef void (* PFNGLCOLOR4HNVPROC) (GLhalf red, GLhalf green, GLhalf blue, GLhalf alpha); typedef void (* PFNGLCOLOR4HVNVPROC) (GLhalf *v); typedef void (* PFNGLTEXCOORD1HNVPROC) (GLhalf s); typedef void (* PFNGLTEXCOORD1HVNVPROC) (GLhalf *v); typedef void (* PFNGLTEXCOORD2HNVPROC) (GLhalf s, GLhalf t); typedef void (* PFNGLTEXCOORD2HVNVPROC) (GLhalf *v); typedef void (* PFNGLTEXCOORD3HNVPROC) (GLhalf s, GLhalf t, GLhalf r); typedef void (* PFNGLTEXCOORD3HVNVPROC) (GLhalf *v); typedef void (* PFNGLTEXCOORD4HNVPROC) (GLhalf s, GLhalf t, GLhalf r, GLhalf q); typedef void (* PFNGLTEXCOORD4HVNVPROC) (GLhalf *v); typedef void (* PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalf s); typedef void (* PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, GLhalf *v); typedef void (* PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalf s, GLhalf t); typedef void (* PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, GLhalf *v); typedef void (* PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r); typedef void (* PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, GLhalf *v); typedef void (* PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r, GLhalf q); typedef void (* PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, GLhalf *v); typedef void (* PFNGLFOGCOORDHNVPROC) (GLhalf fog); typedef void (* PFNGLFOGCOORDHVNVPROC) (GLhalf *fog); typedef void (* PFNGLSECONDARYCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue); typedef void (* PFNGLSECONDARYCOLOR3HVNVPROC) (GLhalf *v); typedef void (* PFNGLVERTEXWEIGHTHNVPROC) (GLhalf weight); typedef void (* PFNGLVERTEXWEIGHTHVNVPROC) (GLhalf *weight); typedef void (* PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalf x); typedef void (* PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, GLhalf *v); typedef void (* PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalf x, GLhalf y); typedef void (* PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, GLhalf *v); typedef void (* PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z); typedef void (* PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, GLhalf *v); typedef void (* PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z, GLhalf w); typedef void (* PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, GLhalf *v); typedef void (* PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, GLhalf *v); typedef void (* PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, GLhalf *v); typedef void (* PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, GLhalf *v); typedef void (* PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, GLhalf *v); /* GL_NV_stencil_two_side */ typedef void (* PFNGLACTIVESTENCILFACENVPROC) (GLenum face); /* GL_MESA_resize_buffers */ typedef void (* PFNGLRESIZEBUFFERSMESAPROC) (); /* GL_MESA_window_pos */ typedef void (* PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); typedef void (* PFNGLWINDOWPOS2DVMESAPROC) (GLdouble *v); typedef void (* PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); typedef void (* PFNGLWINDOWPOS2FVMESAPROC) (GLfloat *v); typedef void (* PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); typedef void (* PFNGLWINDOWPOS2IVMESAPROC) (GLint *v); typedef void (* PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); typedef void (* PFNGLWINDOWPOS2SVMESAPROC) (GLshort *v); typedef void (* PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void (* PFNGLWINDOWPOS3DVMESAPROC) (GLdouble *v); typedef void (* PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLWINDOWPOS3FVMESAPROC) (GLfloat *v); typedef void (* PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); typedef void (* PFNGLWINDOWPOS3IVMESAPROC) (GLint *v); typedef void (* PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); typedef void (* PFNGLWINDOWPOS3SVMESAPROC) (GLshort *v); typedef void (* PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLWINDOWPOS4DVMESAPROC) (GLdouble *v); typedef void (* PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLWINDOWPOS4FVMESAPROC) (GLfloat *v); typedef void (* PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); typedef void (* PFNGLWINDOWPOS4IVMESAPROC) (GLint *v); typedef void (* PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); typedef void (* PFNGLWINDOWPOS4SVMESAPROC) (GLshort *v); /* GL_IBM_multimode_draw_arrays */ typedef void (* PFNGLMULTIMODEDRAWARRAYSIBMPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount, GLint modestride); typedef void (* PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (GLenum *mode, GLsizei *count, GLenum type, GLvoid* *indices, GLsizei primcount, GLint modestride); /* GL_IBM_vertex_array_lists */ typedef void (* PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, GLvoid* *pointer, GLint ptrstride); typedef void (* PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, GLvoid* *pointer, GLint ptrstride); typedef void (* PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, GLboolean* *pointer, GLint ptrstride); typedef void (* PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, GLvoid* *pointer, GLint ptrstride); typedef void (* PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, GLvoid* *pointer, GLint ptrstride); typedef void (* PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, GLvoid* *pointer, GLint ptrstride); typedef void (* PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, GLvoid* *pointer, GLint ptrstride); typedef void (* PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, GLvoid* *pointer, GLint ptrstride); /* GL_3DFX_tbuffer */ typedef void (* PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); /* GL_SGIS_texture_color_mask */ typedef void (* PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* GL_SGIX_igloo_interface */ typedef void (* PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, GLvoid *params); /* GL_NV_fence */ typedef void (* PFNGLDELETEFENCESNVPROC) (GLsizei n, GLuint *fences); typedef void (* PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); typedef GLboolean (* PFNGLISFENCENVPROC) (GLuint fence); typedef GLboolean (* PFNGLTESTFENCENVPROC) (GLuint fence); typedef void (* PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); typedef void (* PFNGLFINISHFENCENVPROC) (GLuint fence); typedef void (* PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); /* GL_NV_element_array */ typedef void (* PFNGLELEMENTPOINTERNVPROC) (GLenum type, GLvoid *pointer); typedef void (* PFNGLDRAWELEMENTARRAYNVPROC) (GLenum mode, GLint first, GLsizei count); typedef void (* PFNGLDRAWRANGEELEMENTARRAYNVPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); typedef void (* PFNGLMULTIDRAWELEMENTARRAYNVPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void (* PFNGLMULTIDRAWRANGEELEMENTARRAYNVPROC) (GLenum mode, GLuint start, GLuint end, GLint *first, GLsizei *count, GLsizei primcount); /* GL_NV_evaluators */ typedef void (* PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, GLvoid *points); typedef void (* PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); typedef void (* PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (* PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (* PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); typedef void (* PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); typedef void (* PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); /* GL_NV_register_combiners2 */ typedef void (* PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); typedef void (* PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); /* GL_NV_vertex_program */ typedef GLboolean (* PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, GLuint *programs, GLboolean *residences); typedef void (* PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); typedef void (* PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, GLuint *programs); typedef void (* PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, GLfloat *params); typedef void (* PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); typedef void (* PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); typedef void (* PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); typedef void (* PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (* PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); typedef void (* PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); typedef void (* PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); typedef void (* PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); typedef void (* PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); typedef void (* PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); typedef GLboolean (* PFNGLISPROGRAMNVPROC) (GLuint id); typedef void (* PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, GLubyte *program); typedef void (* PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, GLdouble *v); typedef void (* PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, GLfloat *v); typedef void (* PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, GLdouble *v); typedef void (* PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, GLfloat *v); typedef void (* PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, GLuint *programs); typedef void (* PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); typedef void (* PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, GLvoid *pointer); typedef void (* PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); typedef void (* PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); typedef void (* PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); typedef void (* PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); typedef void (* PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); typedef void (* PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); typedef void (* PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void (* PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void (* PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, GLdouble *v); typedef void (* PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, GLfloat *v); typedef void (* PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void (* PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, GLshort *v); typedef void (* PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void (* PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, GLubyte *v); typedef void (* PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, GLdouble *v); typedef void (* PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, GLfloat *v); typedef void (* PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, GLshort *v); typedef void (* PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, GLdouble *v); typedef void (* PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, GLfloat *v); typedef void (* PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, GLshort *v); typedef void (* PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, GLdouble *v); typedef void (* PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, GLfloat *v); typedef void (* PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, GLshort *v); typedef void (* PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, GLdouble *v); typedef void (* PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, GLfloat *v); typedef void (* PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, GLshort *v); typedef void (* PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, GLubyte *v); /* GL_ATI_envmap_bumpmap */ typedef void (* PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); typedef void (* PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); typedef void (* PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); typedef void (* PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); /* GL_ATI_fragment_shader */ typedef GLuint (* PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); typedef void (* PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); typedef void (* PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); typedef void (* PFNGLBEGINFRAGMENTSHADERATIPROC) (); typedef void (* PFNGLENDFRAGMENTSHADERATIPROC) (); typedef void (* PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); typedef void (* PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); typedef void (* PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); typedef void (* PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); typedef void (* PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); typedef void (* PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); typedef void (* PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); typedef void (* PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); typedef void (* PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, GLfloat *value); /* GL_ATI_pn_triangles */ typedef void (* PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); typedef void (* PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); /* GL_ATI_vertex_array_object */ typedef GLuint (* PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, GLvoid *pointer, GLenum usage); typedef GLboolean (* PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); typedef void (* PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, GLvoid *pointer, GLenum preserve); typedef void (* PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); typedef void (* PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); typedef void (* PFNGLDELETEOBJECTBUFFERATIPROC) (GLuint buffer); typedef void (* PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); typedef void (* PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); typedef void (* PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); typedef void (* PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); typedef void (* PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); typedef void (* PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); /* GL_ATI_vertex_streams */ typedef void (* PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); typedef void (* PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, GLshort *coords); typedef void (* PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); typedef void (* PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, GLint *coords); typedef void (* PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); typedef void (* PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, GLfloat *coords); typedef void (* PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); typedef void (* PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, GLdouble *coords); typedef void (* PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); typedef void (* PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, GLshort *coords); typedef void (* PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); typedef void (* PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, GLint *coords); typedef void (* PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); typedef void (* PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, GLfloat *coords); typedef void (* PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); typedef void (* PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, GLdouble *coords); typedef void (* PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); typedef void (* PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, GLshort *coords); typedef void (* PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); typedef void (* PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, GLint *coords); typedef void (* PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); typedef void (* PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, GLfloat *coords); typedef void (* PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); typedef void (* PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, GLdouble *coords); typedef void (* PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); typedef void (* PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, GLshort *coords); typedef void (* PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); typedef void (* PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, GLint *coords); typedef void (* PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (* PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, GLfloat *coords); typedef void (* PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (* PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, GLdouble *coords); typedef void (* PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); typedef void (* PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, GLbyte *coords); typedef void (* PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); typedef void (* PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, GLshort *coords); typedef void (* PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); typedef void (* PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, GLint *coords); typedef void (* PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); typedef void (* PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, GLfloat *coords); typedef void (* PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); typedef void (* PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, GLdouble *coords); typedef void (* PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); typedef void (* PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); typedef void (* PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); /* GL_ATI_element_array */ typedef void (* PFNGLELEMENTPOINTERATIPROC) (GLenum type, GLvoid *pointer); typedef void (* PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); typedef void (* PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); /* GL_SUN_mesh_array */ typedef void (* PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); /* GL_NV_occlusion_query */ typedef void (* PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); typedef void (* PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); typedef GLboolean (* PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); typedef void (* PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); typedef void (* PFNGLENDOCCLUSIONQUERYNVPROC) (); typedef void (* PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (* PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); /* GL_NV_pixel_data_range */ typedef void (* PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); typedef void (* PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); /* GL_NV_point_sprite */ typedef void (* PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); typedef void (* PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, GLint *params); glfw-2.7.2/support/d/examples/0000755000175000017500000000000011621215252017225 5ustar elmindredaelmindredaglfw-2.7.2/support/d/examples/listmodes.d0000644000175000017500000000245110625531326021405 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program lists all available fullscreen video modes. //======================================================================== import glfw; // Maximum number of modes that we want to list const int MAX_NUM_MODES = 400; //======================================================================== // main() //======================================================================== int main() { GLFWvidmode dtmode; GLFWvidmode modes[ MAX_NUM_MODES ]; int modecount, i; // Initialize GLFW if( !glfwInit() ) { return 0; } // Show desktop video mode glfwGetDesktopMode( &dtmode ); printf( "Desktop mode: %d x %d x %d\n\n", dtmode.Width, dtmode.Height, dtmode.RedBits + dtmode.GreenBits + dtmode.BlueBits ); // List available video modes modecount = glfwGetVideoModes( modes, MAX_NUM_MODES ); printf( "Available modes:\n" ); for( i = 0; i < modecount; i ++ ) { printf( "%3d: %d x %d x %d\n", i, modes[i].Width, modes[i].Height, modes[i].RedBits + modes[i].GreenBits + modes[i].BlueBits ); } // Terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/support/d/examples/mipmaps.d0000644000175000017500000000741610625531326021056 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program shows texture loading with mipmap generation and trilienar // filtering. // Note: For OpenGL 1.0 compability, we do not use texture objects (this // is no issue, since we only have one texture). //======================================================================== import glfw; import std.c.stdio; //======================================================================== // main() //======================================================================== int main( ) { int width, height, running, frames, x, y; double t, t0, fps; char titlestr[ 200 ]; // Initialise GLFW glfwInit(); // Open OpenGL window if( !glfwOpenWindow( 640, 480, 0,0,0,0, 0,0, GLFW_WINDOW ) ) { glfwTerminate(); return 0; } // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Disable vertical sync (on cards that support it) glfwSwapInterval( 0 ); // Load texture from file, and build all mipmap levels. The // texture is automatically uploaded to texture memory. if( !glfwLoadTexture2D( "mipmaps.tga", GLFW_BUILD_MIPMAPS_BIT ) ) { glfwTerminate(); return 0; } // Use trilinear interpolation (GL_LINEAR_MIPMAP_LINEAR) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); // Enable texturing glEnable( GL_TEXTURE_2D ); // Main loop running = GL_TRUE; frames = 0; t0 = glfwGetTime(); while( running ) { // Get time and mouse position t = glfwGetTime(); glfwGetMousePos( &x, &y ); // Calculate and display FPS (frames per second) if( (t-t0) > 1.0 || frames == 0 ) { fps = cast(double)frames / (t-t0); sprintf( titlestr, "Trilinear interpolation (%.1f FPS)", fps ); glfwSetWindowTitle( titlestr ); t0 = t; frames = 0; } frames ++; // Get window size (may be different than the requested size) glfwGetWindowSize( &width, &height ); height = height > 0 ? height : 1; // Set viewport glViewport( 0, 0, width, height ); // Clear color buffer glClearColor( 0.0f, 0.0f, 0.0f, 0.0f); glClear( GL_COLOR_BUFFER_BIT ); // Select and setup the projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0f, cast(GLfloat)width/cast(GLfloat)height, 1.0f, 50.0f ); // Select and setup the modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 3.0f, -20.0f, // Eye-position 0.0f, -4.0f, -11.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector // Draw a textured quad glRotatef( 0.05*cast(GLfloat)x + cast(GLfloat)t*5.0f, 0.0f, 1.0f, 0.0f ); glBegin( GL_QUADS ); glTexCoord2f( -20.0f, 20.0f ); glVertex3f( -50.0f, 0.0f, -50.0f ); glTexCoord2f( 20.0f, 20.0f ); glVertex3f( 50.0f, 0.0f, -50.0f ); glTexCoord2f( 20.0f, -20.0f ); glVertex3f( 50.0f, 0.0f, 50.0f ); glTexCoord2f( -20.0f, -20.0f ); glVertex3f( -50.0f, 0.0f, 50.0f ); glEnd(); // Swap buffers glfwSwapBuffers(); // Check if the ESC key was pressed or the window was closed running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); } // Close OpenGL window and terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/support/d/examples/gears.d0000644000175000017500000002242010625531326020501 0ustar elmindredaelmindreda/* * 3-D gear wheels. This program is in the public domain. * * Command line options: * -info print GL implementation information * -exit automatically exit after 30 seconds * * * Brian Paul * * * Marcus Geelnard: * - Conversion to GLFW * - Time based rendering (frame rate independent) * - Slightly modified camera that should work better for stereo viewing */ import std.math; import std.c.string; import glfw; static int running = 1; static double t0 = 0.0; static double t = 0.0; static double dt = 0.0; static int Frames = 0; static int autoexit = 0; /** Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of trig here. Input: inner_radius - radius of hole at center outer_radius - radius at center of teeth width - width of gear teeth - number of teeth tooth_depth - depth of tooth **/ static void gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { GLint i; GLfloat r0, r1, r2; GLfloat angle, da; GLfloat u, v, len; r0 = inner_radius; r1 = outer_radius - tooth_depth / 2.0; r2 = outer_radius + tooth_depth / 2.0; da = 2.0 * PI / teeth / 4.0; glShadeModel(GL_FLAT); glNormal3f(0.0, 0.0, 1.0); /* draw front face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.0 * PI / teeth; glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); if (i < teeth) { glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); } } glEnd(); /* draw front sides of teeth */ glBegin(GL_QUADS); da = 2.0 * PI / teeth / 4.0; for (i = 0; i < teeth; i++) { angle = i * 2.0 * PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); } glEnd(); glNormal3f(0.0, 0.0, -1.0); /* draw back face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.0 * PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); if (i < teeth) { glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); } } glEnd(); /* draw back sides of teeth */ glBegin(GL_QUADS); da = 2.0 * PI / teeth / 4.0; for (i = 0; i < teeth; i++) { angle = i * 2.0 * PI / teeth; glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); } glEnd(); /* draw outward faces of teeth */ glBegin(GL_QUAD_STRIP); for (i = 0; i < teeth; i++) { angle = i * 2.0 * PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); u = r2 * cos(angle + da) - r1 * cos(angle); v = r2 * sin(angle + da) - r1 * sin(angle); len = sqrt(u * u + v * v); u /= len; v /= len; glNormal3f(v, -u, 0.0); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); glNormal3f(cos(angle), sin(angle), 0.0); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); glNormal3f(v, -u, 0.0); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); glNormal3f(cos(angle), sin(angle), 0.0); } glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); glEnd(); glShadeModel(GL_SMOOTH); /* draw inside radius cylinder */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.0 * PI / teeth; glNormal3f(-cos(angle), -sin(angle), 0.0); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); } glEnd(); } static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; static GLint gear1, gear2, gear3; static GLfloat angle = 0.0; /* OpenGL draw function & timing */ static void draw() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(view_rotx, 1.0, 0.0, 0.0); glRotatef(view_roty, 0.0, 1.0, 0.0); glRotatef(view_rotz, 0.0, 0.0, 1.0); glPushMatrix(); glTranslatef(-3.0, -2.0, 0.0); glRotatef(cast(GLfloat)angle, 0.0, 0.0, 1.0); glCallList(gear1); glPopMatrix(); glPushMatrix(); glTranslatef(3.1, -2.0, 0.0); glRotatef(cast(GLfloat)(-2.0 * angle - 9.0), 0.0, 0.0, 1.0); glCallList(gear2); glPopMatrix(); glPushMatrix(); glTranslatef(-3.1, 4.2, 0.0); glRotatef(cast(GLfloat)(-2.0 * angle - 25.0), 0.0, 0.0, 1.0); glCallList(gear3); glPopMatrix(); glPopMatrix(); Frames++; { double t_new = glfwGetTime(); dt = t_new - t; t = t_new; if (t - t0 >= 5.0) { double seconds = t - t0; double fps = Frames / seconds; printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps); t0 = t; Frames = 0; if ((t >= 0.999 * autoexit) && (autoexit)) { running = 0; } } } } /* update animation parameters */ static void animate() { angle += 100.0*dt; } /* change view angle, exit upon ESC */ extern (Windows) { void key( int k, int action ) { if( action != GLFW_PRESS ) return; switch (k) { case 'Z': if( glfwGetKey( GLFW_KEY_LSHIFT ) ) view_rotz -= 5.0; else view_rotz += 5.0; break; case GLFW_KEY_ESC: running = 0; break; case GLFW_KEY_UP: view_rotx += 5.0; break; case GLFW_KEY_DOWN: view_rotx -= 5.0; break; case GLFW_KEY_LEFT: view_roty += 5.0; break; case GLFW_KEY_RIGHT: view_roty -= 5.0; break; default: return; } } } /* new window size */ extern (Windows) { void reshape( int width, int height ) { GLfloat h = cast(GLfloat) height / cast(GLfloat) width; GLfloat xmax, znear, zfar; znear = 5.0f; zfar = 30.0f; xmax = znear * 0.5; glViewport( 0, 0, cast(GLint) width, cast(GLint) height ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glFrustum( -xmax, xmax, -xmax*h, xmax*h, znear, zfar ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glTranslatef( 0.0, 0.0, -20.0 ); } } /* program & OpenGL initialization */ static void init(char[][] args) { static const GLfloat[4] pos = [5.0, 5.0, 10.0, 0.0]; static const GLfloat[4] red = [0.8, 0.1, 0.0, 1.0]; static const GLfloat[4] green = [0.0, 0.8, 0.2, 1.0]; static const GLfloat[4] blue = [0.2, 0.2, 1.0, 1.0]; GLint i; glLightfv(GL_LIGHT0, GL_POSITION, pos); glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); /* make the gears */ gear1 = glGenLists(1); glNewList(gear1, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); gear(1.0, 4.0, 1.0, 20, 0.7); glEndList(); gear2 = glGenLists(1); glNewList(gear2, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); gear(0.5, 2.0, 2.0, 10, 0.7); glEndList(); gear3 = glGenLists(1); glNewList(gear3, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); gear(1.3, 2.0, 0.5, 10, 0.7); glEndList(); glEnable(GL_NORMALIZE); for ( i=1; i * Original Amiga authors were R.J. Mical and Dale Luck. * GLFW conversion by Marcus Geelnard * Notes: - 360' = 2*PI [radian] * * - Distances between objects are created by doing a relative * Z translations. * * - Although OpenGL enticingly supports alpha-blending, * the shadow of the original Boing didn't affect the color * of the grid. * * - [Marcus] Changed timing scheme from interval driven to frame- * time based animation steps (which results in much smoother * movement) * * History of Amiga Boing: * * Boing was demonstrated on the prototype Amiga (codenamed "Lorraine") in * 1985. According to legend, it was written ad-hoc in one night by * R. J. Mical and Dale Luck. Because the bouncing ball animation was so fast * and smooth, attendees did not believe the Amiga prototype was really doing * the rendering. Suspecting a trick, they began looking around the booth for * a hidden computer or VCR. *****************************************************************************/ import std.math; import std.string; import std.random; import glfw; /***************************************************************************** * Various declarations and macros *****************************************************************************/ const float RADIUS = 70.0; const float STEP_LONGITUDE = 22.5; /* 22.5 makes 8 bands like original Boing */ const float STEP_LATITUDE = 22.5; const float DIST_BALL = (RADIUS * 2.0 + RADIUS * 0.1); const float VIEW_SCENE_DIST = (DIST_BALL * 3.0+ 200.0); /* distance from viewer to middle of boing area */ const float GRID_SIZE = (RADIUS * 4.5); /* length (width) of grid */ const float BOUNCE_HEIGHT = (RADIUS * 2.1); const float BOUNCE_WIDTH = (RADIUS * 2.1); const float SHADOW_OFFSET_X = -20.0; const float SHADOW_OFFSET_Y = 10.0; const float SHADOW_OFFSET_Z = 0.0; const float WALL_L_OFFSET = 0.0; const float WALL_R_OFFSET = 5.0; /* Animation speed (50.0 mimics the original GLUT demo speed) */ const float ANIMATION_SPEED = 50.0; /* Maximum allowed delta time per physics iteration */ const float MAX_DELTA_T = 0.02; /* Draw ball, or its shadow */ enum { DRAW_BALL, DRAW_BALL_SHADOW } /* Vertex type */ struct vertex_t {float x; float y; float z;} /* Global vars */ GLfloat deg_rot_y = 0.0; GLfloat deg_rot_y_inc = 2.0; GLfloat ball_x = -RADIUS; GLfloat ball_y = -RADIUS; GLfloat ball_x_inc = 1.0; GLfloat ball_y_inc = 2.0; int drawBallHow; double t = 0.0; double t_old = 0.0; double dt = 0.0; /* Random number generator */ const int RAND_MAX = 4095; /***************************************************************************** * Truncate a degree. *****************************************************************************/ GLfloat TruncateDeg( GLfloat deg ) { if ( deg >= 360.0 ) return (deg - 360.0); else return deg; } /***************************************************************************** * Convert a degree (360-based) into a radian. * 360' = 2 * PI *****************************************************************************/ double deg2rad( double deg ) { return deg / 360.0 * (2.0 * PI); } /***************************************************************************** * 360' sin(). *****************************************************************************/ double sin_deg( double deg ) { return sin( deg2rad( deg ) ); } /***************************************************************************** * 360' cos(). *****************************************************************************/ double cos_deg( double deg ) { return cos( deg2rad( deg ) ); } /***************************************************************************** * Compute a cross product (for a normal vector). * * c = a x b *****************************************************************************/ void CrossProduct( vertex_t a, vertex_t b, vertex_t c, vertex_t* n ) { GLfloat u1, u2, u3; GLfloat v1, v2, v3; u1 = b.x - a.x; u2 = b.y - a.y; u3 = b.y - a.z; v1 = c.x - a.x; v2 = c.y - a.y; v3 = c.z - a.z; n.x = u2 * v3 - v2 * v3; n.y = u3 * v1 - v3 * u1; n.z = u1 * v2 - v1 * u2; } /***************************************************************************** * Calculate the angle to be passed to gluPerspective() so that a scene * is visible. This function originates from the OpenGL Red Book. * * Parms : size * The size of the segment when the angle is intersected at "dist" * (ie at the outermost edge of the angle of vision). * * dist * Distance from viewpoint to scene. *****************************************************************************/ GLfloat PerspectiveAngle( GLfloat size, GLfloat dist ) { GLfloat radTheta, degTheta; radTheta = 2.0 * atan2( size / 2.0, dist ); degTheta = (180.0 * radTheta) / PI; return degTheta; } const int BOING_DEBUG = 0; /***************************************************************************** * init() *****************************************************************************/ void init() { /* * Clear background. */ glClearColor( 0.55, 0.55, 0.55, 0.0 ); glShadeModel( GL_FLAT ); } /***************************************************************************** * display() *****************************************************************************/ void display() { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glPushMatrix(); drawBallHow = DRAW_BALL_SHADOW; DrawBoingBall(); DrawGrid(); drawBallHow = DRAW_BALL; DrawBoingBall(); glPopMatrix(); glFlush(); } /***************************************************************************** * reshape() *****************************************************************************/ extern (Windows) { void reshape( int w, int h ) { glViewport( 0, 0, cast(GLsizei)w, cast(GLsizei)h ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( PerspectiveAngle( RADIUS * 2, 200 ), cast(GLfloat)w / cast(GLfloat)h, 1.0, VIEW_SCENE_DIST ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0, 0.0, VIEW_SCENE_DIST,/* eye */ 0.0, 0.0, 0.0, /* center of vision */ 0.0, -1.0, 0.0 ); /* up vector */ } } /***************************************************************************** * Draw the Boing ball. * * The Boing ball is sphere in which each facet is a rectangle. * Facet colors alternate between red and white. * The ball is built by stacking latitudinal circles. Each circle is composed * of a widely-separated set of points, so that each facet is noticably large. *****************************************************************************/ extern (Windows) { void DrawBoingBall() { GLfloat lon_deg = 0.0; /* degree of longitude */ double dt_total = 0.0, dt2 = 0.0; glPushMatrix(); glMatrixMode( GL_MODELVIEW ); /* * Another relative Z translation to separate objects. */ glTranslatef( 0.0, 0.0, DIST_BALL ); /* Update ball position and rotation (iterate if necessary) */ dt_total = dt; while( dt_total > 0.0 ) { dt2 = dt_total > MAX_DELTA_T ? MAX_DELTA_T : dt_total; dt_total -= dt2; BounceBall( dt2 ); deg_rot_y = TruncateDeg( deg_rot_y + deg_rot_y_inc*(dt2*ANIMATION_SPEED) ); } /* Set ball position */ glTranslatef( ball_x, ball_y, 0.0 ); /* * Offset the shadow. */ if ( drawBallHow == DRAW_BALL_SHADOW ) { glTranslatef( SHADOW_OFFSET_X, SHADOW_OFFSET_Y, SHADOW_OFFSET_Z ); } /* * Tilt the ball. */ glRotatef( -20.0, 0.0, 0.0, 1.0 ); /* * Continually rotate ball around Y axis. */ glRotatef( deg_rot_y, 0.0, 1.0, 0.0 ); /* * Set OpenGL state for Boing ball. */ glCullFace( GL_FRONT ); glEnable( GL_CULL_FACE ); glEnable( GL_NORMALIZE ); /* * Build a faceted latitude slice of the Boing ball, * stepping same-sized vertical bands of the sphere. */ for ( lon_deg = 0; lon_deg < 180; lon_deg += STEP_LONGITUDE ) { /* * Draw a latitude circle at this longitude. */ DrawBoingBallBand( lon_deg, lon_deg + STEP_LONGITUDE ); } glPopMatrix(); return; } } /***************************************************************************** * Bounce the ball. *****************************************************************************/ void BounceBall( double dt ) { GLfloat sign = 1.0; GLfloat deg = 0.0; /* Bounce on walls */ if ( ball_x > (BOUNCE_WIDTH/2 + WALL_R_OFFSET ) ) { ball_x_inc = -0.5 - 0.75 * cast(GLfloat)((rand()&RAND_MAX)/cast(GLfloat)RAND_MAX); deg_rot_y_inc = -deg_rot_y_inc; } if ( ball_x < -(BOUNCE_HEIGHT/2 + WALL_L_OFFSET) ) { ball_x_inc = 0.5 + 0.75 * cast(GLfloat)((rand()&RAND_MAX)/cast(GLfloat)RAND_MAX); deg_rot_y_inc = -deg_rot_y_inc; } /* Bounce on floor / roof */ if ( ball_y > BOUNCE_HEIGHT/2.0 ) { ball_y_inc = -0.75 - cast(GLfloat)((rand()&RAND_MAX)/cast(GLfloat)RAND_MAX); } if ( ball_y < -BOUNCE_HEIGHT/2.0*0.85 ) { ball_y_inc = 0.75 + cast(GLfloat)((rand()&RAND_MAX)/cast(GLfloat)RAND_MAX); } /* Update ball position */ ball_x += ball_x_inc * (dt*ANIMATION_SPEED); ball_y += ball_y_inc * (dt*ANIMATION_SPEED); /* * Simulate the effects of gravity on Y movement. */ if ( ball_y_inc < 0 ) sign = -1.0; else sign = 1.0; deg = (ball_y + BOUNCE_HEIGHT/2.0) * 90.0 / BOUNCE_HEIGHT; if ( deg > 80.0 ) deg = 80.0; if ( deg < 10.0 ) deg = 10.0; ball_y_inc = sign * 4.0 * sin_deg( deg ); } /***************************************************************************** * Draw a faceted latitude band of the Boing ball. * * Parms: long_lo, long_hi * Low and high longitudes of slice, resp. *****************************************************************************/ void DrawBoingBallBand( GLfloat long_lo, GLfloat long_hi ) { vertex_t vert_ne; /* "ne" means south-east, so on */ vertex_t vert_nw; vertex_t vert_sw; vertex_t vert_se; vertex_t vert_norm; GLfloat lat_deg = 0.0; static int colorToggle = 0; /* * Iterate thru the points of a latitude circle. * A latitude circle is a 2D set of X,Z points. */ for ( lat_deg = 0; lat_deg <= (360 - STEP_LATITUDE); lat_deg += STEP_LATITUDE ) { /* * Color this polygon with red or white. */ if ( colorToggle ) glColor3f( 0.8, 0.1, 0.1 ); else glColor3f( 0.95, 0.95, 0.95 ); /+ if ( lat_deg >= 180 ) if ( colorToggle ) glColor3f( 0.1, 0.8, 0.1 ); else glColor3f( 0.5, 0.5, 0.95 ); +/ colorToggle = ! colorToggle; /* * Change color if drawing shadow. */ if ( drawBallHow == DRAW_BALL_SHADOW ) glColor3f( 0.35, 0.35, 0.35 ); /* * Assign each Y. */ vert_ne.y = vert_nw.y = cos_deg(long_hi) * RADIUS; vert_sw.y = vert_se.y = cos_deg(long_lo) * RADIUS; /* * Assign each X,Z with sin,cos values scaled by latitude radius indexed by longitude. * Eg, long=0 and long=180 are at the poles, so zero scale is sin(longitude), * while long=90 (sin(90)=1) is at equator. */ vert_ne.x = cos_deg( lat_deg ) * (RADIUS * sin_deg( long_lo + STEP_LONGITUDE )); vert_se.x = cos_deg( lat_deg ) * (RADIUS * sin_deg( long_lo )); vert_nw.x = cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * sin_deg( long_lo + STEP_LONGITUDE )); vert_sw.x = cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * sin_deg( long_lo )); vert_ne.z = sin_deg( lat_deg ) * (RADIUS * sin_deg( long_lo + STEP_LONGITUDE )); vert_se.z = sin_deg( lat_deg ) * (RADIUS * sin_deg( long_lo )); vert_nw.z = sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * sin_deg( long_lo + STEP_LONGITUDE )); vert_sw.z = sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * sin_deg( long_lo )); /* * Draw the facet. */ glBegin( GL_POLYGON ); CrossProduct( vert_ne, vert_nw, vert_sw, &vert_norm ); glNormal3f( vert_norm.x, vert_norm.y, vert_norm.z ); glVertex3f( vert_ne.x, vert_ne.y, vert_ne.z ); glVertex3f( vert_nw.x, vert_nw.y, vert_nw.z ); glVertex3f( vert_sw.x, vert_sw.y, vert_sw.z ); glVertex3f( vert_se.x, vert_se.y, vert_se.z ); glEnd(); debug(BOING_DEBUG) { printf( "----------------------------------------------------------- \n" ); printf( "lat = %f long_lo = %f long_hi = %f \n", lat_deg, long_lo, long_hi ); printf( "vert_ne x = %.8f y = %.8f z = %.8f \n", vert_ne.x, vert_ne.y, vert_ne.z ); printf( "vert_nw x = %.8f y = %.8f z = %.8f \n", vert_nw.x, vert_nw.y, vert_nw.z ); printf( "vert_se x = %.8f y = %.8f z = %.8f \n", vert_se.x, vert_se.y, vert_se.z ); printf( "vert_sw x = %.8f y = %.8f z = %.8f \n", vert_sw.x, vert_sw.y, vert_sw.z ); } } /* * Toggle color so that next band will opposite red/white colors than this one. */ colorToggle = ! colorToggle; /* * This circular band is done. */ return; } /***************************************************************************** * Draw the purple grid of lines, behind the Boing ball. * When the Workbench is dropped to the bottom, Boing shows 12 rows. *****************************************************************************/ void DrawGrid() { int row, col; const int rowTotal = 12; /* must be divisible by 2 */ const int colTotal = rowTotal; /* must be same as rowTotal */ const GLfloat widthLine = 2.0; /* should be divisible by 2 */ const GLfloat sizeCell = GRID_SIZE / rowTotal; const GLfloat z_offset = -40.0; GLfloat xl = 0.0, xr = 0.0; GLfloat yt = 0.0, yb = 0.0; glPushMatrix(); glDisable( GL_CULL_FACE ); /* * Another relative Z translation to separate objects. */ glTranslatef( 0.0, 0.0, DIST_BALL ); /* * Draw vertical lines (as skinny 3D rectangles). */ for ( col = 0; col <= colTotal; col++ ) { /* * Compute co-ords of line. */ xl = -GRID_SIZE / 2 + col * sizeCell; xr = xl + widthLine; yt = GRID_SIZE / 2; yb = -GRID_SIZE / 2 - widthLine; glBegin( GL_POLYGON ); glColor3f( 0.6, 0.1, 0.6 ); /* purple */ glVertex3f( xr, yt, z_offset ); /* NE */ glVertex3f( xl, yt, z_offset ); /* NW */ glVertex3f( xl, yb, z_offset ); /* SW */ glVertex3f( xr, yb, z_offset ); /* SE */ glEnd(); } /* * Draw horizontal lines (as skinny 3D rectangles). */ for ( row = 0; row <= rowTotal; row++ ) { /* * Compute co-ords of line. */ yt = GRID_SIZE / 2 - row * sizeCell; yb = yt - widthLine; xl = -GRID_SIZE / 2; xr = GRID_SIZE / 2 + widthLine; glBegin( GL_POLYGON ); glColor3f( 0.6, 0.1, 0.6 ); /* purple */ glVertex3f( xr, yt, z_offset ); /* NE */ glVertex3f( xl, yt, z_offset ); /* NW */ glVertex3f( xl, yb, z_offset ); /* SW */ glVertex3f( xr, yb, z_offset ); /* SE */ glEnd(); } glPopMatrix(); return; } /*======================================================================* * main() *======================================================================*/ int main() { int running = 0; double t0 = 0.0, fps = 0.0; char[] titlestr; /* Init GLFW */ glfwInit(); if( !glfwOpenWindow( 400,400, 0,0,0,0, 16,0, GLFW_WINDOW ) ) { glfwTerminate(); return 0; } glfwSetWindowTitle( "Boing (classic Amiga demo)\0" ); glfwSetWindowSizeCallback( &reshape ); glfwEnable( GLFW_STICKY_KEYS ); glfwSwapInterval( 1 ); // glfwSetTime( 0.0 ); init(); /* Main loop */ int frames = 0; t0 = glfwGetTime(); do { /* Timing */ t = glfwGetTime(); dt = t - t_old; t_old = t; // Calculate and display FPS (frames per second) if( (t-t0) > 1.0 || frames == 0 ) { fps = cast(double)frames / (t-t0); titlestr = "Boing (classic Amiga demo - " ~ toString(fps) ~ " FPS)\0"; glfwSetWindowTitle( titlestr ); t0 = t; frames = 0; } frames ++; /* Draw one frame */ display(); /* Swap buffers */ glfwSwapBuffers(); /* Check if we are still running */ running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); } while( running ); glfwTerminate(); return 0; } glfw-2.7.2/support/d/examples/splitview.d0000644000175000017500000003244510625531326021436 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program uses a "split window" view, rendering four views of the // same scene in one window (e.g. uesful for 3D modelling software). This // demo uses scissors to separete the four different rendering areas from // each other. // // This code was ported straight from C, so it may not be a school book // example of D programming, but it shows how to use GLFW callbacks in D. //======================================================================== import std.math; import std.string; import glfw; //======================================================================== // Global variables //======================================================================== // Mouse position int xpos = 0, ypos = 0; // Window size int width, height; // Active view: 0 = none, 1 = upper left, 2 = upper right, 3 = lower left, // 4 = lower right int active_view = 0; // Rotation around each axis int rot_x = 0, rot_y = 0, rot_z = 0; //======================================================================== // DrawTorus() - Draw a solid torus (use a display list for the model) //======================================================================== const double TORUS_MAJOR = 1.5; const double TORUS_MINOR = 0.5; const int TORUS_MAJOR_RES = 32; const int TORUS_MINOR_RES = 32; void DrawTorus() { static GLuint torus_list = 0; int i, j, k; double s, t, x, y, z, nx, ny, nz, scale, twopi; if( !torus_list ) { // Start recording displaylist torus_list = glGenLists( 1 ); glNewList( torus_list, GL_COMPILE_AND_EXECUTE ); // Draw torus twopi = 2.0 * PI; for( i = 0; i < TORUS_MINOR_RES; i++ ) { glBegin( GL_QUAD_STRIP ); for( j = 0; j <= TORUS_MAJOR_RES; j++ ) { for( k = 1; k >= 0; k-- ) { s = (i + k) % TORUS_MINOR_RES + 0.5; t = j % TORUS_MAJOR_RES; // Calculate point on surface x = (TORUS_MAJOR+TORUS_MINOR*cos(s*twopi/TORUS_MINOR_RES))*cos(t*twopi/TORUS_MAJOR_RES); y = TORUS_MINOR * sin(s * twopi / TORUS_MINOR_RES); z = (TORUS_MAJOR+TORUS_MINOR*cos(s*twopi/TORUS_MINOR_RES))*sin(t*twopi/TORUS_MAJOR_RES); // Calculate surface normal nx = x - TORUS_MAJOR*cos(t*twopi/TORUS_MAJOR_RES); ny = y; nz = z - TORUS_MAJOR*sin(t*twopi/TORUS_MAJOR_RES); scale = 1.0 / sqrt( nx*nx + ny*ny + nz*nz ); nx *= scale; ny *= scale; nz *= scale; glNormal3f( cast(float)nx, cast(float)ny, cast(float)nz ); glVertex3f( cast(float)x, cast(float)y, cast(float)z ); } } glEnd(); } // Stop recording displaylist glEndList(); } else { // Playback displaylist glCallList( torus_list ); } } //======================================================================== // DrawScene() - Draw the scene (a rotating torus) //======================================================================== void DrawScene() { const GLfloat[4] model_diffuse = [1.0f, 0.8f, 0.8f, 1.0f]; const GLfloat[4] model_specular = [0.6f, 0.6f, 0.6f, 1.0f]; const GLfloat model_shininess = 20.0f; glPushMatrix(); // Rotate the object glRotatef( cast(GLfloat)rot_x*0.5f, 1.0f, 0.0f, 0.0f ); glRotatef( cast(GLfloat)rot_y*0.5f, 0.0f, 1.0f, 0.0f ); glRotatef( cast(GLfloat)rot_z*0.5f, 0.0f, 0.0f, 1.0f ); // Set model color (used for orthogonal views, lighting disabled) glColor4fv( model_diffuse ); // Set model material (used for perspective view, lighting enabled) glMaterialfv( GL_FRONT, GL_DIFFUSE, model_diffuse ); glMaterialfv( GL_FRONT, GL_SPECULAR, model_specular ); glMaterialf( GL_FRONT, GL_SHININESS, model_shininess ); // Draw torus DrawTorus(); glPopMatrix(); } //======================================================================== // DrawGrid() - Draw a 2D grid (used for orthogonal views) //======================================================================== void DrawGrid( float scale, int steps ) { int i; float x, y; glPushMatrix(); // Set background to some dark bluish grey glClearColor( 0.05f, 0.05f, 0.2f, 0.0f ); glClear( GL_COLOR_BUFFER_BIT ); // Setup modelview matrix (flat XY view) glLoadIdentity(); gluLookAt( 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ); // We don't want to update the Z-buffer glDepthMask( GL_FALSE ); // Set grid color glColor3f( 0.0f, 0.5f, 0.5f ); glBegin( GL_LINES ); // Horizontal lines x = scale * 0.5f * cast(float)(steps-1); y = -scale * 0.5f * cast(float)(steps-1); for( i = 0; i < steps; i ++ ) { glVertex3f( -x, y, 0.0f ); glVertex3f( x, y, 0.0f ); y += scale; } // Vertical lines x = -scale * 0.5f * cast(float)(steps-1); y = scale * 0.5f * cast(float)(steps-1); for( i = 0; i < steps; i ++ ) { glVertex3f( x, -y, 0.0f ); glVertex3f( x, y, 0.0f ); x += scale; } glEnd(); // Enable Z-buffer writing again glDepthMask( GL_TRUE ); glPopMatrix(); } //======================================================================== // DrawAllViews() //======================================================================== void DrawAllViews() { const GLfloat[4] light_position = [0.0f, 8.0f, 8.0f, 1.0f]; const GLfloat[4] light_diffuse = [1.0f, 1.0f, 1.0f, 1.0f]; const GLfloat[4] light_specular = [1.0f, 1.0f, 1.0f, 1.0f]; const GLfloat[4] light_ambient = [0.2f, 0.2f, 0.3f, 1.0f]; double aspect; // Calculate aspect of window if( height > 0 ) { aspect = cast(double)width / cast(double)height; } else { aspect = 1.0; } // Clear screen glClearColor( 0.0f, 0.0f, 0.0f, 0.0f); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // Enable scissor test glEnable( GL_SCISSOR_TEST ); // Enable depth test glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); // ** ORTHOGONAL VIEWS ** // For orthogonal views, use wireframe rendering glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); // Enable line anti-aliasing glEnable( GL_LINE_SMOOTH ); glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); // Setup orthogonal projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( -3.0*aspect, 3.0*aspect, -3.0, 3.0, 1.0, 50.0 ); // Upper left view (TOP VIEW) glViewport( 0, height/2, width/2, height/2 ); glScissor( 0, height/2, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 10.0f, 1e-3f, // Eye-position (above) 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector DrawGrid( 0.5, 12 ); DrawScene(); // Lower left view (FRONT VIEW) glViewport( 0, 0, width/2, height/2 ); glScissor( 0, 0, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 0.0f, 10.0f, // Eye-position (in front of) 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector DrawGrid( 0.5, 12 ); DrawScene(); // Lower right view (SIDE VIEW) glViewport( width/2, 0, width/2, height/2 ); glScissor( width/2, 0, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 10.0f, 0.0f, 0.0f, // Eye-position (to the right) 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector DrawGrid( 0.5, 12 ); DrawScene(); // Disable line anti-aliasing glDisable( GL_LINE_SMOOTH ); glDisable( GL_BLEND ); // ** PERSPECTIVE VIEW ** // For perspective view, use solid rendering glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); // Enable face culling (faster rendering) glEnable( GL_CULL_FACE ); glCullFace( GL_BACK ); glFrontFace( GL_CW ); // Setup perspective projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0f, aspect, 1.0f, 50.0f ); // Upper right view (PERSPECTIVE VIEW) glViewport( width/2, height/2, width/2, height/2 ); glScissor( width/2, height/2, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 3.0f, 1.5f, 3.0f, // Eye-position 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector // Configure and enable light source 1 glLightfv( GL_LIGHT1, GL_POSITION, light_position ); glLightfv( GL_LIGHT1, GL_AMBIENT, light_ambient ); glLightfv( GL_LIGHT1, GL_DIFFUSE, light_diffuse ); glLightfv( GL_LIGHT1, GL_SPECULAR, light_specular ); glEnable( GL_LIGHT1 ); glEnable( GL_LIGHTING ); // Draw scene DrawScene(); // Disable lighting glDisable( GL_LIGHTING ); // Disable face culling glDisable( GL_CULL_FACE ); // Disable depth test glDisable( GL_DEPTH_TEST ); // Disable scissor test glDisable( GL_SCISSOR_TEST ); // Draw a border around the active view if( active_view > 0 && active_view != 2 ) { glViewport( 0, 0, width, height ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0.0, 2.0, 0.0, 2.0, 0.0, 1.0 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glColor3f( 1.0f, 1.0f, 0.6f ); glTranslatef( (active_view-1)&1, 1-(active_view-1)/2, 0.0f ); glBegin( GL_LINE_STRIP ); glVertex2i( 0, 0 ); glVertex2i( 1, 0 ); glVertex2i( 1, 1 ); glVertex2i( 0, 1 ); glVertex2i( 0, 0 ); glEnd(); } } //======================================================================== // WindowSizeFun() - Window size callback function //======================================================================== extern (Windows) { void WindowSizeFun( int w, int h ) { width = w; height = h > 0 ? h : 1; } } //======================================================================== // MousePosFun() - Mouse position callback function //======================================================================== extern (Windows) { void MousePosFun( int x, int y ) { // Depending on which view was selected, rotate around different axes switch( active_view ) { case 1: rot_x += y - ypos; rot_z += x - xpos; break; case 3: rot_x += y - ypos; rot_y += x - xpos; break; case 4: rot_y += x - xpos; rot_z += y - ypos; break; default: // Do nothing for perspective view, or if no view is selected break; } // Remember mouse position xpos = x; ypos = y; } } //======================================================================== // MouseButtonFun() - Mouse button callback function //======================================================================== extern (Windows) { void MouseButtonFun( int button, int action ) { // Button clicked? if( ( button == GLFW_MOUSE_BUTTON_LEFT ) && action == GLFW_PRESS ) { // Detect which of the four views was clicked active_view = 1; if( xpos >= width/2 ) { active_view += 1; } if( ypos >= height/2 ) { active_view += 2; } } // Button released? else if( button == GLFW_MOUSE_BUTTON_LEFT ) { // Deselect any previously selected view active_view = 0; } } } //======================================================================== // main() //======================================================================== int main() { int running; // Initialise GLFW glfwInit(); // Open OpenGL window if( !glfwOpenWindow( 500, 500, 0,0,0,0, 16,0, GLFW_WINDOW ) ) { glfwTerminate(); return 0; } // Set window title glfwSetWindowTitle( "Split view demo\0" ); // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Enable mouse cursor (only needed for fullscreen mode) glfwEnable( GLFW_MOUSE_CURSOR ); // Disable automatic event polling glfwDisable( GLFW_AUTO_POLL_EVENTS ); // Set callback functions glfwSetWindowSizeCallback( &WindowSizeFun ); glfwSetMousePosCallback( &MousePosFun ); glfwSetMouseButtonCallback( &MouseButtonFun ); // Main loop do { // Draw all views DrawAllViews(); // Swap buffers glfwSwapBuffers(); // Wait for new events glfwWaitEvents(); // Check if the ESC key was pressed or the window was closed running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); } while( running ); // Close OpenGL window and terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/support/d/examples/Makefile0000644000175000017500000000257211266154676020714 0ustar elmindredaelmindreda########################################################################## # This makefile builds the example programs using the Digital Mars D # compiler. You need to copy the .lib files from support\d\lib to your # Digital Mars C/C++ compiler/linker lib folder (dm\lib) before compiling # the programs. ########################################################################## DC = dmd IMPORTSDIR = ..\imports DFLAGS = -O -I$(IMPORTSDIR) LIBDIR = ..\lib LIBS = $(LIBDIR)\glfwdll.lib $(LIBDIR)\glu32.lib $(LIBDIR)\opengl32.lib all: boing.exe gears.exe listmodes.exe mipmaps.exe mthello.exe mtbench.exe \ particles.exe pong3d.exe splitview.exe triangle.exe wave.exe clean: del *.exe *.obj *.map boing.exe: boing.d $(DC) $(DFLAGS) -of$@ $ 0.0f ) { /* Select iteration time step */ dt = dt_total > MAX_DELTA_T ? MAX_DELTA_T : dt_total; dt_total -= dt; /* Calculate wave propagation */ calc(); } /* Compute height of each vertex */ adjustGrid(); /* Draw wave grid to OpenGL display */ draw_screen(); /* Still running? */ running = running && glfwGetWindowParam( GLFW_OPENED ); } glfwTerminate(); return 0; } version(Windows) { extern(Windows): } else { extern(C): } /* Handle key strokes */ void handle_key_down(int key, int action) { if( action != GLFW_PRESS ) { return; } switch(key) { case GLFW_KEY_ESC: running = 0; break; case GLFW_KEY_SPACE: initSurface(); break; case GLFW_KEY_LEFT: alpha+=5; break; case GLFW_KEY_RIGHT: alpha-=5; break; case GLFW_KEY_UP: beta-=5; break; case GLFW_KEY_DOWN: beta+=5; break; case GLFW_KEY_PAGEUP: if(zoom>1) zoom-=1; break; case GLFW_KEY_PAGEDOWN: zoom+=1; break; default: break; } } /* Callback function for window resize events */ void handle_resize( int width, int height ) { float ratio = 1.0f; if( height > 0 ) { ratio = cast(float) width / cast(float) height; } /* Setup viewport (Place where the stuff will appear in the main window). */ glViewport(0, 0, width, height); /* * Change to the projection matrix and set * our viewing volume. */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(60.0, ratio, 1.0, 1024.0); } glfw-2.7.2/support/d/examples/triangle.d0000644000175000017500000000630010625531326021204 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program opens a window (640x480), and renders a spinning colored // triangle (it is controlled with both the GLFW timer and the mouse). It // also calculates the rendering speed (FPS), which is displayed in the // window title bar. //======================================================================== import std.string; import glfw; //======================================================================== // main() //======================================================================== int main() { int width, height, running, frames, x, y; double t, t0, fps; char[] titlestr; // Initialise GLFW glfwInit(); // Open OpenGL window if( !glfwOpenWindow( 640, 480, 0,0,0,0, 0,0, GLFW_WINDOW ) ) { glfwTerminate(); return 0; } // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Disable vertical sync (on cards that support it) glfwSwapInterval( 0 ); // Main loop running = GL_TRUE; frames = 0; t0 = glfwGetTime(); while( running ) { // Get time and mouse position t = glfwGetTime(); glfwGetMousePos( &x, &y ); // Calculate and display FPS (frames per second) if( (t-t0) > 1.0 || frames == 0 ) { fps = cast(double)frames / (t-t0); titlestr = "Spinning Triangle (" ~ toString(fps) ~ " FPS)\0"; glfwSetWindowTitle( titlestr ); t0 = t; frames = 0; } frames ++; // Get window size (may be different than the requested size) glfwGetWindowSize( &width, &height ); height = height > 0 ? height : 1; // Set viewport glViewport( 0, 0, width, height ); // Clear color buffer glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); glClear( GL_COLOR_BUFFER_BIT ); // Select and setup the projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0f, cast(GLfloat)width/cast(GLfloat)height, 1.0f, 100.0f ); // Select and setup the modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 1.0f, 0.0f, // Eye-position 0.0f, 20.0f, 0.0f, // View-point 0.0f, 0.0f, 1.0f ); // Up-vector // Draw a rotating colorful triangle glTranslatef( 0.0f, 14.0f, 0.0f ); glRotatef( 0.3*cast(GLfloat)x + cast(GLfloat)t*100.0f, 0.0f, 0.0f, 1.0f ); glBegin( GL_TRIANGLES ); glColor3f( 1.0f, 0.0f, 0.0f ); glVertex3f( -5.0f, 0.0f, -4.0f ); glColor3f( 0.0f, 1.0f, 0.0f ); glVertex3f( 5.0f, 0.0f, -4.0f ); glColor3f( 0.0f, 0.0f, 1.0f ); glVertex3f( 0.0f, 0.0f, 6.0f ); glEnd(); // Swap buffers glfwSwapBuffers(); // Check if the ESC key was pressed or the window was closed running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); } // Close OpenGL window and terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/support/d/examples/mtbench.d0000644000175000017500000002160410625531326021023 0ustar elmindredaelmindreda//======================================================================== // Multithreading benchmark program, based on the GLFW multi threading // support. // // This program can be used to get an idea of what to expect in terms of // multithreading granularity performance. // // As a "bonus", this program demonstrates how to create a signal // primitive using the GLFW mutex and condition variable primitives. // // Here are some benchmark results: // (Note: these are not exact measurments, since they are subject to // varying CPU-loads etc. Some tested systems are multi-user systems // which were running under anything but optimal conditions) // // +------------+-------+-------------+-------------------+------------+ // | Processor | CPUs | OS | Context switches | Mean sleep | // | | | | per second | time (ms) | // +------------+-------+-------------+-------------------+------------+ // |Athlon | 1 | Linux | 161942 | 20.000 | // |710 MHz | | 2.4.3 | | | // +------------+-------+-------------+-------------------+------------+ // |Athlon | 1 | MS Win2k | 525230 | 10.014 | // |710 MHz | | | | | // +------------+-------+-------------+-------------------+------------+ // |Athlon | 1 | MS Win 98 | 23564 | 4.947 | // |710 MHz | | | | | // +------------+-------+-------------+-------------------+------------+ // |Pentium III | 1 | MS NT 4.0 | 304694 | 10.014 | // |500 MHz | | | | | // +------------+-------+-------------+-------------------+------------+ // |UltraSPARC2 | 6 | SunOS 5.6 | 120867 | 19.355 | // |400 MHz | | | | | // +------------+-------+-------------+-------------------+------------+ // |Alpha 21264 | 1 | OSF1 | 131993 | 3.097 | // |500 MHz | | | | | // +------------+-------+-------------+-------------------+------------+ // |Alpha 21264 | 2 | OSF1 | 40836 | 1.397 | // |500 MHz | | | | | // +------------+-------+-------------+-------------------+------------+ // |68020 (emu) | 1 | AmigaOS 3.1 | 50425 | 40.060 | // |~200 MHz | | (WinUAE) | | | // +------------+-------+-------------+-------------------+------------+ // //======================================================================== import glfw; import std.c.stdio; struct signal_t { GLFWcond cond; GLFWmutex mutex; int flag; } signal_t gotoA, gotoB; GLFWcond threadDone; GLFWmutex doneMutex; int doneCount = 0; int gotoACount = 0; int gotoBCount = 0; const int MAX_COUNT = 10000; //------------------------------------------------------------------------ // InitSignal() //------------------------------------------------------------------------ void InitSignal( signal_t *s ) { s.cond = glfwCreateCond(); s.mutex = glfwCreateMutex(); s.flag = 0; } //------------------------------------------------------------------------ // KillSignal() //------------------------------------------------------------------------ void KillSignal( signal_t *s ) { glfwDestroyCond( s.cond ); glfwDestroyMutex( s.mutex ); s.flag = 0; } //------------------------------------------------------------------------ // WaitSignal() //------------------------------------------------------------------------ void WaitSignal( signal_t *s ) { glfwLockMutex( s.mutex ); while( !s.flag ) { glfwWaitCond( s.cond, s.mutex, GLFW_INFINITY ); } s.flag = 0; glfwUnlockMutex( s.mutex ); } //------------------------------------------------------------------------ // SetSignal() //------------------------------------------------------------------------ void SetSignal( signal_t *s ) { glfwLockMutex( s.mutex ); s.flag = 1; glfwUnlockMutex( s.mutex ); glfwSignalCond( s.cond ); } //------------------------------------------------------------------------ // main() //------------------------------------------------------------------------ int main( ) { GLFWthread threadA, threadB; double t1, t2, csps; int done, count, i; gotoACount = gotoBCount = doneCount = 0; // Initialize GLFW if( !glfwInit() ) { return 0; } // Print some program information printf( "\nMultithreading benchmarking program\n" ); printf( "-----------------------------------\n\n" ); printf( "This program consists of two tests. In the first test " ); printf( "two threads are created,\n" ); printf( "which continously signal/wait each other. This forces " ); printf( "the execution to\n" ); printf( "alternate between the two threads, and gives a measure " ); printf( "of the thread\n" ); printf( "synchronization granularity. In the second test, the " ); printf( "main thread is repeatedly\n" ); printf( "put to sleep for a very short interval using glfwSleep. " ); printf( "The average sleep time\n" ); printf( "is measured, which tells the minimum supported sleep " ); printf( "interval.\n\n" ); printf( "Results:\n" ); printf( "--------\n\n" ); printf( "Number of CPUs: %d\n\n", glfwGetNumberOfProcessors() ); fflush( stdout ); //------------------------------------------------------------------------ // 1) Benchmark thread synchronization granularity //------------------------------------------------------------------------ // Init mutexes and conditions doneMutex = glfwCreateMutex(); threadDone = glfwCreateCond(); InitSignal( &gotoA ); InitSignal( &gotoB ); // Create threads A & B threadA = glfwCreateThread( &threadAfun, null ); threadB = glfwCreateThread( &threadBfun, null ); if( threadA == -1 || threadB == -1 ) { glfwLockMutex( doneMutex ); doneCount = 2; glfwUnlockMutex( doneMutex ); } // Wait for both threads to be done t1 = glfwGetTime(); glfwLockMutex( doneMutex ); do { done = (doneCount == 2); if( !done ) { glfwWaitCond( threadDone, doneMutex, GLFW_INFINITY ); } } while( !done ); glfwUnlockMutex( doneMutex ); t2 = glfwGetTime(); // Display results count = gotoACount + gotoBCount; csps = cast(double)count / (t2-t1); printf( "Test 1: %.0f context switches / second (%.3f us/switch)\n", csps, 1e6/csps ); fflush( stdout ); // Wait for threads to die glfwWaitThread( threadA, GLFW_WAIT ); glfwWaitThread( threadB, GLFW_WAIT ); // Destroy mutexes and conditions glfwDestroyMutex( doneMutex ); glfwDestroyCond( threadDone ); KillSignal( &gotoA ); KillSignal( &gotoB ); //------------------------------------------------------------------------ // 2) Benchmark thread sleep granularity //------------------------------------------------------------------------ // Find an initial estimate t1 = glfwGetTime(); for( i = 0; i < 10; i ++ ) { glfwSleep( 0.0001 ); } t2 = glfwGetTime(); // Sleep for roughly 1 s count = cast(int)(1.0 / ((t2-t1)/10.0)); t1 = glfwGetTime(); for( i = 0; i < count; i ++ ) { glfwSleep( 0.0001 ); } t2 = glfwGetTime(); // Display results printf( "Test 2: %.3f ms / sleep (mean)\n\n", 1000.0 * (t2-t1) / cast(double)count ); // Terminate GLFW glfwTerminate(); return 0; } version(Windows) { extern(Windows): } else { extern(C): } //------------------------------------------------------------------------ // threadAfun() //------------------------------------------------------------------------ void threadAfun( void * arg ) { int done; do { done = (gotoACount >= MAX_COUNT); if( !done ) { gotoACount ++; SetSignal( &gotoB ); WaitSignal( &gotoA ); } } while( !done ); SetSignal( &gotoB ); glfwLockMutex( doneMutex ); doneCount ++; glfwUnlockMutex( doneMutex ); glfwSignalCond( threadDone ); } //------------------------------------------------------------------------ // threadBfun() //------------------------------------------------------------------------ void threadBfun( void * arg ) { int done; do { done = (gotoBCount >= MAX_COUNT); if( !done ) { gotoBCount ++; SetSignal( &gotoA ); WaitSignal( &gotoB ); } } while( !done ); SetSignal( &gotoA ); glfwLockMutex( doneMutex ); doneCount ++; glfwUnlockMutex( doneMutex ); glfwSignalCond( threadDone ); } glfw-2.7.2/support/d/examples/keytest.d0000644000175000017500000001413110625531326021070 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // Keyboard input test. //======================================================================== import glfw; import std.math; import std.string; import std.c.stdio; int running = 0; int keyrepeat = 0; int systemkeys = 1; //======================================================================== // main() //======================================================================== int main( ) { int width, height; double t; // Initialise GLFW glfwInit(); // Open OpenGL window if( !glfwOpenWindow( 250,100, 0,0,0,0, 0,0, GLFW_WINDOW ) ) { glfwTerminate(); return 0; } // Set key callback function glfwSetKeyCallback( &keyfun ); // Set tile glfwSetWindowTitle( "Press some keys!" ); // Main loop running = GL_TRUE; while( running ) { // Get time and mouse position t = glfwGetTime(); // Get window size (may be different than the requested size) glfwGetWindowSize( &width, &height ); height = height > 0 ? height : 1; // Set viewport glViewport( 0, 0, width, height ); // Clear color buffer glClearColor( cast(GLfloat)(0.5+0.5*sin(3.0*t)), 0.0f, 0.0f, 0.0f); glClear( GL_COLOR_BUFFER_BIT ); // Swap buffers glfwSwapBuffers(); // Check if the window was closed running = running && glfwGetWindowParam( GLFW_OPENED ); } // Close OpenGL window and terminate GLFW glfwTerminate(); return 0; } //======================================================================== // keyfun() //======================================================================== version(Windows) { extern(Windows): } else { extern(C): } void keyfun( int key, int action ) { if( action != GLFW_PRESS ) { return; } switch( key ) { case GLFW_KEY_ESC: printf( "ESC => quit program\n" ); running = GL_FALSE; break; case GLFW_KEY_F1: case GLFW_KEY_F2: case GLFW_KEY_F3: case GLFW_KEY_F4: case GLFW_KEY_F5: case GLFW_KEY_F6: case GLFW_KEY_F7: case GLFW_KEY_F8: case GLFW_KEY_F9: case GLFW_KEY_F10: case GLFW_KEY_F11: case GLFW_KEY_F12: case GLFW_KEY_F13: case GLFW_KEY_F14: case GLFW_KEY_F15: case GLFW_KEY_F16: case GLFW_KEY_F17: case GLFW_KEY_F18: case GLFW_KEY_F19: case GLFW_KEY_F20: case GLFW_KEY_F21: case GLFW_KEY_F22: case GLFW_KEY_F23: case GLFW_KEY_F24: case GLFW_KEY_F25: printf( "F%d\n", 1 + key - GLFW_KEY_F1 ); break; case GLFW_KEY_UP: printf( "UP\n" ); break; case GLFW_KEY_DOWN: printf( "DOWN\n" ); break; case GLFW_KEY_LEFT: printf( "LEFT\n" ); break; case GLFW_KEY_RIGHT: printf( "RIGHT\n" ); break; case GLFW_KEY_LSHIFT: printf( "LSHIFT\n" ); break; case GLFW_KEY_RSHIFT: printf( "RSHIFT\n" ); break; case GLFW_KEY_LCTRL: printf( "LCTRL\n" ); break; case GLFW_KEY_RCTRL: printf( "RCTRL\n" ); break; case GLFW_KEY_LALT: printf( "LALT\n" ); break; case GLFW_KEY_RALT: printf( "RALT\n" ); break; case GLFW_KEY_TAB: printf( "TAB\n" ); break; case GLFW_KEY_ENTER: printf( "ENTER\n" ); break; case GLFW_KEY_BACKSPACE: printf( "BACKSPACE\n" ); break; case GLFW_KEY_INSERT: printf( "INSERT\n" ); break; case GLFW_KEY_DEL: printf( "DEL\n" ); break; case GLFW_KEY_PAGEUP: printf( "PAGEUP\n" ); break; case GLFW_KEY_PAGEDOWN: printf( "PAGEDOWN\n" ); break; case GLFW_KEY_HOME: printf( "HOME\n" ); break; case GLFW_KEY_END: printf( "END\n" ); break; case GLFW_KEY_KP_0: printf( "KEYPAD 0\n" ); break; case GLFW_KEY_KP_1: printf( "KEYPAD 1\n" ); break; case GLFW_KEY_KP_2: printf( "KEYPAD 2\n" ); break; case GLFW_KEY_KP_3: printf( "KEYPAD 3\n" ); break; case GLFW_KEY_KP_4: printf( "KEYPAD 4\n" ); break; case GLFW_KEY_KP_5: printf( "KEYPAD 5\n" ); break; case GLFW_KEY_KP_6: printf( "KEYPAD 6\n" ); break; case GLFW_KEY_KP_7: printf( "KEYPAD 7\n" ); break; case GLFW_KEY_KP_8: printf( "KEYPAD 8\n" ); break; case GLFW_KEY_KP_9: printf( "KEYPAD 9\n" ); break; case GLFW_KEY_KP_DIVIDE: printf( "KEYPAD DIVIDE\n" ); break; case GLFW_KEY_KP_MULTIPLY: printf( "KEYPAD MULTIPLY\n" ); break; case GLFW_KEY_KP_SUBTRACT: printf( "KEYPAD SUBTRACT\n" ); break; case GLFW_KEY_KP_ADD: printf( "KEYPAD ADD\n" ); break; case GLFW_KEY_KP_DECIMAL: printf( "KEYPAD DECIMAL\n" ); break; case GLFW_KEY_KP_EQUAL: printf( "KEYPAD =\n" ); break; case GLFW_KEY_KP_ENTER: printf( "KEYPAD ENTER\n" ); break; case GLFW_KEY_SPACE: printf( "SPACE\n" ); break; case 'R': keyrepeat = (keyrepeat+1) & 1; if( keyrepeat ) { glfwEnable( GLFW_KEY_REPEAT ); } else { glfwDisable( GLFW_KEY_REPEAT ); } printf( "R => Key repeat: %s\n", keyrepeat ? toStringz("ON") : toStringz("OFF") ); break; case 'S': systemkeys = (systemkeys+1) & 1; if( systemkeys ) { glfwEnable( GLFW_SYSTEM_KEYS ); } else { glfwDisable( GLFW_SYSTEM_KEYS ); } printf( "S => System keys: %s\n", systemkeys ? "ON" : "OFF" ); break; default: if( key > 0 && key < 256 ) { printf( "%c\n", cast(char) key ); } else { printf( "???\n" ); } break; } fflush( stdout ); } glfw-2.7.2/support/d/examples/particles.d0000644000175000017500000011321010625531326021364 0ustar elmindredaelmindreda//======================================================================== // This is a simple, but cool particle engine (buzz-word meaning many // small objects that are treated as points and drawn as textures // projected on simple geometry). // // This demonstration generates a colorful fountain-like animation. It // uses several advanced OpenGL teqhniques: // // 1) Lighting (per vertex) // 2) Alpha blending // 3) Fog // 4) Texturing // 5) Display lists (for drawing the static environment geometry) // 6) Vertex arrays (for drawing the particles) // 7) GL_EXT_separate_specular_color is used (if available) // // Even more so, this program uses multi threading. The program is // essentialy divided into a main rendering thread and a particle physics // calculation thread. My benchmarks under Windows 2000 on a single // processor system show that running this program as two threads instead // of a single thread means no difference (there may be a very marginal // advantage for the multi threaded case). On dual processor systems I // have had reports of 5-25% of speed increase when running this program // as two threads instead of one thread. // // The default behaviour of this program is to use two threads. To force // a single thread to be used, use the command line switch -s. // // To run a fixed length benchmark (60 s), use the command line switch -b. // // Benchmark results (640x480x16, best of three tests): // // CPU GFX 1 thread 2 threads // Athlon XP 2700+ GeForce Ti4200 (oc) 757 FPS 759 FPS // P4 2.8 GHz (SMT) GeForce FX5600 548 FPS 550 FPS // // One more thing: Press 'w' during the demo to toggle wireframe mode. //======================================================================== import std.math; import std.c.string; import std.random; import glfw; // Define tokens for GL_EXT_separate_specular_color if not already defined // #ifndef GL_EXT_separate_specular_color const int GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8; const int GL_SINGLE_COLOR_EXT = 0x81F9; const int GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA; // #endif // GL_EXT_separate_specular_color // Desired fullscreen resolution const int WIDTH = 640; const int HEIGHT = 480; //======================================================================== // Type definitions //======================================================================== struct VEC { float x,y,z; } // This structure is used for interleaved vertex arrays (see the // DrawParticles function) - Note: This structure SHOULD be packed on most // systems. It uses 32-bit fields on 32-bit boundaries, and is a multiple // of 64 bits in total (6x32=3x64). If it does not work, try using pragmas // or whatever to force the structure to be packed. struct VERTEX { GLfloat s, t; // Texture coordinates GLuint rgba; // Color (four ubytes packed into an uint) GLfloat x, y, z; // Vertex coordinates } //======================================================================== // Program control global variables //======================================================================== // "Running" flag (true if program shall continue to run) int running = 0; // Window dimensions int width=640, height=480; // "wireframe" flag (true if we use wireframe view) int wireframe = 0; // "multithreading" flag (true if we use multithreading) int multithreading = 0; // Thread synchronization struct TS { double t; // Time (s) float dt; // Time since last frame (s) int p_frame; // Particle physics frame number int d_frame; // Particle draw frame number GLFWcond p_done; // Condition: particle physics done GLFWcond d_done; // Condition: particle draw done GLFWmutex particles_lock; // Particles data sharing mutex } TS thread_sync; //======================================================================== // Texture declarations (we hard-code them into the source code, since // they are so simple) //======================================================================== const int P_TEX_WIDTH = 8; // Particle texture dimensions const int P_TEX_HEIGHT = 8; const int F_TEX_WIDTH = 16; // Floor texture dimensions const int F_TEX_HEIGHT = 16; // Texture object IDs GLuint particle_tex_id=0, floor_tex_id=0; // Particle texture (a simple spot) const ubyte[ P_TEX_WIDTH * P_TEX_HEIGHT ] particle_texture = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x22, 0x22, 0x11, 0x00, 0x00, 0x00, 0x11, 0x33, 0x88, 0x77, 0x33, 0x11, 0x00, 0x00, 0x22, 0x88, 0xff, 0xee, 0x77, 0x22, 0x00, 0x00, 0x22, 0x77, 0xee, 0xff, 0x88, 0x22, 0x00, 0x00, 0x11, 0x33, 0x77, 0x88, 0x33, 0x11, 0x00, 0x00, 0x00, 0x11, 0x33, 0x22, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]; // Floor texture (your basic checkered floor) const ubyte[ F_TEX_WIDTH * F_TEX_HEIGHT ] floor_texture = [ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xcc, 0xee, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x66, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xee, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x55, 0x30, 0x30, 0x44, 0x30, 0x30, 0xf0, 0xdd, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x60, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30, 0xf0, 0xff, 0xf0, 0xf0, 0xdd, 0xf0, 0xf0, 0xff, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x55, 0x33, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0, 0x30, 0x44, 0x66, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xaa, 0xf0, 0xf0, 0xcc, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xdd, 0xf0, 0x30, 0x30, 0x30, 0x77, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, ]; //======================================================================== // These are fixed constants that control the particle engine. In a // modular world, these values should be variables... //======================================================================== // Maximum number of particles const int MAX_PARTICLES = 3000; // Life span of a particle (in seconds) const float LIFE_SPAN = 8.0f; // A new particle is born every [BIRTH_INTERVAL] second const float BIRTH_INTERVAL = (LIFE_SPAN/cast(float)MAX_PARTICLES); // Particle size (meters) const float PARTICLE_SIZE = 0.7f; // Gravitational constant (m/s^2) const float GRAVITY = 9.8f; // Base initial velocity (m/s) const float VELOCITY = 8.0f; // Bounce friction (1.0 = no friction, 0.0 = maximum friction) const float FRICTION = 0.75f; // "Fountain" height (m) const float FOUNTAIN_HEIGHT = 3.0f; // Fountain radius (m) const float FOUNTAIN_RADIUS = 1.6f; // Minimum delta-time for particle phisics (s) const float MIN_DELTA_T = (BIRTH_INTERVAL*0.5); //======================================================================== // Particle system global variables //======================================================================== // This structure holds all state for a single particle struct PARTICLE { float x,y,z; // Position in space float vx,vy,vz; // Velocity vector float r,g,b; // Color of particle float life; // Life of particle (1.0 = newborn, < 0.0 = dead) int active; // Tells if this particle is active } // Global vectors holding all particles. We use two vectors for double // buffering. static PARTICLE[ MAX_PARTICLES ] particles; // Global variable holding the age of the youngest particle static float min_age = 0.0; // Color of latest born particle (used for fountain lighting) static float[4] glow_color = [0.0, 0.0, 0.0, 0.0]; // Position of latest born particle (used for fountain lighting) static float[4] glow_pos = [0.0, 0.0, 0.0, 0.0]; //======================================================================== // Object material and fog configuration constants //======================================================================== const GLfloat[4] fountain_diffuse = [0.7f,1.0f,1.0f,1.0f]; const GLfloat[4] fountain_specular = [1.0f,1.0f,1.0f,1.0f]; const GLfloat fountain_shininess = 12.0f; const GLfloat[4] floor_diffuse = [1.0f,0.6f,0.6f,1.0f]; const GLfloat[4] floor_specular = [0.6f,0.6f,0.6f,1.0f]; const GLfloat floor_shininess = 18.0f; const GLfloat[4] fog_color = [0.1f, 0.1f, 0.1f, 1.0f]; //======================================================================== // InitParticle() - Initialize a new particle //======================================================================== void InitParticle( PARTICLE* p, double t ) { float xy_angle=0.0, velocity=0.0; // Start position of particle is at the fountain blow-out p.x = 0.0f; p.y = 0.0f; p.z = FOUNTAIN_HEIGHT; // Start velocity is up (Z)... p.vz = 0.7f + (0.3/4096.0) * cast(float) (rand() & 4095); // ...and a randomly chosen X/Y direction xy_angle = (2.0*PI/4096.0) * cast(float) (rand() & 4095); p.vx = 0.4f * cast(float) cos( xy_angle ); p.vy = 0.4f * cast(float) sin( xy_angle ); // Scale velocity vector according to a time-varying velocity velocity = VELOCITY*(0.8f + 0.1f*cast(float)(sin( 0.5*t )+sin( 1.31*t ))); p.vx *= velocity; p.vy *= velocity; p.vz *= velocity; // Color is time-varying p.r = 0.7f + 0.3f * cast(float) sin( 0.34*t + 0.1 ); p.g = 0.6f + 0.4f * cast(float) sin( 0.63*t + 1.1 ); p.b = 0.6f + 0.4f * cast(float) sin( 0.91*t + 2.1 ); // Store settings for fountain glow lighting glow_pos[0] = 0.4f * cast(float) sin( 1.34*t ); glow_pos[1] = 0.4f * cast(float) sin( 3.11*t ); glow_pos[2] = FOUNTAIN_HEIGHT + 1.0f; glow_pos[3] = 1.0f; glow_color[0] = p.r; glow_color[1] = p.g; glow_color[2] = p.b; glow_color[3] = 1.0f; // The particle is new-born and active p.life = 1.0f; p.active = 1; } //======================================================================== // UpdateParticle() - Update a particle //======================================================================== const float FOUNTAIN_R2 = (FOUNTAIN_RADIUS+PARTICLE_SIZE/2) * (FOUNTAIN_RADIUS+PARTICLE_SIZE/2); void UpdateParticle( PARTICLE* p, float dt ) { // If the particle is not active, we need not do anything if( !p.active ) { return; } // The particle is getting older... p.life = p.life - dt * (1.0f / LIFE_SPAN); // Did the particle die? if( p.life <= 0.0f ) { p.active = 0; return; } // Update particle velocity (apply gravity) p.vz = p.vz - GRAVITY * dt; // Update particle position p.x = p.x + p.vx * dt; p.y = p.y + p.vy * dt; p.z = p.z + p.vz * dt; // Simple collision detection + response if( p.vz < 0.0f ) { // Particles should bounce on the fountain (with friction) if( (p.x*p.x + p.y*p.y) < FOUNTAIN_R2 && p.z < (FOUNTAIN_HEIGHT + PARTICLE_SIZE/2) ) { p.vz = -FRICTION * p.vz; p.z = FOUNTAIN_HEIGHT + PARTICLE_SIZE/2 + FRICTION * (FOUNTAIN_HEIGHT + PARTICLE_SIZE/2 - p.z); } // Particles should bounce on the floor (with friction) else if( p.z < PARTICLE_SIZE/2 ) { p.vz = -FRICTION * p.vz; p.z = PARTICLE_SIZE/2 + FRICTION * (PARTICLE_SIZE/2 - p.z); } } } //======================================================================== // ParticleEngine() - The main frame for the particle engine. Called once // per frame. //======================================================================== void ParticleEngine( double t, float dt ) { int i; float dt2 = 0.0; // Update particles (iterated several times per frame if dt is too // large) while( dt > 0.0f ) { // Calculate delta time for this iteration dt2 = dt < MIN_DELTA_T ? dt : MIN_DELTA_T; // Update particles for( i = 0; i < MAX_PARTICLES; i ++ ) { UpdateParticle( &particles[ i ], dt2 ); } // Increase minimum age min_age += dt2; // Should we create any new particle(s)? while( min_age >= BIRTH_INTERVAL ) { min_age -= BIRTH_INTERVAL; // Find a dead particle to replace with a new one for( i = 0; i < MAX_PARTICLES; i ++ ) { if( !particles[ i ].active ) { InitParticle( &particles[ i ], t + min_age ); UpdateParticle( &particles[ i ], min_age ); break; } } } // Decrease frame delta time dt -= dt2; } } //======================================================================== // DrawParticles() - Draw all active particles. We use OpenGL 1.1 vertex // arrays for this in order to accelerate the drawing. //======================================================================== const int BATCH_PARTICLES = 70; // Number of particles to draw in each batch // (70 corresponds to 7.5 KB = will not blow // the L1 data cache on most CPUs) const int PARTICLE_VERTS = 4; // Number of vertices per particle void DrawParticles( double t, float dt ) { int i = 0, particle_count = 0; VERTEX[ BATCH_PARTICLES * PARTICLE_VERTS ] vertex_array; VERTEX *vptr; float alpha = 0.0; GLuint rgba; VEC quad_lower_left, quad_lower_right; GLfloat mat[ 16 ]; PARTICLE *pptr; // Here comes the real trick with flat single primitive objects (s.c. // "billboards"): We must rotate the textured primitive so that it // always faces the viewer (is coplanar with the view-plane). // We: // 1) Create the primitive around origo (0,0,0) // 2) Rotate it so that it is coplanar with the view plane // 3) Translate it according to the particle position // Note that 1) and 2) is the same for all particles (done only once). // Get modelview matrix. We will only use the upper left 3x3 part of // the matrix, which represents the rotation. glGetFloatv( GL_MODELVIEW_MATRIX, mat ); // 1) & 2) We do it in one swift step: // Although not obvious, the following six lines represent two matrix/ // vector multiplications. The matrix is the inverse 3x3 rotation // matrix (i.e. the transpose of the same matrix), and the two vectors // represent the lower left corner of the quad, PARTICLE_SIZE/2 * // (-1,-1,0), and the lower right corner, PARTICLE_SIZE/2 * (1,-1,0). // The upper left/right corners of the quad is always the negative of // the opposite corners (regardless of rotation). quad_lower_left.x = (-PARTICLE_SIZE/2) * (mat[0] + mat[1]); quad_lower_left.y = (-PARTICLE_SIZE/2) * (mat[4] + mat[5]); quad_lower_left.z = (-PARTICLE_SIZE/2) * (mat[8] + mat[9]); quad_lower_right.x = (PARTICLE_SIZE/2) * (mat[0] - mat[1]); quad_lower_right.y = (PARTICLE_SIZE/2) * (mat[4] - mat[5]); quad_lower_right.z = (PARTICLE_SIZE/2) * (mat[8] - mat[9]); // Don't update z-buffer, since all particles are transparent! glDepthMask( GL_FALSE ); // Enable blending glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE ); // Select particle texture if( !wireframe ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, particle_tex_id ); } // Set up vertex arrays. We use interleaved arrays, which is easier to // handle (in most situations) and it gives a linear memeory access // access pattern (which may give better performance in some // situations). GL_T2F_C4UB_V3F means: 2 floats for texture coords, // 4 ubytes for color and 3 floats for vertex coord (in that order). // Most OpenGL cards / drivers are optimized for this format. glInterleavedArrays( GL_T2F_C4UB_V3F, 0, vertex_array ); // Is particle physics carried out in a separate thread? if( multithreading ) { // Wait for particle physics thread to be done glfwLockMutex( thread_sync.particles_lock ); while( running && thread_sync.p_frame <= thread_sync.d_frame ) { glfwWaitCond( thread_sync.p_done, thread_sync.particles_lock, 0.1 ); } // Store the frame time and delta time for the physics thread thread_sync.t = t; thread_sync.dt = dt; // Update frame counter thread_sync.d_frame ++; } else { // Perform particle physics in this thread ParticleEngine( t, dt ); } // Loop through all particles and build vertex arrays. particle_count = 0; vptr = vertex_array; pptr = particles; for( i = 0; i < MAX_PARTICLES; i ++ ) { if( pptr.active ) { // Calculate particle intensity (we set it to max during 75% // of its life, then it fades out) alpha = 4.0f * pptr.life; if( alpha > 1.0f ) { alpha = 1.0f; } // Convert color from float to 8-bit (store it in a 32-bit // integer using endian independent type casting) (cast(GLubyte *)&rgba)[0] = cast(GLubyte)(pptr.r * 255.0f); (cast(GLubyte *)&rgba)[1] = cast(GLubyte)(pptr.g * 255.0f); (cast(GLubyte *)&rgba)[2] = cast(GLubyte)(pptr.b * 255.0f); (cast(GLubyte *)&rgba)[3] = cast(GLubyte)(alpha * 255.0f); // 3) Translate the quad to the correct position in modelview // space and store its parameters in vertex arrays (we also // store texture coord and color information for each vertex). // Lower left corner vptr.s = 0.0f; vptr.t = 0.0f; vptr.rgba = rgba; vptr.x = pptr.x + quad_lower_left.x; vptr.y = pptr.y + quad_lower_left.y; vptr.z = pptr.z + quad_lower_left.z; vptr ++; // Lower right corner vptr.s = 1.0f; vptr.t = 0.0f; vptr.rgba = rgba; vptr.x = pptr.x + quad_lower_right.x; vptr.y = pptr.y + quad_lower_right.y; vptr.z = pptr.z + quad_lower_right.z; vptr ++; // Upper right corner vptr.s = 1.0f; vptr.t = 1.0f; vptr.rgba = rgba; vptr.x = pptr.x - quad_lower_left.x; vptr.y = pptr.y - quad_lower_left.y; vptr.z = pptr.z - quad_lower_left.z; vptr ++; // Upper left corner vptr.s = 0.0f; vptr.t = 1.0f; vptr.rgba = rgba; vptr.x = pptr.x - quad_lower_right.x; vptr.y = pptr.y - quad_lower_right.y; vptr.z = pptr.z - quad_lower_right.z; vptr ++; // Increase count of drawable particles particle_count ++; } // If we have filled up one batch of particles, draw it as a set // of quads using glDrawArrays. if( particle_count >= BATCH_PARTICLES ) { // The first argument tells which primitive type we use (QUAD) // The second argument tells the index of the first vertex (0) // The last argument is the vertex count glDrawArrays( GL_QUADS, 0, PARTICLE_VERTS * particle_count ); particle_count = 0; vptr = vertex_array; } // Next particle pptr ++; } // We are done with the particle data: Unlock mutex and signal physics // thread if( multithreading ) { glfwUnlockMutex( thread_sync.particles_lock ); glfwSignalCond( thread_sync.d_done ); } // Draw final batch of particles (if any) glDrawArrays( GL_QUADS, 0, PARTICLE_VERTS * particle_count ); // Disable vertex arrays (Note: glInterleavedArrays implicitly called // glEnableClientState for vertex, texture coord and color arrays) glDisableClientState( GL_VERTEX_ARRAY ); glDisableClientState( GL_TEXTURE_COORD_ARRAY ); glDisableClientState( GL_COLOR_ARRAY ); // Disable texturing and blending glDisable( GL_TEXTURE_2D ); glDisable( GL_BLEND ); // Allow Z-buffer updates again glDepthMask( GL_TRUE ); } //======================================================================== // Fountain geometry specification //======================================================================== const int FOUNTAIN_SIDE_POINTS = 14; const int FOUNTAIN_SWEEP_STEPS = 32; static const float[ FOUNTAIN_SIDE_POINTS*2 ] fountain_side = [ 1.2f, 0.0f, 1.0f, 0.2f, 0.41f, 0.3f, 0.4f, 0.35f, 0.4f, 1.95f, 0.41f, 2.0f, 0.8f, 2.2f, 1.2f, 2.4f, 1.5f, 2.7f, 1.55f,2.95f, 1.6f, 3.0f, 1.0f, 3.0f, 0.5f, 3.0f, 0.0f, 3.0f ]; static const float[ FOUNTAIN_SIDE_POINTS*2 ] fountain_normal = [ 1.0000f, 0.0000f, 0.6428f, 0.7660f, 0.3420f, 0.9397f, 1.0000f, 0.0000f, 1.0000f, 0.0000f, 0.3420f,-0.9397f, 0.4226f,-0.9063f, 0.5000f,-0.8660f, 0.7660f,-0.6428f, 0.9063f,-0.4226f, 0.0000f,1.00000f, 0.0000f,1.00000f, 0.0000f,1.00000f, 0.0000f,1.00000f ]; //======================================================================== // DrawFountain() - Draw a fountain //======================================================================== void DrawFountain() { static GLuint fountain_list = 0; double angle = 0.0; float x = 0.0, y = 0.0; int m, n; // The first time, we build the fountain display list if( !fountain_list ) { // Start recording of a new display list fountain_list = glGenLists( 1 ); glNewList( fountain_list, GL_COMPILE_AND_EXECUTE ); // Set fountain material glMaterialfv( GL_FRONT, GL_DIFFUSE, fountain_diffuse ); glMaterialfv( GL_FRONT, GL_SPECULAR, fountain_specular ); glMaterialf( GL_FRONT, GL_SHININESS, fountain_shininess ); // Build fountain using triangle strips for( n = 0; n < FOUNTAIN_SIDE_POINTS-1; n ++ ) { glBegin( GL_TRIANGLE_STRIP ); for( m = 0; m <= FOUNTAIN_SWEEP_STEPS; m ++ ) { angle = cast(double) m * (2.0*PI/cast(double)FOUNTAIN_SWEEP_STEPS); x = cast(float) cos( angle ); y = cast(float) sin( angle ); // Draw triangle strip glNormal3f( x * fountain_normal[ n*2+2 ], y * fountain_normal[ n*2+2 ], fountain_normal[ n*2+3 ] ); glVertex3f( x * fountain_side[ n*2+2 ], y * fountain_side[ n*2+2 ], fountain_side[ n*2+3 ] ); glNormal3f( x * fountain_normal[ n*2 ], y * fountain_normal[ n*2 ], fountain_normal[ n*2+1 ] ); glVertex3f( x * fountain_side[ n*2 ], y * fountain_side[ n*2 ], fountain_side[ n*2+1 ] ); } glEnd(); } // End recording of display list glEndList(); } else { // Playback display list glCallList( fountain_list ); } } //======================================================================== // TesselateFloor() - Recursive function for building variable tesselated // floor //======================================================================== void TesselateFloor( float x1, float y1, float x2, float y2, int recursion ) { float delta, x, y; // Last recursion? if( recursion >= 5 ) { delta = 999999.0f; } else { x = fabs(x1) < fabs(x2) ? fabs(x1) : fabs(x2); y = fabs(y1) < fabs(y2) ? fabs(y1) : fabs(y2); delta = x*x + y*y; } // Recurse further? if( delta < 0.1f ) { x = (x1+x2) * 0.5f; y = (y1+y2) * 0.5f; TesselateFloor( x1,y1, x, y, recursion + 1 ); TesselateFloor( x,y1, x2, y, recursion + 1 ); TesselateFloor( x1, y, x,y2, recursion + 1 ); TesselateFloor( x, y, x2,y2, recursion + 1 ); } else { glTexCoord2f( x1*30.0f, y1*30.0f ); glVertex3f( x1*80.0f, y1*80.0f , 0.0f ); glTexCoord2f( x2*30.0f, y1*30.0f ); glVertex3f( x2*80.0f, y1*80.0f , 0.0f ); glTexCoord2f( x2*30.0f, y2*30.0f ); glVertex3f( x2*80.0f, y2*80.0f , 0.0f ); glTexCoord2f( x1*30.0f, y2*30.0f ); glVertex3f( x1*80.0f, y2*80.0f , 0.0f ); } } //======================================================================== // DrawFloor() - Draw floor. We builde the floor recursively, and let the // tesselation in the centre (near x,y=0,0) be high, while the selleation // around the edges be low. //======================================================================== void DrawFloor() { static GLuint floor_list = 0; // Select floor texture if( !wireframe ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, floor_tex_id ); } // The first time, we build the floor display list if( !floor_list ) { // Start recording of a new display list floor_list = glGenLists( 1 ); glNewList( floor_list, GL_COMPILE_AND_EXECUTE ); // Set floor material glMaterialfv( GL_FRONT, GL_DIFFUSE, floor_diffuse ); glMaterialfv( GL_FRONT, GL_SPECULAR, floor_specular ); glMaterialf( GL_FRONT, GL_SHININESS, floor_shininess ); // Draw floor as a bunch of triangle strips (high tesselation // improves lighting) glNormal3f( 0.0f, 0.0f, 1.0f ); glBegin( GL_QUADS ); TesselateFloor( -1.0f,-1.0f, 0.0f,0.0f, 0 ); TesselateFloor( 0.0f,-1.0f, 1.0f,0.0f, 0 ); TesselateFloor( 0.0f, 0.0f, 1.0f,1.0f, 0 ); TesselateFloor( -1.0f, 0.0f, 0.0f,1.0f, 0 ); glEnd(); // End recording of display list glEndList(); } else { // Playback display list glCallList( floor_list ); } glDisable( GL_TEXTURE_2D ); } //======================================================================== // SetupLights() - Position and configure light sources //======================================================================== void SetupLights() { float[4] l1pos, l1amb, l1dif, l1spec; float[4] l2pos, l2amb, l2dif, l2spec; // Set light source 1 parameters l1pos[0] = 0.0f; l1pos[1] = -9.0f; l1pos[2] = 8.0f; l1pos[3] = 1.0f; l1amb[0] = 0.2f; l1amb[1] = 0.2f; l1amb[2] = 0.2f; l1amb[3] = 1.0f; l1dif[0] = 0.8f; l1dif[1] = 0.4f; l1dif[2] = 0.2f; l1dif[3] = 1.0f; l1spec[0] = 1.0f; l1spec[1] = 0.6f; l1spec[2] = 0.2f; l1spec[3] = 0.0f; // Set light source 2 parameters l2pos[0] = -15.0f; l2pos[1] = 12.0f; l2pos[2] = 1.5f; l2pos[3] = 1.0f; l2amb[0] = 0.0f; l2amb[1] = 0.0f; l2amb[2] = 0.0f; l2amb[3] = 1.0f; l2dif[0] = 0.2f; l2dif[1] = 0.4f; l2dif[2] = 0.8f; l2dif[3] = 1.0f; l2spec[0] = 0.2f; l2spec[1] = 0.6f; l2spec[2] = 1.0f; l2spec[3] = 0.0f; // Configure light sources in OpenGL glLightfv( GL_LIGHT1, GL_POSITION, l1pos ); glLightfv( GL_LIGHT1, GL_AMBIENT, l1amb ); glLightfv( GL_LIGHT1, GL_DIFFUSE, l1dif ); glLightfv( GL_LIGHT1, GL_SPECULAR, l1spec ); glLightfv( GL_LIGHT2, GL_POSITION, l2pos ); glLightfv( GL_LIGHT2, GL_AMBIENT, l2amb ); glLightfv( GL_LIGHT2, GL_DIFFUSE, l2dif ); glLightfv( GL_LIGHT2, GL_SPECULAR, l2spec ); glLightfv( GL_LIGHT3, GL_POSITION, glow_pos ); glLightfv( GL_LIGHT3, GL_DIFFUSE, glow_color ); glLightfv( GL_LIGHT3, GL_SPECULAR, glow_color ); // Enable light sources glEnable( GL_LIGHT1 ); glEnable( GL_LIGHT2 ); glEnable( GL_LIGHT3 ); } //======================================================================== // Draw() - Main rendering function //======================================================================== void Draw( double t ) { double xpos, ypos, zpos, angle_x, angle_y, angle_z; static double t_old = 0.0; float dt; // Calculate frame-to-frame delta time dt = cast(float)(t-t_old); t_old = t; // Setup viewport glViewport( 0, 0, width, height ); // Clear color and Z-buffer glClearColor( 0.1f, 0.1f, 0.1f, 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // Setup projection glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0, cast(double)width/cast(double)height, 1.0, 60.0 ); // Setup camera glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); // Rotate camera angle_x = 90.0 - 10.0; angle_y = 10.0 * sin( 0.3 * t ); angle_z = 10.0 * t; glRotated( -angle_x, 1.0, 0.0, 0.0 ); glRotated( -angle_y, 0.0, 1.0, 0.0 ); glRotated( -angle_z, 0.0, 0.0, 1.0 ); // Translate camera xpos = 15.0 * sin( (PI/180.0) * angle_z ) + 2.0 * sin( (PI/180.0) * 3.1 * t ); ypos = -15.0 * cos( (PI/180.0) * angle_z ) + 2.0 * cos( (PI/180.0) * 2.9 * t ); zpos = 4.0 + 2.0 * cos( (PI/180.0) * 4.9 * t ); glTranslated( -xpos, -ypos, -zpos ); // Enable face culling glFrontFace( GL_CCW ); glCullFace( GL_BACK ); glEnable( GL_CULL_FACE ); // Enable lighting SetupLights(); glEnable( GL_LIGHTING ); // Enable fog (dim details far away) glEnable( GL_FOG ); glFogi( GL_FOG_MODE, GL_EXP ); glFogf( GL_FOG_DENSITY, 0.05f ); glFogfv( GL_FOG_COLOR, fog_color ); // Draw floor DrawFloor(); // Enable Z-buffering glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); glDepthMask( GL_TRUE ); // Draw fountain DrawFountain(); // Disable fog & lighting glDisable( GL_LIGHTING ); glDisable( GL_FOG ); // Draw all particles (must be drawn after all solid objects have been // drawn!) DrawParticles( t, dt ); // Z-buffer not needed anymore glDisable( GL_DEPTH_TEST ); } //======================================================================== // Resize() - GLFW window resize callback function //======================================================================== extern (Windows) { void Resize( int x, int y ) { width = x; height = y > 0 ? y : 1; // Prevent division by zero in aspect calc. } } //======================================================================== // Input callback functions //======================================================================== extern (Windows) { void KeyFun( int key, int action ) { if( action == GLFW_PRESS ) { switch( key ) { case GLFW_KEY_ESC: running = 0; break; case 'W': wireframe = !wireframe; glPolygonMode( GL_FRONT_AND_BACK, wireframe ? GL_LINE : GL_FILL ); break; default: break; } } } } //======================================================================== // PhysicsThreadFun() - Thread for updating particle physics //======================================================================== extern (Windows) { void PhysicsThreadFun( void *arg ) { while( running ) { // Lock mutex glfwLockMutex( thread_sync.particles_lock ); // Wait for particle drawing to be done while( running && thread_sync.p_frame > thread_sync.d_frame ) { glfwWaitCond( thread_sync.d_done, thread_sync.particles_lock, 0.1 ); } // No longer running? if( !running ) { break; } // Update particles ParticleEngine( thread_sync.t, thread_sync.dt ); // Update frame counter thread_sync.p_frame ++; // Unlock mutex and signal drawing thread glfwUnlockMutex( thread_sync.particles_lock ); glfwSignalCond( thread_sync.p_done ); } } } //======================================================================== // main() //======================================================================== int main(char[][] args) { int i=0, frames=0, benchmark=0; double t0=0.0, t=0.0; GLFWthread physics_thread = 0; // Use multithreading by default, but don't benchmark multithreading = 1; benchmark = 0; // Check command line arguments for( i = 1; i < args.length; i ++ ) { // Use benchmarking? if( strcmp( args[i], "-b" ) == 0 ) { benchmark = 1; } // Force multithreading off? else if( strcmp( args[i], "-s" ) == 0 ) { multithreading = 0; } // With a Finder launch on Mac OS X we get a bogus -psn_0_46268417 // kind of argument (actual numbers vary). Ignore it. // else if( strncmp( args[i], "-psn_", 5) == 0 ) { } // Usage else { if( strcmp( args[i], "-?" ) != 0 ) { printf( "Unknown option %.*s\n\n", args[ i ] ); } printf( "Usage: %.*s [options]\n", args[ 0 ] ); printf( "\n"); printf( "Options:\n" ); printf( " -b Benchmark (run program for 60 s)\n" ); printf( " -s Run program as single thread (default is to use two threads)\n" ); printf( " -? Display this text\n" ); printf( "\n"); printf( "Program runtime controls:\n" ); printf( " w Toggle wireframe mode\n" ); printf( " ESC Exit program\n" ); return 0; } } // Initialize GLFW glfwInit(); // Open OpenGL fullscreen window if( !glfwOpenWindow( WIDTH, HEIGHT, 5,6,5,0, 16,0, GLFW_FULLSCREEN ) ) { glfwTerminate(); return 0; } // Set window title glfwSetWindowTitle( "Particle engine" ); // Disable VSync (we want to get as high FPS as possible!) glfwSwapInterval( 0 ); // Window resize callback function glfwSetWindowSizeCallback( &Resize ); // Set keyboard input callback function glfwSetKeyCallback( &KeyFun ); // Upload particle texture glGenTextures( 1, &particle_tex_id ); glBindTexture( GL_TEXTURE_2D, particle_tex_id ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexImage2D( GL_TEXTURE_2D, 0, GL_LUMINANCE, P_TEX_WIDTH, P_TEX_HEIGHT, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, particle_texture ); // Upload floor texture glGenTextures( 1, &floor_tex_id ); glBindTexture( GL_TEXTURE_2D, floor_tex_id ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexImage2D( GL_TEXTURE_2D, 0, GL_LUMINANCE, F_TEX_WIDTH, F_TEX_HEIGHT, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, floor_texture ); // Check if we have GL_EXT_separate_specular_color, and if so use it // (This extension should ALWAYS be used when OpenGL lighting is used // together with texturing, since it gives more realistic results) if( glfwExtensionSupported( "GL_EXT_separate_specular_color" ) ) { glLightModeli( GL_LIGHT_MODEL_COLOR_CONTROL_EXT, GL_SEPARATE_SPECULAR_COLOR_EXT ); } // Set filled polygon mode as default (not wireframe) glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); wireframe = 0; // Clear particle system for( i = 0; i < MAX_PARTICLES; i ++ ) { particles[ i ].active = 0; } min_age = 0.0f; // Set "running" flag running = 1; // Set initial times thread_sync.t = 0.0; thread_sync.dt = 0.001f; // Init threading if( multithreading ) { thread_sync.p_frame = 0; thread_sync.d_frame = 0; thread_sync.particles_lock = glfwCreateMutex(); thread_sync.p_done = glfwCreateCond(); thread_sync.d_done = glfwCreateCond(); physics_thread = glfwCreateThread( &PhysicsThreadFun, null ); } // Main loop t0 = glfwGetTime(); frames = 0; while( running ) { // Get frame time t = glfwGetTime() - t0; // Draw... Draw( t ); // Swap buffers glfwSwapBuffers(); // Check if window was closed running = running && glfwGetWindowParam( GLFW_OPENED ); // Increase frame count frames ++; // End of benchmark? if( benchmark && t >= 60.0 ) { running = 0; } } t = glfwGetTime() - t0; // Wait for particle physics thread to die if( multithreading ) { glfwWaitThread( physics_thread, GLFW_WAIT ); } // Display profiling information printf( "%d frames in %.2f seconds = %.1f FPS", frames, t, cast(double)frames / t ); printf( " (multithreading %.*s)\n", multithreading ? "on" : "off" ); // Terminate OpenGL glfwTerminate(); return 0; } glfw-2.7.2/support/d/examples/mthello.d0000644000175000017500000000224310625531326021045 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program prints "Hello world!", using two threads. //======================================================================== import glfw; //======================================================================== // main() - Main function (main thread) //======================================================================== int main( ) { GLFWthread thread; // Initialise GLFW if( !glfwInit() ) { return 0; } // Create thread thread = glfwCreateThread( &HelloFun, null ); // Wait for thread to die glfwWaitThread( thread, GLFW_WAIT ); // Print the rest of the message printf( "world!\n" ); // Terminate GLFW glfwTerminate(); return 0; } version(Windows) { extern(Windows): } else { extern(C): } //======================================================================== // HelloFun() - Thread function //======================================================================== void HelloFun( void *arg ) { // Print the first part of the message printf( "Hello " ); } glfw-2.7.2/support/d/examples/pong3d.d0000644000175000017500000005427410625531326020606 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // This is an OpenGL port of the famous "PONG" game (the first computer // game ever?). It is very simple, and could be improved alot. It was // created in order to show off the gaming capabilities of GLFW. //======================================================================== import glfw; import std.math; import std.c.stdlib; //======================================================================== // Constants //======================================================================== // Screen resolution const int WIDTH = 640; const int HEIGHT = 480; // Player size (units) const float PLAYER_XSIZE = 0.05; const float PLAYER_YSIZE = 0.15; // Ball size (units) const float BALL_SIZE = 0.02; // Maximum player movement speed (units / second) const float MAX_SPEED = 1.5; // Player movement acceleration (units / seconds^2) const float ACCELERATION = 4.0; // Player movement deceleration (units / seconds^2) const float DECELERATION = 2.0; // Ball movement speed (units / second) const float BALL_SPEED = 0.4; // Menu options const int MENU_NONE = 0; const int MENU_PLAY = 1; const int MENU_QUIT = 2; // Game events const int NOBODY_WINS = 0; const int PLAYER1_WINS = 1; const int PLAYER2_WINS = 2; // Winner ID const int NOBODY = 0; const int PLAYER1 = 1; const int PLAYER2 = 2; // Camera positions const int CAMERA_CLASSIC = 0; const int CAMERA_ABOVE = 1; const int CAMERA_SPECTATOR = 2; const int CAMERA_DEFAULT = CAMERA_CLASSIC; //======================================================================== // Textures //======================================================================== const int TEX_TITLE = 0; const int TEX_MENU = 1; const int TEX_INSTR = 2; const int TEX_WINNER1 = 3; const int TEX_WINNER2 = 4; const int TEX_FIELD = 5; const int NUM_TEXTURES = 6; // Texture names const char[] tex_name[ NUM_TEXTURES ] = [ "pong3d_title.tga", "pong3d_menu.tga", "pong3d_instr.tga", "pong3d_winner1.tga", "pong3d_winner2.tga", "pong3d_field.tga" ]; // OpenGL texture object IDs GLuint tex_id[ NUM_TEXTURES ]; //======================================================================== // Global variables //======================================================================== // Display information int width, height; // Frame information double thistime, oldtime, dt, starttime; // Camera information int camerapos; // Player information struct Player { double ypos; // -1.0 to +1.0 double yspeed; // -MAX_SPEED to +MAX_SPEED } Player player1, player2; // Ball information struct Ball { double xpos, ypos; double xspeed, yspeed; } Ball ball; // And the winner is... int winner; // Lighting configuration const GLfloat env_ambient[4] = [1.0f,1.0f,1.0f,1.0f]; const GLfloat light1_position[4] = [-3.0f,3.0f,2.0f,1.0f]; const GLfloat light1_diffuse[4] = [1.0f,1.0f,1.0f,0.0f]; const GLfloat light1_ambient[4] = [0.0f,0.0f,0.0f,0.0f]; // Object material properties const GLfloat player1_diffuse[4] = [1.0f,0.3f,0.3f,1.0f]; const GLfloat player1_ambient[4] = [0.3f,0.1f,0.0f,1.0f]; const GLfloat player2_diffuse[4] = [0.3f,1.0f,0.3f,1.0f]; const GLfloat player2_ambient[4] = [0.1f,0.3f,0.1f,1.0f]; const GLfloat ball_diffuse[4] = [1.0f,1.0f,0.5f,1.0f]; const GLfloat ball_ambient[4] = [0.3f,0.3f,0.1f,1.0f]; const GLfloat border_diffuse[4] = [0.3f,0.3f,1.0f,1.0f]; const GLfloat border_ambient[4] = [0.1f,0.1f,0.3f,1.0f]; const GLfloat floor_diffuse[4] = [1.0f,1.0f,1.0f,1.0f]; const GLfloat floor_ambient[4] = [0.3f,0.3f,0.3f,1.0f]; //======================================================================== // LoadTextures() - Load textures from disk and upload to OpenGL card //======================================================================== void LoadTextures( ) { int i; // Generate texture objects glGenTextures( NUM_TEXTURES, tex_id ); // Load textures for( i = 0; i < NUM_TEXTURES; i ++ ) { // Select texture object glBindTexture( GL_TEXTURE_2D, tex_id[ i ] ); // Set texture parameters glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); // Upload texture from file to texture memory glfwLoadTexture2D( tex_name[ i ], 0 ); } } //======================================================================== // DrawImage() - Draw a 2D image as a texture //======================================================================== void DrawImage( int texnum, float x1, float x2, float y1, float y2 ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, tex_id[ texnum ] ); glBegin( GL_QUADS ); glTexCoord2f( 0.0f, 1.0f ); glVertex2f( x1, y1 ); glTexCoord2f( 1.0f, 1.0f ); glVertex2f( x2, y1 ); glTexCoord2f( 1.0f, 0.0f ); glVertex2f( x2, y2 ); glTexCoord2f( 0.0f, 0.0f ); glVertex2f( x1, y2 ); glEnd(); glDisable( GL_TEXTURE_2D ); } //======================================================================== // GameMenu() - Game menu (returns menu option) //======================================================================== int GameMenu( ) { int option; // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Wait for a game menu key to be pressed do { // Get window size glfwGetWindowSize( &width, &height ); // Set viewport glViewport( 0, 0, width, height ); // Clear display glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); glClear( GL_COLOR_BUFFER_BIT ); // Setup projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, 1.0f ); // Setup modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); // Display title glColor3f( 1.0f, 1.0f, 1.0f ); DrawImage( TEX_TITLE, 0.1f, 0.9f, 0.0f, 0.3f ); // Display menu glColor3f( 1.0f, 1.0f, 0.0f ); DrawImage( TEX_MENU, 0.38f, 0.62f, 0.35f, 0.5f ); // Display instructions glColor3f( 0.0f, 1.0f, 1.0f ); DrawImage( TEX_INSTR, 0.32f, 0.68f, 0.65f, 0.85f ); // Swap buffers glfwSwapBuffers(); // Check for keys if( glfwGetKey( 'Q' ) || !glfwGetWindowParam( GLFW_OPENED ) ) { option = MENU_QUIT; } else if( glfwGetKey( GLFW_KEY_F1 ) ) { option = MENU_PLAY; } else { option = MENU_NONE; } // To avoid horrible busy waiting, sleep for at least 20 ms glfwSleep( 0.02 ); } while( option == MENU_NONE ); // Disable sticky keys glfwDisable( GLFW_STICKY_KEYS ); return option; } //======================================================================== // NewGame() - Initialize a new game //======================================================================== void NewGame( ) { // Frame information starttime = thistime = glfwGetTime(); // Camera information camerapos = CAMERA_DEFAULT; // Player 1 information player1.ypos = 0.0; player1.yspeed = 0.0; // Player 2 information player2.ypos = 0.0; player2.yspeed = 0.0; // Ball information ball.xpos = -1.0 + PLAYER_XSIZE; ball.ypos = player1.ypos; ball.xspeed = 1.0; ball.yspeed = 1.0; } //======================================================================== // PlayerControl() - Player control //======================================================================== void PlayerControl( ) { float joy1pos[ 2 ]; float joy2pos[ 2 ]; // Get joystick X & Y axis positions glfwGetJoystickPos( GLFW_JOYSTICK_1, joy1pos, 2 ); glfwGetJoystickPos( GLFW_JOYSTICK_2, joy2pos, 2 ); // Player 1 control if( glfwGetKey( 'A' ) || joy1pos[ 1 ] > 0.2f ) { player1.yspeed += dt * ACCELERATION; if( player1.yspeed > MAX_SPEED ) { player1.yspeed = MAX_SPEED; } } else if( glfwGetKey( 'Z' ) || joy1pos[ 1 ] < -0.2f ) { player1.yspeed -= dt * ACCELERATION; if( player1.yspeed < -MAX_SPEED ) { player1.yspeed = -MAX_SPEED; } } else { player1.yspeed /= exp( DECELERATION * dt ); } // Player 2 control if( glfwGetKey( 'K' ) || joy2pos[ 1 ] > 0.2f ) { player2.yspeed += dt * ACCELERATION; if( player2.yspeed > MAX_SPEED ) { player2.yspeed = MAX_SPEED; } } else if( glfwGetKey( 'M' ) || joy2pos[ 1 ] < -0.2f ) { player2.yspeed -= dt * ACCELERATION; if( player2.yspeed < -MAX_SPEED ) { player2.yspeed = -MAX_SPEED; } } else { player2.yspeed /= exp( DECELERATION * dt ); } // Update player 1 position player1.ypos += dt * player1.yspeed; if( player1.ypos > 1.0 - PLAYER_YSIZE ) { player1.ypos = 1.0 - PLAYER_YSIZE; player1.yspeed = 0.0; } else if( player1.ypos < -1.0 + PLAYER_YSIZE ) { player1.ypos = -1.0 + PLAYER_YSIZE; player1.yspeed = 0.0; } // Update player 2 position player2.ypos += dt * player2.yspeed; if( player2.ypos > 1.0 - PLAYER_YSIZE ) { player2.ypos = 1.0 - PLAYER_YSIZE; player2.yspeed = 0.0; } else if( player2.ypos < -1.0 + PLAYER_YSIZE ) { player2.ypos = -1.0 + PLAYER_YSIZE; player2.yspeed = 0.0; } } //======================================================================== // BallControl() - Ball control //======================================================================== int BallControl( ) { int event; double ballspeed; // Calculate new ball speed ballspeed = BALL_SPEED * (1.0 + 0.02*(thistime-starttime)); ball.xspeed = ball.xspeed > 0 ? ballspeed : -ballspeed; ball.yspeed = ball.yspeed > 0 ? ballspeed : -ballspeed; ball.yspeed *= 0.74321; // Update ball position ball.xpos += dt * ball.xspeed; ball.ypos += dt * ball.yspeed; // Did the ball hit a top/bottom wall? if( ball.ypos >= 1.0 ) { ball.ypos = 2.0 - ball.ypos; ball.yspeed = -ball.yspeed; } else if( ball.ypos <= -1.0 ) { ball.ypos = -2.0 - ball.ypos; ball.yspeed = -ball.yspeed; } // Did the ball hit/miss a player? event = NOBODY_WINS; // Is the ball entering the player 1 goal? if( ball.xpos < -1.0 + PLAYER_XSIZE ) { // Did player 1 catch the ball? if( ball.ypos > (player1.ypos-PLAYER_YSIZE) && ball.ypos < (player1.ypos+PLAYER_YSIZE) ) { ball.xpos = -2.0 + 2.0*PLAYER_XSIZE - ball.xpos; ball.xspeed = -ball.xspeed; } else { event = PLAYER2_WINS; } } // Is the ball entering the player 2 goal? if( ball.xpos > 1.0 - PLAYER_XSIZE ) { // Did player 2 catch the ball? if( ball.ypos > (player2.ypos-PLAYER_YSIZE) && ball.ypos < (player2.ypos+PLAYER_YSIZE) ) { ball.xpos = 2.0 - 2.0*PLAYER_XSIZE - ball.xpos; ball.xspeed = -ball.xspeed; } else { event = PLAYER1_WINS; } } return event; } //======================================================================== // DrawBox() - Draw a 3D box //======================================================================== const float TEX_SCALE = 4.0f; void DrawBox( float x1, float y1, float z1, float x2, float y2, float z2 ) { // Draw six sides of a cube glBegin( GL_QUADS ); // Side 1 (down) glNormal3f( 0.0f, 0.0f, -1.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y2,z1 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y2,z1 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y1,z1 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y1,z1 ); // Side 2 (up) glNormal3f( 0.0f, 0.0f, 1.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y1,z2 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y1,z2 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y2,z2 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y2,z2 ); // Side 3 (backward) glNormal3f( 0.0f, -1.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y1,z1 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y1,z1 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y1,z2 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y1,z2 ); // Side 4 (forward) glNormal3f( 0.0f, 1.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y2,z2 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y2,z2 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y2,z1 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y2,z1 ); // Side 5 (left) glNormal3f( -1.0f, 0.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y1,z2 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x1,y2,z2 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x1,y2,z1 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y1,z1 ); // Side 6 (right) glNormal3f( 1.0f, 0.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x2,y1,z1 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y2,z1 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y2,z2 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x2,y1,z2 ); glEnd(); } //======================================================================== // UpdateDisplay() - Draw graphics (all game related OpenGL stuff goes // here) //======================================================================== void UpdateDisplay( ) { // Get window size glfwGetWindowSize( &width, &height ); // Set viewport glViewport( 0, 0, width, height ); // Clear display glClearColor( 0.02f, 0.02f, 0.02f, 0.0f ); glClearDepth( 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // Setup projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 55.0f, // Angle of view cast(GLfloat)width/cast(GLfloat)height, // Aspect 1.0f, // Near Z 100.0f // Far Z ); // Setup modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); switch( camerapos ) { default: case CAMERA_CLASSIC: gluLookAt( 0.0f, 0.0f, 2.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f ); break; case CAMERA_ABOVE: gluLookAt( 0.0f, 0.0f, 2.5f, cast(float)ball.xpos, cast(float)ball.ypos, 0.0f, 0.0f, 1.0f, 0.0f ); break; case CAMERA_SPECTATOR: gluLookAt( 0.0f, -2.0, 1.2f, cast(float)ball.xpos, cast(float)ball.ypos, 0.0f, 0.0f, 0.0f, 1.0f ); break; } // Enable depth testing glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); // Enable lighting glEnable( GL_LIGHTING ); glLightModelfv( GL_LIGHT_MODEL_AMBIENT, env_ambient ); glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE ); glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE ); glLightfv( GL_LIGHT1, GL_POSITION, light1_position ); glLightfv( GL_LIGHT1, GL_DIFFUSE, light1_diffuse ); glLightfv( GL_LIGHT1, GL_AMBIENT, light1_ambient ); glEnable( GL_LIGHT1 ); // Front face is counter-clock-wise glFrontFace( GL_CCW ); // Enable face culling (not necessary, but speeds up rendering) glCullFace( GL_BACK ); glEnable( GL_CULL_FACE ); // Draw Player 1 glMaterialfv( GL_FRONT, GL_DIFFUSE, player1_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, player1_ambient ); DrawBox( -1.0, cast(GLfloat)player1.ypos-PLAYER_YSIZE, 0.0, -1.0+PLAYER_XSIZE, cast(GLfloat)player1.ypos+PLAYER_YSIZE, 0.1 ); // Draw Player 2 glMaterialfv( GL_FRONT, GL_DIFFUSE, player2_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, player2_ambient ); DrawBox( 1.0-PLAYER_XSIZE, cast(GLfloat)player2.ypos-PLAYER_YSIZE, 0.0, 1.0, cast(GLfloat)player2.ypos+PLAYER_YSIZE, 0.1 ); // Draw Ball glMaterialfv( GL_FRONT, GL_DIFFUSE, ball_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, ball_ambient ); DrawBox( cast(GLfloat)ball.xpos-BALL_SIZE, cast(GLfloat)ball.ypos-BALL_SIZE, 0.0, cast(GLfloat)ball.xpos+BALL_SIZE, cast(GLfloat)ball.ypos+BALL_SIZE, BALL_SIZE*2 ); // Top game field border glMaterialfv( GL_FRONT, GL_DIFFUSE, border_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, border_ambient ); DrawBox( -1.1f, 1.0f, 0.0f, 1.1f, 1.1f, 0.1f ); // Bottom game field border glColor3f( 0.0f, 0.0f, 0.7f ); DrawBox( -1.1f, -1.1f, 0.0f, 1.1f, -1.0f, 0.1f ); // Left game field border DrawBox( -1.1f, -1.0f, 0.0f, -1.0f, 1.0f, 0.1f ); // Left game field border DrawBox( 1.0f, -1.0f, 0.0f, 1.1f, 1.0f, 0.1f ); // Enable texturing glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, tex_id[ TEX_FIELD ] ); // Game field floor glMaterialfv( GL_FRONT, GL_DIFFUSE, floor_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, floor_ambient ); DrawBox( -1.01f, -1.01f, -0.01f, 1.01f, 1.01f, 0.0f ); // Disable texturing glDisable( GL_TEXTURE_2D ); // Disable face culling glDisable( GL_CULL_FACE ); // Disable lighting glDisable( GL_LIGHTING ); // Disable depth testing glDisable( GL_DEPTH_TEST ); } //======================================================================== // GameOver() //======================================================================== void GameOver( ) { // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Until the user presses ESC or SPACE while( !glfwGetKey( GLFW_KEY_ESC ) && !glfwGetKey( ' ' ) && glfwGetWindowParam( GLFW_OPENED ) ) { // Draw display UpdateDisplay(); // Setup projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, 1.0f ); // Setup modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); // Enable blending glEnable( GL_BLEND ); // Dim background glBlendFunc( GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA ); glColor4f( 0.3f, 0.3f, 0.3f, 0.3f ); glBegin( GL_QUADS ); glVertex2f( 0.0f, 0.0f ); glVertex2f( 1.0f, 0.0f ); glVertex2f( 1.0f, 1.0f ); glVertex2f( 0.0f, 1.0f ); glEnd(); // Display winner text glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_COLOR ); if( winner == PLAYER1 ) { glColor4f( 1.0f, 0.5f, 0.5f, 1.0f ); DrawImage( TEX_WINNER1, 0.35f, 0.65f, 0.46f, 0.54f ); } else if( winner == PLAYER2 ) { glColor4f( 0.5f, 1.0f, 0.5f, 1.0f ); DrawImage( TEX_WINNER2, 0.35f, 0.65f, 0.46f, 0.54f ); } // Disable blending glDisable( GL_BLEND ); // Swap buffers glfwSwapBuffers(); } // Disable sticky keys glfwDisable( GLFW_STICKY_KEYS ); } //======================================================================== // GameLoop() - Game loop //======================================================================== void GameLoop( ) { int playing, event; // Initialize a new game NewGame(); // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Loop until the game ends playing = GL_TRUE; while( playing && glfwGetWindowParam( GLFW_OPENED ) ) { // Frame timer oldtime = thistime; thistime = glfwGetTime(); dt = thistime - oldtime; // Get user input and update player positions PlayerControl(); // Move the ball, and check if a player hits/misses the ball event = BallControl(); // Did we have a winner? switch( event ) { case PLAYER1_WINS: winner = PLAYER1; playing = GL_FALSE; break; case PLAYER2_WINS: winner = PLAYER2; playing = GL_FALSE; break; default: break; } // Did the user press ESC? if( glfwGetKey( GLFW_KEY_ESC ) ) { playing = GL_FALSE; } // Did the user change camera view? if( glfwGetKey( '1' ) ) { camerapos = CAMERA_CLASSIC; } else if( glfwGetKey( '2' ) ) { camerapos = CAMERA_ABOVE; } else if( glfwGetKey( '3' ) ) { camerapos = CAMERA_SPECTATOR; } // Draw display UpdateDisplay(); // Swap buffers glfwSwapBuffers(); } // Disable sticky keys glfwDisable( GLFW_STICKY_KEYS ); // Show winner GameOver(); } //======================================================================== // main() - Program entry point //======================================================================== int main( ) { int menuoption; // Initialize GLFW if( !glfwInit() ) { exit( 0 ); } // Open OpenGL window if( !glfwOpenWindow( WIDTH, HEIGHT, 0,0,0,0, 16,0, GLFW_FULLSCREEN ) ) { glfwTerminate(); exit( 0 ); } // Load all textures LoadTextures(); // Main loop do { // Get menu option menuoption = GameMenu(); // If the user wants to play, let him... if( menuoption == MENU_PLAY ) { GameLoop(); } } while( menuoption != MENU_QUIT ); // Unload all textures if( glfwGetWindowParam( GLFW_OPENED ) ) { glDeleteTextures( NUM_TEXTURES, tex_id ); } // Terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/support/msvc100/0000755000175000017500000000000011621215252016355 5ustar elmindredaelmindredaglfw-2.7.2/support/msvc100/GLFWDLL.vcxproj0000644000175000017500000001560611601213542021073 0ustar elmindredaelmindreda Debug Win32 Release Win32 {BC8E963C-BA35-4A32-B53A-CCD9C83E32FC} Win32Proj GLFWDLL DynamicLibrary true MultiByte false DynamicLibrary false false MultiByte true GLFW false GLFW NotUsing Level3 Disabled _GLFW_NO_DLOAD_WINMM;_GLFW_NO_DLOAD_GDI32;GLFW_BUILD_DLL;WIN32;_DEBUG;_WINDOWS;_USRDLL;GLFWDLL_EXPORTS;%(PreprocessorDefinitions) false $(SolutionDir)\..\..\lib;$(SolutionDir)\..\..\lib\win32;%(AdditionalIncludeDirectories) false Windows true $(TargetDir)$(TargetName)DLL.lib winmm.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) $(SolutionDir)\..\..\lib\win32\glfwdll.def Level3 NotUsing MaxSpeed false true _GLFW_NO_DLOAD_WINMM;_GLFW_NO_DLOAD_GDI32;GLFW_BUILD_DLL;WIN32;NDEBUG;_WINDOWS;_USRDLL;GLFWDLL_EXPORTS;%(PreprocessorDefinitions) false $(SolutionDir)\..\..\lib;$(SolutionDir)\..\..\lib\win32;%(AdditionalIncludeDirectories) Windows false true true $(TargetDir)$(TargetName)DLL.lib winmm.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) $(SolutionDir)\..\..\lib\win32\glfwdll.def glfw-2.7.2/support/msvc100/GLFW.vcxproj0000644000175000017500000001344011601217106020531 0ustar elmindredaelmindreda Debug Win32 Release Win32 {4DA03747-F505-4A98-9124-03B3B73B9B3B} Win32Proj GLFW StaticLibrary true MultiByte false StaticLibrary false false MultiByte Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) false false $(SolutionDir)\..\..\lib;$(SolutionDir)\..\..\lib\win32;%(AdditionalIncludeDirectories)$(SolutionDir)\..\..\lib;$(SolutionDir)\..\..\lib\win32;%(AdditionalIncludeDirectories) Windows true false Level3 MaxSpeed false true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) false $(SolutionDir)\..\..\lib;$(SolutionDir)\..\..\lib\win32;%(AdditionalIncludeDirectories)$(SolutionDir)\..\..\lib;$(SolutionDir)\..\..\lib\win32;%(AdditionalIncludeDirectories) Windows true true true false glfw-2.7.2/support/msvc100/GLFW.sln0000644000175000017500000000246311601213542017635 0ustar elmindredaelmindreda Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLFW", "GLFW.vcxproj", "{4DA03747-F505-4A98-9124-03B3B73B9B3B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLFWDLL", "GLFWDLL.vcxproj", "{BC8E963C-BA35-4A32-B53A-CCD9C83E32FC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4DA03747-F505-4A98-9124-03B3B73B9B3B}.Debug|Win32.ActiveCfg = Debug|Win32 {4DA03747-F505-4A98-9124-03B3B73B9B3B}.Debug|Win32.Build.0 = Debug|Win32 {4DA03747-F505-4A98-9124-03B3B73B9B3B}.Release|Win32.ActiveCfg = Release|Win32 {4DA03747-F505-4A98-9124-03B3B73B9B3B}.Release|Win32.Build.0 = Release|Win32 {BC8E963C-BA35-4A32-B53A-CCD9C83E32FC}.Debug|Win32.ActiveCfg = Debug|Win32 {BC8E963C-BA35-4A32-B53A-CCD9C83E32FC}.Debug|Win32.Build.0 = Debug|Win32 {BC8E963C-BA35-4A32-B53A-CCD9C83E32FC}.Release|Win32.ActiveCfg = Release|Win32 {BC8E963C-BA35-4A32-B53A-CCD9C83E32FC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal glfw-2.7.2/support/msvc90/0000755000175000017500000000000011621215252016305 5ustar elmindredaelmindredaglfw-2.7.2/support/msvc90/fsaa.vcproj0000644000175000017500000000744211275605010020453 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/tearing.vcproj0000644000175000017500000000757111275605010021175 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/fsinput.vcproj0000644000175000017500000000757111275614047021246 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/events.vcproj0000644000175000017500000000745011275605010021044 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/pong3d.vcproj0000644000175000017500000000757711155035335020750 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/defaults.vcproj0000644000175000017500000000745611275553746021377 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/wave.vcproj0000644000175000017500000000757111155035335020512 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/joysticks.vcproj0000644000175000017500000000746111272407406021572 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/mipmaps.vcproj0000644000175000017500000000760211155035335021211 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/version.vcproj0000644000175000017500000000756111275610355021240 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/GLFW.sln0000644000175000017500000003333711275614047017605 0ustar elmindredaelmindreda Microsoft Visual Studio Solution File, Format Version 10.00 # Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLFW", "GLFW.vcproj", "{BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLFWDLL", "GLFWDLL.vcproj", "{EE39B12C-97CF-4172-81FD-6ADE6B7F7B7B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joysticks", "joysticks.vcproj", "{EE473E21-BCE8-44F1-AC1B-86B7AEF9937F}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gears", "gears.vcproj", "{7B66C263-B2A7-45EE-A309-8831A036CD3A}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "listmodes", "listmodes.vcproj", "{236D76D6-11EE-4A7A-9866-5F54D167F0BB}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mthello", "mthello.vcproj", "{5663B66C-02B6-4BAD-BD8D-43522B1B8102}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mtbench", "mtbench.vcproj", "{95EC0C16-2E1F-4A9C-AE91-CF139A02E24B}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boing", "boing.vcproj", "{2DE61CE4-FFFA-4352-BAD1-4F938FFDF5AE}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mipmaps", "mipmaps.vcproj", "{E740C25F-5BDE-46CA-8531-21E979833D2D}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "particles", "particles.vcproj", "{21B213C8-728F-4A63-89D6-53C12AC296E8}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pong3d", "pong3d.vcproj", "{4D4A34A1-5174-499C-BA1F-DBA9DFFA20A9}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splitview", "splitview.vcproj", "{959B9D47-29D7-49AB-A016-17E8E14B9836}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "triangle", "triangle.vcproj", "{577B0316-8AF6-4785-AB1D-B24959859E02}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wave", "wave.vcproj", "{38522E5A-AC8F-48BA-9BBB-0AEE3389B6A5}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "accuracy", "accuracy.vcproj", "{588AFBF8-66B7-40C1-A8F8-0441074CB8FD}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "defaults", "defaults.vcproj", "{1BE57407-5E23-4B92-99A5-824373D34041}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "events", "events.vcproj", "{C0288A9D-6997-45DA-87E1-D3FC3D0A5CD4}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fsaa", "fsaa.vcproj", "{157A45EF-2089-45C5-A1FA-D2D0C29AF8E7}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fsinput", "fsinput.vcproj", "{1D71F54A-26A9-4BE8-9B1A-E6027252D8FF}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "peter", "peter.vcproj", "{637F0D11-2FAD-41EF-8EE3-9B7D21261105}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reopen", "reopen.vcproj", "{E2A77601-A969-4178-AE56-EFC8023FE12D}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tearing", "tearing.vcproj", "{D397257E-F80A-49B0-9C42-9EE4271463D7}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version.vcproj", "{6D17B61F-E539-4FD1-9B04-266467FF5417}" ProjectSection(ProjectDependencies) = postProject {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} = {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9}.Debug|Win32.ActiveCfg = Debug|Win32 {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9}.Debug|Win32.Build.0 = Debug|Win32 {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9}.Release|Win32.ActiveCfg = Release|Win32 {BAA85EB9-BE33-45FB-B552-0AB3AC4D9CA9}.Release|Win32.Build.0 = Release|Win32 {EE39B12C-97CF-4172-81FD-6ADE6B7F7B7B}.Debug|Win32.ActiveCfg = Debug|Win32 {EE39B12C-97CF-4172-81FD-6ADE6B7F7B7B}.Debug|Win32.Build.0 = Debug|Win32 {EE39B12C-97CF-4172-81FD-6ADE6B7F7B7B}.Release|Win32.ActiveCfg = Release|Win32 {EE39B12C-97CF-4172-81FD-6ADE6B7F7B7B}.Release|Win32.Build.0 = Release|Win32 {EE473E21-BCE8-44F1-AC1B-86B7AEF9937F}.Debug|Win32.ActiveCfg = Debug|Win32 {EE473E21-BCE8-44F1-AC1B-86B7AEF9937F}.Debug|Win32.Build.0 = Debug|Win32 {EE473E21-BCE8-44F1-AC1B-86B7AEF9937F}.Release|Win32.ActiveCfg = Release|Win32 {EE473E21-BCE8-44F1-AC1B-86B7AEF9937F}.Release|Win32.Build.0 = Release|Win32 {7B66C263-B2A7-45EE-A309-8831A036CD3A}.Debug|Win32.ActiveCfg = Debug|Win32 {7B66C263-B2A7-45EE-A309-8831A036CD3A}.Debug|Win32.Build.0 = Debug|Win32 {7B66C263-B2A7-45EE-A309-8831A036CD3A}.Release|Win32.ActiveCfg = Release|Win32 {7B66C263-B2A7-45EE-A309-8831A036CD3A}.Release|Win32.Build.0 = Release|Win32 {236D76D6-11EE-4A7A-9866-5F54D167F0BB}.Debug|Win32.ActiveCfg = Debug|Win32 {236D76D6-11EE-4A7A-9866-5F54D167F0BB}.Debug|Win32.Build.0 = Debug|Win32 {236D76D6-11EE-4A7A-9866-5F54D167F0BB}.Release|Win32.ActiveCfg = Release|Win32 {236D76D6-11EE-4A7A-9866-5F54D167F0BB}.Release|Win32.Build.0 = Release|Win32 {5663B66C-02B6-4BAD-BD8D-43522B1B8102}.Debug|Win32.ActiveCfg = Debug|Win32 {5663B66C-02B6-4BAD-BD8D-43522B1B8102}.Debug|Win32.Build.0 = Debug|Win32 {5663B66C-02B6-4BAD-BD8D-43522B1B8102}.Release|Win32.ActiveCfg = Release|Win32 {5663B66C-02B6-4BAD-BD8D-43522B1B8102}.Release|Win32.Build.0 = Release|Win32 {95EC0C16-2E1F-4A9C-AE91-CF139A02E24B}.Debug|Win32.ActiveCfg = Debug|Win32 {95EC0C16-2E1F-4A9C-AE91-CF139A02E24B}.Debug|Win32.Build.0 = Debug|Win32 {95EC0C16-2E1F-4A9C-AE91-CF139A02E24B}.Release|Win32.ActiveCfg = Release|Win32 {95EC0C16-2E1F-4A9C-AE91-CF139A02E24B}.Release|Win32.Build.0 = Release|Win32 {2DE61CE4-FFFA-4352-BAD1-4F938FFDF5AE}.Debug|Win32.ActiveCfg = Debug|Win32 {2DE61CE4-FFFA-4352-BAD1-4F938FFDF5AE}.Debug|Win32.Build.0 = Debug|Win32 {2DE61CE4-FFFA-4352-BAD1-4F938FFDF5AE}.Release|Win32.ActiveCfg = Release|Win32 {2DE61CE4-FFFA-4352-BAD1-4F938FFDF5AE}.Release|Win32.Build.0 = Release|Win32 {E740C25F-5BDE-46CA-8531-21E979833D2D}.Debug|Win32.ActiveCfg = Debug|Win32 {E740C25F-5BDE-46CA-8531-21E979833D2D}.Debug|Win32.Build.0 = Debug|Win32 {E740C25F-5BDE-46CA-8531-21E979833D2D}.Release|Win32.ActiveCfg = Release|Win32 {E740C25F-5BDE-46CA-8531-21E979833D2D}.Release|Win32.Build.0 = Release|Win32 {21B213C8-728F-4A63-89D6-53C12AC296E8}.Debug|Win32.ActiveCfg = Debug|Win32 {21B213C8-728F-4A63-89D6-53C12AC296E8}.Debug|Win32.Build.0 = Debug|Win32 {21B213C8-728F-4A63-89D6-53C12AC296E8}.Release|Win32.ActiveCfg = Release|Win32 {21B213C8-728F-4A63-89D6-53C12AC296E8}.Release|Win32.Build.0 = Release|Win32 {4D4A34A1-5174-499C-BA1F-DBA9DFFA20A9}.Debug|Win32.ActiveCfg = Debug|Win32 {4D4A34A1-5174-499C-BA1F-DBA9DFFA20A9}.Debug|Win32.Build.0 = Debug|Win32 {4D4A34A1-5174-499C-BA1F-DBA9DFFA20A9}.Release|Win32.ActiveCfg = Release|Win32 {4D4A34A1-5174-499C-BA1F-DBA9DFFA20A9}.Release|Win32.Build.0 = Release|Win32 {959B9D47-29D7-49AB-A016-17E8E14B9836}.Debug|Win32.ActiveCfg = Debug|Win32 {959B9D47-29D7-49AB-A016-17E8E14B9836}.Debug|Win32.Build.0 = Debug|Win32 {959B9D47-29D7-49AB-A016-17E8E14B9836}.Release|Win32.ActiveCfg = Release|Win32 {959B9D47-29D7-49AB-A016-17E8E14B9836}.Release|Win32.Build.0 = Release|Win32 {577B0316-8AF6-4785-AB1D-B24959859E02}.Debug|Win32.ActiveCfg = Debug|Win32 {577B0316-8AF6-4785-AB1D-B24959859E02}.Debug|Win32.Build.0 = Debug|Win32 {577B0316-8AF6-4785-AB1D-B24959859E02}.Release|Win32.ActiveCfg = Release|Win32 {577B0316-8AF6-4785-AB1D-B24959859E02}.Release|Win32.Build.0 = Release|Win32 {38522E5A-AC8F-48BA-9BBB-0AEE3389B6A5}.Debug|Win32.ActiveCfg = Debug|Win32 {38522E5A-AC8F-48BA-9BBB-0AEE3389B6A5}.Debug|Win32.Build.0 = Debug|Win32 {38522E5A-AC8F-48BA-9BBB-0AEE3389B6A5}.Release|Win32.ActiveCfg = Release|Win32 {38522E5A-AC8F-48BA-9BBB-0AEE3389B6A5}.Release|Win32.Build.0 = Release|Win32 {588AFBF8-66B7-40C1-A8F8-0441074CB8FD}.Debug|Win32.ActiveCfg = Debug|Win32 {588AFBF8-66B7-40C1-A8F8-0441074CB8FD}.Debug|Win32.Build.0 = Debug|Win32 {588AFBF8-66B7-40C1-A8F8-0441074CB8FD}.Release|Win32.ActiveCfg = Release|Win32 {588AFBF8-66B7-40C1-A8F8-0441074CB8FD}.Release|Win32.Build.0 = Release|Win32 {1BE57407-5E23-4B92-99A5-824373D34041}.Debug|Win32.ActiveCfg = Debug|Win32 {1BE57407-5E23-4B92-99A5-824373D34041}.Debug|Win32.Build.0 = Debug|Win32 {1BE57407-5E23-4B92-99A5-824373D34041}.Release|Win32.ActiveCfg = Release|Win32 {1BE57407-5E23-4B92-99A5-824373D34041}.Release|Win32.Build.0 = Release|Win32 {C0288A9D-6997-45DA-87E1-D3FC3D0A5CD4}.Debug|Win32.ActiveCfg = Debug|Win32 {C0288A9D-6997-45DA-87E1-D3FC3D0A5CD4}.Debug|Win32.Build.0 = Debug|Win32 {C0288A9D-6997-45DA-87E1-D3FC3D0A5CD4}.Release|Win32.ActiveCfg = Release|Win32 {C0288A9D-6997-45DA-87E1-D3FC3D0A5CD4}.Release|Win32.Build.0 = Release|Win32 {157A45EF-2089-45C5-A1FA-D2D0C29AF8E7}.Debug|Win32.ActiveCfg = Debug|Win32 {157A45EF-2089-45C5-A1FA-D2D0C29AF8E7}.Debug|Win32.Build.0 = Debug|Win32 {157A45EF-2089-45C5-A1FA-D2D0C29AF8E7}.Release|Win32.ActiveCfg = Release|Win32 {157A45EF-2089-45C5-A1FA-D2D0C29AF8E7}.Release|Win32.Build.0 = Release|Win32 {1D71F54A-26A9-4BE8-9B1A-E6027252D8FF}.Debug|Win32.ActiveCfg = Debug|Win32 {1D71F54A-26A9-4BE8-9B1A-E6027252D8FF}.Debug|Win32.Build.0 = Debug|Win32 {1D71F54A-26A9-4BE8-9B1A-E6027252D8FF}.Release|Win32.ActiveCfg = Release|Win32 {1D71F54A-26A9-4BE8-9B1A-E6027252D8FF}.Release|Win32.Build.0 = Release|Win32 {637F0D11-2FAD-41EF-8EE3-9B7D21261105}.Debug|Win32.ActiveCfg = Debug|Win32 {637F0D11-2FAD-41EF-8EE3-9B7D21261105}.Debug|Win32.Build.0 = Debug|Win32 {637F0D11-2FAD-41EF-8EE3-9B7D21261105}.Release|Win32.ActiveCfg = Release|Win32 {637F0D11-2FAD-41EF-8EE3-9B7D21261105}.Release|Win32.Build.0 = Release|Win32 {E2A77601-A969-4178-AE56-EFC8023FE12D}.Debug|Win32.ActiveCfg = Debug|Win32 {E2A77601-A969-4178-AE56-EFC8023FE12D}.Debug|Win32.Build.0 = Debug|Win32 {E2A77601-A969-4178-AE56-EFC8023FE12D}.Release|Win32.ActiveCfg = Release|Win32 {E2A77601-A969-4178-AE56-EFC8023FE12D}.Release|Win32.Build.0 = Release|Win32 {D397257E-F80A-49B0-9C42-9EE4271463D7}.Debug|Win32.ActiveCfg = Debug|Win32 {D397257E-F80A-49B0-9C42-9EE4271463D7}.Debug|Win32.Build.0 = Debug|Win32 {D397257E-F80A-49B0-9C42-9EE4271463D7}.Release|Win32.ActiveCfg = Release|Win32 {D397257E-F80A-49B0-9C42-9EE4271463D7}.Release|Win32.Build.0 = Release|Win32 {6D17B61F-E539-4FD1-9B04-266467FF5417}.Debug|Win32.ActiveCfg = Debug|Win32 {6D17B61F-E539-4FD1-9B04-266467FF5417}.Debug|Win32.Build.0 = Debug|Win32 {6D17B61F-E539-4FD1-9B04-266467FF5417}.Release|Win32.ActiveCfg = Release|Win32 {6D17B61F-E539-4FD1-9B04-266467FF5417}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal glfw-2.7.2/support/msvc90/boing.vcproj0000644000175000017500000000757411613575614020661 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/mtbench.vcproj0000644000175000017500000000746411155035335021171 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/GLFWDLL.vcproj0000644000175000017500000001441511613615667020651 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/gears.vcproj0000644000175000017500000000757411275560333020660 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/particles.vcproj0000644000175000017500000000761011155035335021530 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/mthello.vcproj0000644000175000017500000000746411155035335021215 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/peter.vcproj0000644000175000017500000000744511275605010020663 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/accuracy.vcproj0000644000175000017500000000757411275553746021363 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/GLFW.vcproj0000644000175000017500000001232411601076546020304 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/reopen.vcproj0000644000175000017500000000745011275605010021030 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/listmodes.vcproj0000644000175000017500000000747211155035335021553 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/splitview.vcproj0000644000175000017500000000761011155035335021570 0ustar elmindredaelmindreda glfw-2.7.2/support/msvc90/triangle.vcproj0000644000175000017500000000760511155035335021353 0ustar elmindredaelmindreda glfw-2.7.2/include/0000755000175000017500000000000011621215251015072 5ustar elmindredaelmindredaglfw-2.7.2/include/GL/0000755000175000017500000000000011621215251015374 5ustar elmindredaelmindredaglfw-2.7.2/include/GL/glfw.h0000644000175000017500000004646011613652304016523 0ustar elmindredaelmindreda/************************************************************************ * GLFW - An OpenGL framework * API version: 2.7 * WWW: http://www.glfw.org/ *------------------------------------------------------------------------ * Copyright (c) 2002-2006 Marcus Geelnard * Copyright (c) 2006-2010 Camilla Berglund * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would * be appreciated but is not required. * * 2. Altered source versions must be plainly marked as such, and must not * be misrepresented as being the original software. * * 3. This notice may not be removed or altered from any source * distribution. * *************************************************************************/ #ifndef __glfw_h_ #define __glfw_h_ #ifdef __cplusplus extern "C" { #endif /************************************************************************* * Global definitions *************************************************************************/ /* We need a NULL pointer from time to time */ #ifndef NULL #ifdef __cplusplus #define NULL 0 #else #define NULL ((void *)0) #endif #endif /* NULL */ /* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ /* Please report any probles that you find with your compiler, which may * be solved in this section! There are several compilers that I have not * been able to test this file with yet. * * First: If we are we on Windows, we want a single define for it (_WIN32) * (Note: For Cygwin the compiler flag -mwin32 should be used, but to * make sure that things run smoothly for Cygwin users, we add __CYGWIN__ * to the list of "valid Win32 identifiers", which removes the need for * -mwin32) */ #if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)) #define _WIN32 #endif /* _WIN32 */ /* In order for extension support to be portable, we need to define an * OpenGL function call method. We use the keyword APIENTRY, which is * defined for Win32. (Note: Windows also needs this for ) */ #ifndef APIENTRY #ifdef _WIN32 #define APIENTRY __stdcall #else #define APIENTRY #endif #define GL_APIENTRY_DEFINED #endif /* APIENTRY */ /* The following three defines are here solely to make some Windows-based * files happy. Theoretically we could include , but * it has the major drawback of severely polluting our namespace. */ /* Under Windows, we need WINGDIAPI defined */ #if !defined(WINGDIAPI) && defined(_WIN32) #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__) /* Microsoft Visual C++, Borland C++ Builder and Pelles C */ #define WINGDIAPI __declspec(dllimport) #elif defined(__LCC__) /* LCC-Win32 */ #define WINGDIAPI __stdcall #else /* Others (e.g. MinGW, Cygwin) */ #define WINGDIAPI extern #endif #define GL_WINGDIAPI_DEFINED #endif /* WINGDIAPI */ /* Some files also need CALLBACK defined */ #if !defined(CALLBACK) && defined(_WIN32) #if defined(_MSC_VER) /* Microsoft Visual C++ */ #if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) #define CALLBACK __stdcall #else #define CALLBACK #endif #else /* Other Windows compilers */ #define CALLBACK __stdcall #endif #define GLU_CALLBACK_DEFINED #endif /* CALLBACK */ /* Microsoft Visual C++, Borland C++ and Pelles C needs wchar_t */ #if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__)) && !defined(_WCHAR_T_DEFINED) typedef unsigned short wchar_t; #define _WCHAR_T_DEFINED #endif /* _WCHAR_T_DEFINED */ /* ---------------- GLFW related system specific defines ----------------- */ #if defined(_WIN32) && defined(GLFW_BUILD_DLL) /* We are building a Win32 DLL */ #define GLFWAPI __declspec(dllexport) #define GLFWAPIENTRY __stdcall #define GLFWCALL __stdcall #elif defined(_WIN32) && defined(GLFW_DLL) /* We are calling a Win32 DLL */ #if defined(__LCC__) #define GLFWAPI extern #else #define GLFWAPI __declspec(dllimport) #endif #define GLFWAPIENTRY __stdcall #define GLFWCALL __stdcall #else /* We are either building/calling a static lib or we are non-win32 */ #define GLFWAPIENTRY #define GLFWAPI #define GLFWCALL #endif /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ /* Include standard OpenGL headers: GLFW uses GL_FALSE/GL_TRUE, and it is * convenient for the user to only have to include . This also * solves the problem with Windows and needing some * special defines which normally requires the user to include * (which is not a nice solution for portable programs). */ #if defined(__APPLE_CC__) #include #ifndef GLFW_NO_GLU #include #endif #else #include #ifndef GLFW_NO_GLU #include #endif #endif /************************************************************************* * GLFW version *************************************************************************/ #define GLFW_VERSION_MAJOR 2 #define GLFW_VERSION_MINOR 7 #define GLFW_VERSION_REVISION 2 /************************************************************************* * Input handling definitions *************************************************************************/ /* Key and button state/action definitions */ #define GLFW_RELEASE 0 #define GLFW_PRESS 1 /* Keyboard key definitions: 8-bit ISO-8859-1 (Latin 1) encoding is used * for printable keys (such as A-Z, 0-9 etc), and values above 256 * represent special (non-printable) keys (e.g. F1, Page Up etc). */ #define GLFW_KEY_UNKNOWN -1 #define GLFW_KEY_SPACE 32 #define GLFW_KEY_SPECIAL 256 #define GLFW_KEY_ESC (GLFW_KEY_SPECIAL+1) #define GLFW_KEY_F1 (GLFW_KEY_SPECIAL+2) #define GLFW_KEY_F2 (GLFW_KEY_SPECIAL+3) #define GLFW_KEY_F3 (GLFW_KEY_SPECIAL+4) #define GLFW_KEY_F4 (GLFW_KEY_SPECIAL+5) #define GLFW_KEY_F5 (GLFW_KEY_SPECIAL+6) #define GLFW_KEY_F6 (GLFW_KEY_SPECIAL+7) #define GLFW_KEY_F7 (GLFW_KEY_SPECIAL+8) #define GLFW_KEY_F8 (GLFW_KEY_SPECIAL+9) #define GLFW_KEY_F9 (GLFW_KEY_SPECIAL+10) #define GLFW_KEY_F10 (GLFW_KEY_SPECIAL+11) #define GLFW_KEY_F11 (GLFW_KEY_SPECIAL+12) #define GLFW_KEY_F12 (GLFW_KEY_SPECIAL+13) #define GLFW_KEY_F13 (GLFW_KEY_SPECIAL+14) #define GLFW_KEY_F14 (GLFW_KEY_SPECIAL+15) #define GLFW_KEY_F15 (GLFW_KEY_SPECIAL+16) #define GLFW_KEY_F16 (GLFW_KEY_SPECIAL+17) #define GLFW_KEY_F17 (GLFW_KEY_SPECIAL+18) #define GLFW_KEY_F18 (GLFW_KEY_SPECIAL+19) #define GLFW_KEY_F19 (GLFW_KEY_SPECIAL+20) #define GLFW_KEY_F20 (GLFW_KEY_SPECIAL+21) #define GLFW_KEY_F21 (GLFW_KEY_SPECIAL+22) #define GLFW_KEY_F22 (GLFW_KEY_SPECIAL+23) #define GLFW_KEY_F23 (GLFW_KEY_SPECIAL+24) #define GLFW_KEY_F24 (GLFW_KEY_SPECIAL+25) #define GLFW_KEY_F25 (GLFW_KEY_SPECIAL+26) #define GLFW_KEY_UP (GLFW_KEY_SPECIAL+27) #define GLFW_KEY_DOWN (GLFW_KEY_SPECIAL+28) #define GLFW_KEY_LEFT (GLFW_KEY_SPECIAL+29) #define GLFW_KEY_RIGHT (GLFW_KEY_SPECIAL+30) #define GLFW_KEY_LSHIFT (GLFW_KEY_SPECIAL+31) #define GLFW_KEY_RSHIFT (GLFW_KEY_SPECIAL+32) #define GLFW_KEY_LCTRL (GLFW_KEY_SPECIAL+33) #define GLFW_KEY_RCTRL (GLFW_KEY_SPECIAL+34) #define GLFW_KEY_LALT (GLFW_KEY_SPECIAL+35) #define GLFW_KEY_RALT (GLFW_KEY_SPECIAL+36) #define GLFW_KEY_TAB (GLFW_KEY_SPECIAL+37) #define GLFW_KEY_ENTER (GLFW_KEY_SPECIAL+38) #define GLFW_KEY_BACKSPACE (GLFW_KEY_SPECIAL+39) #define GLFW_KEY_INSERT (GLFW_KEY_SPECIAL+40) #define GLFW_KEY_DEL (GLFW_KEY_SPECIAL+41) #define GLFW_KEY_PAGEUP (GLFW_KEY_SPECIAL+42) #define GLFW_KEY_PAGEDOWN (GLFW_KEY_SPECIAL+43) #define GLFW_KEY_HOME (GLFW_KEY_SPECIAL+44) #define GLFW_KEY_END (GLFW_KEY_SPECIAL+45) #define GLFW_KEY_KP_0 (GLFW_KEY_SPECIAL+46) #define GLFW_KEY_KP_1 (GLFW_KEY_SPECIAL+47) #define GLFW_KEY_KP_2 (GLFW_KEY_SPECIAL+48) #define GLFW_KEY_KP_3 (GLFW_KEY_SPECIAL+49) #define GLFW_KEY_KP_4 (GLFW_KEY_SPECIAL+50) #define GLFW_KEY_KP_5 (GLFW_KEY_SPECIAL+51) #define GLFW_KEY_KP_6 (GLFW_KEY_SPECIAL+52) #define GLFW_KEY_KP_7 (GLFW_KEY_SPECIAL+53) #define GLFW_KEY_KP_8 (GLFW_KEY_SPECIAL+54) #define GLFW_KEY_KP_9 (GLFW_KEY_SPECIAL+55) #define GLFW_KEY_KP_DIVIDE (GLFW_KEY_SPECIAL+56) #define GLFW_KEY_KP_MULTIPLY (GLFW_KEY_SPECIAL+57) #define GLFW_KEY_KP_SUBTRACT (GLFW_KEY_SPECIAL+58) #define GLFW_KEY_KP_ADD (GLFW_KEY_SPECIAL+59) #define GLFW_KEY_KP_DECIMAL (GLFW_KEY_SPECIAL+60) #define GLFW_KEY_KP_EQUAL (GLFW_KEY_SPECIAL+61) #define GLFW_KEY_KP_ENTER (GLFW_KEY_SPECIAL+62) #define GLFW_KEY_KP_NUM_LOCK (GLFW_KEY_SPECIAL+63) #define GLFW_KEY_CAPS_LOCK (GLFW_KEY_SPECIAL+64) #define GLFW_KEY_SCROLL_LOCK (GLFW_KEY_SPECIAL+65) #define GLFW_KEY_PAUSE (GLFW_KEY_SPECIAL+66) #define GLFW_KEY_LSUPER (GLFW_KEY_SPECIAL+67) #define GLFW_KEY_RSUPER (GLFW_KEY_SPECIAL+68) #define GLFW_KEY_MENU (GLFW_KEY_SPECIAL+69) #define GLFW_KEY_LAST GLFW_KEY_MENU /* Mouse button definitions */ #define GLFW_MOUSE_BUTTON_1 0 #define GLFW_MOUSE_BUTTON_2 1 #define GLFW_MOUSE_BUTTON_3 2 #define GLFW_MOUSE_BUTTON_4 3 #define GLFW_MOUSE_BUTTON_5 4 #define GLFW_MOUSE_BUTTON_6 5 #define GLFW_MOUSE_BUTTON_7 6 #define GLFW_MOUSE_BUTTON_8 7 #define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8 /* Mouse button aliases */ #define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1 #define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2 #define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3 /* Joystick identifiers */ #define GLFW_JOYSTICK_1 0 #define GLFW_JOYSTICK_2 1 #define GLFW_JOYSTICK_3 2 #define GLFW_JOYSTICK_4 3 #define GLFW_JOYSTICK_5 4 #define GLFW_JOYSTICK_6 5 #define GLFW_JOYSTICK_7 6 #define GLFW_JOYSTICK_8 7 #define GLFW_JOYSTICK_9 8 #define GLFW_JOYSTICK_10 9 #define GLFW_JOYSTICK_11 10 #define GLFW_JOYSTICK_12 11 #define GLFW_JOYSTICK_13 12 #define GLFW_JOYSTICK_14 13 #define GLFW_JOYSTICK_15 14 #define GLFW_JOYSTICK_16 15 #define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16 /************************************************************************* * Other definitions *************************************************************************/ /* glfwOpenWindow modes */ #define GLFW_WINDOW 0x00010001 #define GLFW_FULLSCREEN 0x00010002 /* glfwGetWindowParam tokens */ #define GLFW_OPENED 0x00020001 #define GLFW_ACTIVE 0x00020002 #define GLFW_ICONIFIED 0x00020003 #define GLFW_ACCELERATED 0x00020004 #define GLFW_RED_BITS 0x00020005 #define GLFW_GREEN_BITS 0x00020006 #define GLFW_BLUE_BITS 0x00020007 #define GLFW_ALPHA_BITS 0x00020008 #define GLFW_DEPTH_BITS 0x00020009 #define GLFW_STENCIL_BITS 0x0002000A /* The following constants are used for both glfwGetWindowParam * and glfwOpenWindowHint */ #define GLFW_REFRESH_RATE 0x0002000B #define GLFW_ACCUM_RED_BITS 0x0002000C #define GLFW_ACCUM_GREEN_BITS 0x0002000D #define GLFW_ACCUM_BLUE_BITS 0x0002000E #define GLFW_ACCUM_ALPHA_BITS 0x0002000F #define GLFW_AUX_BUFFERS 0x00020010 #define GLFW_STEREO 0x00020011 #define GLFW_WINDOW_NO_RESIZE 0x00020012 #define GLFW_FSAA_SAMPLES 0x00020013 #define GLFW_OPENGL_VERSION_MAJOR 0x00020014 #define GLFW_OPENGL_VERSION_MINOR 0x00020015 #define GLFW_OPENGL_FORWARD_COMPAT 0x00020016 #define GLFW_OPENGL_DEBUG_CONTEXT 0x00020017 #define GLFW_OPENGL_PROFILE 0x00020018 /* GLFW_OPENGL_PROFILE tokens */ #define GLFW_OPENGL_CORE_PROFILE 0x00050001 #define GLFW_OPENGL_COMPAT_PROFILE 0x00050002 /* glfwEnable/glfwDisable tokens */ #define GLFW_MOUSE_CURSOR 0x00030001 #define GLFW_STICKY_KEYS 0x00030002 #define GLFW_STICKY_MOUSE_BUTTONS 0x00030003 #define GLFW_SYSTEM_KEYS 0x00030004 #define GLFW_KEY_REPEAT 0x00030005 #define GLFW_AUTO_POLL_EVENTS 0x00030006 /* glfwWaitThread wait modes */ #define GLFW_WAIT 0x00040001 #define GLFW_NOWAIT 0x00040002 /* glfwGetJoystickParam tokens */ #define GLFW_PRESENT 0x00050001 #define GLFW_AXES 0x00050002 #define GLFW_BUTTONS 0x00050003 /* glfwReadImage/glfwLoadTexture2D flags */ #define GLFW_NO_RESCALE_BIT 0x00000001 /* Only for glfwReadImage */ #define GLFW_ORIGIN_UL_BIT 0x00000002 #define GLFW_BUILD_MIPMAPS_BIT 0x00000004 /* Only for glfwLoadTexture2D */ #define GLFW_ALPHA_MAP_BIT 0x00000008 /* Time spans longer than this (seconds) are considered to be infinity */ #define GLFW_INFINITY 100000.0 /************************************************************************* * Typedefs *************************************************************************/ /* The video mode structure used by glfwGetVideoModes() */ typedef struct { int Width, Height; int RedBits, BlueBits, GreenBits; } GLFWvidmode; /* Image/texture information */ typedef struct { int Width, Height; int Format; int BytesPerPixel; unsigned char *Data; } GLFWimage; /* Thread ID */ typedef int GLFWthread; /* Mutex object */ typedef void * GLFWmutex; /* Condition variable object */ typedef void * GLFWcond; /* Function pointer types */ typedef void (GLFWCALL * GLFWwindowsizefun)(int,int); typedef int (GLFWCALL * GLFWwindowclosefun)(void); typedef void (GLFWCALL * GLFWwindowrefreshfun)(void); typedef void (GLFWCALL * GLFWmousebuttonfun)(int,int); typedef void (GLFWCALL * GLFWmouseposfun)(int,int); typedef void (GLFWCALL * GLFWmousewheelfun)(int); typedef void (GLFWCALL * GLFWkeyfun)(int,int); typedef void (GLFWCALL * GLFWcharfun)(int,int); typedef void (GLFWCALL * GLFWthreadfun)(void *); /************************************************************************* * Prototypes *************************************************************************/ /* GLFW initialization, termination and version querying */ GLFWAPI int GLFWAPIENTRY glfwInit( void ); GLFWAPI void GLFWAPIENTRY glfwTerminate( void ); GLFWAPI void GLFWAPIENTRY glfwGetVersion( int *major, int *minor, int *rev ); /* Window handling */ GLFWAPI int GLFWAPIENTRY glfwOpenWindow( int width, int height, int redbits, int greenbits, int bluebits, int alphabits, int depthbits, int stencilbits, int mode ); GLFWAPI void GLFWAPIENTRY glfwOpenWindowHint( int target, int hint ); GLFWAPI void GLFWAPIENTRY glfwCloseWindow( void ); GLFWAPI void GLFWAPIENTRY glfwSetWindowTitle( const char *title ); GLFWAPI void GLFWAPIENTRY glfwGetWindowSize( int *width, int *height ); GLFWAPI void GLFWAPIENTRY glfwSetWindowSize( int width, int height ); GLFWAPI void GLFWAPIENTRY glfwSetWindowPos( int x, int y ); GLFWAPI void GLFWAPIENTRY glfwIconifyWindow( void ); GLFWAPI void GLFWAPIENTRY glfwRestoreWindow( void ); GLFWAPI void GLFWAPIENTRY glfwSwapBuffers( void ); GLFWAPI void GLFWAPIENTRY glfwSwapInterval( int interval ); GLFWAPI int GLFWAPIENTRY glfwGetWindowParam( int param ); GLFWAPI void GLFWAPIENTRY glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ); GLFWAPI void GLFWAPIENTRY glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun ); GLFWAPI void GLFWAPIENTRY glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun ); /* Video mode functions */ GLFWAPI int GLFWAPIENTRY glfwGetVideoModes( GLFWvidmode *list, int maxcount ); GLFWAPI void GLFWAPIENTRY glfwGetDesktopMode( GLFWvidmode *mode ); /* Input handling */ GLFWAPI void GLFWAPIENTRY glfwPollEvents( void ); GLFWAPI void GLFWAPIENTRY glfwWaitEvents( void ); GLFWAPI int GLFWAPIENTRY glfwGetKey( int key ); GLFWAPI int GLFWAPIENTRY glfwGetMouseButton( int button ); GLFWAPI void GLFWAPIENTRY glfwGetMousePos( int *xpos, int *ypos ); GLFWAPI void GLFWAPIENTRY glfwSetMousePos( int xpos, int ypos ); GLFWAPI int GLFWAPIENTRY glfwGetMouseWheel( void ); GLFWAPI void GLFWAPIENTRY glfwSetMouseWheel( int pos ); GLFWAPI void GLFWAPIENTRY glfwSetKeyCallback( GLFWkeyfun cbfun ); GLFWAPI void GLFWAPIENTRY glfwSetCharCallback( GLFWcharfun cbfun ); GLFWAPI void GLFWAPIENTRY glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun ); GLFWAPI void GLFWAPIENTRY glfwSetMousePosCallback( GLFWmouseposfun cbfun ); GLFWAPI void GLFWAPIENTRY glfwSetMouseWheelCallback( GLFWmousewheelfun cbfun ); /* Joystick input */ GLFWAPI int GLFWAPIENTRY glfwGetJoystickParam( int joy, int param ); GLFWAPI int GLFWAPIENTRY glfwGetJoystickPos( int joy, float *pos, int numaxes ); GLFWAPI int GLFWAPIENTRY glfwGetJoystickButtons( int joy, unsigned char *buttons, int numbuttons ); /* Time */ GLFWAPI double GLFWAPIENTRY glfwGetTime( void ); GLFWAPI void GLFWAPIENTRY glfwSetTime( double time ); GLFWAPI void GLFWAPIENTRY glfwSleep( double time ); /* Extension support */ GLFWAPI int GLFWAPIENTRY glfwExtensionSupported( const char *extension ); GLFWAPI void* GLFWAPIENTRY glfwGetProcAddress( const char *procname ); GLFWAPI void GLFWAPIENTRY glfwGetGLVersion( int *major, int *minor, int *rev ); /* Threading support */ GLFWAPI GLFWthread GLFWAPIENTRY glfwCreateThread( GLFWthreadfun fun, void *arg ); GLFWAPI void GLFWAPIENTRY glfwDestroyThread( GLFWthread ID ); GLFWAPI int GLFWAPIENTRY glfwWaitThread( GLFWthread ID, int waitmode ); GLFWAPI GLFWthread GLFWAPIENTRY glfwGetThreadID( void ); GLFWAPI GLFWmutex GLFWAPIENTRY glfwCreateMutex( void ); GLFWAPI void GLFWAPIENTRY glfwDestroyMutex( GLFWmutex mutex ); GLFWAPI void GLFWAPIENTRY glfwLockMutex( GLFWmutex mutex ); GLFWAPI void GLFWAPIENTRY glfwUnlockMutex( GLFWmutex mutex ); GLFWAPI GLFWcond GLFWAPIENTRY glfwCreateCond( void ); GLFWAPI void GLFWAPIENTRY glfwDestroyCond( GLFWcond cond ); GLFWAPI void GLFWAPIENTRY glfwWaitCond( GLFWcond cond, GLFWmutex mutex, double timeout ); GLFWAPI void GLFWAPIENTRY glfwSignalCond( GLFWcond cond ); GLFWAPI void GLFWAPIENTRY glfwBroadcastCond( GLFWcond cond ); GLFWAPI int GLFWAPIENTRY glfwGetNumberOfProcessors( void ); /* Enable/disable functions */ GLFWAPI void GLFWAPIENTRY glfwEnable( int token ); GLFWAPI void GLFWAPIENTRY glfwDisable( int token ); /* Image/texture I/O support */ GLFWAPI int GLFWAPIENTRY glfwReadImage( const char *name, GLFWimage *img, int flags ); GLFWAPI int GLFWAPIENTRY glfwReadMemoryImage( const void *data, long size, GLFWimage *img, int flags ); GLFWAPI void GLFWAPIENTRY glfwFreeImage( GLFWimage *img ); GLFWAPI int GLFWAPIENTRY glfwLoadTexture2D( const char *name, int flags ); GLFWAPI int GLFWAPIENTRY glfwLoadMemoryTexture2D( const void *data, long size, int flags ); GLFWAPI int GLFWAPIENTRY glfwLoadTextureImage2D( GLFWimage *img, int flags ); #ifdef __cplusplus } #endif #endif /* __glfw_h_ */ glfw-2.7.2/compile.bat0000644000175000017500000003067511601433370015604 0ustar elmindredaelmindreda@echo off REM ********************************************************************** REM * compile.bat - MS Windows compilation batch file REM * REM * This is a "helper" script for the top-level Makefile for GLFW. REM * It was introduced to eliminate incompability issues between REM * Windows NT, 2000 and 9x (it's easier to make a script/makefile REM * run accross different unices from different vendors than to make REM * a script/makefile run across different Windows versions from REM * Microsoft!). REM * REM * This batch file has been tested under Windows 98, NT 4.0 and 2k. REM * REM * Usage 1: compile MAKEPROG SUFFIX REM * REM * MAKEPROG Name of make program (e.g. make or nmake) REM * SUFFIX Makefile suffix for a specific compiler (e.g. msvc) REM * REM * Usage 2: compile CLEAN REM ********************************************************************** REM ---------------------------------------------------------------------- REM Check input arguments REM ---------------------------------------------------------------------- IF %1 == CLEAN GOTO Cleanup IF %1 == "" GOTO Error1 IF "%2" == "" GOTO Error1 IF NOT EXIST .\lib\win32\Makefile.win32.%2 GOTO Error2 GOTO ArgsOK :Error1 echo ************************************************************************* echo *** NOTE: THIS PROGRAM IS USED BY THE TOP LEVEL MAKEFILE. *** echo *** PLEASE READ 'README.HTML' FOR INFORMATION ON HOW TO COMPILE GLFW! *** echo ************************************************************************* echo Usage 1: %0 MAKEPROG SUFFIX echo MAKEPROG - Name of make program (e.g. make or nmake) echo SUFFIX - Makefile suffix for a specific compiler (e.g. mgw or msvc) echo Usage 2: %0 CLEAN goto End :Error2 echo "%2" is not a vaild Makefile suffix goto End :ArgsOK REM ---------------------------------------------------------------------- REM Build GLFW library (both static and dynamic, where supported) REM ---------------------------------------------------------------------- cd .\lib\win32 %1 -f Makefile.win32.%2 REM ---------------------------------------------------------------------- REM Build example programs REM ---------------------------------------------------------------------- cd ..\..\examples %1 -f Makefile.win32.%2 REM ---------------------------------------------------------------------- REM Build test programs REM ---------------------------------------------------------------------- cd ..\tests %1 -f Makefile.win32.%2 REM ---------------------------------------------------------------------- REM Return to root directory REM ---------------------------------------------------------------------- cd .. GOTO End REM ---------------------------------------------------------------------- REM Clean up compiled files REM ---------------------------------------------------------------------- :Cleanup REM Library object files IF EXIST .\lib\win32\enable.o del .\lib\win32\enable.o IF EXIST .\lib\win32\fullscreen.o del .\lib\win32\fullscreen.o IF EXIST .\lib\win32\glext.o del .\lib\win32\glext.o IF EXIST .\lib\win32\image.o del .\lib\win32\image.o IF EXIST .\lib\win32\init.o del .\lib\win32\init.o IF EXIST .\lib\win32\input.o del .\lib\win32\input.o IF EXIST .\lib\win32\joystick.o del .\lib\win32\joystick.o IF EXIST .\lib\win32\stream.o del .\lib\win32\stream.o IF EXIST .\lib\win32\tga.o del .\lib\win32\tga.o IF EXIST .\lib\win32\thread.o del .\lib\win32\thread.o IF EXIST .\lib\win32\time.o del .\lib\win32\time.o IF EXIST .\lib\win32\window.o del .\lib\win32\window.o IF EXIST .\lib\win32\win32_enable.o del .\lib\win32\win32_enable.o IF EXIST .\lib\win32\win32_fullscreen.o del .\lib\win32\win32_fullscreen.o IF EXIST .\lib\win32\win32_glext.o del .\lib\win32\win32_glext.o IF EXIST .\lib\win32\win32_init.o del .\lib\win32\win32_init.o IF EXIST .\lib\win32\win32_joystick.o del .\lib\win32\win32_joystick.o IF EXIST .\lib\win32\win32_thread.o del .\lib\win32\win32_thread.o IF EXIST .\lib\win32\win32_time.o del .\lib\win32\win32_time.o IF EXIST .\lib\win32\win32_window.o del .\lib\win32\win32_window.o IF EXIST .\lib\win32\enable_dll.o del .\lib\win32\enable_dll.o IF EXIST .\lib\win32\fullscreen_dll.o del .\lib\win32\fullscreen_dll.o IF EXIST .\lib\win32\glext_dll.o del .\lib\win32\glext_dll.o IF EXIST .\lib\win32\image_dll.o del .\lib\win32\image_dll.o IF EXIST .\lib\win32\init_dll.o del .\lib\win32\init_dll.o IF EXIST .\lib\win32\input_dll.o del .\lib\win32\input_dll.o IF EXIST .\lib\win32\joystick_dll.o del .\lib\win32\joystick_dll.o IF EXIST .\lib\win32\stream_dll.o del .\lib\win32\stream_dll.o IF EXIST .\lib\win32\tga_dll.o del .\lib\win32\tga_dll.o IF EXIST .\lib\win32\thread_dll.o del .\lib\win32\thread_dll.o IF EXIST .\lib\win32\time_dll.o del .\lib\win32\time_dll.o IF EXIST .\lib\win32\window_dll.o del .\lib\win32\window_dll.o IF EXIST .\lib\win32\win32_dllmain_dll.o del .\lib\win32\win32_dllmain_dll.o IF EXIST .\lib\win32\win32_enable_dll.o del .\lib\win32\win32_enable_dll.o IF EXIST .\lib\win32\win32_fullscreen_dll.o del .\lib\win32\win32_fullscreen_dll.o IF EXIST .\lib\win32\win32_glext_dll.o del .\lib\win32\win32_glext_dll.o IF EXIST .\lib\win32\win32_init_dll.o del .\lib\win32\win32_init_dll.o IF EXIST .\lib\win32\win32_joystick_dll.o del .\lib\win32\win32_joystick_dll.o IF EXIST .\lib\win32\win32_thread_dll.o del .\lib\win32\win32_thread_dll.o IF EXIST .\lib\win32\win32_time_dll.o del .\lib\win32\win32_time_dll.o IF EXIST .\lib\win32\win32_window_dll.o del .\lib\win32\win32_window_dll.o IF EXIST .\lib\win32\enable.obj del .\lib\win32\enable.obj IF EXIST .\lib\win32\fullscreen.obj del .\lib\win32\fullscreen.obj IF EXIST .\lib\win32\glext.obj del .\lib\win32\glext.obj IF EXIST .\lib\win32\image.obj del .\lib\win32\image.obj IF EXIST .\lib\win32\init.obj del .\lib\win32\init.obj IF EXIST .\lib\win32\input.obj del .\lib\win32\input.obj IF EXIST .\lib\win32\joystick.obj del .\lib\win32\joystick.obj IF EXIST .\lib\win32\stream.obj del .\lib\win32\stream.obj IF EXIST .\lib\win32\tga.obj del .\lib\win32\tga.obj IF EXIST .\lib\win32\thread.obj del .\lib\win32\thread.obj IF EXIST .\lib\win32\time.obj del .\lib\win32\time.obj IF EXIST .\lib\win32\window.obj del .\lib\win32\window.obj IF EXIST .\lib\win32\win32_enable.obj del .\lib\win32\win32_enable.obj IF EXIST .\lib\win32\win32_fullscreen.obj del .\lib\win32\win32_fullscreen.obj IF EXIST .\lib\win32\win32_glext.obj del .\lib\win32\win32_glext.obj IF EXIST .\lib\win32\win32_init.obj del .\lib\win32\win32_init.obj IF EXIST .\lib\win32\win32_joystick.obj del .\lib\win32\win32_joystick.obj IF EXIST .\lib\win32\win32_thread.obj del .\lib\win32\win32_thread.obj IF EXIST .\lib\win32\win32_time.obj del .\lib\win32\win32_time.obj IF EXIST .\lib\win32\win32_window.obj del .\lib\win32\win32_window.obj IF EXIST .\lib\win32\enable_dll.obj del .\lib\win32\enable_dll.obj IF EXIST .\lib\win32\fullscreen_dll.obj del .\lib\win32\fullscreen_dll.obj IF EXIST .\lib\win32\glext_dll.obj del .\lib\win32\glext_dll.obj IF EXIST .\lib\win32\image_dll.obj del .\lib\win32\image_dll.obj IF EXIST .\lib\win32\init_dll.obj del .\lib\win32\init_dll.obj IF EXIST .\lib\win32\input_dll.obj del .\lib\win32\input_dll.obj IF EXIST .\lib\win32\joystick_dll.obj del .\lib\win32\joystick_dll.obj IF EXIST .\lib\win32\stream_dll.obj del .\lib\win32\stream_dll.obj IF EXIST .\lib\win32\tga_dll.obj del .\lib\win32\tga_dll.obj IF EXIST .\lib\win32\thread_dll.obj del .\lib\win32\thread_dll.obj IF EXIST .\lib\win32\time_dll.obj del .\lib\win32\time_dll.obj IF EXIST .\lib\win32\window_dll.obj del .\lib\win32\window_dll.obj IF EXIST .\lib\win32\win32_dllmain_dll.obj del .\lib\win32\win32_dllmain_dll.obj IF EXIST .\lib\win32\win32_enable_dll.obj del .\lib\win32\win32_enable_dll.obj IF EXIST .\lib\win32\win32_fullscreen_dll.obj del .\lib\win32\win32_fullscreen_dll.obj IF EXIST .\lib\win32\win32_glext_dll.obj del .\lib\win32\win32_glext_dll.obj IF EXIST .\lib\win32\win32_init_dll.obj del .\lib\win32\win32_init_dll.obj IF EXIST .\lib\win32\win32_joystick_dll.obj del .\lib\win32\win32_joystick_dll.obj IF EXIST .\lib\win32\win32_thread_dll.obj del .\lib\win32\win32_thread_dll.obj IF EXIST .\lib\win32\win32_time_dll.obj del .\lib\win32\win32_time_dll.obj IF EXIST .\lib\win32\win32_window_dll.obj del .\lib\win32\win32_window_dll.obj REM Library files IF EXIST .\lib\win32\libglfw.a del .\lib\win32\libglfw.a IF EXIST .\lib\win32\libglfwdll.a del .\lib\win32\libglfwdll.a IF EXIST .\lib\win32\glfw.exp del .\lib\win32\glfw.exp IF EXIST .\lib\win32\glfwdll.exp del .\lib\win32\glfwdll.exp IF EXIST .\lib\win32\glfw.lib del .\lib\win32\glfw.lib IF EXIST .\lib\win32\glfwdll.lib del .\lib\win32\glfwdll.lib IF EXIST .\lib\win32\glfw.dll del .\lib\win32\glfw.dll IF EXIST .\lib\win32\glfw.tds del .\lib\win32\glfw.tds IF EXIST .\lib\win32\init.tds del .\lib\win32\init.tds REM Executables and related files IF EXIST .\examples\boing.exe del .\examples\boing.exe IF EXIST .\examples\gears.exe del .\examples\gears.exe IF EXIST .\examples\listmodes.exe del .\examples\listmodes.exe IF EXIST .\examples\mipmaps.exe del .\examples\mipmaps.exe IF EXIST .\examples\mtbench.exe del .\examples\mtbench.exe IF EXIST .\examples\mthello.exe del .\examples\mthello.exe IF EXIST .\examples\particles.exe del .\examples\particles.exe IF EXIST .\examples\pong3d.exe del .\examples\pong3d.exe IF EXIST .\examples\splitview.exe del .\examples\splitview.exe IF EXIST .\examples\triangle.exe del .\examples\triangle.exe IF EXIST .\examples\wave.exe del .\examples\wave.exe IF EXIST .\examples\boing.obj del .\examples\boing.obj IF EXIST .\examples\gears.obj del .\examples\gears.obj IF EXIST .\examples\listmodes.obj del .\examples\listmodes.obj IF EXIST .\examples\mipmaps.obj del .\examples\mipmaps.obj IF EXIST .\examples\mtbench.obj del .\examples\mtbench.obj IF EXIST .\examples\mthello.obj del .\examples\mthello.obj IF EXIST .\examples\particles.obj del .\examples\particles.obj IF EXIST .\examples\pong3d.obj del .\examples\pong3d.obj IF EXIST .\examples\splitview.obj del .\examples\splitview.obj IF EXIST .\examples\triangle.obj del .\examples\triangle.obj IF EXIST .\examples\wave.obj del .\examples\wave.obj IF EXIST .\examples\boing.tds del .\examples\boing.tds IF EXIST .\examples\gears.tds del .\examples\gears.tds IF EXIST .\examples\listmodes.tds del .\examples\listmodes.tds IF EXIST .\examples\mipmaps.tds del .\examples\mipmaps.tds IF EXIST .\examples\mtbench.tds del .\examples\mtbench.tds IF EXIST .\examples\mthello.tds del .\examples\mthello.tds IF EXIST .\examples\particles.tds del .\examples\particles.tds IF EXIST .\examples\pong3d.tds del .\examples\pong3d.tds IF EXIST .\examples\splitview.tds del .\examples\splitview.tds IF EXIST .\examples\triangle.tds del .\examples\triangle.tds IF EXIST .\examples\wave.tds del .\examples\wave.tds IF EXIST .\tests\accuracy.exe del .\tests\accuracy.exe IF EXIST .\tests\defaults.exe del .\tests\defaults.exe IF EXIST .\tests\events.exe del .\tests\events.exe IF EXIST .\tests\fsaa.exe del .\tests\fsaa.exe IF EXIST .\tests\fsinput.exe del .\tests\fsinput.exe IF EXIST .\tests\joysticks.exe del .\tests\joysticks.exe IF EXIST .\tests\peter.exe del .\tests\peter.exe IF EXIST .\tests\reopen.exe del .\tests\reopen.exe IF EXIST .\tests\tearing.exe del .\tests\tearing.exe IF EXIST .\tests\version.exe del .\tests\version.exe :End glfw-2.7.2/examples/0000755000175000017500000000000011621215253015267 5ustar elmindredaelmindredaglfw-2.7.2/examples/Makefile.x11.in0000644000175000017500000000222411435166340017751 0ustar elmindredaelmindredaBINARIES = triangle listmodes mthello pong3d mtbench particles splitview \ mipmaps gears boing wave heightmap all: $(BINARIES) triangle: triangle.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) triangle.c $(LFLAGS) -o $@ listmodes: listmodes.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) listmodes.c $(LFLAGS) -o $@ mthello: mthello.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) mthello.c $(LFLAGS) -o $@ pong3d: pong3d.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) pong3d.c $(LFLAGS) -o $@ mtbench: mtbench.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) mtbench.c $(LFLAGS) -o $@ particles: particles.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) particles.c $(LFLAGS) -o $@ splitview: splitview.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) splitview.c $(LFLAGS) -o $@ mipmaps: mipmaps.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) mipmaps.c $(LFLAGS) -o $@ gears: gears.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) gears.c $(LFLAGS) -o $@ boing: boing.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) boing.c $(LFLAGS) -o $@ wave: wave.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) wave.c $(LFLAGS) -o $@ heightmap: heightmap.c ../lib/x11/libglfw.a $(CC) $(CFLAGS) heightmap.c $(LFLAGS) -o $@ clean: rm -f $(BINARIES) glfw-2.7.2/examples/mthello.c0000644000175000017500000000221510625531326017104 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program prints "Hello world!", using two threads. //======================================================================== #include #include //======================================================================== // HelloFun() - Thread function //======================================================================== void GLFWCALL HelloFun( void *arg ) { // Print the first part of the message printf( "Hello " ); } //======================================================================== // main() - Main function (main thread) //======================================================================== int main( void ) { GLFWthread thread; // Initialise GLFW if( !glfwInit() ) { return 0; } // Create thread thread = glfwCreateThread( HelloFun, NULL ); // Wait for thread to die glfwWaitThread( thread, GLFW_WAIT ); // Print the rest of the message printf( "world!\n" ); // Terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/examples/pong3d.c0000644000175000017500000005475411275554034016654 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // This is an OpenGL port of the famous "PONG" game (the first computer // game ever?). It is very simple, and could be improved alot. It was // created in order to show off the gaming capabilities of GLFW. //======================================================================== #include #include #include #include //======================================================================== // Constants //======================================================================== // Screen resolution #define WIDTH 640 #define HEIGHT 480 // Player size (units) #define PLAYER_XSIZE 0.05f #define PLAYER_YSIZE 0.15f // Ball size (units) #define BALL_SIZE 0.02f // Maximum player movement speed (units / second) #define MAX_SPEED 1.5f // Player movement acceleration (units / seconds^2) #define ACCELERATION 4.0f // Player movement deceleration (units / seconds^2) #define DECELERATION 2.0f // Ball movement speed (units / second) #define BALL_SPEED 0.4f // Menu options #define MENU_NONE 0 #define MENU_PLAY 1 #define MENU_QUIT 2 // Game events #define NOBODY_WINS 0 #define PLAYER1_WINS 1 #define PLAYER2_WINS 2 // Winner ID #define NOBODY 0 #define PLAYER1 1 #define PLAYER2 2 // Camera positions #define CAMERA_CLASSIC 0 #define CAMERA_ABOVE 1 #define CAMERA_SPECTATOR 2 #define CAMERA_DEFAULT CAMERA_CLASSIC //======================================================================== // Textures //======================================================================== #define TEX_TITLE 0 #define TEX_MENU 1 #define TEX_INSTR 2 #define TEX_WINNER1 3 #define TEX_WINNER2 4 #define TEX_FIELD 5 #define NUM_TEXTURES 6 // Texture names char * tex_name[ NUM_TEXTURES ] = { "pong3d_title.tga", "pong3d_menu.tga", "pong3d_instr.tga", "pong3d_winner1.tga", "pong3d_winner2.tga", "pong3d_field.tga" }; // OpenGL texture object IDs GLuint tex_id[ NUM_TEXTURES ]; //======================================================================== // Global variables //======================================================================== // Display information int width, height; // Frame information double thistime, oldtime, dt, starttime; // Camera information int camerapos; // Player information struct { double ypos; // -1.0 to +1.0 double yspeed; // -MAX_SPEED to +MAX_SPEED } player1, player2; // Ball information struct { double xpos, ypos; double xspeed, yspeed; } ball; // And the winner is... int winner; // Lighting configuration const GLfloat env_ambient[4] = {1.0f,1.0f,1.0f,1.0f}; const GLfloat light1_position[4] = {-3.0f,3.0f,2.0f,1.0f}; const GLfloat light1_diffuse[4] = {1.0f,1.0f,1.0f,0.0f}; const GLfloat light1_ambient[4] = {0.0f,0.0f,0.0f,0.0f}; // Object material properties const GLfloat player1_diffuse[4] = {1.0f,0.3f,0.3f,1.0f}; const GLfloat player1_ambient[4] = {0.3f,0.1f,0.0f,1.0f}; const GLfloat player2_diffuse[4] = {0.3f,1.0f,0.3f,1.0f}; const GLfloat player2_ambient[4] = {0.1f,0.3f,0.1f,1.0f}; const GLfloat ball_diffuse[4] = {1.0f,1.0f,0.5f,1.0f}; const GLfloat ball_ambient[4] = {0.3f,0.3f,0.1f,1.0f}; const GLfloat border_diffuse[4] = {0.3f,0.3f,1.0f,1.0f}; const GLfloat border_ambient[4] = {0.1f,0.1f,0.3f,1.0f}; const GLfloat floor_diffuse[4] = {1.0f,1.0f,1.0f,1.0f}; const GLfloat floor_ambient[4] = {0.3f,0.3f,0.3f,1.0f}; //======================================================================== // LoadTextures() - Load textures from disk and upload to OpenGL card //======================================================================== GLboolean LoadTextures( void ) { int i; // Generate texture objects glGenTextures( NUM_TEXTURES, tex_id ); // Load textures for( i = 0; i < NUM_TEXTURES; i ++ ) { // Select texture object glBindTexture( GL_TEXTURE_2D, tex_id[ i ] ); // Set texture parameters glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); // Upload texture from file to texture memory if( !glfwLoadTexture2D( tex_name[ i ], 0 ) ) { fprintf( stderr, "Failed to load texture %s\n", tex_name[ i ] ); return GL_FALSE; } } return GL_TRUE; } //======================================================================== // DrawImage() - Draw a 2D image as a texture //======================================================================== void DrawImage( int texnum, float x1, float x2, float y1, float y2 ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, tex_id[ texnum ] ); glBegin( GL_QUADS ); glTexCoord2f( 0.0f, 1.0f ); glVertex2f( x1, y1 ); glTexCoord2f( 1.0f, 1.0f ); glVertex2f( x2, y1 ); glTexCoord2f( 1.0f, 0.0f ); glVertex2f( x2, y2 ); glTexCoord2f( 0.0f, 0.0f ); glVertex2f( x1, y2 ); glEnd(); glDisable( GL_TEXTURE_2D ); } //======================================================================== // GameMenu() - Game menu (returns menu option) //======================================================================== int GameMenu( void ) { int option; // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Wait for a game menu key to be pressed do { // Get window size glfwGetWindowSize( &width, &height ); // Set viewport glViewport( 0, 0, width, height ); // Clear display glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); glClear( GL_COLOR_BUFFER_BIT ); // Setup projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, 1.0f ); // Setup modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); // Display title glColor3f( 1.0f, 1.0f, 1.0f ); DrawImage( TEX_TITLE, 0.1f, 0.9f, 0.0f, 0.3f ); // Display menu glColor3f( 1.0f, 1.0f, 0.0f ); DrawImage( TEX_MENU, 0.38f, 0.62f, 0.35f, 0.5f ); // Display instructions glColor3f( 0.0f, 1.0f, 1.0f ); DrawImage( TEX_INSTR, 0.32f, 0.68f, 0.65f, 0.85f ); // Swap buffers glfwSwapBuffers(); // Check for keys if( glfwGetKey( 'Q' ) || !glfwGetWindowParam( GLFW_OPENED ) ) { option = MENU_QUIT; } else if( glfwGetKey( GLFW_KEY_F1 ) ) { option = MENU_PLAY; } else { option = MENU_NONE; } // To avoid horrible busy waiting, sleep for at least 20 ms glfwSleep( 0.02 ); } while( option == MENU_NONE ); // Disable sticky keys glfwDisable( GLFW_STICKY_KEYS ); return option; } //======================================================================== // NewGame() - Initialize a new game //======================================================================== void NewGame( void ) { // Frame information starttime = thistime = glfwGetTime(); // Camera information camerapos = CAMERA_DEFAULT; // Player 1 information player1.ypos = 0.0; player1.yspeed = 0.0; // Player 2 information player2.ypos = 0.0; player2.yspeed = 0.0; // Ball information ball.xpos = -1.0 + PLAYER_XSIZE; ball.ypos = player1.ypos; ball.xspeed = 1.0; ball.yspeed = 1.0; } //======================================================================== // PlayerControl() - Player control //======================================================================== void PlayerControl( void ) { float joy1pos[ 2 ], joy2pos[ 2 ]; // Get joystick X & Y axis positions glfwGetJoystickPos( GLFW_JOYSTICK_1, joy1pos, 2 ); glfwGetJoystickPos( GLFW_JOYSTICK_2, joy2pos, 2 ); // Player 1 control if( glfwGetKey( 'A' ) || joy1pos[ 1 ] > 0.2f ) { player1.yspeed += dt * ACCELERATION; if( player1.yspeed > MAX_SPEED ) { player1.yspeed = MAX_SPEED; } } else if( glfwGetKey( 'Z' ) || joy1pos[ 1 ] < -0.2f ) { player1.yspeed -= dt * ACCELERATION; if( player1.yspeed < -MAX_SPEED ) { player1.yspeed = -MAX_SPEED; } } else { player1.yspeed /= exp( DECELERATION * dt ); } // Player 2 control if( glfwGetKey( 'K' ) || joy2pos[ 1 ] > 0.2f ) { player2.yspeed += dt * ACCELERATION; if( player2.yspeed > MAX_SPEED ) { player2.yspeed = MAX_SPEED; } } else if( glfwGetKey( 'M' ) || joy2pos[ 1 ] < -0.2f ) { player2.yspeed -= dt * ACCELERATION; if( player2.yspeed < -MAX_SPEED ) { player2.yspeed = -MAX_SPEED; } } else { player2.yspeed /= exp( DECELERATION * dt ); } // Update player 1 position player1.ypos += dt * player1.yspeed; if( player1.ypos > 1.0 - PLAYER_YSIZE ) { player1.ypos = 1.0 - PLAYER_YSIZE; player1.yspeed = 0.0; } else if( player1.ypos < -1.0 + PLAYER_YSIZE ) { player1.ypos = -1.0 + PLAYER_YSIZE; player1.yspeed = 0.0; } // Update player 2 position player2.ypos += dt * player2.yspeed; if( player2.ypos > 1.0 - PLAYER_YSIZE ) { player2.ypos = 1.0 - PLAYER_YSIZE; player2.yspeed = 0.0; } else if( player2.ypos < -1.0 + PLAYER_YSIZE ) { player2.ypos = -1.0 + PLAYER_YSIZE; player2.yspeed = 0.0; } } //======================================================================== // BallControl() - Ball control //======================================================================== int BallControl( void ) { int event; double ballspeed; // Calculate new ball speed ballspeed = BALL_SPEED * (1.0 + 0.02*(thistime-starttime)); ball.xspeed = ball.xspeed > 0 ? ballspeed : -ballspeed; ball.yspeed = ball.yspeed > 0 ? ballspeed : -ballspeed; ball.yspeed *= 0.74321; // Update ball position ball.xpos += dt * ball.xspeed; ball.ypos += dt * ball.yspeed; // Did the ball hit a top/bottom wall? if( ball.ypos >= 1.0 ) { ball.ypos = 2.0 - ball.ypos; ball.yspeed = -ball.yspeed; } else if( ball.ypos <= -1.0 ) { ball.ypos = -2.0 - ball.ypos; ball.yspeed = -ball.yspeed; } // Did the ball hit/miss a player? event = NOBODY_WINS; // Is the ball entering the player 1 goal? if( ball.xpos < -1.0 + PLAYER_XSIZE ) { // Did player 1 catch the ball? if( ball.ypos > (player1.ypos-PLAYER_YSIZE) && ball.ypos < (player1.ypos+PLAYER_YSIZE) ) { ball.xpos = -2.0 + 2.0*PLAYER_XSIZE - ball.xpos; ball.xspeed = -ball.xspeed; } else { event = PLAYER2_WINS; } } // Is the ball entering the player 2 goal? if( ball.xpos > 1.0 - PLAYER_XSIZE ) { // Did player 2 catch the ball? if( ball.ypos > (player2.ypos-PLAYER_YSIZE) && ball.ypos < (player2.ypos+PLAYER_YSIZE) ) { ball.xpos = 2.0 - 2.0*PLAYER_XSIZE - ball.xpos; ball.xspeed = -ball.xspeed; } else { event = PLAYER1_WINS; } } return event; } //======================================================================== // DrawBox() - Draw a 3D box //======================================================================== #define TEX_SCALE 4.0f void DrawBox( float x1, float y1, float z1, float x2, float y2, float z2 ) { // Draw six sides of a cube glBegin( GL_QUADS ); // Side 1 (down) glNormal3f( 0.0f, 0.0f, -1.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y2,z1 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y2,z1 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y1,z1 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y1,z1 ); // Side 2 (up) glNormal3f( 0.0f, 0.0f, 1.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y1,z2 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y1,z2 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y2,z2 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y2,z2 ); // Side 3 (backward) glNormal3f( 0.0f, -1.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y1,z1 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y1,z1 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y1,z2 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y1,z2 ); // Side 4 (forward) glNormal3f( 0.0f, 1.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y2,z2 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y2,z2 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y2,z1 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y2,z1 ); // Side 5 (left) glNormal3f( -1.0f, 0.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x1,y1,z2 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x1,y2,z2 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x1,y2,z1 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x1,y1,z1 ); // Side 6 (right) glNormal3f( 1.0f, 0.0f, 0.0f ); glTexCoord2f( 0.0f, 0.0f ); glVertex3f( x2,y1,z1 ); glTexCoord2f( TEX_SCALE, 0.0f ); glVertex3f( x2,y2,z1 ); glTexCoord2f( TEX_SCALE, TEX_SCALE ); glVertex3f( x2,y2,z2 ); glTexCoord2f( 0.0f, TEX_SCALE ); glVertex3f( x2,y1,z2 ); glEnd(); } //======================================================================== // UpdateDisplay() - Draw graphics (all game related OpenGL stuff goes // here) //======================================================================== void UpdateDisplay( void ) { // Get window size glfwGetWindowSize( &width, &height ); // Set viewport glViewport( 0, 0, width, height ); // Clear display glClearColor( 0.02f, 0.02f, 0.02f, 0.0f ); glClearDepth( 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // Setup projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 55.0f, // Angle of view (GLfloat)width/(GLfloat)height, // Aspect 1.0f, // Near Z 100.0f // Far Z ); // Setup modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); switch( camerapos ) { default: case CAMERA_CLASSIC: gluLookAt( 0.0f, 0.0f, 2.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f ); break; case CAMERA_ABOVE: gluLookAt( 0.0f, 0.0f, 2.5f, (float)ball.xpos, (float)ball.ypos, 0.0f, 0.0f, 1.0f, 0.0f ); break; case CAMERA_SPECTATOR: gluLookAt( 0.0f, -2.0, 1.2f, (float)ball.xpos, (float)ball.ypos, 0.0f, 0.0f, 0.0f, 1.0f ); break; } // Enable depth testing glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); // Enable lighting glEnable( GL_LIGHTING ); glLightModelfv( GL_LIGHT_MODEL_AMBIENT, env_ambient ); glLightModeli( GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE ); glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE ); glLightfv( GL_LIGHT1, GL_POSITION, light1_position ); glLightfv( GL_LIGHT1, GL_DIFFUSE, light1_diffuse ); glLightfv( GL_LIGHT1, GL_AMBIENT, light1_ambient ); glEnable( GL_LIGHT1 ); // Front face is counter-clock-wise glFrontFace( GL_CCW ); // Enable face culling (not necessary, but speeds up rendering) glCullFace( GL_BACK ); glEnable( GL_CULL_FACE ); // Draw Player 1 glMaterialfv( GL_FRONT, GL_DIFFUSE, player1_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, player1_ambient ); DrawBox( -1.f, (GLfloat)player1.ypos-PLAYER_YSIZE, 0.f, -1.f+PLAYER_XSIZE, (GLfloat)player1.ypos+PLAYER_YSIZE, 0.1f ); // Draw Player 2 glMaterialfv( GL_FRONT, GL_DIFFUSE, player2_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, player2_ambient ); DrawBox( 1.f-PLAYER_XSIZE, (GLfloat)player2.ypos-PLAYER_YSIZE, 0.f, 1.f, (GLfloat)player2.ypos+PLAYER_YSIZE, 0.1f ); // Draw Ball glMaterialfv( GL_FRONT, GL_DIFFUSE, ball_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, ball_ambient ); DrawBox( (GLfloat)ball.xpos-BALL_SIZE, (GLfloat)ball.ypos-BALL_SIZE, 0.f, (GLfloat)ball.xpos+BALL_SIZE, (GLfloat)ball.ypos+BALL_SIZE, BALL_SIZE*2 ); // Top game field border glMaterialfv( GL_FRONT, GL_DIFFUSE, border_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, border_ambient ); DrawBox( -1.1f, 1.0f, 0.0f, 1.1f, 1.1f, 0.1f ); // Bottom game field border glColor3f( 0.0f, 0.0f, 0.7f ); DrawBox( -1.1f, -1.1f, 0.0f, 1.1f, -1.0f, 0.1f ); // Left game field border DrawBox( -1.1f, -1.0f, 0.0f, -1.0f, 1.0f, 0.1f ); // Left game field border DrawBox( 1.0f, -1.0f, 0.0f, 1.1f, 1.0f, 0.1f ); // Enable texturing glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, tex_id[ TEX_FIELD ] ); // Game field floor glMaterialfv( GL_FRONT, GL_DIFFUSE, floor_diffuse ); glMaterialfv( GL_FRONT, GL_AMBIENT, floor_ambient ); DrawBox( -1.01f, -1.01f, -0.01f, 1.01f, 1.01f, 0.0f ); // Disable texturing glDisable( GL_TEXTURE_2D ); // Disable face culling glDisable( GL_CULL_FACE ); // Disable lighting glDisable( GL_LIGHTING ); // Disable depth testing glDisable( GL_DEPTH_TEST ); } //======================================================================== // GameOver() //======================================================================== void GameOver( void ) { // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Until the user presses ESC or SPACE while( !glfwGetKey( GLFW_KEY_ESC ) && !glfwGetKey( ' ' ) && glfwGetWindowParam( GLFW_OPENED ) ) { // Draw display UpdateDisplay(); // Setup projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, 1.0f ); // Setup modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); // Enable blending glEnable( GL_BLEND ); // Dim background glBlendFunc( GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA ); glColor4f( 0.3f, 0.3f, 0.3f, 0.3f ); glBegin( GL_QUADS ); glVertex2f( 0.0f, 0.0f ); glVertex2f( 1.0f, 0.0f ); glVertex2f( 1.0f, 1.0f ); glVertex2f( 0.0f, 1.0f ); glEnd(); // Display winner text glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_COLOR ); if( winner == PLAYER1 ) { glColor4f( 1.0f, 0.5f, 0.5f, 1.0f ); DrawImage( TEX_WINNER1, 0.35f, 0.65f, 0.46f, 0.54f ); } else if( winner == PLAYER2 ) { glColor4f( 0.5f, 1.0f, 0.5f, 1.0f ); DrawImage( TEX_WINNER2, 0.35f, 0.65f, 0.46f, 0.54f ); } // Disable blending glDisable( GL_BLEND ); // Swap buffers glfwSwapBuffers(); } // Disable sticky keys glfwDisable( GLFW_STICKY_KEYS ); } //======================================================================== // GameLoop() - Game loop //======================================================================== void GameLoop( void ) { int playing, event; // Initialize a new game NewGame(); // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Loop until the game ends playing = GL_TRUE; while( playing && glfwGetWindowParam( GLFW_OPENED ) ) { // Frame timer oldtime = thistime; thistime = glfwGetTime(); dt = thistime - oldtime; // Get user input and update player positions PlayerControl(); // Move the ball, and check if a player hits/misses the ball event = BallControl(); // Did we have a winner? switch( event ) { case PLAYER1_WINS: winner = PLAYER1; playing = GL_FALSE; break; case PLAYER2_WINS: winner = PLAYER2; playing = GL_FALSE; break; default: break; } // Did the user press ESC? if( glfwGetKey( GLFW_KEY_ESC ) ) { playing = GL_FALSE; } // Did the user change camera view? if( glfwGetKey( '1' ) ) { camerapos = CAMERA_CLASSIC; } else if( glfwGetKey( '2' ) ) { camerapos = CAMERA_ABOVE; } else if( glfwGetKey( '3' ) ) { camerapos = CAMERA_SPECTATOR; } // Draw display UpdateDisplay(); // Swap buffers glfwSwapBuffers(); } // Disable sticky keys glfwDisable( GLFW_STICKY_KEYS ); // Show winner GameOver(); } //======================================================================== // main() - Program entry point //======================================================================== int main( void ) { int menuoption; // Initialize GLFW if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); exit( EXIT_FAILURE ); } // Open OpenGL window if( !glfwOpenWindow( WIDTH, HEIGHT, 0,0,0,0, 16,0, GLFW_FULLSCREEN ) ) { fprintf( stderr, "Failed to open GLFW window\n" ); glfwTerminate(); exit( EXIT_FAILURE ); } glfwSwapInterval( 1 ); // Load all textures if( !LoadTextures() ) { glfwTerminate(); exit( EXIT_FAILURE ); } // Main loop do { // Get menu option menuoption = GameMenu(); // If the user wants to play, let him... if( menuoption == MENU_PLAY ) { GameLoop(); } } while( menuoption != MENU_QUIT ); // Unload all textures if( glfwGetWindowParam( GLFW_OPENED ) ) { glDeleteTextures( NUM_TEXTURES, tex_id ); } // Terminate GLFW glfwTerminate(); exit( EXIT_SUCCESS ); } glfw-2.7.2/examples/gears.c0000644000175000017500000002374211275554034016554 0ustar elmindredaelmindreda/* * 3-D gear wheels. This program is in the public domain. * * Command line options: * -info print GL implementation information * -exit automatically exit after 30 seconds * * * Brian Paul * * * Marcus Geelnard: * - Conversion to GLFW * - Time based rendering (frame rate independent) * - Slightly modified camera that should work better for stereo viewing * * * Camilla Berglund: * - Removed FPS counter (this is not a benchmark) * - Added a few comments * - Enabled vsync */ #include #include #include #include #include #ifndef M_PI #define M_PI 3.141592654 #endif /* The program exits when this is zero. */ static int running = 1; /* If non-zero, the program exits after that many seconds */ static int autoexit = 0; /** Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of trig here. Input: inner_radius - radius of hole at center outer_radius - radius at center of teeth width - width of gear teeth - number of teeth tooth_depth - depth of tooth **/ static void gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { GLint i; GLfloat r0, r1, r2; GLfloat angle, da; GLfloat u, v, len; r0 = inner_radius; r1 = outer_radius - tooth_depth / 2.f; r2 = outer_radius + tooth_depth / 2.f; da = 2.f * (float) M_PI / teeth / 4.f; glShadeModel(GL_FLAT); glNormal3f(0.f, 0.f, 1.f); /* draw front face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.f * (float) M_PI / teeth; glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), width * 0.5f); glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), width * 0.5f); if (i < teeth) { glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), width * 0.5f); glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), width * 0.5f); } } glEnd(); /* draw front sides of teeth */ glBegin(GL_QUADS); da = 2.f * (float) M_PI / teeth / 4.f; for (i = 0; i < teeth; i++) { angle = i * 2.f * (float) M_PI / teeth; glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), width * 0.5f); glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), width * 0.5f); glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), width * 0.5f); glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), width * 0.5f); } glEnd(); glNormal3f(0.0, 0.0, -1.0); /* draw back face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.f * (float) M_PI / teeth; glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), -width * 0.5f); glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), -width * 0.5f); if (i < teeth) { glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), -width * 0.5f); glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), -width * 0.5f); } } glEnd(); /* draw back sides of teeth */ glBegin(GL_QUADS); da = 2.f * (float) M_PI / teeth / 4.f; for (i = 0; i < teeth; i++) { angle = i * 2.f * (float) M_PI / teeth; glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), -width * 0.5f); glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), -width * 0.5f); glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), -width * 0.5f); glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), -width * 0.5f); } glEnd(); /* draw outward faces of teeth */ glBegin(GL_QUAD_STRIP); for (i = 0; i < teeth; i++) { angle = i * 2.f * (float) M_PI / teeth; glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), width * 0.5f); glVertex3f(r1 * (float) cos(angle), r1 * (float) sin(angle), -width * 0.5f); u = r2 * (float) cos(angle + da) - r1 * (float) cos(angle); v = r2 * (float) sin(angle + da) - r1 * (float) sin(angle); len = (float) sqrt(u * u + v * v); u /= len; v /= len; glNormal3f(v, -u, 0.0); glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), width * 0.5f); glVertex3f(r2 * (float) cos(angle + da), r2 * (float) sin(angle + da), -width * 0.5f); glNormal3f((float) cos(angle), (float) sin(angle), 0.f); glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), width * 0.5f); glVertex3f(r2 * (float) cos(angle + 2 * da), r2 * (float) sin(angle + 2 * da), -width * 0.5f); u = r1 * (float) cos(angle + 3 * da) - r2 * (float) cos(angle + 2 * da); v = r1 * (float) sin(angle + 3 * da) - r2 * (float) sin(angle + 2 * da); glNormal3f(v, -u, 0.f); glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), width * 0.5f); glVertex3f(r1 * (float) cos(angle + 3 * da), r1 * (float) sin(angle + 3 * da), -width * 0.5f); glNormal3f((float) cos(angle), (float) sin(angle), 0.f); } glVertex3f(r1 * (float) cos(0), r1 * (float) sin(0), width * 0.5f); glVertex3f(r1 * (float) cos(0), r1 * (float) sin(0), -width * 0.5f); glEnd(); glShadeModel(GL_SMOOTH); /* draw inside radius cylinder */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.f * (float) M_PI / teeth; glNormal3f(-(float) cos(angle), -(float) sin(angle), 0.f); glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), -width * 0.5f); glVertex3f(r0 * (float) cos(angle), r0 * (float) sin(angle), width * 0.5f); } glEnd(); } static GLfloat view_rotx = 20.f, view_roty = 30.f, view_rotz = 0.f; static GLint gear1, gear2, gear3; static GLfloat angle = 0.f; /* OpenGL draw function & timing */ static void draw(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(view_rotx, 1.0, 0.0, 0.0); glRotatef(view_roty, 0.0, 1.0, 0.0); glRotatef(view_rotz, 0.0, 0.0, 1.0); glPushMatrix(); glTranslatef(-3.0, -2.0, 0.0); glRotatef(angle, 0.0, 0.0, 1.0); glCallList(gear1); glPopMatrix(); glPushMatrix(); glTranslatef(3.1f, -2.f, 0.f); glRotatef(-2.f * angle - 9.f, 0.f, 0.f, 1.f); glCallList(gear2); glPopMatrix(); glPushMatrix(); glTranslatef(-3.1f, 4.2f, 0.f); glRotatef(-2.f * angle - 25.f, 0.f, 0.f, 1.f); glCallList(gear3); glPopMatrix(); glPopMatrix(); } /* update animation parameters */ static void animate(void) { angle = 100.f * (float) glfwGetTime(); } /* change view angle, exit upon ESC */ void GLFWCALL key( int k, int action ) { if( action != GLFW_PRESS ) return; switch (k) { case 'Z': if( glfwGetKey( GLFW_KEY_LSHIFT ) ) view_rotz -= 5.0; else view_rotz += 5.0; break; case GLFW_KEY_ESC: running = 0; break; case GLFW_KEY_UP: view_rotx += 5.0; break; case GLFW_KEY_DOWN: view_rotx -= 5.0; break; case GLFW_KEY_LEFT: view_roty += 5.0; break; case GLFW_KEY_RIGHT: view_roty -= 5.0; break; default: return; } } /* new window size */ void GLFWCALL reshape( int width, int height ) { GLfloat h = (GLfloat) height / (GLfloat) width; GLfloat xmax, znear, zfar; znear = 5.0f; zfar = 30.0f; xmax = znear * 0.5f; glViewport( 0, 0, (GLint) width, (GLint) height ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glFrustum( -xmax, xmax, -xmax*h, xmax*h, znear, zfar ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glTranslatef( 0.0, 0.0, -20.0 ); } /* program & OpenGL initialization */ static void init(int argc, char *argv[]) { static GLfloat pos[4] = {5.f, 5.f, 10.f, 0.f}; static GLfloat red[4] = {0.8f, 0.1f, 0.f, 1.f}; static GLfloat green[4] = {0.f, 0.8f, 0.2f, 1.f}; static GLfloat blue[4] = {0.2f, 0.2f, 1.f, 1.f}; GLint i; glLightfv(GL_LIGHT0, GL_POSITION, pos); glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); /* make the gears */ gear1 = glGenLists(1); glNewList(gear1, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); gear(1.f, 4.f, 1.f, 20, 0.7f); glEndList(); gear2 = glGenLists(1); glNewList(gear2, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); gear(0.5f, 2.f, 2.f, 10, 0.7f); glEndList(); gear3 = glGenLists(1); glNewList(gear3, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); gear(1.3f, 2.f, 0.5f, 10, 0.7f); glEndList(); glEnable(GL_NORMALIZE); for ( i=1; i #include typedef struct { GLFWcond cond; GLFWmutex mutex; int flag; } signal_t; signal_t gotoA, gotoB; GLFWcond threadDone; GLFWmutex doneMutex; int doneCount; int gotoACount, gotoBCount; #define MAX_COUNT 10000 //------------------------------------------------------------------------ // InitSignal() //------------------------------------------------------------------------ void InitSignal( signal_t *s ) { s->cond = glfwCreateCond(); s->mutex = glfwCreateMutex(); s->flag = 0; } //------------------------------------------------------------------------ // KillSignal() //------------------------------------------------------------------------ void KillSignal( signal_t *s ) { glfwDestroyCond( s->cond ); glfwDestroyMutex( s->mutex ); s->flag = 0; } //------------------------------------------------------------------------ // WaitSignal() //------------------------------------------------------------------------ void WaitSignal( signal_t *s ) { glfwLockMutex( s->mutex ); while( !s->flag ) { glfwWaitCond( s->cond, s->mutex, GLFW_INFINITY ); } s->flag = 0; glfwUnlockMutex( s->mutex ); } //------------------------------------------------------------------------ // SetSignal() //------------------------------------------------------------------------ void SetSignal( signal_t *s ) { glfwLockMutex( s->mutex ); s->flag = 1; glfwUnlockMutex( s->mutex ); glfwSignalCond( s->cond ); } //------------------------------------------------------------------------ // threadAfun() //------------------------------------------------------------------------ void GLFWCALL threadAfun( void * arg ) { int done; do { done = (gotoACount >= MAX_COUNT); if( !done ) { gotoACount ++; SetSignal( &gotoB ); WaitSignal( &gotoA ); } } while( !done ); SetSignal( &gotoB ); glfwLockMutex( doneMutex ); doneCount ++; glfwUnlockMutex( doneMutex ); glfwSignalCond( threadDone ); } //------------------------------------------------------------------------ // threadBfun() //------------------------------------------------------------------------ void GLFWCALL threadBfun( void * arg ) { int done; do { done = (gotoBCount >= MAX_COUNT); if( !done ) { gotoBCount ++; SetSignal( &gotoA ); WaitSignal( &gotoB ); } } while( !done ); SetSignal( &gotoA ); glfwLockMutex( doneMutex ); doneCount ++; glfwUnlockMutex( doneMutex ); glfwSignalCond( threadDone ); } //------------------------------------------------------------------------ // main() //------------------------------------------------------------------------ int main( void ) { GLFWthread threadA, threadB; double t1, t2, csps; int done, count, i; gotoACount = gotoBCount = doneCount = 0; // Initialize GLFW if( !glfwInit() ) { return 0; } // Print some program information printf( "\nMultithreading benchmarking program\n" ); printf( "-----------------------------------\n\n" ); printf( "This program consists of two tests. In the first test " ); printf( "two threads are created,\n" ); printf( "which continously signal/wait each other. This forces " ); printf( "the execution to\n" ); printf( "alternate between the two threads, and gives a measure " ); printf( "of the thread\n" ); printf( "synchronization granularity. In the second test, the " ); printf( "main thread is repeatedly\n" ); printf( "put to sleep for a very short interval using glfwSleep. " ); printf( "The average sleep time\n" ); printf( "is measured, which tells the minimum supported sleep " ); printf( "interval.\n\n" ); printf( "Results:\n" ); printf( "--------\n\n" ); printf( "Number of CPUs: %d\n\n", glfwGetNumberOfProcessors() ); fflush( stdout ); //------------------------------------------------------------------------ // 1) Benchmark thread synchronization granularity //------------------------------------------------------------------------ // Init mutexes and conditions doneMutex = glfwCreateMutex(); threadDone = glfwCreateCond(); InitSignal( &gotoA ); InitSignal( &gotoB ); // Create threads A & B threadA = glfwCreateThread( threadAfun, NULL ); threadB = glfwCreateThread( threadBfun, NULL ); if( threadA == -1 || threadB == -1 ) { glfwLockMutex( doneMutex ); doneCount = 2; glfwUnlockMutex( doneMutex ); } // Wait for both threads to be done t1 = glfwGetTime(); glfwLockMutex( doneMutex ); do { done = (doneCount == 2); if( !done ) { glfwWaitCond( threadDone, doneMutex, GLFW_INFINITY ); } } while( !done ); glfwUnlockMutex( doneMutex ); t2 = glfwGetTime(); // Display results count = gotoACount + gotoBCount; csps = (double)count / (t2-t1); printf( "Test 1: %.0f context switches / second (%.3f us/switch)\n", csps, 1e6/csps ); fflush( stdout ); // Wait for threads to die glfwWaitThread( threadA, GLFW_WAIT ); glfwWaitThread( threadB, GLFW_WAIT ); // Destroy mutexes and conditions glfwDestroyMutex( doneMutex ); glfwDestroyCond( threadDone ); KillSignal( &gotoA ); KillSignal( &gotoB ); //------------------------------------------------------------------------ // 2) Benchmark thread sleep granularity //------------------------------------------------------------------------ // Find an initial estimate t1 = glfwGetTime(); for( i = 0; i < 10; i ++ ) { glfwSleep( 0.0001 ); } t2 = glfwGetTime(); // Sleep for roughly 1 s count = (int)(1.0 / ((t2-t1)/10.0)); t1 = glfwGetTime(); for( i = 0; i < count; i ++ ) { glfwSleep( 0.0001 ); } t2 = glfwGetTime(); // Display results printf( "Test 2: %.3f ms / sleep (mean)\n\n", 1000.0 * (t2-t1) / (double)count ); // Terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/examples/pong3d_menu.tga0000644000175000017500000000345307616577464020237 0ustar elmindredaelmindreda r5  glfw-2.7.2/examples/Makefile.win32.lcc0000644000175000017500000000410111435220232020420 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Windows using LCC-Win32. #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.win32.lcc ########################################################################## # Compiler settings CC = lc CFLAGS = -I..\\include -O -A #CFLAGS = -I..\\include -O -A -DGLFW_DLL # Linker settings LFLAGS = ..\\lib\\win32\\glfw.lib glu32.lib opengl32.lib #LFLAGS = ..\\lib\\win32\\glfwdll.lib glu32.lib opengl32.lib # Subsystem settings WINDOWS = -subsystem windows CONSOLE = -subsystem console # Default: Build all tests all: triangle.exe listmodes.exe mthello.exe pong3d.exe mtbench.exe \ particles.exe splitview.exe mipmaps.exe gears.exe boing.exe \ wave.exe heightmap.exe # Rule for triangle triangle.exe: triangle.c $(CC) $(CFLAGS) triangle.c $(LFLAGS) -o $@ -s $(WINDOWS) # Rule for listmodes listmodes.exe: listmodes.c $(CC) $(CFLAGS) listmodes.c $(LFLAGS) -o $@ -s $(CONSOLE) # Rule for mthello mthello.exe: mthello.c $(CC) $(CFLAGS) mthello.c $(LFLAGS) -o $@ -s $(CONSOLE) # Rule for pong3d pong3d.exe: pong3d.c $(CC) $(CFLAGS) pong3d.c $(LFLAGS) -o $@ -s $(WINDOWS) # Rule for mtbench mtbench.exe: mtbench.c $(CC) $(CFLAGS) mtbench.c $(LFLAGS) -o $@ -s $(CONSOLE) # Rule for particles particles.exe: particles.c $(CC) $(CFLAGS) particles.c $(LFLAGS) -o $@ -s $(CONSOLE) # Rule for splitview splitview.exe: splitview.c $(CC) $(CFLAGS) splitview.c $(LFLAGS) -o $@ -s $(WINDOWS) # Rule for mipmaps mipmaps.exe: mipmaps.c $(CC) $(CFLAGS) mipmaps.c $(LFLAGS) -o $@ -s $(WINDOWS) # Rule for gears gears.exe: gears.c $(CC) $(CFLAGS) gears.c $(LFLAGS) -o $@ -s $(WINDOWS) # Rule for boing boing.exe: boing.c $(CC) $(CFLAGS) boing.c $(LFLAGS) -o $@ -s $(WINDOWS) # Rule for wave wave.exe: wave.c $(CC) $(CFLAGS) wave.c $(LFLAGS) -o $@ -s $(WINDOWS) # Rule for heightmap heightmap.exe: heightmap.c getopt.c $(CC) $(CFLAGS) heightmap.c getopt.c $(LFLAGS) -o $@ -s $(WINDOWS) glfw-2.7.2/examples/pong3d_winner1.tga0000644000175000017500000000153507616577464020655 0ustar elmindredaelmindreda f glfw-2.7.2/examples/listmodes.c0000644000175000017500000000246510625531326017452 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program lists all available fullscreen video modes. //======================================================================== #include #include // Maximum number of modes that we want to list #define MAX_NUM_MODES 400 //======================================================================== // main() //======================================================================== int main( void ) { GLFWvidmode dtmode, modes[ MAX_NUM_MODES ]; int modecount, i; // Initialize GLFW if( !glfwInit() ) { return 0; } // Show desktop video mode glfwGetDesktopMode( &dtmode ); printf( "Desktop mode: %d x %d x %d\n\n", dtmode.Width, dtmode.Height, dtmode.RedBits + dtmode.GreenBits + dtmode.BlueBits ); // List available video modes modecount = glfwGetVideoModes( modes, MAX_NUM_MODES ); printf( "Available modes:\n" ); for( i = 0; i < modecount; i ++ ) { printf( "%3d: %d x %d x %d\n", i, modes[i].Width, modes[i].Height, modes[i].RedBits + modes[i].GreenBits + modes[i].BlueBits ); } // Terminate GLFW glfwTerminate(); return 0; } glfw-2.7.2/examples/heightmap.c0000644000175000017500000007440311435454400017413 0ustar elmindredaelmindreda//======================================================================== // Heightmap example program using OpenGL 3 core profile // Copyright (c) 2010 Olivier Delannoy // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would // be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source // distribution. // //======================================================================== #include #include #include #include #include #include "getopt.h" #define GLFW_NO_GLU 1 #include /* OpenGL 3.3 support * Functions are effectively mapped in init_opengl() */ #ifndef GL_VERSION_3_0 /* no defines */ #endif #ifndef GL_VERSION_2_0 typedef char GLchar; #define GL_BLEND_EQUATION_RGB 0x8009 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 #define GL_CURRENT_VERTEX_ATTRIB 0x8626 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 #define GL_STENCIL_BACK_FUNC 0x8800 #define GL_STENCIL_BACK_FAIL 0x8801 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 #define GL_MAX_DRAW_BUFFERS 0x8824 #define GL_DRAW_BUFFER0 0x8825 #define GL_DRAW_BUFFER1 0x8826 #define GL_DRAW_BUFFER2 0x8827 #define GL_DRAW_BUFFER3 0x8828 #define GL_DRAW_BUFFER4 0x8829 #define GL_DRAW_BUFFER5 0x882A #define GL_DRAW_BUFFER6 0x882B #define GL_DRAW_BUFFER7 0x882C #define GL_DRAW_BUFFER8 0x882D #define GL_DRAW_BUFFER9 0x882E #define GL_DRAW_BUFFER10 0x882F #define GL_DRAW_BUFFER11 0x8830 #define GL_DRAW_BUFFER12 0x8831 #define GL_DRAW_BUFFER13 0x8832 #define GL_DRAW_BUFFER14 0x8833 #define GL_DRAW_BUFFER15 0x8834 #define GL_BLEND_EQUATION_ALPHA 0x883D #define GL_MAX_VERTEX_ATTRIBS 0x8869 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 #define GL_FRAGMENT_SHADER 0x8B30 #define GL_VERTEX_SHADER 0x8B31 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A #define GL_MAX_VARYING_FLOATS 0x8B4B #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D #define GL_SHADER_TYPE 0x8B4F #define GL_FLOAT_VEC2 0x8B50 #define GL_FLOAT_VEC3 0x8B51 #define GL_FLOAT_VEC4 0x8B52 #define GL_INT_VEC2 0x8B53 #define GL_INT_VEC3 0x8B54 #define GL_INT_VEC4 0x8B55 #define GL_BOOL 0x8B56 #define GL_BOOL_VEC2 0x8B57 #define GL_BOOL_VEC3 0x8B58 #define GL_BOOL_VEC4 0x8B59 #define GL_FLOAT_MAT2 0x8B5A #define GL_FLOAT_MAT3 0x8B5B #define GL_FLOAT_MAT4 0x8B5C #define GL_SAMPLER_1D 0x8B5D #define GL_SAMPLER_2D 0x8B5E #define GL_SAMPLER_3D 0x8B5F #define GL_SAMPLER_CUBE 0x8B60 #define GL_SAMPLER_1D_SHADOW 0x8B61 #define GL_SAMPLER_2D_SHADOW 0x8B62 #define GL_DELETE_STATUS 0x8B80 #define GL_COMPILE_STATUS 0x8B81 #define GL_LINK_STATUS 0x8B82 #define GL_VALIDATE_STATUS 0x8B83 #define GL_INFO_LOG_LENGTH 0x8B84 #define GL_ATTACHED_SHADERS 0x8B85 #define GL_ACTIVE_UNIFORMS 0x8B86 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 #define GL_SHADER_SOURCE_LENGTH 0x8B88 #define GL_ACTIVE_ATTRIBUTES 0x8B89 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B #define GL_SHADING_LANGUAGE_VERSION 0x8B8C #define GL_CURRENT_PROGRAM 0x8B8D #define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 #define GL_LOWER_LEFT 0x8CA1 #define GL_UPPER_LEFT 0x8CA2 #define GL_STENCIL_BACK_REF 0x8CA3 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 #endif #ifndef GL_VERSION_1_5 typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr; #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 #define GL_QUERY_COUNTER_BITS 0x8864 #define GL_CURRENT_QUERY 0x8865 #define GL_QUERY_RESULT 0x8866 #define GL_QUERY_RESULT_AVAILABLE 0x8867 #define GL_ARRAY_BUFFER 0x8892 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 #define GL_ARRAY_BUFFER_BINDING 0x8894 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F #define GL_READ_ONLY 0x88B8 #define GL_WRITE_ONLY 0x88B9 #define GL_READ_WRITE 0x88BA #define GL_BUFFER_ACCESS 0x88BB #define GL_BUFFER_MAPPED 0x88BC #define GL_BUFFER_MAP_POINTER 0x88BD #define GL_STREAM_DRAW 0x88E0 #define GL_STREAM_READ 0x88E1 #define GL_STREAM_COPY 0x88E2 #define GL_STATIC_DRAW 0x88E4 #define GL_STATIC_READ 0x88E5 #define GL_STATIC_COPY 0x88E6 #define GL_DYNAMIC_DRAW 0x88E8 #define GL_DYNAMIC_READ 0x88E9 #define GL_DYNAMIC_COPY 0x88EA #define GL_SAMPLES_PASSED 0x8914 #endif /* OpenGL 3.0 */ typedef void (APIENTRY * PFN_glGenVertexArrays)(GLsizei n, GLuint *arrays); typedef void (APIENTRY * PFN_glBindVertexArray)(GLuint array); typedef void (APIENTRY * PFN_glDeleteVertexArrays)(GLsizei n, GLuint *arrays); /* OpenGL 2.0 */ typedef GLuint (APIENTRY * PFN_glCreateShader)(GLenum type); typedef void (APIENTRY * PFN_glDeleteShader)(GLuint shader); typedef void (APIENTRY * PFN_glCompileShader)(GLuint shader); typedef void (APIENTRY * PFN_glShaderSource)(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); typedef void (APIENTRY * PFN_glGetShaderiv)(GLuint shader, GLenum pname, GLint *params); typedef void (APIENTRY * PFN_glGetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); typedef GLuint (APIENTRY * PFN_glCreateProgram)(void); typedef void (APIENTRY * PFN_glDeleteProgram)(GLuint program); typedef void (APIENTRY * PFN_glAttachShader)(GLuint program, GLuint shader); typedef void (APIENTRY * PFN_glLinkProgram)(GLuint program); typedef void (APIENTRY * PFN_glGetProgramiv)(GLuint program, GLenum pname, GLint *params); typedef void (APIENTRY * PFN_glGetProgramInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); typedef void (APIENTRY * PFN_glValidateProgram)(GLuint program); typedef void (APIENTRY * PFN_glUseProgram)(GLuint program); typedef GLint (APIENTRY * PFN_glGetUniformLocation)(GLuint program, const GLchar *name); typedef void (APIENTRY * PFN_glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef GLint (APIENTRY * PFN_glGetAttribLocation)(GLuint program, const GLchar *name); typedef void (APIENTRY * PFN_glEnableVertexAttribArray)(GLuint index); typedef void (APIENTRY * PFN_glVertexAttrib1f)(GLuint index, GLfloat x); typedef void (APIENTRY * PFN_glVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); /* OpenGL 1.5 */ typedef void (APIENTRY * PFN_glBindBuffer)(GLenum target, GLuint buffer); typedef void (APIENTRY * PFN_glDeleteBuffers)(GLsizei n, const GLuint *buffers); typedef void (APIENTRY * PFN_glGenBuffers)(GLsizei n, GLuint *buffers); typedef void (APIENTRY * PFN_glBufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); typedef void (APIENTRY * PFN_glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); /* OpenGL function pointers */ static PFN_glGenBuffers pglGenBuffers = NULL; static PFN_glGenVertexArrays pglGenVertexArrays = NULL; static PFN_glDeleteVertexArrays pglDeleteVertexArrays = NULL; static PFN_glCreateShader pglCreateShader = NULL; static PFN_glShaderSource pglShaderSource = NULL; static PFN_glCompileShader pglCompileShader = NULL; static PFN_glGetShaderiv pglGetShaderiv = NULL; static PFN_glGetShaderInfoLog pglGetShaderInfoLog = NULL; static PFN_glDeleteShader pglDeleteShader = NULL; static PFN_glCreateProgram pglCreateProgram = NULL; static PFN_glAttachShader pglAttachShader = NULL; static PFN_glLinkProgram pglLinkProgram = NULL; static PFN_glUseProgram pglUseProgram = NULL; static PFN_glGetProgramiv pglGetProgramiv = NULL; static PFN_glGetProgramInfoLog pglGetProgramInfoLog = NULL; static PFN_glDeleteProgram pglDeleteProgram = NULL; static PFN_glGetUniformLocation pglGetUniformLocation = NULL; static PFN_glUniformMatrix4fv pglUniformMatrix4fv = NULL; static PFN_glGetAttribLocation pglGetAttribLocation = NULL; /* Map height updates */ #define MAX_CIRCLE_SIZE (5.0f) #define MAX_DISPLACEMENT (1.0f) #define DISPLACEMENT_SIGN_LIMIT (0.3f) #define MAX_ITER (200) #define NUM_ITER_AT_A_TIME (1) /* Map general information */ #define MAP_SIZE (10.0f) #define MAP_NUM_VERTICES (80) #define MAP_NUM_TOTAL_VERTICES (MAP_NUM_VERTICES*MAP_NUM_VERTICES) #define MAP_NUM_LINES (3* (MAP_NUM_VERTICES - 1) * (MAP_NUM_VERTICES - 1) + \ 2 * (MAP_NUM_VERTICES - 1)) /* OpenGL function pointers */ static PFN_glBindVertexArray pglBindVertexArray = NULL; static PFN_glBufferData pglBufferData = NULL; static PFN_glBindBuffer pglBindBuffer = NULL; static PFN_glBufferSubData pglBufferSubData = NULL; static PFN_glEnableVertexAttribArray pglEnableVertexAttribArray = NULL; static PFN_glVertexAttribPointer pglVertexAttribPointer = NULL; #define RESOLVE_GL_FCN(type, var, name) \ if (status == GL_TRUE) \ {\ var = glfwGetProcAddress((name));\ if ((var) == NULL)\ {\ status = GL_FALSE;\ }\ } static GLboolean init_opengl(void) { GLboolean status = GL_TRUE; RESOLVE_GL_FCN(PFN_glCreateShader, pglCreateShader, "glCreateShader"); RESOLVE_GL_FCN(PFN_glShaderSource, pglShaderSource, "glShaderSource"); RESOLVE_GL_FCN(PFN_glCompileShader, pglCompileShader, "glCompileShader"); RESOLVE_GL_FCN(PFN_glGetShaderiv, pglGetShaderiv, "glGetShaderiv"); RESOLVE_GL_FCN(PFN_glGetShaderInfoLog, pglGetShaderInfoLog, "glGetShaderInfoLog"); RESOLVE_GL_FCN(PFN_glDeleteShader, pglDeleteShader, "glDeleteShader"); RESOLVE_GL_FCN(PFN_glCreateProgram, pglCreateProgram, "glCreateProgram"); RESOLVE_GL_FCN(PFN_glAttachShader, pglAttachShader, "glAttachShader"); RESOLVE_GL_FCN(PFN_glLinkProgram, pglLinkProgram, "glLinkProgram"); RESOLVE_GL_FCN(PFN_glUseProgram, pglUseProgram, "glUseProgram"); RESOLVE_GL_FCN(PFN_glGetProgramiv, pglGetProgramiv, "glGetProgramiv"); RESOLVE_GL_FCN(PFN_glGetProgramInfoLog, pglGetProgramInfoLog, "glGetProgramInfoLog"); RESOLVE_GL_FCN(PFN_glDeleteProgram, pglDeleteProgram, "glDeleteProgram"); RESOLVE_GL_FCN(PFN_glGetUniformLocation, pglGetUniformLocation, "glGetUniformLocation"); RESOLVE_GL_FCN(PFN_glUniformMatrix4fv, pglUniformMatrix4fv, "glUniformMatrix4fv"); RESOLVE_GL_FCN(PFN_glGetAttribLocation, pglGetAttribLocation, "glGetAttribLocation"); RESOLVE_GL_FCN(PFN_glGenVertexArrays, pglGenVertexArrays, "glGenVertexArrays"); RESOLVE_GL_FCN(PFN_glDeleteVertexArrays, pglDeleteVertexArrays, "glDeleteVertexArrays"); RESOLVE_GL_FCN(PFN_glBindVertexArray, pglBindVertexArray, "glBindVertexArray"); RESOLVE_GL_FCN(PFN_glGenBuffers, pglGenBuffers, "glGenBuffers"); RESOLVE_GL_FCN(PFN_glBindBuffer, pglBindBuffer, "glBindBuffer"); RESOLVE_GL_FCN(PFN_glBufferData, pglBufferData, "glBufferData"); RESOLVE_GL_FCN(PFN_glBufferSubData, pglBufferSubData, "glBufferSubData"); RESOLVE_GL_FCN(PFN_glEnableVertexAttribArray, pglEnableVertexAttribArray, "glEnableVertexAttribArray"); RESOLVE_GL_FCN(PFN_glVertexAttribPointer, pglVertexAttribPointer, "glVertexAttribPointer"); return status; } /********************************************************************** * Default shader programs *********************************************************************/ static const char* default_vertex_shader = "#version 150\n" "uniform mat4 project;\n" "uniform mat4 modelview;\n" "in float x;\n" "in float y;\n" "in float z;\n" "\n" "void main()\n" "{\n" " gl_Position = project * modelview * vec4(x, y, z, 1.0);\n" "}\n"; static const char* default_fragment_shader = "#version 150\n" "out vec4 gl_FragColor;\n" "void main()\n" "{\n" " gl_FragColor = vec4(0.2, 1.0, 0.2, 1.0); \n" "}\n"; /********************************************************************** * Values for shader uniforms *********************************************************************/ /* Frustum configuration */ static GLfloat view_angle = 45.0f; static GLfloat aspect_ratio = 4.0f/3.0f; static GLfloat z_near = 1.0f; static GLfloat z_far = 100.f; /* Projection matrix */ static GLfloat projection_matrix[16] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; /* Model view matrix */ static GLfloat modelview_matrix[16] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; /********************************************************************** * Heightmap vertex and index data *********************************************************************/ static GLfloat map_vertices[3][MAP_NUM_TOTAL_VERTICES]; static GLuint map_line_indices[2*MAP_NUM_LINES]; /* Store uniform location for the shaders * Those values are setup as part of the process of creating * the shader program. They should not be used before creating * the program. */ static GLuint mesh; static GLuint mesh_vbo[4]; /********************************************************************** * OpenGL helper functions *********************************************************************/ /* Load a (text) file into memory and return its contents */ static char* read_file_content(const char* filename) { FILE* fd; size_t size = 0; char* result = NULL; fd = fopen(filename, "r"); if (fd != NULL) { size = fseek(fd, 0, SEEK_END); (void) fseek(fd, 0, SEEK_SET); result = malloc(size + 1); result[size] = '\0'; if (fread(result, size, 1, fd) != 1) { free(result); result = NULL; } (void) fclose(fd); } return result; } /* Creates a shader object of the specified type using the specified text */ static GLuint make_shader(GLenum type, const char* shader_src) { GLuint shader; GLint shader_ok; GLsizei log_length; char info_log[8192]; shader = pglCreateShader(type); if (shader != 0) { pglShaderSource(shader, 1, (const GLchar**)&shader_src, NULL); pglCompileShader(shader); pglGetShaderiv(shader, GL_COMPILE_STATUS, &shader_ok); if (shader_ok != GL_TRUE) { fprintf(stderr, "ERROR: Failed to compile %s shader\n", (type == GL_FRAGMENT_SHADER) ? "fragment" : "vertex" ); pglGetShaderInfoLog(shader, 8192, &log_length,info_log); fprintf(stderr, "ERROR: \n%s\n\n", info_log); pglDeleteShader(shader); shader = 0; } } return shader; } /* Creates a program object using the specified vertex and fragment text */ static GLuint make_shader_program(const char* vertex_shader_src, const char* fragment_shader_src) { GLuint program = 0u; GLint program_ok; GLuint vertex_shader = 0u; GLuint fragment_shader = 0u; GLsizei log_length; char info_log[8192]; vertex_shader = make_shader(GL_VERTEX_SHADER, (vertex_shader_src == NULL) ? default_vertex_shader : vertex_shader_src); if (vertex_shader != 0u) { fragment_shader = make_shader(GL_FRAGMENT_SHADER, (fragment_shader_src == NULL) ? default_fragment_shader : fragment_shader_src); if (fragment_shader != 0u) { /* make the program that connect the two shader and link it */ program = pglCreateProgram(); if (program != 0u) { /* attach both shader and link */ pglAttachShader(program, vertex_shader); pglAttachShader(program, fragment_shader); pglLinkProgram(program); pglGetProgramiv(program, GL_LINK_STATUS, &program_ok); if (program_ok != GL_TRUE) { fprintf(stderr, "ERROR, failed to link shader program\n"); pglGetProgramInfoLog(program, 8192, &log_length, info_log); fprintf(stderr, "ERROR: \n%s\n\n", info_log); pglDeleteProgram(program); pglDeleteShader(fragment_shader); pglDeleteShader(vertex_shader); program = 0u; } } } else { fprintf(stderr, "ERROR: Unable to load fragment shader\n"); pglDeleteShader(vertex_shader); } } else { fprintf(stderr, "ERROR: Unable to load vertex shader\n"); } return program; } /********************************************************************** * Geometry creation functions *********************************************************************/ /* Generate vertices and indices for the heightmap */ static void init_map(void) { int i; int j; int k; GLfloat step = MAP_SIZE / (MAP_NUM_VERTICES - 1); GLfloat x = 0.0f; GLfloat z = 0.0f; /* Create a flat grid */ k = 0; for (i = 0 ; i < MAP_NUM_VERTICES ; ++i) { for (j = 0 ; j < MAP_NUM_VERTICES ; ++j) { map_vertices[0][k] = x; map_vertices[1][k] = 0.0f; map_vertices[2][k] = z; z += step; ++k; } x += step; z = 0.0f; } #if DEBUG_ENABLED for (i = 0 ; i < MAP_NUM_TOTAL_VERTICES ; ++i) { printf ("Vertice %d (%f, %f, %f)\n", i, map_vertices[0][i], map_vertices[1][i], map_vertices[2][i]); } #endif /* create indices */ /* line fan based on i * i+1 * | / i + n + 1 * | / * |/ * i --- i + n */ /* close the top of the square */ k = 0; for (i = 0 ; i < MAP_NUM_VERTICES -1 ; ++i) { map_line_indices[k++] = (i + 1) * MAP_NUM_VERTICES -1; map_line_indices[k++] = (i + 2) * MAP_NUM_VERTICES -1; } /* close the right of the square */ for (i = 0 ; i < MAP_NUM_VERTICES -1 ; ++i) { map_line_indices[k++] = (MAP_NUM_VERTICES - 1) * MAP_NUM_VERTICES + i; map_line_indices[k++] = (MAP_NUM_VERTICES - 1) * MAP_NUM_VERTICES + i + 1; } for (i = 0 ; i < (MAP_NUM_VERTICES - 1) ; ++i) { for (j = 0 ; j < (MAP_NUM_VERTICES - 1) ; ++j) { int ref = i * (MAP_NUM_VERTICES) + j; map_line_indices[k++] = ref; map_line_indices[k++] = ref + 1; map_line_indices[k++] = ref; map_line_indices[k++] = ref + MAP_NUM_VERTICES; map_line_indices[k++] = ref; map_line_indices[k++] = ref + MAP_NUM_VERTICES + 1; } } #ifdef DEBUG_ENABLED for (k = 0 ; k < 2 * MAP_NUM_LINES ; k += 2) { int beg, end; beg = map_line_indices[k]; end = map_line_indices[k+1]; printf ("Line %d: %d -> %d (%f, %f, %f) -> (%f, %f, %f)\n", k / 2, beg, end, map_vertices[0][beg], map_vertices[1][beg], map_vertices[2][beg], map_vertices[0][end], map_vertices[1][end], map_vertices[2][end]); } #endif } static void generate_heightmap__circle(float* center_x, float* center_y, float* size, float* displacement) { float sign; /* random value for element in between [0-1.0] */ *center_x = (MAP_SIZE * rand()) / (1.0f * RAND_MAX); *center_y = (MAP_SIZE * rand()) / (1.0f * RAND_MAX); *size = (MAX_CIRCLE_SIZE * rand()) / (1.0f * RAND_MAX); sign = (1.0f * rand()) / (1.0f * RAND_MAX); sign = (sign < DISPLACEMENT_SIGN_LIMIT) ? -1.0f : 1.0f; *displacement = (sign * (MAX_DISPLACEMENT * rand())) / (1.0f * RAND_MAX); } /* Run the specified number of iterations of the generation process for the * heightmap */ static void update_map(int num_iter) { assert(num_iter > 0); while(num_iter) { /* center of the circle */ float center_x; float center_z; float circle_size; float disp; size_t ii; generate_heightmap__circle(¢er_x, ¢er_z, &circle_size, &disp); disp = disp / 2.0f; for (ii = 0u ; ii < MAP_NUM_TOTAL_VERTICES ; ++ii) { GLfloat dx = center_x - map_vertices[0][ii]; GLfloat dz = center_z - map_vertices[2][ii]; GLfloat pd = (2.0f * sqrtf((dx * dx) + (dz * dz))) / circle_size; if (fabs(pd) <= 1.0f) { /* tx,tz is within the circle */ GLfloat new_height = disp + (cos(pd*3.14f)*disp); map_vertices[1][ii] += new_height; } } --num_iter; } } /********************************************************************** * OpenGL helper functions *********************************************************************/ /* Create VBO, IBO and VAO objects for the heightmap geometry and bind them to * the specified program object */ static void make_mesh(GLuint program) { GLuint attrloc; pglGenVertexArrays(1, &mesh); pglGenBuffers(4, mesh_vbo); pglBindVertexArray(mesh); /* Prepare the data for drawing through a buffer inidices */ pglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh_vbo[3]); pglBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint)* MAP_NUM_LINES * 2, map_line_indices, GL_STATIC_DRAW); /* Prepare the attributes for rendering */ attrloc = pglGetAttribLocation(program, "x"); pglBindBuffer(GL_ARRAY_BUFFER, mesh_vbo[0]); pglBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[0][0], GL_STATIC_DRAW); pglEnableVertexAttribArray(attrloc); pglVertexAttribPointer(attrloc, 1, GL_FLOAT, GL_FALSE, 0, 0); attrloc = pglGetAttribLocation(program, "z"); pglBindBuffer(GL_ARRAY_BUFFER, mesh_vbo[2]); pglBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[2][0], GL_STATIC_DRAW); pglEnableVertexAttribArray(attrloc); pglVertexAttribPointer(attrloc, 1, GL_FLOAT, GL_FALSE, 0, 0); attrloc = pglGetAttribLocation(program, "y"); pglBindBuffer(GL_ARRAY_BUFFER, mesh_vbo[1]); pglBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[1][0], GL_DYNAMIC_DRAW); pglEnableVertexAttribArray(attrloc); pglVertexAttribPointer(attrloc, 1, GL_FLOAT, GL_FALSE, 0, 0); } /* Update VBO vertices from source data */ static void update_mesh(void) { pglBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(GLfloat) * MAP_NUM_TOTAL_VERTICES, &map_vertices[1][0]); } /********************************************************************** * GLFW callback functions *********************************************************************/ /* The program runs as long as this is GL_TRUE */ static GLboolean running = GL_TRUE; /* GLFW Window management functions */ static int GLFWCALL close_window_callback(void) { running = GL_FALSE; /* Disallow window closing * The window will be closed when the main loop terminates */ return GL_FALSE; } static void GLFWCALL key_callback(int key, int action) { switch(key) { case GLFW_KEY_ESC: /* Exit program on Escape */ running = GL_FALSE; break; } } /* Print usage information */ static void usage(void) { printf("Usage: heightmap [-v ] [-f ]\n"); printf(" heightmap [-h]\n"); } int main(int argc, char** argv) { int ch, iter; double dt; double last_update_time; int frame; float f; GLint uloc_modelview; GLint uloc_project; char* vertex_shader_path = NULL; char* fragment_shader_path = NULL; char* vertex_shader_src = NULL; char* fragment_shader_src = NULL; GLuint shader_program; while ((ch = getopt(argc, argv, "f:v:h")) != -1) { switch (ch) { case 'f': fragment_shader_path = optarg; break; case 'v': vertex_shader_path = optarg; break; case 'h': usage(); exit(EXIT_SUCCESS); default: usage(); exit(EXIT_FAILURE); } } if (fragment_shader_path) { vertex_shader_src = read_file_content(fragment_shader_path); if (!fragment_shader_src) { fprintf(stderr, "ERROR: unable to load fragment shader from '%s'\n", fragment_shader_path); exit(EXIT_FAILURE); } } if (vertex_shader_path) { vertex_shader_src = read_file_content(vertex_shader_path); if (!vertex_shader_src) { fprintf(stderr, "ERROR: unable to load vertex shader from '%s'\n", fragment_shader_path); exit(EXIT_FAILURE); } } if (GL_TRUE != glfwInit()) { fprintf(stderr, "ERROR: Unable to initialize GLFW\n"); usage(); free(vertex_shader_src); free(fragment_shader_src); exit(EXIT_FAILURE); } glfwEnable(GLFW_AUTO_POLL_EVENTS); /* No explicit call to glfwPollEvents() */ glfwOpenWindowHint(GLFW_WINDOW_NO_RESIZE, GL_TRUE); glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3); glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2); glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE); if (GL_TRUE != glfwOpenWindow(800, 600, 0, 0, 0, 0, 0, 0, GLFW_WINDOW)) { fprintf(stderr, "ERROR: Unable to create the OpenGL context and associated window\n"); usage(); free(vertex_shader_src); free(fragment_shader_src); exit(EXIT_FAILURE); } glfwSetWindowTitle("GLFW OpenGL3 Heightmap demo"); /* Register events callback */ glfwSetWindowCloseCallback(close_window_callback); glfwSetKeyCallback(key_callback); if (GL_TRUE != init_opengl()) { fprintf(stderr, "ERROR: unable to resolve OpenGL function pointers\n"); free(vertex_shader_src); free(fragment_shader_src); exit(EXIT_FAILURE); } /* Prepare opengl resources for rendering */ shader_program = make_shader_program(vertex_shader_src , fragment_shader_src); free(vertex_shader_src); free(fragment_shader_src); if (shader_program == 0u) { fprintf(stderr, "ERROR: during creation of the shader program\n"); usage(); exit(EXIT_FAILURE); } pglUseProgram(shader_program); uloc_project = pglGetUniformLocation(shader_program, "project"); uloc_modelview = pglGetUniformLocation(shader_program, "modelview"); /* Compute the projection matrix */ f = 1.0f / tanf(view_angle / 2.0f); projection_matrix[0] = f / aspect_ratio; projection_matrix[5] = f; projection_matrix[10] = (z_far + z_near)/ (z_near - z_far); projection_matrix[11] = -1.0f; projection_matrix[14] = 2.0f * (z_far * z_near) / (z_near - z_far); pglUniformMatrix4fv(uloc_project, 1, GL_FALSE, projection_matrix); /* Set the camera position */ modelview_matrix[12] = -5.0f; modelview_matrix[13] = -5.0f; modelview_matrix[14] = -20.0f; pglUniformMatrix4fv(uloc_modelview, 1, GL_FALSE, modelview_matrix); /* Create mesh data */ init_map(); make_mesh(shader_program); /* Create vao + vbo to store the mesh */ /* Create the vbo to store all the information for the grid and the height */ /* setup the scene ready for rendering */ glViewport(0, 0, 800, 600); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); /* main loop */ frame = 0; iter = 0; dt = last_update_time = glfwGetTime(); while (running) { ++frame; /* render the next frame */ glClear(GL_COLOR_BUFFER_BIT); glDrawElements(GL_LINES, 2* MAP_NUM_LINES , GL_UNSIGNED_INT, 0); /* display and process events through callbacks */ glfwSwapBuffers(); /* Check the frame rate and update the heightmap if needed */ dt = glfwGetTime(); if ((dt - last_update_time) > 0.2) { /* generate the next iteration of the heightmap */ if (iter < MAX_ITER) { update_map(NUM_ITER_AT_A_TIME); update_mesh(); iter += NUM_ITER_AT_A_TIME; } last_update_time = dt; frame = 0; } } exit(EXIT_SUCCESS); } glfw-2.7.2/examples/Makefile.win32.ow0000644000175000017500000000432111435220232020310 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Windows using Open Watcom 1.0. #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # "wmake -ms -f Makefile.win32.ow" or "nmake -f Makefile.win32.ow" ########################################################################## # Compiler settings CC = wcl386 CFLAGS = /Ox /I..\\include #CFLAGS = /Ox /I..\\include /DGLFW_DLL # Linker settings LFLAGS = ..\\lib\\win32\\glfw.lib opengl32.lib glu32.lib user32.lib #LFLAGS = ..\\lib\\win32\\glfwdll.lib opengl32.lib glu32.lib # Subsystem settings WINDOWS = -"RUNTIME windows=4.0 REFERENCE 'mainCRTStartup' OPTION { start='mainCRTStartup' quiet stack=1M }" CONSOLE = -"RUNTIME console REFERENCE _cstart_ OPTION { START=_cstart_ quiet stack=1M }" # Default: Build all tests all: triangle.exe listmodes.exe mthello.exe pong3d.exe mtbench.exe \ particles.exe splitview.exe mipmaps.exe gears.exe boing.exe \ wave.exe heightmap.exe # Rule for triangle triangle.exe: triangle.c $(CC) $(CFLAGS) /Fe$@ triangle.c $(LFLAGS) $(WINDOWS) # Rule for listmodes listmodes.exe: listmodes.c $(CC) $(CFLAGS) /Fe$@ listmodes.c $(LFLAGS) $(CONSOLE) # Rule for mthello mthello.exe: mthello.c $(CC) $(CFLAGS) /Fe$@ mthello.c $(LFLAGS) $(CONSOLE) # Rule for pong3d pong3d.exe: pong3d.c $(CC) $(CFLAGS) /Fe$@ pong3d.c $(LFLAGS) $(WINDOWS) # Rule for mtbench mtbench.exe: mtbench.c $(CC) $(CFLAGS) /Fe$@ mtbench.c $(LFLAGS) $(CONSOLE) # Rule for particles particles.exe: particles.c $(CC) $(CFLAGS) /Fe$@ particles.c $(LFLAGS) $(CONSOLE) # Rule for splitview splitview.exe: splitview.c $(CC) $(CFLAGS) /Fe$@ splitview.c $(LFLAGS) $(WINDOWS) # Rule for mipmaps mipmaps.exe: mipmaps.c $(CC) $(CFLAGS) /Fe$@ mipmaps.c $(LFLAGS) $(WINDOWS) # Rule for gears gears.exe: gears.c $(CC) $(CFLAGS) /Fe$@ gears.c $(LFLAGS) $(WINDOWS) # Rule for boing boing.exe: boing.c $(CC) $(CFLAGS) /Fe$@ boing.c $(LFLAGS) $(WINDOWS) # Rule for wave wave.exe: wave.c $(CC) $(CFLAGS) /Fe$@ wave.c $(LFLAGS) $(WINDOWS) # Rule for heightmap heightmap.exe: heightmap.c getopt.c $(CC) $(CFLAGS) /Fe$@ heightmap.c getopt.c $(LFLAGS) $(WINDOWS) glfw-2.7.2/examples/mipmaps.tga0000644000175000017500000020142207616577464017463 0ustar elmindredaelmindreda :Zo$Z$/$:$:O:Z:o::::DdDDDOOZddoO/O:OZ$//DZDzDoOOZd$od$d$d$z$OZ/dZ/zZ/Z//d/Zd/d/z/:::O::OD:O:dZ:zZ:Z:Dd:Zd:o:z:z::ϯ:ZODodDZDDDDڏDĚDDZZOzzOOOOگOZ:ZOdZddZZoZzZzZdZoZzZZĄZďZڏZZZښZZZ:odzzdzdddddodddښdگddoooozooozooooگoںoo:zDZzZdzozOzzdzzozzzzzzdzzzzzzzzzzϚzdzڤzZoozں亏ďozoZzϤįگﺚĚĚϚښگϺĤĤĤĤĤϤڤڤڤzoįįگںĺĺĺĺĺϺںdįĺںĤįĚĺĺϺτZozz!TMU歜{niϱm!H1D790\T|,Ad4ۿ||, EmF-2U6 (d).[FF-Fx$H`K+ƮWDF 0aY{Hh&+%3h?)$$GynS( },c' Ss9 ?nK.,KcJceBS7f=!̒ݶ}}f1 D(T8̰HAYTT1:6/=ӹoۛNY7ȥñF=WwV@dBQ{BuN? DgXssPn_,{ԏA&,Lų̺輹۲f SF}9/@ 'Y$ N#@]H^obBBcQ,`&Ah#<@hhY}Ÿ||S74YT G $byG;'rz֕{͵y=!,|Ŷ`JdGxzdOsS_JLc}Leej555~v#Ԯi?)'QAAkX@Yx$0!8ٚ2?wZ=#X!FEs5Tr' XA_t^`H&+ '',,,^00hܵ||KKc{ 5f9 "<,|I 0@ M{N/Yˉi쨧gE?=*<<^}JHXf~ fo$,,eL,e}zWf(S5fB$ $Mϙ" ,\߾/ R"6-")AɋO)Dgg w?)iS#fِ,JH'?zf!(  EYYYYH+15T`JKmԼٱ? )44鳭m-7MݞN1>"XHoe 9JLݶAeL^_Om8  (~z'+0নCH y`VȑԕvT~T72g@6-/&,e͟竂w?z  ;|ddu (~< 19$")'@8MbIO22\N)WY{eL0Lq *Y}qqeeJ@͝QasgT6~d11Hy鲴cБ#ֽl &%<>= 1Ԩ|mfU\y2>Ӳi;Nw{H)!1E,eݷ󽑂{bA<zdZ65TSST~5~𵛫w7FוiH g Unzx[ZF.NϜ0+|,++LۭLe}N4I' CHGhQBGOF(U隓kzۛz||10<ڛ@b$(~ȪnN==VF2^8d  ,}qRfȕA^P?ܱm=6 Wh5(a311j9 [OD8WO "VggҋEVsf(T5(S~@99!dBR,KbYH/?zߝ+,qq,Bo1,0??|{oJ}B#78$ 6 6 !hm y0 hb-1fG4|4MN":m=?zͱmF / D? 'ammS1 2Dǣ]OsԖ 6~~51lY\=gb³,,`_Az*z̵_?&,}LAB+,id)?B|BXh8 Df8im/&շb@YgMUN?H  1>᭺ž@ Xz2!Nrmzڝm58N OdmwN~T \!!ɫGiӥ5LzTә^}^,e}CAX 3k $'4B{|q}|+X$Ye}L,,{ Hta?NRK^+ 7< IOךZ"X? Y{n廕:VxF2=2? hڞggN!!gԱuôzF (67i*$ &yFD $uZӛ潠VS΄SL>DD"<|B>бʽxkt?2ݷp4*hniJ,S6g?NN-1S~=6b'9gW!?7N%⽠ǣB,*$*AL+t̊^o_Rp,,o|HbF1P- Namzñno8!VVE^hԋxײ4@ۼyi׫2:vǚ䈌jVzmI"|G9_jTEO-(޸6R) VM4*ǥϲb@::h{^++LJJQkYH`oJeşyyKLeݐ&b^!lmHY''+Ba\[d|nn|||yіPXzۏffv wuN<^z8VnثumE D͞h6ǣ"gWfT5S556U?KEN?;ڏY,Q4Id*O1UazwN %Yigyk@*bͳ͞cLc}ܶeo̭{K,AGb+yPPgUgdZW4'FFl@&RRn鱂TXڳf6T7NXXEm 00:7yyەd׫ɮ~|fSSZ XtB Ga?ܮTs?Y͞s" mz׾,LJ`ܳKnQ3k0%hGNn9~VffB.:'@[u1潋m/YŸ㖓MԴ9im=6!6b0hcY`w?9ǥκ؄fѫxih2;-zȓryIzd2'F!=Юa/) @|O'GIJԝy 󦀀T5SZ61PQ Wa{Z!zۮa?$#_G4' UW˛{fVi+~( 1fVV[=NOd4 .gͳggƱEʂT7"'IEXFZϮmw>sI%足{L,,J}, D7.z|'e`|{|̌VdWǦ#V Q??iPzw-w[N?pBIҿykP >gô{j (8<!(Fa-!vNGP? <#G?g’զ9hyZؾx?=!V\W1=2 }{eJ,Je}J#7MEnm}Jpeee,+nk)\fPJ{JJ]IGYYX2-V=U]DaFViiĞO$ ;h|bQi'=T7a( ZiO GǃWWN;ᨦ̲鼒Q->==Fb@ݴO-"EXk "=D>"zIĒY Qx; 0Gkڵ 鹌h? !DԩOZz@tyG@sP4*Ndso|cAە88YFGij!9͞1S(SXgnC̎sXXN'*|býa2!!=!<@ 7'Vsz83O"_^Ah4p@t³ۻ| ӕyondF xO27粜Qw=@ᯎk#.NYwUMۛ'$I|孟c`nQ8-[ڠ=cYXf!b?NjS5͒0-=ho |J_VMu7f!1ThkxZ P*"ׇ=11UWOG@zz[FMek""nsZWZXʮI'#X?Xl 1ZȥT55S(ԍS~~(EpYsB))缒ӨkY\촛HH@V=1Wa'tY*)}},JL٧WV8X̂1(ğn_r"c'-W̼ !Wz?)IM*X?Ax>2)GWgXGA*X4)/o&ix16fT65SSkP 5SMԧX' hzn캏kY@a`b@Hz'%0P?gVVǪGmvOw>??Ea_E{e}LLN!8  ,曎澴ʎhNEXQkYh|n 0* izdd)#tL(S5z+ 845ޡS"xp,L}|||BUGkl!1 gƭ<#Ü1*#4!3R̐tP^$ ܳc.$gDklV)mwJokiw8 XX-=d,m S5(f+^4g)7U(5ϡSVk,,}Ğ|4 @'X2-=  6Vd 9o&0ĒA Y'4 2MM鯼켴_|Bd4# }L p (V dN?z) D{{ ʚFE !!"- S( fǕ:g|+C!)[(ۃ~5((Ja"8H%XMV[-B)[쩦λ' DD9<%<Ғ%9 'zhF|aGK+G 9+Jo|e_H`۴K 9d2DA?/g{ڵul>'  n5T((fmm&&_~8?5S;5+o) g+^Pd)Fˮ>--M$zzz)ԎQnw)*H^˛-r#+}p͒_]2=WOY,;f ? Hk?uȥ2ng󽠚m4  ,'1 5T TT7@3Ԍ@Y4~hV (JI "N^o^ז=7aF1Z)7I?s``)-!fI!fm !="G> fϑfM$%+_̒`G?Ng9p VffI @ȮԮ1n|Dg檑jH+*v16E;V$.Ԝ^y75STY4 hxgӖDf1UɮP)DCY?F'eO :O2! 1616iY񭭐o@;g},"UfX۹gFO򾚖1T澝- f1f\H`.Ƚm2-s"3:˴zp TN1555(ޣ#tnhu2: SE1Um=Vv! 7h^fDZG2ȥϖf1j a <Ŷo+YoL7ďȑW115䈻=WzFH6xF2$X$ƛiۋ>E{GF"( gB{g"9l 56xUMP1=,0F(fjZ$o-F1gxfz<}ܟ}ڵ+%,q, Tֵe֑fv S(TvȓU|TUgO # ;̴ԕW-II!'(~A4 m\?#X)5Ǔ1!ٛw87.FzK<5111! FN6";tF8X 0_eJJ`ힰ@H}, UѾ|4'?v=1 (56(Tff 12 fVk@i?f!M,C+{J}gl1f65  V6w-\]XX!nGE-gyFf6(T6S5~wݷݾF 76zrf!h̛F2)l'iF(TzwBtd2侹ʛkWUD!M.B <|R0^cJe "ȥ~T(SSSSS~SSSS555Sz1 :>"ièdO$i\==n? VN!U!Tf 5S,p=V鹥6T|(1>*ڮ- 3m??2F D16UIJѠ<he9  ;!  7IJ44k`,e ~~(SS5((5길~1" -g- "nzI -ke& S~(6gE.1 fd2DN;.;,bz$7ұE" 4)) #ڢϦX<15S(~t`LeB  ?z,Jݒh7(5((TȑF 5 ё!F>7z'$9Ҿ4 SD  ,qtf7SГ-hH 87aGg|zlf~Tڴ@y@XPb4;ЮwF (S~r˨@Nsܭ_Yn4Aa?۠j!8f SS5SSSSS((T12P̬Ԡ[V̞a\wa?Eg߶:S~sY_ՅgE eLo,L} 2X1Ρ~8MЇ 6iڝm_ƎE֛O)x2d'S(6Ҵn'0Hg|4YmsYEVFT66~~~~~~~~T!11gӮF 7dm>!GS5Sxhce. +X,J,L 5-s1~680AedOEYR*i}a ";ĵzmFS~5.I39hÝB'#$s7?zgEhѣȂ16TTT1 Z11mFĵzz>-M"55~Ѫϡ|LwN #}}2:VF5UrzO2;#siMZvf 5S"AzPiwI7V7z@GnF!78@{F fZ111FkẬjõĴıNEN2Sޡ((SZr,,:7 }qq|ͮ568 9l5 =^Ym::D9,X@3AYf6S(敕uusԾʎYh鯏K'N)- 1Fb! 21=x\WlOQۭ>NRyab{XWW!!Π5(SѪZgB'qLb3|LKcm(8VU8M򳭪*  FF "b1 ff1 4Hdz[UUWWZwÛitl[gٚۧ𽴴NOmlⱜ_AHyǕʲo`{т)(T~5((T澕sбsQQV[BQ'|Jg05(56TYY?>ﷷBU  'nؔɮIIת'44Ia\MVrjZwF/zX{ǃ"?G"ybH_̝INuXY^}ozȥ=(5fʿagʃ7'87z)ᰜ 61d !p#8ȠNmzduUq=( *Y̬g'*YU$-VMgguwOO盏X2 3s?y))X|kI%NaXϛۻѣLj 3( 6Tەgs!~z S~(fȥU='!Mq,S(V.V<7^=(!WOZEhFM3#;XE"# vUI bIF!!E[N!1.yaQ|OMMN)'kwۦ۴U 0K5(!,@uT((SP%iɧWV!"b (! ϵKA@@nd,e} ST ~U )/g<{ת7b+G -yn'))B 1 UUddנNgyw1#_͛G_̼KI)#鴱⮫|Z! f:&`þu;YH(_?ѓf6(T-./WZf MA9M? "q&_,+A^ VzmuAnث#g1")鞴۝n|tffZ"h[mkIP|#F\Ѡ4 >dz).Z$ $AyڟK)! wʔW. ++'?Pml2;X+Qf(E'"ZȂ6fTTƬȥf6=E{A<&,t,ڽY0#  Nw "0 kǧۼOPi*@kF>W##>=xI2UQ d=''b|dOݱxbb' >ՎaQGB|^HQA>= x||~TTڮU #:1-DX*55<$?ǥfȓ~TF-̷o,,HLwBg"Vm=z) &H,JQ@N!9 Ei\wlm)=2b{y2=jzPAKcN[ınQBRˏ# I|eZ1gʮxai~T~Dzݿ8 hwx]ʦ? o(' &Pyc{=" 4'lf71;q}L<4+<KKAb|' F.k'0z)J}RB4tV\mI48Q_|+0k- HY+նl4{Ho4t˒KA,L{4$)b'*qLLH"8Z[ޗS,00t0^}esʲ. =f1(~QMjjIFM"fVDD88gj|a> D Xm|J* WsXd)@u fBYc0GnYcJGa鵴ՒH^,`,Q%;kxkn}}oGNVW2S^o^^ݷc/] 8 F!rw!U ! 齚Ț3$ZUVsAhrUs֖jfjZò{^O-:a zL%?IQaNa4bG8"s˕Um'y雛UVX^UP+x̴F!:!gʦڛaX?iߚ1TfD|4)ɕY`}|cc{||Tff 7%.h<9##A͞p++^{}qe퐒86ss 7O2=6(SS(S( b % NE7=8F!Vҿxdp)!:8lF= ;gf7Vh^ѥV um 훔ȥF[D9M(S~h Xi0,o}˴ô|pRKtt{xfF1 ZY77V8g9žoJLݷ}R,A0^dфW!7f!>| 5~5(S7O]I %I?#^:E8i'?Ym8p)idEVM D!|ػ.NɈgepxGIw* ʻڛ˰î5)!ݐxE;ʮŸtPGH^bKY2T:a멍Y0<*e_HJeõtoocKB,QH+&Yݭ< !FU g9=- T1 h)UI$G/׽۲zOMTOn=1НtnGN6:7GzO;ȓ[Z #SzۅBku.)30^­h9h<9#9hдK@ 0ڶL,4*,^yQAHA%z(fݵf7z<'A,4k)d#¾鱫֓ȴJ?1+ex㮚v66-1jE Uˮtm$5~4A&40J}}d4&JLbaab4<|?2T6<99zrWE #hLL,,*)g4{KA,b|RC+oN(߶(澕jV =s' #{c|,0 oy4'!/oLLC +ݳyaO͕ou߮||40@|pF=fT 6|Ϩ٨ӽN:ϽD7gVЕ) 0nG&^+{ԯڹkY^o{Js ?gg? ,¶qez,|B+|{nlV)TT6sӧ1DلUԲu>)A}LLVI b' |NANXhl)'?$|HN1!=VF1T66p,kkigDDUg" $NiP #Vzdj TmIYj=[P@AH|Lh{oo| gLbnZsX@]NXX0B MZ\F Mf6n@40yۼî_Hb4Y!!>ȵ?<ڱwwi?GYY\G^`ec,e}L<ԕݞ*cp4 A  @uikaW>[1 (%"7I4+K{qtLIC 4k?u1|@Xh|HXu]nB%Wm21W,&^JY?)h^^۾zH gE!fj2$NP'$@kH+o_@hX) >g|'   ()JJLݶ`0hUv=#,+Y錍}RpXC[|P" 'AO ~STU666(3:Mf))YGGEVz #sU (=;yaF w;Yz!uU$ ?BqKAb Jݶ}F F"/?h񵒰{lHth#opcH_z 1("}}}ğijg:]:|0|+HݵK'?|C$w鵵0#1ਚT ZZ^rUm7]C0zIA+J}[!Ӡ-"$@sXY| nn<Vڐ+,A^}#:}qLe}c+Ak*#Y 7fS Z{ $b_RB@30' !8F[gەt bH_unI3N-E'^@*@Y]XZմ?N?uQ HP\R0 9}RJ`nPi(FQLJݞB,`|H0:LJJ,|H+4X??*YL'gh<^xai3hZ6T/Y|ax) !T11=DVyfhaY֦:E &{uWݯw 0گ@Xթgфksj Eo4 A`ڕ, ̒|KA,?;Gid5}eccŶe,,40eJ,,eĵ͞{{L,0Xı=T~f1 8?EW9m<ȥE7VNIWr%?j.;YOZ-MǧMf2EY Jeeoܰz|+V <ŸٌH##@?0YI!f}eo}}LJy++,}JeLCBH,KL,!!ffѪfff$XHG3ؕ皛!F <=!EsG :gIG<<0tÝȇ-i;$'4H{{enˏG."' y*А@30'8'[ִ||ij}·}}qJ,c,Jo³eH+^HA{L,;V큁_UgsbyGE::E.:XYA71ǽזl 'dF!=+G㮝箛FF x= 1NVЊimlm֏s"  Ny 0zQoպÕz^,+? #h' XVE$@p <HpKRݷ}qqJqŷŒJ0A+c}LA@VzڜAG@Xiz̐Gn͞zaO?ha zm:VwKLfȑlugF.͝GND\rۺԮziΜ$=-$h̵^@b)EJ^I+' 8DNDI'I I)Ot hR*4Yoܷ,,_0^Y}+H,}ŶݶQ'#Q<3խ88Ni#5fy{ۋQ$8q4%|=66gfB' <)".>õ|k@ \V̝lFF=)?!xXҹ^A_zNwcYQ' 0;GpI"Ez:"_$Y@Ϧ:MgV P< )X H%_m?@i洒b+'!Pڬ˜濴zGh{g &AʴHHnIF2c|Y^i EᳰWľ殨cL}eoe}z'* ?ZMXsXiyĴV<}p%tLQB ,J,,L}ݷ}}nOEڰr2Nô|ֽiyRp f1 sz7m. 0JAИtY?n' xÝ||bݵP ;|J,,c,,_z$Xrר󭯳kt-n@s@ ^}k?DW'dgeJ,,`{_͵Y0H^t\==f=6pJJJV!\}qLLLݷ}& 0``ڵs-FzI'$X˨gI J͏ky͟ܟo`F=Dgڌ  %n{̰ڐzwʎ) ܶY@::C&|4Oee}̳}ti!M2gmz`J,ݷYtA9 "gXkYO@F-=2)FVhhzgiۮI C|³eowȓgwsٌX#01! _,A^oʋm-W\) <ݶ}oY*#,0o' )cc`P"Uzwԋ^JJ}`0Ǯ̣ŵz-7F!!WؼX/@¾?Jݞb.Vǣ!D਄!E|@^滝y^w!HLcڹb&ݳqJ,K*Y,h4 G||_{e,Ŷi=(m9_ny_yzPnzaN[OIH&,{Ԭ4HV7V<']P') 7{%ܒHNDt|eCJ^|q,oᏋ'4,,f7_}h9YqBRٿyJo}ݶ,|̼ood'\캆4 (z ^n_^^4Nin̟{n'2 *0#0G40H^HH͞np|a]i/ $nI'%hy'0{uN"? 0Y{P;# 8d%³ì{oJ++͜## ' 4U $YY۴H,}e칍|G*G4հe}|,,|cc{@ ퟙ#~B! ^ŷK$G).<X{kn䨜 :9hڿaaG@kc?F 2":|B  % Ŷ}ݳJ,cb|k. +)?ҋ?gb'*}onob}<%JG?d)`eoƛza$ 7g @CLc^K|J|F[<ژY ɱz! @HH'E g孴|bk V-7 "g滏|b' -N]szd@% Y|+@Hܟ͞?2. <ƤC,H^Je "& hYYXPb?G' !Y{kG<<.VbK|e,ڞ^{{Y#NN̍k,90-4RJ͞4 VMN3& P$ %" ɤE ٬Ğr!gW"@+L4IAzsM# *ϕB, RHH|,^YB,CVtPzyBI ,A )iP3#9ٕ>fzdd,bkeJ_ᘤV'hwY9a/b|@nG 7! $h'H&]zmm2 P黮{B4n|PVۍ||\- OkY,<ݮXhnia 7i󼌋V̴P?h|auvٛ99Ʊ)I FD4'"V@ VG)պBxgaF= ;ݒ4*ʕO"M@@]ؑ $Y}|po,Hʻz,,,* ;ԉggEh}}}KA`,hk˯_Lo|pGg˴n^KgkkA̵H4 bHH+HY*?=f绫Únk^´͜?  1\(7.!E"-I|'XsE8i !/Œn'כy^YG$ ?@hF ^L,& 2lG+K-.iV#Y||͝J&0YՐ^oJ`}o箇|4e,>E?/;'A*  4'++%h⚚xOBK|nکg Tfٝ-7MaVV첫g4B.";?Eua ;͵ĞKP0^kn?E1(Q*" 6UjaJeB'@yz{Ľwh||RX󟏬`}d_I'&`,YԲhh4^&  EM% "EWQ?X_p|BQ͐ܟz?.Ϛ-X;7ϞXӰG]F; ""i829|Q' 黦͞aD((562AJeeeeq4 g 'ImOI,bA+JĞ^e,;+*s۞ژ៳Q*? %^e,Y++^+ ";F11=s̊hY`4^A0JA'$!7b 8\a2.1 Eӄz F yk۴b%ۜii鼏S6(T~6((fųLLe}|  $?4&PJijݞ`oܶ}R&X0h{Le}ܶn40Y|,'Em°&&X.!MwNm|)$Y_HtL^HAHڰ^}{yX" f7 @濻'9 1|NU4 ? <;Xd#idd?Ei˜f( TȮz(k`,,JK Vw7&&?,ĵĭ}qL^n&0J,,`zH^{͞p->E8.9x@AJpQ|Y  mA,H&+nԼ|߫[Ni6 TA YFh&4 ~66fԼufi}LJH+c +,+Ӭ4b (5TʴP]? zh|}žQV }L, a &ĴY0AN3$$izmsصp`&_nyr!!11V޸10ᭊs/AhVrz{YQne,CL ]/')PGH*;ҴykŸH, M|oO:d7V(ܶL,_bB+Bo}+o䠚O"qC@NzٲʹںˎםY*<@*Yڏ\-m4 ^0g(Ş4YttmLRP?'84@$ V͐00!JX)NV(Vܷ`ooJ^qՕjO ?CQwbC`$Wzdbڭ翋ic+Y1%*Y˻߻ںFDӣ~zG0ṭdRJ屹Դ\' Ey4B+ )4]e| ' "g1³|J,AneL,JJʖwm"IJO"dPOGHٹ͵Piঃ{J,,&0Yך1#9nA{b9ôxEEXyg !U8EfTTfTf򀃆۽[c,_]Xg?; XB*akH :۞Bc,BۮAU4  hFMﷷJe}Ju[ ?N3?Ao.$=D.+zINٌX|JJ}}J"W! YA'$ @zykE":X=!7ߦfT661wƭܯlE|,&/EںyQ4 bIhgö_b*Y?$sq+0ר1(i}LLLee}JLe}eVO$WVH`沎i8#0g'Y@0G<3A,,,J|cA)1Ez  X?@YX 7EENgg87ӕi>T1g,JE VzO--VƶLXG#*HH)ORI'@o{'4yI)!F wQEmg6S ,,J,zLܷŶc7זFV0HE$3i#0P0ƟX"VۨX9 J}}>,JnHHY̞핦Ի翄Tр~( HoDz)"ge,XV/ gzO)  B*$X|YG?lQ%9] "${bundle_name}.app/Contents/PkgInfo" fi if [ ! -f "${bundle_name}.app/Contents/Info.plist" ]; then cat > "${bundle_name}.app/Contents/Info.plist" < CFBundleDevelopmentRegion English CFBundleExecutable ${bundle_name} CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL CFBundleSignature ???? CFBundleVersion 0.1 EOF fi glfw-2.7.2/examples/Makefile.carbon.universal0000644000175000017500000000555111400255654022213 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Mac OS X using Apple GCC. #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.carbon.universal ########################################################################## # Compiler settings CC = gcc FATFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ -mmacosx-version-min=10.4 -arch ppc -arch i386 CFLAGS = -I../include $(FATFLAGS) # Linker settings LIB = ../lib/carbon/libglfw.a HEADER = ../include/GL/glfw.h LFLAGS = $(LIB) -framework AGL -framework OpenGL -framework Carbon -m32 # Default: Build all tests all: Triangle.app/Contents/MacOS/Triangle \ listmodes \ mthello \ Pong3D.app/Contents/MacOS/Pong3D \ mtbench \ Particles.app/Contents/MacOS/Particles \ SplitView.app/Contents/MacOS/SplitView \ Mipmaps.app/Contents/MacOS/Mipmaps \ Gears.app/Contents/MacOS/Gears \ Boing.app/Contents/MacOS/Boing \ Wave.app/Contents/MacOS/Wave Triangle.app/Contents/MacOS/Triangle: triangle.c $(LIB) $(HEADER) /bin/sh bundle.sh Triangle $(CC) $(CFLAGS) triangle.c $(LFLAGS) -o Triangle.app/Contents/MacOS/Triangle listmodes: listmodes.c $(LIB) $(HEADER) $(CC) $(CFLAGS) listmodes.c $(LFLAGS) -o listmodes mthello: mthello.c $(LIB) $(HEADER) $(CC) $(CFLAGS) mthello.c $(LFLAGS) -o mthello Pong3D.app/Contents/MacOS/Pong3D: pong3d.c $(LIB) $(HEADER) /bin/sh bundle.sh Pong3D cp pong3d_*.tga Pong3D.app/Contents/Resources/ $(CC) $(CFLAGS) pong3d.c $(LFLAGS) -o Pong3D.app/Contents/MacOS/Pong3D mtbench: mtbench.c $(LIB) $(HEADER) $(CC) $(CFLAGS) mtbench.c $(LFLAGS) -o mtbench Particles.app/Contents/MacOS/Particles: particles.c $(LIB) $(HEADER) /bin/sh bundle.sh Particles $(CC) $(CFLAGS) particles.c $(LFLAGS) -o Particles.app/Contents/MacOS/Particles SplitView.app/Contents/MacOS/SplitView: splitview.c $(LIB) $(HEADER) /bin/sh bundle.sh SplitView $(CC) $(CFLAGS) splitview.c $(LFLAGS) -o SplitView.app/Contents/MacOS/SplitView Mipmaps.app/Contents/MacOS/Mipmaps: mipmaps.c $(LIB) $(HEADER) /bin/sh bundle.sh Mipmaps cp mipmaps.tga Mipmaps.app/Contents/Resources/ $(CC) $(CFLAGS) mipmaps.c $(LFLAGS) -o Mipmaps.app/Contents/MacOS/Mipmaps Gears.app/Contents/MacOS/Gears: gears.c $(LIB) $(HEADER) /bin/sh bundle.sh Gears $(CC) $(CFLAGS) gears.c $(LFLAGS) -o Gears.app/Contents/MacOS/Gears Boing.app/Contents/MacOS/Boing: boing.c $(LIB) $(HEADER) /bin/sh bundle.sh Boing $(CC) $(CFLAGS) boing.c $(LFLAGS) -o Boing.app/Contents/MacOS/Boing Wave.app/Contents/MacOS/Wave: wave.c $(LIB) $(HEADER) /bin/sh bundle.sh Wave $(CC) $(CFLAGS) wave.c $(LFLAGS) -o Wave.app/Contents/MacOS/Wave clean: rm -rf Triangle.app listmodes mthello Pong3D.app mtbench Particles.app \ SplitView.app Mipmaps.app Gears.app Boing.app Wave.app glfw-2.7.2/examples/particles.c0000644000175000017500000011326511425666031017437 0ustar elmindredaelmindreda//======================================================================== // This is a simple, but cool particle engine (buzz-word meaning many // small objects that are treated as points and drawn as textures // projected on simple geometry). // // This demonstration generates a colorful fountain-like animation. It // uses several advanced OpenGL teqhniques: // // 1) Lighting (per vertex) // 2) Alpha blending // 3) Fog // 4) Texturing // 5) Display lists (for drawing the static environment geometry) // 6) Vertex arrays (for drawing the particles) // 7) GL_EXT_separate_specular_color is used (if available) // // Even more so, this program uses multi threading. The program is // essentialy divided into a main rendering thread and a particle physics // calculation thread. My benchmarks under Windows 2000 on a single // processor system show that running this program as two threads instead // of a single thread means no difference (there may be a very marginal // advantage for the multi threaded case). On dual processor systems I // have had reports of 5-25% of speed increase when running this program // as two threads instead of one thread. // // The default behaviour of this program is to use two threads. To force // a single thread to be used, use the command line switch -s. // // To run a fixed length benchmark (60 s), use the command line switch -b. // // Benchmark results (640x480x16, best of three tests): // // CPU GFX 1 thread 2 threads // Athlon XP 2700+ GeForce Ti4200 (oc) 757 FPS 759 FPS // P4 2.8 GHz (SMT) GeForce FX5600 548 FPS 550 FPS // // One more thing: Press 'w' during the demo to toggle wireframe mode. //======================================================================== #include #include #include #include #include // Define tokens for GL_EXT_separate_specular_color if not already defined #ifndef GL_EXT_separate_specular_color #define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 #define GL_SINGLE_COLOR_EXT 0x81F9 #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA #endif // GL_EXT_separate_specular_color // Some 's do not define M_PI #ifndef M_PI #define M_PI 3.141592654 #endif // Desired fullscreen resolution #define WIDTH 640 #define HEIGHT 480 //======================================================================== // Type definitions //======================================================================== typedef struct { float x,y,z; } VEC; // This structure is used for interleaved vertex arrays (see the // DrawParticles function) - Note: This structure SHOULD be packed on most // systems. It uses 32-bit fields on 32-bit boundaries, and is a multiple // of 64 bits in total (6x32=3x64). If it does not work, try using pragmas // or whatever to force the structure to be packed. typedef struct { GLfloat s, t; // Texture coordinates GLuint rgba; // Color (four ubytes packed into an uint) GLfloat x, y, z; // Vertex coordinates } VERTEX; //======================================================================== // Program control global variables //======================================================================== // "Running" flag (true if program shall continue to run) int running; // Window dimensions int width, height; // "wireframe" flag (true if we use wireframe view) int wireframe; // "multithreading" flag (true if we use multithreading) int multithreading; // Thread synchronization struct { double t; // Time (s) float dt; // Time since last frame (s) int p_frame; // Particle physics frame number int d_frame; // Particle draw frame number GLFWcond p_done; // Condition: particle physics done GLFWcond d_done; // Condition: particle draw done GLFWmutex particles_lock; // Particles data sharing mutex } thread_sync; //======================================================================== // Texture declarations (we hard-code them into the source code, since // they are so simple) //======================================================================== #define P_TEX_WIDTH 8 // Particle texture dimensions #define P_TEX_HEIGHT 8 #define F_TEX_WIDTH 16 // Floor texture dimensions #define F_TEX_HEIGHT 16 // Texture object IDs GLuint particle_tex_id, floor_tex_id; // Particle texture (a simple spot) const unsigned char particle_texture[ P_TEX_WIDTH * P_TEX_HEIGHT ] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x22, 0x22, 0x11, 0x00, 0x00, 0x00, 0x11, 0x33, 0x88, 0x77, 0x33, 0x11, 0x00, 0x00, 0x22, 0x88, 0xff, 0xee, 0x77, 0x22, 0x00, 0x00, 0x22, 0x77, 0xee, 0xff, 0x88, 0x22, 0x00, 0x00, 0x11, 0x33, 0x77, 0x88, 0x33, 0x11, 0x00, 0x00, 0x00, 0x11, 0x33, 0x22, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // Floor texture (your basic checkered floor) const unsigned char floor_texture[ F_TEX_WIDTH * F_TEX_HEIGHT ] = { 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xcc, 0xee, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x66, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xee, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xcc, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x55, 0x30, 0x30, 0x44, 0x30, 0x30, 0xf0, 0xdd, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x60, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x33, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x20, 0x30, 0x30, 0xf0, 0xff, 0xf0, 0xf0, 0xdd, 0xf0, 0xf0, 0xff, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x55, 0x33, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xf0, 0x30, 0x44, 0x66, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xaa, 0xf0, 0xf0, 0xcc, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xdd, 0xf0, 0x30, 0x30, 0x30, 0x77, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, }; //======================================================================== // These are fixed constants that control the particle engine. In a // modular world, these values should be variables... //======================================================================== // Maximum number of particles #define MAX_PARTICLES 3000 // Life span of a particle (in seconds) #define LIFE_SPAN 8.0f // A new particle is born every [BIRTH_INTERVAL] second #define BIRTH_INTERVAL (LIFE_SPAN/(float)MAX_PARTICLES) // Particle size (meters) #define PARTICLE_SIZE 0.7f // Gravitational constant (m/s^2) #define GRAVITY 9.8f // Base initial velocity (m/s) #define VELOCITY 8.0f // Bounce friction (1.0 = no friction, 0.0 = maximum friction) #define FRICTION 0.75f // "Fountain" height (m) #define FOUNTAIN_HEIGHT 3.0f // Fountain radius (m) #define FOUNTAIN_RADIUS 1.6f // Minimum delta-time for particle phisics (s) #define MIN_DELTA_T (BIRTH_INTERVAL * 0.5f) //======================================================================== // Particle system global variables //======================================================================== // This structure holds all state for a single particle typedef struct { float x,y,z; // Position in space float vx,vy,vz; // Velocity vector float r,g,b; // Color of particle float life; // Life of particle (1.0 = newborn, < 0.0 = dead) int active; // Tells if this particle is active } PARTICLE; // Global vectors holding all particles. We use two vectors for double // buffering. static PARTICLE particles[ MAX_PARTICLES ]; // Global variable holding the age of the youngest particle static float min_age; // Color of latest born particle (used for fountain lighting) static float glow_color[4]; // Position of latest born particle (used for fountain lighting) static float glow_pos[4]; //======================================================================== // Object material and fog configuration constants //======================================================================== const GLfloat fountain_diffuse[4] = {0.7f,1.0f,1.0f,1.0f}; const GLfloat fountain_specular[4] = {1.0f,1.0f,1.0f,1.0f}; const GLfloat fountain_shininess = 12.0f; const GLfloat floor_diffuse[4] = {1.0f,0.6f,0.6f,1.0f}; const GLfloat floor_specular[4] = {0.6f,0.6f,0.6f,1.0f}; const GLfloat floor_shininess = 18.0f; const GLfloat fog_color[4] = {0.1f, 0.1f, 0.1f, 1.0f}; //======================================================================== // InitParticle() - Initialize a new particle //======================================================================== void InitParticle( PARTICLE *p, double t ) { float xy_angle, velocity; // Start position of particle is at the fountain blow-out p->x = 0.0f; p->y = 0.0f; p->z = FOUNTAIN_HEIGHT; // Start velocity is up (Z)... p->vz = 0.7f + (0.3f/4096.f) * (float) (rand() & 4095); // ...and a randomly chosen X/Y direction xy_angle = (2.f * (float)M_PI / 4096.f) * (float) (rand() & 4095); p->vx = 0.4f * (float) cos( xy_angle ); p->vy = 0.4f * (float) sin( xy_angle ); // Scale velocity vector according to a time-varying velocity velocity = VELOCITY*(0.8f + 0.1f*(float)(sin( 0.5*t )+sin( 1.31*t ))); p->vx *= velocity; p->vy *= velocity; p->vz *= velocity; // Color is time-varying p->r = 0.7f + 0.3f * (float) sin( 0.34*t + 0.1 ); p->g = 0.6f + 0.4f * (float) sin( 0.63*t + 1.1 ); p->b = 0.6f + 0.4f * (float) sin( 0.91*t + 2.1 ); // Store settings for fountain glow lighting glow_pos[0] = 0.4f * (float) sin( 1.34*t ); glow_pos[1] = 0.4f * (float) sin( 3.11*t ); glow_pos[2] = FOUNTAIN_HEIGHT + 1.0f; glow_pos[3] = 1.0f; glow_color[0] = p->r; glow_color[1] = p->g; glow_color[2] = p->b; glow_color[3] = 1.0f; // The particle is new-born and active p->life = 1.0f; p->active = 1; } //======================================================================== // UpdateParticle() - Update a particle //======================================================================== #define FOUNTAIN_R2 (FOUNTAIN_RADIUS+PARTICLE_SIZE/2)*(FOUNTAIN_RADIUS+PARTICLE_SIZE/2) void UpdateParticle( PARTICLE *p, float dt ) { // If the particle is not active, we need not do anything if( !p->active ) { return; } // The particle is getting older... p->life = p->life - dt * (1.0f / LIFE_SPAN); // Did the particle die? if( p->life <= 0.0f ) { p->active = 0; return; } // Update particle velocity (apply gravity) p->vz = p->vz - GRAVITY * dt; // Update particle position p->x = p->x + p->vx * dt; p->y = p->y + p->vy * dt; p->z = p->z + p->vz * dt; // Simple collision detection + response if( p->vz < 0.0f ) { // Particles should bounce on the fountain (with friction) if( (p->x*p->x + p->y*p->y) < FOUNTAIN_R2 && p->z < (FOUNTAIN_HEIGHT + PARTICLE_SIZE/2) ) { p->vz = -FRICTION * p->vz; p->z = FOUNTAIN_HEIGHT + PARTICLE_SIZE/2 + FRICTION * (FOUNTAIN_HEIGHT + PARTICLE_SIZE/2 - p->z); } // Particles should bounce on the floor (with friction) else if( p->z < PARTICLE_SIZE/2 ) { p->vz = -FRICTION * p->vz; p->z = PARTICLE_SIZE/2 + FRICTION * (PARTICLE_SIZE/2 - p->z); } } } //======================================================================== // ParticleEngine() - The main frame for the particle engine. Called once // per frame. //======================================================================== void ParticleEngine( double t, float dt ) { int i; float dt2; // Update particles (iterated several times per frame if dt is too // large) while( dt > 0.0f ) { // Calculate delta time for this iteration dt2 = dt < MIN_DELTA_T ? dt : MIN_DELTA_T; // Update particles for( i = 0; i < MAX_PARTICLES; i ++ ) { UpdateParticle( &particles[ i ], dt2 ); } // Increase minimum age min_age += dt2; // Should we create any new particle(s)? while( min_age >= BIRTH_INTERVAL ) { min_age -= BIRTH_INTERVAL; // Find a dead particle to replace with a new one for( i = 0; i < MAX_PARTICLES; i ++ ) { if( !particles[ i ].active ) { InitParticle( &particles[ i ], t + min_age ); UpdateParticle( &particles[ i ], min_age ); break; } } } // Decrease frame delta time dt -= dt2; } } //======================================================================== // DrawParticles() - Draw all active particles. We use OpenGL 1.1 vertex // arrays for this in order to accelerate the drawing. //======================================================================== #define BATCH_PARTICLES 70 // Number of particles to draw in each batch // (70 corresponds to 7.5 KB = will not blow // the L1 data cache on most CPUs) #define PARTICLE_VERTS 4 // Number of vertices per particle void DrawParticles( double t, float dt ) { int i, particle_count; VERTEX vertex_array[ BATCH_PARTICLES * PARTICLE_VERTS ], *vptr; float alpha; GLuint rgba; VEC quad_lower_left, quad_lower_right; GLfloat mat[ 16 ]; PARTICLE *pptr; // Here comes the real trick with flat single primitive objects (s.c. // "billboards"): We must rotate the textured primitive so that it // always faces the viewer (is coplanar with the view-plane). // We: // 1) Create the primitive around origo (0,0,0) // 2) Rotate it so that it is coplanar with the view plane // 3) Translate it according to the particle position // Note that 1) and 2) is the same for all particles (done only once). // Get modelview matrix. We will only use the upper left 3x3 part of // the matrix, which represents the rotation. glGetFloatv( GL_MODELVIEW_MATRIX, mat ); // 1) & 2) We do it in one swift step: // Although not obvious, the following six lines represent two matrix/ // vector multiplications. The matrix is the inverse 3x3 rotation // matrix (i.e. the transpose of the same matrix), and the two vectors // represent the lower left corner of the quad, PARTICLE_SIZE/2 * // (-1,-1,0), and the lower right corner, PARTICLE_SIZE/2 * (1,-1,0). // The upper left/right corners of the quad is always the negative of // the opposite corners (regardless of rotation). quad_lower_left.x = (-PARTICLE_SIZE/2) * (mat[0] + mat[1]); quad_lower_left.y = (-PARTICLE_SIZE/2) * (mat[4] + mat[5]); quad_lower_left.z = (-PARTICLE_SIZE/2) * (mat[8] + mat[9]); quad_lower_right.x = (PARTICLE_SIZE/2) * (mat[0] - mat[1]); quad_lower_right.y = (PARTICLE_SIZE/2) * (mat[4] - mat[5]); quad_lower_right.z = (PARTICLE_SIZE/2) * (mat[8] - mat[9]); // Don't update z-buffer, since all particles are transparent! glDepthMask( GL_FALSE ); // Enable blending glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE ); // Select particle texture if( !wireframe ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, particle_tex_id ); } // Set up vertex arrays. We use interleaved arrays, which is easier to // handle (in most situations) and it gives a linear memeory access // access pattern (which may give better performance in some // situations). GL_T2F_C4UB_V3F means: 2 floats for texture coords, // 4 ubytes for color and 3 floats for vertex coord (in that order). // Most OpenGL cards / drivers are optimized for this format. glInterleavedArrays( GL_T2F_C4UB_V3F, 0, vertex_array ); // Is particle physics carried out in a separate thread? if( multithreading ) { // Wait for particle physics thread to be done glfwLockMutex( thread_sync.particles_lock ); while( running && thread_sync.p_frame <= thread_sync.d_frame ) { glfwWaitCond( thread_sync.p_done, thread_sync.particles_lock, 0.1 ); } // Store the frame time and delta time for the physics thread thread_sync.t = t; thread_sync.dt = dt; // Update frame counter thread_sync.d_frame ++; } else { // Perform particle physics in this thread ParticleEngine( t, dt ); } // Loop through all particles and build vertex arrays. particle_count = 0; vptr = vertex_array; pptr = particles; for( i = 0; i < MAX_PARTICLES; i ++ ) { if( pptr->active ) { // Calculate particle intensity (we set it to max during 75% // of its life, then it fades out) alpha = 4.0f * pptr->life; if( alpha > 1.0f ) { alpha = 1.0f; } // Convert color from float to 8-bit (store it in a 32-bit // integer using endian independent type casting) ((GLubyte *)&rgba)[0] = (GLubyte)(pptr->r * 255.0f); ((GLubyte *)&rgba)[1] = (GLubyte)(pptr->g * 255.0f); ((GLubyte *)&rgba)[2] = (GLubyte)(pptr->b * 255.0f); ((GLubyte *)&rgba)[3] = (GLubyte)(alpha * 255.0f); // 3) Translate the quad to the correct position in modelview // space and store its parameters in vertex arrays (we also // store texture coord and color information for each vertex). // Lower left corner vptr->s = 0.0f; vptr->t = 0.0f; vptr->rgba = rgba; vptr->x = pptr->x + quad_lower_left.x; vptr->y = pptr->y + quad_lower_left.y; vptr->z = pptr->z + quad_lower_left.z; vptr ++; // Lower right corner vptr->s = 1.0f; vptr->t = 0.0f; vptr->rgba = rgba; vptr->x = pptr->x + quad_lower_right.x; vptr->y = pptr->y + quad_lower_right.y; vptr->z = pptr->z + quad_lower_right.z; vptr ++; // Upper right corner vptr->s = 1.0f; vptr->t = 1.0f; vptr->rgba = rgba; vptr->x = pptr->x - quad_lower_left.x; vptr->y = pptr->y - quad_lower_left.y; vptr->z = pptr->z - quad_lower_left.z; vptr ++; // Upper left corner vptr->s = 0.0f; vptr->t = 1.0f; vptr->rgba = rgba; vptr->x = pptr->x - quad_lower_right.x; vptr->y = pptr->y - quad_lower_right.y; vptr->z = pptr->z - quad_lower_right.z; vptr ++; // Increase count of drawable particles particle_count ++; } // If we have filled up one batch of particles, draw it as a set // of quads using glDrawArrays. if( particle_count >= BATCH_PARTICLES ) { // The first argument tells which primitive type we use (QUAD) // The second argument tells the index of the first vertex (0) // The last argument is the vertex count glDrawArrays( GL_QUADS, 0, PARTICLE_VERTS * particle_count ); particle_count = 0; vptr = vertex_array; } // Next particle pptr ++; } // We are done with the particle data: Unlock mutex and signal physics // thread if( multithreading ) { glfwUnlockMutex( thread_sync.particles_lock ); glfwSignalCond( thread_sync.d_done ); } // Draw final batch of particles (if any) glDrawArrays( GL_QUADS, 0, PARTICLE_VERTS * particle_count ); // Disable vertex arrays (Note: glInterleavedArrays implicitly called // glEnableClientState for vertex, texture coord and color arrays) glDisableClientState( GL_VERTEX_ARRAY ); glDisableClientState( GL_TEXTURE_COORD_ARRAY ); glDisableClientState( GL_COLOR_ARRAY ); // Disable texturing and blending glDisable( GL_TEXTURE_2D ); glDisable( GL_BLEND ); // Allow Z-buffer updates again glDepthMask( GL_TRUE ); } //======================================================================== // Fountain geometry specification //======================================================================== #define FOUNTAIN_SIDE_POINTS 14 #define FOUNTAIN_SWEEP_STEPS 32 static const float fountain_side[ FOUNTAIN_SIDE_POINTS*2 ] = { 1.2f, 0.0f, 1.0f, 0.2f, 0.41f, 0.3f, 0.4f, 0.35f, 0.4f, 1.95f, 0.41f, 2.0f, 0.8f, 2.2f, 1.2f, 2.4f, 1.5f, 2.7f, 1.55f,2.95f, 1.6f, 3.0f, 1.0f, 3.0f, 0.5f, 3.0f, 0.0f, 3.0f }; static const float fountain_normal[ FOUNTAIN_SIDE_POINTS*2 ] = { 1.0000f, 0.0000f, 0.6428f, 0.7660f, 0.3420f, 0.9397f, 1.0000f, 0.0000f, 1.0000f, 0.0000f, 0.3420f,-0.9397f, 0.4226f,-0.9063f, 0.5000f,-0.8660f, 0.7660f,-0.6428f, 0.9063f,-0.4226f, 0.0000f,1.00000f, 0.0000f,1.00000f, 0.0000f,1.00000f, 0.0000f,1.00000f }; //======================================================================== // DrawFountain() - Draw a fountain //======================================================================== void DrawFountain( void ) { static GLuint fountain_list = 0; double angle; float x, y; int m, n; // The first time, we build the fountain display list if( !fountain_list ) { // Start recording of a new display list fountain_list = glGenLists( 1 ); glNewList( fountain_list, GL_COMPILE_AND_EXECUTE ); // Set fountain material glMaterialfv( GL_FRONT, GL_DIFFUSE, fountain_diffuse ); glMaterialfv( GL_FRONT, GL_SPECULAR, fountain_specular ); glMaterialf( GL_FRONT, GL_SHININESS, fountain_shininess ); // Build fountain using triangle strips for( n = 0; n < FOUNTAIN_SIDE_POINTS-1; n ++ ) { glBegin( GL_TRIANGLE_STRIP ); for( m = 0; m <= FOUNTAIN_SWEEP_STEPS; m ++ ) { angle = (double) m * (2.0*M_PI/(double)FOUNTAIN_SWEEP_STEPS); x = (float) cos( angle ); y = (float) sin( angle ); // Draw triangle strip glNormal3f( x * fountain_normal[ n*2+2 ], y * fountain_normal[ n*2+2 ], fountain_normal[ n*2+3 ] ); glVertex3f( x * fountain_side[ n*2+2 ], y * fountain_side[ n*2+2 ], fountain_side[ n*2+3 ] ); glNormal3f( x * fountain_normal[ n*2 ], y * fountain_normal[ n*2 ], fountain_normal[ n*2+1 ] ); glVertex3f( x * fountain_side[ n*2 ], y * fountain_side[ n*2 ], fountain_side[ n*2+1 ] ); } glEnd(); } // End recording of display list glEndList(); } else { // Playback display list glCallList( fountain_list ); } } //======================================================================== // TesselateFloor() - Recursive function for building variable tesselated // floor //======================================================================== void TesselateFloor( float x1, float y1, float x2, float y2, int recursion ) { float delta, x, y; // Last recursion? if( recursion >= 5 ) { delta = 999999.0f; } else { x = (float) (fabs(x1) < fabs(x2) ? fabs(x1) : fabs(x2)); y = (float) (fabs(y1) < fabs(y2) ? fabs(y1) : fabs(y2)); delta = x*x + y*y; } // Recurse further? if( delta < 0.1f ) { x = (x1+x2) * 0.5f; y = (y1+y2) * 0.5f; TesselateFloor( x1,y1, x, y, recursion + 1 ); TesselateFloor( x,y1, x2, y, recursion + 1 ); TesselateFloor( x1, y, x,y2, recursion + 1 ); TesselateFloor( x, y, x2,y2, recursion + 1 ); } else { glTexCoord2f( x1*30.0f, y1*30.0f ); glVertex3f( x1*80.0f, y1*80.0f , 0.0f ); glTexCoord2f( x2*30.0f, y1*30.0f ); glVertex3f( x2*80.0f, y1*80.0f , 0.0f ); glTexCoord2f( x2*30.0f, y2*30.0f ); glVertex3f( x2*80.0f, y2*80.0f , 0.0f ); glTexCoord2f( x1*30.0f, y2*30.0f ); glVertex3f( x1*80.0f, y2*80.0f , 0.0f ); } } //======================================================================== // DrawFloor() - Draw floor. We builde the floor recursively, and let the // tesselation in the centre (near x,y=0,0) be high, while the selleation // around the edges be low. //======================================================================== void DrawFloor( void ) { static GLuint floor_list = 0; // Select floor texture if( !wireframe ) { glEnable( GL_TEXTURE_2D ); glBindTexture( GL_TEXTURE_2D, floor_tex_id ); } // The first time, we build the floor display list if( !floor_list ) { // Start recording of a new display list floor_list = glGenLists( 1 ); glNewList( floor_list, GL_COMPILE_AND_EXECUTE ); // Set floor material glMaterialfv( GL_FRONT, GL_DIFFUSE, floor_diffuse ); glMaterialfv( GL_FRONT, GL_SPECULAR, floor_specular ); glMaterialf( GL_FRONT, GL_SHININESS, floor_shininess ); // Draw floor as a bunch of triangle strips (high tesselation // improves lighting) glNormal3f( 0.0f, 0.0f, 1.0f ); glBegin( GL_QUADS ); TesselateFloor( -1.0f,-1.0f, 0.0f,0.0f, 0 ); TesselateFloor( 0.0f,-1.0f, 1.0f,0.0f, 0 ); TesselateFloor( 0.0f, 0.0f, 1.0f,1.0f, 0 ); TesselateFloor( -1.0f, 0.0f, 0.0f,1.0f, 0 ); glEnd(); // End recording of display list glEndList(); } else { // Playback display list glCallList( floor_list ); } glDisable( GL_TEXTURE_2D ); } //======================================================================== // SetupLights() - Position and configure light sources //======================================================================== void SetupLights( void ) { float l1pos[4], l1amb[4], l1dif[4], l1spec[4]; float l2pos[4], l2amb[4], l2dif[4], l2spec[4]; // Set light source 1 parameters l1pos[0] = 0.0f; l1pos[1] = -9.0f; l1pos[2] = 8.0f; l1pos[3] = 1.0f; l1amb[0] = 0.2f; l1amb[1] = 0.2f; l1amb[2] = 0.2f; l1amb[3] = 1.0f; l1dif[0] = 0.8f; l1dif[1] = 0.4f; l1dif[2] = 0.2f; l1dif[3] = 1.0f; l1spec[0] = 1.0f; l1spec[1] = 0.6f; l1spec[2] = 0.2f; l1spec[3] = 0.0f; // Set light source 2 parameters l2pos[0] = -15.0f; l2pos[1] = 12.0f; l2pos[2] = 1.5f; l2pos[3] = 1.0f; l2amb[0] = 0.0f; l2amb[1] = 0.0f; l2amb[2] = 0.0f; l2amb[3] = 1.0f; l2dif[0] = 0.2f; l2dif[1] = 0.4f; l2dif[2] = 0.8f; l2dif[3] = 1.0f; l2spec[0] = 0.2f; l2spec[1] = 0.6f; l2spec[2] = 1.0f; l2spec[3] = 0.0f; // Configure light sources in OpenGL glLightfv( GL_LIGHT1, GL_POSITION, l1pos ); glLightfv( GL_LIGHT1, GL_AMBIENT, l1amb ); glLightfv( GL_LIGHT1, GL_DIFFUSE, l1dif ); glLightfv( GL_LIGHT1, GL_SPECULAR, l1spec ); glLightfv( GL_LIGHT2, GL_POSITION, l2pos ); glLightfv( GL_LIGHT2, GL_AMBIENT, l2amb ); glLightfv( GL_LIGHT2, GL_DIFFUSE, l2dif ); glLightfv( GL_LIGHT2, GL_SPECULAR, l2spec ); glLightfv( GL_LIGHT3, GL_POSITION, glow_pos ); glLightfv( GL_LIGHT3, GL_DIFFUSE, glow_color ); glLightfv( GL_LIGHT3, GL_SPECULAR, glow_color ); // Enable light sources glEnable( GL_LIGHT1 ); glEnable( GL_LIGHT2 ); glEnable( GL_LIGHT3 ); } //======================================================================== // Draw() - Main rendering function //======================================================================== void Draw( double t ) { double xpos, ypos, zpos, angle_x, angle_y, angle_z; static double t_old = 0.0; float dt; // Calculate frame-to-frame delta time dt = (float)(t-t_old); t_old = t; // Setup viewport glViewport( 0, 0, width, height ); // Clear color and Z-buffer glClearColor( 0.1f, 0.1f, 0.1f, 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // Setup projection glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0, (double)width/(double)height, 1.0, 60.0 ); // Setup camera glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); // Rotate camera angle_x = 90.0 - 10.0; angle_y = 10.0 * sin( 0.3 * t ); angle_z = 10.0 * t; glRotated( -angle_x, 1.0, 0.0, 0.0 ); glRotated( -angle_y, 0.0, 1.0, 0.0 ); glRotated( -angle_z, 0.0, 0.0, 1.0 ); // Translate camera xpos = 15.0 * sin( (M_PI/180.0) * angle_z ) + 2.0 * sin( (M_PI/180.0) * 3.1 * t ); ypos = -15.0 * cos( (M_PI/180.0) * angle_z ) + 2.0 * cos( (M_PI/180.0) * 2.9 * t ); zpos = 4.0 + 2.0 * cos( (M_PI/180.0) * 4.9 * t ); glTranslated( -xpos, -ypos, -zpos ); // Enable face culling glFrontFace( GL_CCW ); glCullFace( GL_BACK ); glEnable( GL_CULL_FACE ); // Enable lighting SetupLights(); glEnable( GL_LIGHTING ); // Enable fog (dim details far away) glEnable( GL_FOG ); glFogi( GL_FOG_MODE, GL_EXP ); glFogf( GL_FOG_DENSITY, 0.05f ); glFogfv( GL_FOG_COLOR, fog_color ); // Draw floor DrawFloor(); // Enable Z-buffering glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); glDepthMask( GL_TRUE ); // Draw fountain DrawFountain(); // Disable fog & lighting glDisable( GL_LIGHTING ); glDisable( GL_FOG ); // Draw all particles (must be drawn after all solid objects have been // drawn!) DrawParticles( t, dt ); // Z-buffer not needed anymore glDisable( GL_DEPTH_TEST ); } //======================================================================== // Resize() - GLFW window resize callback function //======================================================================== void GLFWCALL Resize( int x, int y ) { width = x; height = y > 0 ? y : 1; // Prevent division by zero in aspect calc. } //======================================================================== // Input callback functions //======================================================================== void GLFWCALL KeyFun( int key, int action ) { if( action == GLFW_PRESS ) { switch( key ) { case GLFW_KEY_ESC: running = 0; break; case 'W': wireframe = !wireframe; glPolygonMode( GL_FRONT_AND_BACK, wireframe ? GL_LINE : GL_FILL ); break; default: break; } } } //======================================================================== // PhysicsThreadFun() - Thread for updating particle physics //======================================================================== void GLFWCALL PhysicsThreadFun( void *arg ) { while( running ) { // Lock mutex glfwLockMutex( thread_sync.particles_lock ); // Wait for particle drawing to be done while( running && thread_sync.p_frame > thread_sync.d_frame ) { glfwWaitCond( thread_sync.d_done, thread_sync.particles_lock, 0.1 ); } // No longer running? if( !running ) { break; } // Update particles ParticleEngine( thread_sync.t, thread_sync.dt ); // Update frame counter thread_sync.p_frame ++; // Unlock mutex and signal drawing thread glfwUnlockMutex( thread_sync.particles_lock ); glfwSignalCond( thread_sync.p_done ); } } //======================================================================== // main() //======================================================================== int main( int argc, char **argv ) { int i, frames, benchmark; double t0, t; GLFWthread physics_thread = 0; // Use multithreading by default, but don't benchmark multithreading = 1; benchmark = 0; // Check command line arguments for( i = 1; i < argc; i ++ ) { // Use benchmarking? if( strcmp( argv[i], "-b" ) == 0 ) { benchmark = 1; } // Force multithreading off? else if( strcmp( argv[i], "-s" ) == 0 ) { multithreading = 0; } // With a Finder launch on Mac OS X we get a bogus -psn_0_46268417 // kind of argument (actual numbers vary). Ignore it. else if( strncmp( argv[i], "-psn_", 5) == 0 ); // Usage else { if( strcmp( argv[i], "-?" ) != 0 ) { printf( "Unknonwn option %s\n\n", argv[ i ] ); } printf( "Usage: %s [options]\n", argv[ 0 ] ); printf( "\n"); printf( "Options:\n" ); printf( " -b Benchmark (run program for 60 s)\n" ); printf( " -s Run program as single thread (default is to use two threads)\n" ); printf( " -? Display this text\n" ); printf( "\n"); printf( "Program runtime controls:\n" ); printf( " w Toggle wireframe mode\n" ); printf( " ESC Exit program\n" ); exit( 0 ); } } // Initialize GLFW if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); exit( EXIT_FAILURE ); } // Open OpenGL fullscreen window if( !glfwOpenWindow( WIDTH, HEIGHT, 0,0,0,0, 16,0, GLFW_FULLSCREEN ) ) { fprintf( stderr, "Failed to open GLFW window\n" ); glfwTerminate(); exit( EXIT_FAILURE ); } // Set window title glfwSetWindowTitle( "Particle engine" ); // Disable VSync (we want to get as high FPS as possible!) glfwSwapInterval( 0 ); // Window resize callback function glfwSetWindowSizeCallback( Resize ); // Set keyboard input callback function glfwSetKeyCallback( KeyFun ); // Upload particle texture glGenTextures( 1, &particle_tex_id ); glBindTexture( GL_TEXTURE_2D, particle_tex_id ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexImage2D( GL_TEXTURE_2D, 0, GL_LUMINANCE, P_TEX_WIDTH, P_TEX_HEIGHT, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, particle_texture ); // Upload floor texture glGenTextures( 1, &floor_tex_id ); glBindTexture( GL_TEXTURE_2D, floor_tex_id ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexImage2D( GL_TEXTURE_2D, 0, GL_LUMINANCE, F_TEX_WIDTH, F_TEX_HEIGHT, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, floor_texture ); // Check if we have GL_EXT_separate_specular_color, and if so use it if( glfwExtensionSupported( "GL_EXT_separate_specular_color" ) ) { glLightModeli( GL_LIGHT_MODEL_COLOR_CONTROL_EXT, GL_SEPARATE_SPECULAR_COLOR_EXT ); } // Set filled polygon mode as default (not wireframe) glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); wireframe = 0; // Clear particle system for( i = 0; i < MAX_PARTICLES; i ++ ) { particles[ i ].active = 0; } min_age = 0.0f; // Set "running" flag running = 1; // Set initial times thread_sync.t = 0.0; thread_sync.dt = 0.001f; // Init threading if( multithreading ) { thread_sync.p_frame = 0; thread_sync.d_frame = 0; thread_sync.particles_lock = glfwCreateMutex(); thread_sync.p_done = glfwCreateCond(); thread_sync.d_done = glfwCreateCond(); physics_thread = glfwCreateThread( PhysicsThreadFun, NULL ); } // Main loop t0 = glfwGetTime(); frames = 0; while( running ) { // Get frame time t = glfwGetTime() - t0; // Draw... Draw( t ); // Swap buffers glfwSwapBuffers(); // Check if window was closed running = running && glfwGetWindowParam( GLFW_OPENED ); // Increase frame count frames ++; // End of benchmark? if( benchmark && t >= 60.0 ) { running = 0; } } t = glfwGetTime() - t0; // Wait for particle physics thread to die if( multithreading ) { glfwWaitThread( physics_thread, GLFW_WAIT ); } // Display profiling information printf( "%d frames in %.2f seconds = %.1f FPS", frames, t, (double)frames / t ); printf( " (multithreading %s)\n", multithreading ? "on" : "off" ); // Terminate OpenGL glfwTerminate(); exit( EXIT_SUCCESS ); } glfw-2.7.2/examples/mipmaps.c0000644000175000017500000000707611275554034017123 0ustar elmindredaelmindreda//======================================================================== // This is an example program for the GLFW library // // It shows texture loading with mipmap generation and rendering with // trilienar texture filtering //======================================================================== #include #include #include int main( void ) { int width, height, x; double time; GLboolean running; GLuint textureID; char* texturePath = "mipmaps.tga"; // Initialise GLFW if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); exit( EXIT_FAILURE ); } // Open OpenGL window if( !glfwOpenWindow( 640, 480, 0,0,0,0, 0,0, GLFW_WINDOW ) ) { fprintf( stderr, "Failed to open GLFW window\n" ); glfwTerminate(); exit( EXIT_FAILURE ); } glfwSetWindowTitle( "Trilinear interpolation" ); // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Enable vertical sync (on cards that support it) glfwSwapInterval( 1 ); // Generate and bind our texture ID glGenTextures( 1, &textureID ); glBindTexture( GL_TEXTURE_2D, textureID ); // Load texture from file into video memory, including mipmap levels if( !glfwLoadTexture2D( texturePath, GLFW_BUILD_MIPMAPS_BIT ) ) { fprintf( stderr, "Failed to load texture %s\n", texturePath ); glfwTerminate(); exit( EXIT_FAILURE ); } // Use trilinear interpolation (GL_LINEAR_MIPMAP_LINEAR) glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); // Enable plain 2D texturing glEnable( GL_TEXTURE_2D ); running = GL_TRUE; while( running ) { // Get time and mouse position time = glfwGetTime(); glfwGetMousePos( &x, NULL ); // Get window size (may be different than the requested size) glfwGetWindowSize( &width, &height ); height = height > 0 ? height : 1; // Set viewport glViewport( 0, 0, width, height ); // Clear color buffer glClearColor( 0.0f, 0.0f, 0.0f, 0.0f); glClear( GL_COLOR_BUFFER_BIT ); // Select and setup the projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0f, (GLfloat)width / (GLfloat)height, 1.0f, 50.0f ); // Select and setup the modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 3.0f, -20.0f, // Eye-position 0.0f, -4.0f, -11.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector // Draw a textured quad glRotatef( 0.05f * (GLfloat)x + (GLfloat)time * 5.0f, 0.0f, 1.0f, 0.0f ); glBegin( GL_QUADS ); glTexCoord2f( -20.0f, 20.0f ); glVertex3f( -50.0f, 0.0f, -50.0f ); glTexCoord2f( 20.0f, 20.0f ); glVertex3f( 50.0f, 0.0f, -50.0f ); glTexCoord2f( 20.0f, -20.0f ); glVertex3f( 50.0f, 0.0f, 50.0f ); glTexCoord2f( -20.0f, -20.0f ); glVertex3f( -50.0f, 0.0f, 50.0f ); glEnd(); // Swap buffers glfwSwapBuffers(); // Check if the ESC key was pressed or the window was closed running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); } // Close OpenGL window and terminate GLFW glfwTerminate(); exit( EXIT_SUCCESS ); } glfw-2.7.2/examples/Makefile.win32.cygwin0000644000175000017500000000345511435220232021172 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Windows using Cygwin #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.win32.cygwin ########################################################################## CC = gcc CFLAGS = -I../include -Wall -O2 -mwin32 -mno-cygwin LIB = ../lib/win32/libglfw.a LFLAGS = -mno-cygwin $(LIB) -lglu32 -lopengl32 WINDOWS = -mwindows -e _mainCRTStartup CONSOLE = -mconsole BINARIES = triangle.exe listmodes.exe mthello.exe pong3d.exe mtbench.exe \ particles.exe splitview.exe mipmaps.exe gears.exe boing.exe \ wave.exe heightmap.exe all: $(BINARIES) triangle.exe: triangle.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) triangle.c $(LFLAGS) -o $@ listmodes.exe: listmodes.c $(LIB) $(CC) $(CFLAGS) $(CONSOLE) listmodes.c $(LFLAGS) -o $@ mthello.exe: mthello.c $(LIB) $(CC) $(CFLAGS) $(CONSOLE) mthello.c $(LFLAGS) -o $@ pong3d.exe: pong3d.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) pong3d.c $(LFLAGS) -o $@ mtbench.exe: mtbench.c $(LIB) $(CC) $(CFLAGS) $(CONSOLE) mtbench.c $(LFLAGS) -o $@ particles.exe: particles.c $(LIB) $(CC) $(CFLAGS) $(CONSOLE) particles.c $(LFLAGS) -o $@ splitview.exe: splitview.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) splitview.c $(LFLAGS) -o $@ mipmaps.exe: mipmaps.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) mipmaps.c $(LFLAGS) -o $@ gears.exe: gears.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) gears.c $(LFLAGS) -o $@ boing.exe: boing.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) boing.c $(LFLAGS) -o $@ wave.exe: wave.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) wave.c $(LFLAGS) -o $@ heightmap.exe: heightmap.c getopt.c $(LIB) $(CC) $(CFLAGS) $(WINDOWS) heightmap.c getopt.c $(LFLAGS) -o $@ clean: rm -f $(BINARIES) glfw-2.7.2/examples/Makefile.win32.cross-mgw0000644000175000017500000000370211435220232021606 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs for Windows on Unix using MinGW32 #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.win32.cross-mgw ########################################################################## TARGET ?= i586-mingw32msvc- CC = gcc CFLAGS = -I../include -Wall -O2 LIB = ../lib/win32/libglfw.a LFLAGS = $(LIB) -lglu32 -lopengl32 WINDOWS = -mwindows -e _mainCRTStartup CONSOLE = -mconsole BINARIES = triangle.exe listmodes.exe mthello.exe pong3d.exe mtbench.exe \ particles.exe splitview.exe mipmaps.exe gears.exe boing.exe \ wave.exe heightmap.exe all: $(BINARIES) triangle.exe: triangle.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) triangle.c $(LFLAGS) -o $@ listmodes.exe: listmodes.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) listmodes.c $(LFLAGS) -o $@ mthello.exe: mthello.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) mthello.c $(LFLAGS) -o $@ pong3d.exe: pong3d.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) pong3d.c $(LFLAGS) -lm -o $@ mtbench.exe: mtbench.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) mtbench.c $(LFLAGS) -o $@ particles.exe: particles.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(CONSOLE) particles.c $(LFLAGS) -lm -o $@ splitview.exe: splitview.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) splitview.c $(LFLAGS) -lm -o $@ mipmaps.exe: mipmaps.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) mipmaps.c $(LFLAGS) -lm -o $@ gears.exe: gears.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) gears.c $(LFLAGS) -lm -o $@ boing.exe: boing.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) boing.c $(LFLAGS) -lm -o $@ wave.exe: wave.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) wave.c $(LFLAGS) -lm -o $@ heightmap.exe: heightmap.c getopt.c $(LIB) $(TARGET)$(CC) $(CFLAGS) $(WINDOWS) heightmap.c getopt.c $(LFLAGS) -lm -o $@ clean: rm -f $(BINARIES) glfw-2.7.2/examples/triangle.c0000644000175000017500000000536711432547217017263 0ustar elmindredaelmindreda//======================================================================== // This is a small test application for GLFW. // The program opens a window (640x480), and renders a spinning colored // triangle (it is controlled with both the GLFW timer and the mouse). //======================================================================== #include #include #include int main( void ) { int width, height, x; double t; // Initialise GLFW if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); exit( EXIT_FAILURE ); } // Open a window and create its OpenGL context if( !glfwOpenWindow( 640, 480, 0,0,0,0, 0,0, GLFW_WINDOW ) ) { fprintf( stderr, "Failed to open GLFW window\n" ); glfwTerminate(); exit( EXIT_FAILURE ); } glfwSetWindowTitle( "Spinning Triangle" ); // Ensure we can capture the escape key being pressed below glfwEnable( GLFW_STICKY_KEYS ); // Enable vertical sync (on cards that support it) glfwSwapInterval( 1 ); do { t = glfwGetTime(); glfwGetMousePos( &x, NULL ); // Get window size (may be different than the requested size) glfwGetWindowSize( &width, &height ); // Special case: avoid division by zero below height = height > 0 ? height : 1; glViewport( 0, 0, width, height ); // Clear color buffer to black glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); glClear( GL_COLOR_BUFFER_BIT ); // Select and setup the projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0f, (GLfloat)width/(GLfloat)height, 1.0f, 100.0f ); // Select and setup the modelview matrix glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 1.0f, 0.0f, // Eye-position 0.0f, 20.0f, 0.0f, // View-point 0.0f, 0.0f, 1.0f ); // Up-vector // Draw a rotating colorful triangle glTranslatef( 0.0f, 14.0f, 0.0f ); glRotatef( 0.3f*(GLfloat)x + (GLfloat)t*100.0f, 0.0f, 0.0f, 1.0f ); glBegin( GL_TRIANGLES ); glColor3f( 1.0f, 0.0f, 0.0f ); glVertex3f( -5.0f, 0.0f, -4.0f ); glColor3f( 0.0f, 1.0f, 0.0f ); glVertex3f( 5.0f, 0.0f, -4.0f ); glColor3f( 0.0f, 0.0f, 1.0f ); glVertex3f( 0.0f, 0.0f, 6.0f ); glEnd(); // Swap buffers glfwSwapBuffers(); } // Check if the ESC key was pressed or the window was closed while( glfwGetKey( GLFW_KEY_ESC ) != GLFW_PRESS && glfwGetWindowParam( GLFW_OPENED ) ); // Close OpenGL window and terminate GLFW glfwTerminate(); exit( EXIT_SUCCESS ); } glfw-2.7.2/examples/splitview.c0000644000175000017500000003367011433543741017501 0ustar elmindredaelmindreda//======================================================================== // This is an example program for the GLFW library // // The program uses a "split window" view, rendering four views of the // same scene in one window (e.g. uesful for 3D modelling software). This // demo uses scissors to separete the four different rendering areas from // each other. // // (If the code seems a little bit strange here and there, it may be // because I am not a friend of orthogonal projections) //======================================================================== #include #include #include #include #ifndef M_PI #define M_PI 3.14159265358979323846 #endif //======================================================================== // Global variables //======================================================================== // Mouse position static int xpos = 0, ypos = 0; // Window size static int width, height; // Active view: 0 = none, 1 = upper left, 2 = upper right, 3 = lower left, // 4 = lower right static int active_view = 0; // Rotation around each axis static int rot_x = 0, rot_y = 0, rot_z = 0; // Do redraw? static int do_redraw = 1; //======================================================================== // Draw a solid torus (use a display list for the model) //======================================================================== #define TORUS_MAJOR 1.5 #define TORUS_MINOR 0.5 #define TORUS_MAJOR_RES 32 #define TORUS_MINOR_RES 32 static void drawTorus( void ) { static GLuint torus_list = 0; int i, j, k; double s, t, x, y, z, nx, ny, nz, scale, twopi; if( !torus_list ) { // Start recording displaylist torus_list = glGenLists( 1 ); glNewList( torus_list, GL_COMPILE_AND_EXECUTE ); // Draw torus twopi = 2.0 * M_PI; for( i = 0; i < TORUS_MINOR_RES; i++ ) { glBegin( GL_QUAD_STRIP ); for( j = 0; j <= TORUS_MAJOR_RES; j++ ) { for( k = 1; k >= 0; k-- ) { s = (i + k) % TORUS_MINOR_RES + 0.5; t = j % TORUS_MAJOR_RES; // Calculate point on surface x = (TORUS_MAJOR+TORUS_MINOR*cos(s*twopi/TORUS_MINOR_RES))*cos(t*twopi/TORUS_MAJOR_RES); y = TORUS_MINOR * sin(s * twopi / TORUS_MINOR_RES); z = (TORUS_MAJOR+TORUS_MINOR*cos(s*twopi/TORUS_MINOR_RES))*sin(t*twopi/TORUS_MAJOR_RES); // Calculate surface normal nx = x - TORUS_MAJOR*cos(t*twopi/TORUS_MAJOR_RES); ny = y; nz = z - TORUS_MAJOR*sin(t*twopi/TORUS_MAJOR_RES); scale = 1.0 / sqrt( nx*nx + ny*ny + nz*nz ); nx *= scale; ny *= scale; nz *= scale; glNormal3f( (float)nx, (float)ny, (float)nz ); glVertex3f( (float)x, (float)y, (float)z ); } } glEnd(); } // Stop recording displaylist glEndList(); } else { // Playback displaylist glCallList( torus_list ); } } //======================================================================== // Draw the scene (a rotating torus) //======================================================================== static void drawScene( void ) { const GLfloat model_diffuse[4] = {1.0f, 0.8f, 0.8f, 1.0f}; const GLfloat model_specular[4] = {0.6f, 0.6f, 0.6f, 1.0f}; const GLfloat model_shininess = 20.0f; glPushMatrix(); // Rotate the object glRotatef( (GLfloat)rot_x*0.5f, 1.0f, 0.0f, 0.0f ); glRotatef( (GLfloat)rot_y*0.5f, 0.0f, 1.0f, 0.0f ); glRotatef( (GLfloat)rot_z*0.5f, 0.0f, 0.0f, 1.0f ); // Set model color (used for orthogonal views, lighting disabled) glColor4fv( model_diffuse ); // Set model material (used for perspective view, lighting enabled) glMaterialfv( GL_FRONT, GL_DIFFUSE, model_diffuse ); glMaterialfv( GL_FRONT, GL_SPECULAR, model_specular ); glMaterialf( GL_FRONT, GL_SHININESS, model_shininess ); // Draw torus drawTorus(); glPopMatrix(); } //======================================================================== // Draw a 2D grid (used for orthogonal views) //======================================================================== static void drawGrid( float scale, int steps ) { int i; float x, y; glPushMatrix(); // Set background to some dark bluish grey glClearColor( 0.05f, 0.05f, 0.2f, 0.0f); glClear( GL_COLOR_BUFFER_BIT ); // Setup modelview matrix (flat XY view) glLoadIdentity(); gluLookAt( 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ); // We don't want to update the Z-buffer glDepthMask( GL_FALSE ); // Set grid color glColor3f( 0.0f, 0.5f, 0.5f ); glBegin( GL_LINES ); // Horizontal lines x = scale * 0.5f * (float)(steps-1); y = -scale * 0.5f * (float)(steps-1); for( i = 0; i < steps; i ++ ) { glVertex3f( -x, y, 0.0f ); glVertex3f( x, y, 0.0f ); y += scale; } // Vertical lines x = -scale * 0.5f * (float)(steps-1); y = scale * 0.5f * (float)(steps-1); for( i = 0; i < steps; i ++ ) { glVertex3f( x, -y, 0.0f ); glVertex3f( x, y, 0.0f ); x += scale; } glEnd(); // Enable Z-buffer writing again glDepthMask( GL_TRUE ); glPopMatrix(); } //======================================================================== // Draw all views //======================================================================== static void drawAllViews( void ) { const GLfloat light_position[4] = {0.0f, 8.0f, 8.0f, 1.0f}; const GLfloat light_diffuse[4] = {1.0f, 1.0f, 1.0f, 1.0f}; const GLfloat light_specular[4] = {1.0f, 1.0f, 1.0f, 1.0f}; const GLfloat light_ambient[4] = {0.2f, 0.2f, 0.3f, 1.0f}; double aspect; // Calculate aspect of window if( height > 0 ) { aspect = (double)width / (double)height; } else { aspect = 1.0; } // Clear screen glClearColor( 0.0f, 0.0f, 0.0f, 0.0f); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); // Enable scissor test glEnable( GL_SCISSOR_TEST ); // Enable depth test glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL ); // ** ORTHOGONAL VIEWS ** // For orthogonal views, use wireframe rendering glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); // Enable line anti-aliasing glEnable( GL_LINE_SMOOTH ); glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); // Setup orthogonal projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( -3.0*aspect, 3.0*aspect, -3.0, 3.0, 1.0, 50.0 ); // Upper left view (TOP VIEW) glViewport( 0, height/2, width/2, height/2 ); glScissor( 0, height/2, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 10.0f, 1e-3f, // Eye-position (above) 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector drawGrid( 0.5, 12 ); drawScene(); // Lower left view (FRONT VIEW) glViewport( 0, 0, width/2, height/2 ); glScissor( 0, 0, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0f, 0.0f, 10.0f, // Eye-position (in front of) 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector drawGrid( 0.5, 12 ); drawScene(); // Lower right view (SIDE VIEW) glViewport( width/2, 0, width/2, height/2 ); glScissor( width/2, 0, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 10.0f, 0.0f, 0.0f, // Eye-position (to the right) 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector drawGrid( 0.5, 12 ); drawScene(); // Disable line anti-aliasing glDisable( GL_LINE_SMOOTH ); glDisable( GL_BLEND ); // ** PERSPECTIVE VIEW ** // For perspective view, use solid rendering glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); // Enable face culling (faster rendering) glEnable( GL_CULL_FACE ); glCullFace( GL_BACK ); glFrontFace( GL_CW ); // Setup perspective projection matrix glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 65.0f, aspect, 1.0f, 50.0f ); // Upper right view (PERSPECTIVE VIEW) glViewport( width/2, height/2, width/2, height/2 ); glScissor( width/2, height/2, width/2, height/2 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 3.0f, 1.5f, 3.0f, // Eye-position 0.0f, 0.0f, 0.0f, // View-point 0.0f, 1.0f, 0.0f ); // Up-vector // Configure and enable light source 1 glLightfv( GL_LIGHT1, GL_POSITION, light_position ); glLightfv( GL_LIGHT1, GL_AMBIENT, light_ambient ); glLightfv( GL_LIGHT1, GL_DIFFUSE, light_diffuse ); glLightfv( GL_LIGHT1, GL_SPECULAR, light_specular ); glEnable( GL_LIGHT1 ); glEnable( GL_LIGHTING ); // Draw scene drawScene(); // Disable lighting glDisable( GL_LIGHTING ); // Disable face culling glDisable( GL_CULL_FACE ); // Disable depth test glDisable( GL_DEPTH_TEST ); // Disable scissor test glDisable( GL_SCISSOR_TEST ); // Draw a border around the active view if( active_view > 0 && active_view != 2 ) { glViewport( 0, 0, width, height ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0.0, 2.0, 0.0, 2.0, 0.0, 1.0 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glColor3f( 1.0f, 1.0f, 0.6f ); glTranslatef( (GLfloat) ((active_view - 1) & 1), (GLfloat) (1 - (active_view - 1) / 2), 0.0f ); glBegin( GL_LINE_STRIP ); glVertex2i( 0, 0 ); glVertex2i( 1, 0 ); glVertex2i( 1, 1 ); glVertex2i( 0, 1 ); glVertex2i( 0, 0 ); glEnd(); } } //======================================================================== // Window size callback function //======================================================================== static void GLFWCALL windowSizeFun( int w, int h ) { width = w; height = h > 0 ? h : 1; do_redraw = 1; } //======================================================================== // Window refresh callback function //======================================================================== static void GLFWCALL windowRefreshFun( void ) { do_redraw = 1; } //======================================================================== // Mouse position callback function //======================================================================== static void GLFWCALL mousePosFun( int x, int y ) { // Depending on which view was selected, rotate around different axes switch( active_view ) { case 1: rot_x += y - ypos; rot_z += x - xpos; do_redraw = 1; break; case 3: rot_x += y - ypos; rot_y += x - xpos; do_redraw = 1; break; case 4: rot_y += x - xpos; rot_z += y - ypos; do_redraw = 1; break; default: // Do nothing for perspective view, or if no view is selected break; } // Remember mouse position xpos = x; ypos = y; } //======================================================================== // Mouse button callback function //======================================================================== static void GLFWCALL mouseButtonFun( int button, int action ) { // Button clicked? if( ( button == GLFW_MOUSE_BUTTON_LEFT ) && action == GLFW_PRESS ) { // Detect which of the four views was clicked active_view = 1; if( xpos >= width/2 ) { active_view += 1; } if( ypos >= height/2 ) { active_view += 2; } } // Button released? else if( button == GLFW_MOUSE_BUTTON_LEFT ) { // Deselect any previously selected view active_view = 0; } do_redraw = 1; } //======================================================================== // main() //======================================================================== int main( void ) { // Initialise GLFW if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); exit( EXIT_FAILURE ); } // Open OpenGL window if( !glfwOpenWindow( 500, 500, 0,0,0,0, 16,0, GLFW_WINDOW ) ) { fprintf( stderr, "Failed to open GLFW window\n" ); glfwTerminate(); exit( EXIT_FAILURE ); } // Enable vsync glfwSwapInterval( 1 ); // Set window title glfwSetWindowTitle( "Split view demo" ); // Enable sticky keys glfwEnable( GLFW_STICKY_KEYS ); // Enable mouse cursor (only needed for fullscreen mode) glfwEnable( GLFW_MOUSE_CURSOR ); // Disable automatic event polling glfwDisable( GLFW_AUTO_POLL_EVENTS ); // Set callback functions glfwSetWindowSizeCallback( windowSizeFun ); glfwSetWindowRefreshCallback( windowRefreshFun ); glfwSetMousePosCallback( mousePosFun ); glfwSetMouseButtonCallback( mouseButtonFun ); // Main loop do { // Only redraw if we need to if( do_redraw ) { // Draw all views drawAllViews(); // Swap buffers glfwSwapBuffers(); do_redraw = 0; } // Wait for new events glfwWaitEvents(); } // Check if the ESC key was pressed or the window was closed while( glfwGetKey( GLFW_KEY_ESC ) != GLFW_PRESS && glfwGetWindowParam( GLFW_OPENED ) ); // Close OpenGL window and terminate GLFW glfwTerminate(); exit( EXIT_SUCCESS ); } glfw-2.7.2/examples/Makefile.win32.mingw0000644000175000017500000000357511435220232021016 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Windows using bare MinGW #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.win32.mingw ########################################################################## CC = gcc CFLAGS = -I../include -Wall -O2 LIB = ../lib/win32/libglfw.a LFLAGS = $(LIB) -lglu32 -lopengl32 -s WINDOWS = -mwindows CONSOLE = -mconsole HEADER = ../include/GL/glfw.h all: triangle.exe listmodes.exe mthello.exe pong3d.exe mtbench.exe \ particles.exe splitview.exe mipmaps.exe gears.exe boing.exe \ wave.exe heightmap.exe triangle.exe: triangle.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) triangle.c $(LFLAGS) -o $@ listmodes.exe: listmodes.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) listmodes.c $(LFLAGS) -o $@ mthello.exe: mthello.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) mthello.c $(LFLAGS) -o $@ pong3d.exe: pong3d.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) pong3d.c $(LFLAGS) -lm -o $@ mtbench.exe: mtbench.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) mtbench.c $(LFLAGS) -o $@ particles.exe: particles.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(CONSOLE) particles.c $(LFLAGS) -lm -o $@ splitview.exe: splitview.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) splitview.c $(LFLAGS) -lm -o $@ mipmaps.exe: mipmaps.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) mipmaps.c $(LFLAGS) -lm -o $@ gears.exe: gears.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) gears.c $(LFLAGS) -lm -o $@ boing.exe: boing.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) boing.c $(LFLAGS) -lm -o $@ wave.exe: wave.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) wave.c $(LFLAGS) -lm -o $@ heightmap.exe: heightmap.c getopt.c $(LIB) $(HEADER) $(CC) $(CFLAGS) $(WINDOWS) heightmap.c getopt.c $(LFLAGS) -lm -o $@ glfw-2.7.2/examples/Makefile.carbon0000644000175000017500000000535111400255654020202 0ustar elmindredaelmindreda########################################################################## # Makefile for GLFW test programs on Mac OS X using Apple GCC. #------------------------------------------------------------------------- # To compile the test files using this makefile, run: # make -f Makefile.carbon ########################################################################## # Compiler settings CC = gcc CFLAGS = -I../include -m32 # Linker settings LIB = ../lib/carbon/libglfw.a HEADER = ../include/GL/glfw.h LFLAGS = $(LIB) -framework AGL -framework OpenGL -framework Carbon -m32 # Default: Build all tests all: Triangle.app/Contents/MacOS/Triangle \ listmodes \ mthello \ Pong3D.app/Contents/MacOS/Pong3D \ mtbench \ Particles.app/Contents/MacOS/Particles \ SplitView.app/Contents/MacOS/SplitView \ Mipmaps.app/Contents/MacOS/Mipmaps \ Gears.app/Contents/MacOS/Gears \ Boing.app/Contents/MacOS/Boing \ Wave.app/Contents/MacOS/Wave Triangle.app/Contents/MacOS/Triangle: triangle.c $(LIB) $(HEADER) /bin/sh bundle.sh Triangle $(CC) $(CFLAGS) triangle.c $(LFLAGS) -o Triangle.app/Contents/MacOS/Triangle listmodes: listmodes.c $(LIB) $(HEADER) $(CC) $(CFLAGS) listmodes.c $(LFLAGS) -o listmodes mthello: mthello.c $(LIB) $(HEADER) $(CC) $(CFLAGS) mthello.c $(LFLAGS) -o mthello Pong3D.app/Contents/MacOS/Pong3D: pong3d.c $(LIB) $(HEADER) /bin/sh bundle.sh Pong3D cp pong3d_*.tga Pong3D.app/Contents/Resources/ $(CC) $(CFLAGS) pong3d.c $(LFLAGS) -o Pong3D.app/Contents/MacOS/Pong3D mtbench: mtbench.c $(LIB) $(HEADER) $(CC) $(CFLAGS) mtbench.c $(LFLAGS) -o mtbench Particles.app/Contents/MacOS/Particles: particles.c $(LIB) $(HEADER) /bin/sh bundle.sh Particles $(CC) $(CFLAGS) particles.c $(LFLAGS) -o Particles.app/Contents/MacOS/Particles SplitView.app/Contents/MacOS/SplitView: splitview.c $(LIB) $(HEADER) /bin/sh bundle.sh SplitView $(CC) $(CFLAGS) splitview.c $(LFLAGS) -o SplitView.app/Contents/MacOS/SplitView Mipmaps.app/Contents/MacOS/Mipmaps: mipmaps.c $(LIB) $(HEADER) /bin/sh bundle.sh Mipmaps cp mipmaps.tga Mipmaps.app/Contents/Resources/ $(CC) $(CFLAGS) mipmaps.c $(LFLAGS) -o Mipmaps.app/Contents/MacOS/Mipmaps Gears.app/Contents/MacOS/Gears: gears.c $(LIB) $(HEADER) /bin/sh bundle.sh Gears $(CC) $(CFLAGS) gears.c $(LFLAGS) -o Gears.app/Contents/MacOS/Gears Boing.app/Contents/MacOS/Boing: boing.c $(LIB) $(HEADER) /bin/sh bundle.sh Boing $(CC) $(CFLAGS) boing.c $(LFLAGS) -o Boing.app/Contents/MacOS/Boing Wave.app/Contents/MacOS/Wave: wave.c $(LIB) $(HEADER) /bin/sh bundle.sh Wave $(CC) $(CFLAGS) wave.c $(LFLAGS) -o Wave.app/Contents/MacOS/Wave clean: rm -rf Triangle.app listmodes mthello Pong3D.app mtbench Particles.app \ SplitView.app Mipmaps.app Gears.app Boing.app Wave.app glfw-2.7.2/examples/getopt.c0000644000175000017500000001453711435216544016756 0ustar elmindredaelmindreda/***************************************************************************** * getopt.c - competent and free getopt library. * $Header: /cvsroot/freegetopt/freegetopt/getopt.c,v 1.2 2003/10/26 03:10:20 vindaci Exp $ * * Copyright (c)2002-2003 Mark K. Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the original author of this software nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ #include #include #include #include "getopt.h" /* 2009-10-12 Camilla Berglund * * Removed unused global static variable 'ID'. */ char* optarg = NULL; int optind = 0; int opterr = 1; int optopt = '?'; static char** prev_argv = NULL; /* Keep a copy of argv and argc to */ static int prev_argc = 0; /* tell if getopt params change */ static int argv_index = 0; /* Option we're checking */ static int argv_index2 = 0; /* Option argument we're checking */ static int opt_offset = 0; /* Index into compounded "-option" */ static int dashdash = 0; /* True if "--" option reached */ static int nonopt = 0; /* How many nonopts we've found */ static void increment_index() { /* Move onto the next option */ if(argv_index < argv_index2) { while(prev_argv[++argv_index] && prev_argv[argv_index][0] != '-' && argv_index < argv_index2+1); } else argv_index++; opt_offset = 1; } /* * Permutes argv[] so that the argument currently being processed is moved * to the end. */ static int permute_argv_once() { /* Movability check */ if(argv_index + nonopt >= prev_argc) return 1; /* Move the current option to the end, bring the others to front */ else { char* tmp = prev_argv[argv_index]; /* Move the data */ memmove(&prev_argv[argv_index], &prev_argv[argv_index+1], sizeof(char**) * (prev_argc - argv_index - 1)); prev_argv[prev_argc - 1] = tmp; nonopt++; return 0; } } int getopt(int argc, char** argv, char* optstr) { int c = 0; /* If we have new argv, reinitialize */ if(prev_argv != argv || prev_argc != argc) { /* Initialize variables */ prev_argv = argv; prev_argc = argc; argv_index = 1; argv_index2 = 1; opt_offset = 1; dashdash = 0; nonopt = 0; } /* Jump point in case we want to ignore the current argv_index */ getopt_top: /* Misc. initializations */ optarg = NULL; /* Dash-dash check */ if(argv[argv_index] && !strcmp(argv[argv_index], "--")) { dashdash = 1; increment_index(); } /* If we're at the end of argv, that's it. */ if(argv[argv_index] == NULL) { c = -1; } /* Are we looking at a string? Single dash is also a string */ else if(dashdash || argv[argv_index][0] != '-' || !strcmp(argv[argv_index], "-")) { /* If we want a string... */ if(optstr[0] == '-') { c = 1; optarg = argv[argv_index]; increment_index(); } /* If we really don't want it (we're in POSIX mode), we're done */ else if(optstr[0] == '+' || getenv("POSIXLY_CORRECT")) { c = -1; /* Everything else is a non-opt argument */ nonopt = argc - argv_index; } /* If we mildly don't want it, then move it back */ else { if(!permute_argv_once()) goto getopt_top; else c = -1; } } /* Otherwise we're looking at an option */ else { char* opt_ptr = NULL; /* Grab the option */ c = argv[argv_index][opt_offset++]; /* Is the option in the optstr? */ if(optstr[0] == '-') opt_ptr = strchr(optstr+1, c); else opt_ptr = strchr(optstr, c); /* Invalid argument */ if(!opt_ptr) { if(opterr) { fprintf(stderr, "%s: invalid option -- %c\n", argv[0], c); } optopt = c; c = '?'; /* Move onto the next option */ increment_index(); } /* Option takes argument */ else if(opt_ptr[1] == ':') { /* ie, -oARGUMENT, -xxxoARGUMENT, etc. */ if(argv[argv_index][opt_offset] != '\0') { optarg = &argv[argv_index][opt_offset]; increment_index(); } /* ie, -o ARGUMENT (only if it's a required argument) */ else if(opt_ptr[2] != ':') { /* One of those "you're not expected to understand this" moment */ if(argv_index2 < argv_index) argv_index2 = argv_index; while(argv[++argv_index2] && argv[argv_index2][0] == '-'); optarg = argv[argv_index2]; /* Don't cross into the non-option argument list */ if(argv_index2 + nonopt >= prev_argc) optarg = NULL; /* Move onto the next option */ increment_index(); } else { /* Move onto the next option */ increment_index(); } /* In case we got no argument for an option with required argument */ if(optarg == NULL && opt_ptr[2] != ':') { optopt = c; c = '?'; if(opterr) { fprintf(stderr,"%s: option requires an argument -- %c\n", argv[0], optopt); } } } /* Option does not take argument */ else { /* Next argv_index */ if(argv[argv_index][opt_offset] == '\0') { increment_index(); } } } /* Calculate optind */ if(c == -1) { optind = argc - nonopt; } else { optind = argv_index; } return c; } /* vim:ts=3 */ glfw-2.7.2/examples/boing.c0000644000175000017500000004236411275554034016552 0ustar elmindredaelmindreda/***************************************************************************** * Title: GLBoing * Desc: Tribute to Amiga Boing. * Author: Jim Brooks * Original Amiga authors were R.J. Mical and Dale Luck. * GLFW conversion by Marcus Geelnard * Notes: - 360' = 2*PI [radian] * * - Distances between objects are created by doing a relative * Z translations. * * - Although OpenGL enticingly supports alpha-blending, * the shadow of the original Boing didn't affect the color * of the grid. * * - [Marcus] Changed timing scheme from interval driven to frame- * time based animation steps (which results in much smoother * movement) * * History of Amiga Boing: * * Boing was demonstrated on the prototype Amiga (codenamed "Lorraine") in * 1985. According to legend, it was written ad-hoc in one night by * R. J. Mical and Dale Luck. Because the bouncing ball animation was so fast * and smooth, attendees did not believe the Amiga prototype was really doing * the rendering. Suspecting a trick, they began looking around the booth for * a hidden computer or VCR. *****************************************************************************/ #include #include #include #include /***************************************************************************** * Various declarations and macros *****************************************************************************/ /* Prototypes */ void init( void ); void display( void ); void GLFWCALL reshape( int w, int h ); void DrawBoingBall( void ); void BounceBall( double dt ); void DrawBoingBallBand( GLfloat long_lo, GLfloat long_hi ); void DrawGrid( void ); #define RADIUS 70.f #define STEP_LONGITUDE 22.5f /* 22.5 makes 8 bands like original Boing */ #define STEP_LATITUDE 22.5f #define DIST_BALL (RADIUS * 2.f + RADIUS * 0.1f) #define VIEW_SCENE_DIST (DIST_BALL * 3.f + 200.f)/* distance from viewer to middle of boing area */ #define GRID_SIZE (RADIUS * 4.5f) /* length (width) of grid */ #define BOUNCE_HEIGHT (RADIUS * 2.1f) #define BOUNCE_WIDTH (RADIUS * 2.1f) #define SHADOW_OFFSET_X -20.f #define SHADOW_OFFSET_Y 10.f #define SHADOW_OFFSET_Z 0.f #define WALL_L_OFFSET 0.f #define WALL_R_OFFSET 5.f /* Animation speed (50.0 mimics the original GLUT demo speed) */ #define ANIMATION_SPEED 50.f /* Maximum allowed delta time per physics iteration */ #define MAX_DELTA_T 0.02f /* Draw ball, or its shadow */ typedef enum { DRAW_BALL, DRAW_BALL_SHADOW } DRAW_BALL_ENUM; /* Vertex type */ typedef struct {float x; float y; float z;} vertex_t; /* Global vars */ GLfloat deg_rot_y = 0.f; GLfloat deg_rot_y_inc = 2.f; GLfloat ball_x = -RADIUS; GLfloat ball_y = -RADIUS; GLfloat ball_x_inc = 1.f; GLfloat ball_y_inc = 2.f; DRAW_BALL_ENUM drawBallHow; double t; double t_old = 0.f; double dt; /* Random number generator */ #ifndef RAND_MAX #define RAND_MAX 4095 #endif /* PI */ #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif /***************************************************************************** * Truncate a degree. *****************************************************************************/ GLfloat TruncateDeg( GLfloat deg ) { if ( deg >= 360.f ) return (deg - 360.f); else return deg; } /***************************************************************************** * Convert a degree (360-based) into a radian. * 360' = 2 * PI *****************************************************************************/ double deg2rad( double deg ) { return deg / 360 * (2 * M_PI); } /***************************************************************************** * 360' sin(). *****************************************************************************/ double sin_deg( double deg ) { return sin( deg2rad( deg ) ); } /***************************************************************************** * 360' cos(). *****************************************************************************/ double cos_deg( double deg ) { return cos( deg2rad( deg ) ); } /***************************************************************************** * Compute a cross product (for a normal vector). * * c = a x b *****************************************************************************/ void CrossProduct( vertex_t a, vertex_t b, vertex_t c, vertex_t *n ) { GLfloat u1, u2, u3; GLfloat v1, v2, v3; u1 = b.x - a.x; u2 = b.y - a.y; u3 = b.y - a.z; v1 = c.x - a.x; v2 = c.y - a.y; v3 = c.z - a.z; n->x = u2 * v3 - v2 * v3; n->y = u3 * v1 - v3 * u1; n->z = u1 * v2 - v1 * u2; } /***************************************************************************** * Calculate the angle to be passed to gluPerspective() so that a scene * is visible. This function originates from the OpenGL Red Book. * * Parms : size * The size of the segment when the angle is intersected at "dist" * (ie at the outermost edge of the angle of vision). * * dist * Distance from viewpoint to scene. *****************************************************************************/ GLfloat PerspectiveAngle( GLfloat size, GLfloat dist ) { GLfloat radTheta, degTheta; radTheta = 2.f * (GLfloat) atan2( size / 2.f, dist ); degTheta = (180.f * radTheta) / (GLfloat) M_PI; return degTheta; } #define BOING_DEBUG 0 /***************************************************************************** * init() *****************************************************************************/ void init( void ) { /* * Clear background. */ glClearColor( 0.55f, 0.55f, 0.55f, 0.f ); glShadeModel( GL_FLAT ); } /***************************************************************************** * display() *****************************************************************************/ void display(void) { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glPushMatrix(); drawBallHow = DRAW_BALL_SHADOW; DrawBoingBall(); DrawGrid(); drawBallHow = DRAW_BALL; DrawBoingBall(); glPopMatrix(); glFlush(); } /***************************************************************************** * reshape() *****************************************************************************/ void GLFWCALL reshape( int w, int h ) { glViewport( 0, 0, (GLsizei)w, (GLsizei)h ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( PerspectiveAngle( RADIUS * 2, 200 ), (GLfloat)w / (GLfloat)h, 1.0, VIEW_SCENE_DIST ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); gluLookAt( 0.0, 0.0, VIEW_SCENE_DIST,/* eye */ 0.0, 0.0, 0.0, /* center of vision */ 0.0, -1.0, 0.0 ); /* up vector */ } /***************************************************************************** * Draw the Boing ball. * * The Boing ball is sphere in which each facet is a rectangle. * Facet colors alternate between red and white. * The ball is built by stacking latitudinal circles. Each circle is composed * of a widely-separated set of points, so that each facet is noticably large. *****************************************************************************/ void DrawBoingBall( void ) { GLfloat lon_deg; /* degree of longitude */ double dt_total, dt2; glPushMatrix(); glMatrixMode( GL_MODELVIEW ); /* * Another relative Z translation to separate objects. */ glTranslatef( 0.0, 0.0, DIST_BALL ); /* Update ball position and rotation (iterate if necessary) */ dt_total = dt; while( dt_total > 0.0 ) { dt2 = dt_total > MAX_DELTA_T ? MAX_DELTA_T : dt_total; dt_total -= dt2; BounceBall( dt2 ); deg_rot_y = TruncateDeg( deg_rot_y + deg_rot_y_inc*((float)dt2*ANIMATION_SPEED) ); } /* Set ball position */ glTranslatef( ball_x, ball_y, 0.0 ); /* * Offset the shadow. */ if ( drawBallHow == DRAW_BALL_SHADOW ) { glTranslatef( SHADOW_OFFSET_X, SHADOW_OFFSET_Y, SHADOW_OFFSET_Z ); } /* * Tilt the ball. */ glRotatef( -20.0, 0.0, 0.0, 1.0 ); /* * Continually rotate ball around Y axis. */ glRotatef( deg_rot_y, 0.0, 1.0, 0.0 ); /* * Set OpenGL state for Boing ball. */ glCullFace( GL_FRONT ); glEnable( GL_CULL_FACE ); glEnable( GL_NORMALIZE ); /* * Build a faceted latitude slice of the Boing ball, * stepping same-sized vertical bands of the sphere. */ for ( lon_deg = 0; lon_deg < 180; lon_deg += STEP_LONGITUDE ) { /* * Draw a latitude circle at this longitude. */ DrawBoingBallBand( lon_deg, lon_deg + STEP_LONGITUDE ); } glPopMatrix(); return; } /***************************************************************************** * Bounce the ball. *****************************************************************************/ void BounceBall( double dt ) { GLfloat sign; GLfloat deg; /* Bounce on walls */ if ( ball_x > (BOUNCE_WIDTH/2 + WALL_R_OFFSET ) ) { ball_x_inc = -0.5f - 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX; deg_rot_y_inc = -deg_rot_y_inc; } if ( ball_x < -(BOUNCE_HEIGHT/2 + WALL_L_OFFSET) ) { ball_x_inc = 0.5f + 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX; deg_rot_y_inc = -deg_rot_y_inc; } /* Bounce on floor / roof */ if ( ball_y > BOUNCE_HEIGHT/2 ) { ball_y_inc = -0.75f - 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX; } if ( ball_y < -BOUNCE_HEIGHT/2*0.85 ) { ball_y_inc = 0.75f + 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX; } /* Update ball position */ ball_x += ball_x_inc * ((float)dt*ANIMATION_SPEED); ball_y += ball_y_inc * ((float)dt*ANIMATION_SPEED); /* * Simulate the effects of gravity on Y movement. */ if ( ball_y_inc < 0 ) sign = -1.0; else sign = 1.0; deg = (ball_y + BOUNCE_HEIGHT/2) * 90 / BOUNCE_HEIGHT; if ( deg > 80 ) deg = 80; if ( deg < 10 ) deg = 10; ball_y_inc = sign * 4.f * (float) sin_deg( deg ); } /***************************************************************************** * Draw a faceted latitude band of the Boing ball. * * Parms: long_lo, long_hi * Low and high longitudes of slice, resp. *****************************************************************************/ void DrawBoingBallBand( GLfloat long_lo, GLfloat long_hi ) { vertex_t vert_ne; /* "ne" means south-east, so on */ vertex_t vert_nw; vertex_t vert_sw; vertex_t vert_se; vertex_t vert_norm; GLfloat lat_deg; static int colorToggle = 0; /* * Iterate thru the points of a latitude circle. * A latitude circle is a 2D set of X,Z points. */ for ( lat_deg = 0; lat_deg <= (360 - STEP_LATITUDE); lat_deg += STEP_LATITUDE ) { /* * Color this polygon with red or white. */ if ( colorToggle ) glColor3f( 0.8f, 0.1f, 0.1f ); else glColor3f( 0.95f, 0.95f, 0.95f ); #if 0 if ( lat_deg >= 180 ) if ( colorToggle ) glColor3f( 0.1f, 0.8f, 0.1f ); else glColor3f( 0.5f, 0.5f, 0.95f ); #endif colorToggle = ! colorToggle; /* * Change color if drawing shadow. */ if ( drawBallHow == DRAW_BALL_SHADOW ) glColor3f( 0.35f, 0.35f, 0.35f ); /* * Assign each Y. */ vert_ne.y = vert_nw.y = (float) cos_deg(long_hi) * RADIUS; vert_sw.y = vert_se.y = (float) cos_deg(long_lo) * RADIUS; /* * Assign each X,Z with sin,cos values scaled by latitude radius indexed by longitude. * Eg, long=0 and long=180 are at the poles, so zero scale is sin(longitude), * while long=90 (sin(90)=1) is at equator. */ vert_ne.x = (float) cos_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); vert_se.x = (float) cos_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo )); vert_nw.x = (float) cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); vert_sw.x = (float) cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo )); vert_ne.z = (float) sin_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); vert_se.z = (float) sin_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo )); vert_nw.z = (float) sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); vert_sw.z = (float) sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo )); /* * Draw the facet. */ glBegin( GL_POLYGON ); CrossProduct( vert_ne, vert_nw, vert_sw, &vert_norm ); glNormal3f( vert_norm.x, vert_norm.y, vert_norm.z ); glVertex3f( vert_ne.x, vert_ne.y, vert_ne.z ); glVertex3f( vert_nw.x, vert_nw.y, vert_nw.z ); glVertex3f( vert_sw.x, vert_sw.y, vert_sw.z ); glVertex3f( vert_se.x, vert_se.y, vert_se.z ); glEnd(); #if BOING_DEBUG printf( "----------------------------------------------------------- \n" ); printf( "lat = %f long_lo = %f long_hi = %f \n", lat_deg, long_lo, long_hi ); printf( "vert_ne x = %.8f y = %.8f z = %.8f \n", vert_ne.x, vert_ne.y, vert_ne.z ); printf( "vert_nw x = %.8f y = %.8f z = %.8f \n", vert_nw.x, vert_nw.y, vert_nw.z ); printf( "vert_se x = %.8f y = %.8f z = %.8f \n", vert_se.x, vert_se.y, vert_se.z ); printf( "vert_sw x = %.8f y = %.8f z = %.8f \n", vert_sw.x, vert_sw.y, vert_sw.z ); #endif } /* * Toggle color so that next band will opposite red/white colors than this one. */ colorToggle = ! colorToggle; /* * This circular band is done. */ return; } /***************************************************************************** * Draw the purple grid of lines, behind the Boing ball. * When the Workbench is dropped to the bottom, Boing shows 12 rows. *****************************************************************************/ void DrawGrid( void ) { int row, col; const int rowTotal = 12; /* must be divisible by 2 */ const int colTotal = rowTotal; /* must be same as rowTotal */ const GLfloat widthLine = 2.0; /* should be divisible by 2 */ const GLfloat sizeCell = GRID_SIZE / rowTotal; const GLfloat z_offset = -40.0; GLfloat xl, xr; GLfloat yt, yb; glPushMatrix(); glDisable( GL_CULL_FACE ); /* * Another relative Z translation to separate objects. */ glTranslatef( 0.0, 0.0, DIST_BALL ); /* * Draw vertical lines (as skinny 3D rectangles). */ for ( col = 0; col <= colTotal; col++ ) { /* * Compute co-ords of line. */ xl = -GRID_SIZE / 2 + col * sizeCell; xr = xl + widthLine; yt = GRID_SIZE / 2; yb = -GRID_SIZE / 2 - widthLine; glBegin( GL_POLYGON ); glColor3f( 0.6f, 0.1f, 0.6f ); /* purple */ glVertex3f( xr, yt, z_offset ); /* NE */ glVertex3f( xl, yt, z_offset ); /* NW */ glVertex3f( xl, yb, z_offset ); /* SW */ glVertex3f( xr, yb, z_offset ); /* SE */ glEnd(); } /* * Draw horizontal lines (as skinny 3D rectangles). */ for ( row = 0; row <= rowTotal; row++ ) { /* * Compute co-ords of line. */ yt = GRID_SIZE / 2 - row * sizeCell; yb = yt - widthLine; xl = -GRID_SIZE / 2; xr = GRID_SIZE / 2 + widthLine; glBegin( GL_POLYGON ); glColor3f( 0.6f, 0.1f, 0.6f ); /* purple */ glVertex3f( xr, yt, z_offset ); /* NE */ glVertex3f( xl, yt, z_offset ); /* NW */ glVertex3f( xl, yb, z_offset ); /* SW */ glVertex3f( xr, yb, z_offset ); /* SE */ glEnd(); } glPopMatrix(); return; } /*======================================================================* * main() *======================================================================*/ int main( void ) { int running; /* Init GLFW */ if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); exit( EXIT_FAILURE ); } if( !glfwOpenWindow( 400,400, 0,0,0,0, 16,0, GLFW_WINDOW ) ) { fprintf( stderr, "Failed to open GLFW window\n" ); glfwTerminate(); exit( EXIT_FAILURE ); } glfwSetWindowTitle( "Boing (classic Amiga demo)" ); glfwSetWindowSizeCallback( reshape ); glfwEnable( GLFW_STICKY_KEYS ); glfwSwapInterval( 1 ); glfwSetTime( 0.0 ); init(); /* Main loop */ do { /* Timing */ t = glfwGetTime(); dt = t - t_old; t_old = t; /* Draw one frame */ display(); /* Swap buffers */ glfwSwapBuffers(); /* Check if we are still running */ running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED ); } while( running ); glfwTerminate(); exit( EXIT_SUCCESS ); } glfw-2.7.2/examples/pong3d_winner2.tga0000644000175000017500000000157307616577464020660 0ustar elmindredaelmindreda f glfw-2.7.2/examples/wave.c0000644000175000017500000002022411275554034016405 0ustar elmindredaelmindreda/***************************************************************************** * Wave Simulation in OpenGL * (C) 2002 Jakob Thomsen * http://home.in.tum.de/~thomsen * Modified for GLFW by Sylvain Hellegouarch - sh@programmationworld.com * Modified for variable frame rate by Marcus Geelnard * 2003-Jan-31: Minor cleanups and speedups / MG *****************************************************************************/ #include #include #include #include #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif /* Maximum delta T to allow for differential calculations */ #define MAX_DELTA_T 0.01 /* Animation speed (10.0 looks good) */ #define ANIMATION_SPEED 10.0 GLfloat alpha = 210.0f, beta = -70.0f; GLfloat zoom = 2.0f; int running = 1; struct Vertex { GLfloat x,y,z; GLfloat r,g,b; }; #define GRIDW 50 #define GRIDH 50 #define VERTEXNUM (GRIDW*GRIDH) #define QUADW (GRIDW-1) #define QUADH (GRIDH-1) #define QUADNUM (QUADW*QUADH) GLuint quad[4*QUADNUM]; struct Vertex vertex[VERTEXNUM]; /* The grid will look like this: * * 3 4 5 * *---*---* * | | | * | 0 | 1 | * | | | * *---*---* * 0 1 2 */ void initVertices( void ) { int x,y,p; /* place the vertices in a grid */ for(y=0;y1) zoom-=1; break; case GLFW_KEY_PAGEDOWN: zoom+=1; break; default: break; } } /* Callback function for window resize events */ void GLFWCALL handle_resize( int width, int height ) { float ratio = 1.0f; if( height > 0 ) { ratio = (float) width / (float) height; } /* Setup viewport (Place where the stuff will appear in the main window). */ glViewport(0, 0, width, height); /* * Change to the projection matrix and set * our viewing volume. */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(60.0, ratio, 1.0, 1024.0); } /* Program entry point */ int main(int argc, char* argv[]) { /* Dimensions of our window. */ int width, height; /* Style of our window. */ int mode; /* Frame time */ double t, t_old, dt_total; /* Initialize GLFW */ if(glfwInit() == GL_FALSE) { fprintf(stderr, "GLFW initialization failed\n"); exit(-1); } /* Desired window properties */ width = 640; height = 480; mode = GLFW_WINDOW; /* Open window */ if( glfwOpenWindow(width,height,0,0,0,0,16,0,mode) == GL_FALSE ) { fprintf(stderr, "Could not open window\n"); glfwTerminate(); exit(-1); } /* Set title */ glfwSetWindowTitle( "Wave Simulation" ); glfwSwapInterval( 1 ); /* Keyboard handler */ glfwSetKeyCallback( handle_key_down ); glfwEnable( GLFW_KEY_REPEAT ); /* Window resize handler */ glfwSetWindowSizeCallback( handle_resize ); /* Initialize OpenGL */ setup_opengl(); /* Initialize simulation */ initVertices(); initSurface(); adjustGrid(); /* Initialize timer */ t_old = glfwGetTime() - 0.01; /* Main loop */ while(running) { /* Timing */ t = glfwGetTime(); dt_total = t - t_old; t_old = t; /* Safety - iterate if dt_total is too large */ while( dt_total > 0.0f ) { /* Select iteration time step */ dt = dt_total > MAX_DELTA_T ? MAX_DELTA_T : dt_total; dt_total -= dt; /* Calculate wave propagation */ calc(); } /* Compute height of each vertex */ adjustGrid(); /* Draw wave grid to OpenGL display */ draw_screen(); /* Still running? */ running = running && glfwGetWindowParam( GLFW_OPENED ); } glfwTerminate(); return 0; } glfw-2.7.2/examples/getopt.h0000644000175000017500000000403311435216544016751 0ustar elmindredaelmindreda/***************************************************************************** * getopt.h - competent and free getopt library. * $Header: /cvsroot/freegetopt/freegetopt/getopt.h,v 1.2 2003/10/26 03:10:20 vindaci Exp $ * * Copyright (c)2002-2003 Mark K. Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the original author of this software nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ #ifndef GETOPT_H_ #define GETOPT_H_ #ifdef __cplusplus extern "C" { #endif extern char* optarg; extern int optind; extern int opterr; extern int optopt; int getopt(int argc, char** argv, char* optstr); #ifdef __cplusplus } #endif #endif /* GETOPT_H_ */ /* vim:ts=3 */ glfw-2.7.2/examples/pong3d_field.tga0000644000175000017500000004263007616577464020356 0ustar elmindredaelmindreda$2DTbldftLVdlvL^lDTflTbdLV\|~ҲҁrС===// 2\22[2YY ر Z۰ڬС ~С===vv=-u==vvך̸ڵС 2\\[ \\Ԧ v[ رd޵ Wuu~.=Ұviٴ١vҤҁ=ҡu=~v~=ҁzڪϓAQӆ 2F\2 \ӦԦ б С ~~uuС.~.Хviа=С٤u===vQإڵ2 Ӌa[2 ԦХ \ Х۲=uvЂv===vСvvvv ?ҁ==ҁ=AQvviӦ YȮޥ a [[ӥ Ӧ2 \ޥ zҁv~ҁ===а=v ҁ===8Ґ=:vаv 2 \ ӥ ¥i/[ Х 2\.П١=>==޵ССХކ-Ҥ=ҁ====Qޥvа //va[ ¥ [2 ޥ $бҁҁҐ== Хޥ v=vץ-=Ґ-===׆аu [۱Ԇ=/// /[ vu=Ґҁ==ޥС vХ==Ґ=-ҁ?ϓ аҹ X [$ v/ӥ 2 ޲~-ҁ==ҁҐ===vаvСչv-ҁu===Lϵv X Ӧ/$vvإ ӥ [ܱҐҐҁ==ҁ==-=uvצvаذ=ivv=ٱv=ҁҐҁ== zҵv Х  ۹v/ӥ/ ӥ[[ кЁҐ==ҐvޥvаءvvvҡvuҁҐ==vA` аа viإ ҐҤІvаaа=ذذС=ҤҁҤҐ=~ړ~ [Xб إӥ؋Ӧڦ / ޥ ޱ.=ҐҐ====vvviإ=v===vϵvСa  ŦŋذХ ޡձuҐҁu=== аХ إivٹvЁұ==u==ұ׬ XaXvަtŦѦ ذ . ޥ մ v-====vvv v ޥvذйҁ==ҁҒ&Х X XXXX ަ ti \\ ر ǡ=-Ґҁ=Ұv Х ދӥ/vإvҲҡҤ=u= .. Xaa X v ӦGE2 Ԧ[ ...ղЂ=ҐҤҁv=Qvإ ӥӥ=ކҤҁҒ===Ҥ͡Ϭv . agXWаХ ŋii / gޥХ. SҐҁ=vvХޥvӦذҐvҤҐҤzϠ X ;gȸޥv 2iia С бպЁv~v=&vӥӥvvӆްvu=. .[.[ cX)ޥХ v ء g`Z =~~.vұuԦӥ ťiر޵Ёv-u~uޛ ڬ~ QQv )r#.Xa a$u==٥ 2Ӌvviv=-ҡ>ǡ~~.ޥ~ .ד .g إQXҦrr)W ` Ҥҁ>=ҤzэԦԦӥivvӥرס->~uЁڸ~. ڦ Ё)W.g ذQކ dٴ`s_yyyy=8=?s Ԧӥӥ/iӥ¥аҐǡǡ ұO޵ڦСv= v. ذvv бҰ~.ެ)f)СҤ888>8?8 ޥޥަӥХӥiذҡҤ=ҁҤ ުڵС~٤ ֬ . аvg.б١v$ڥvv=>??Ւަޥv ӥ/ӥi=v??==١СvҒ)~ аi0 ْҲ.ْ=Ҥ=歆PQ8z ަ [ӆӥ=ҤҐ=ҁҡ=СZuu=ҡZ) g ذ00=Х رٲv==ҡ~=uzL<<ҁٱ vа$ Ԧӥӆ=Q=Ґvuױu.СұҡФ б==Х ҡ~СҒD*<'<<1*պХСҲܻ$ Ӧ=A׆vС=ޥvСЁZҤ=١_޵c.а0v۱ ٱv=ұLzSSSS'**Х бb[ v==Ҥ=v.С~Сuұұ=ұO)g аvQ=v Xٱu~Сu uZ ^'uЂ.Ёuu'bإ vvzzպz<zv=~u=ҁ=СҦ QQv X=~vҁ-Ђ~uTXuuXZZܻչuұ e<[аLzzմմܣ<ܱ=~-ұ҂ ry\ޥv XҰ -ǡ -=uXXXX b١~v--uuرٟzٹ$Сҡ ҁǡu-=ҁ=ҡZc ذСб$ -ҵT=~.uX. ~uZuZZ<=$βْٴ'吡ҁ-ҐuҁСٱ!r 2 v=Zұ=-uXZ סu~~u.ٱv~~---uұرұ$ҡu~ٟ.Ђ.uu-~ұ٣Хر= vаg. $<~ -ǡu=ҡк))2/ްvҰ==ұ==ҐT~СuZұСХ .-u% 0ХСءС .=ҐҒ=urOئԥv====Ҥuu ұаa ..~u=uvv ~ ~ gQ=ҁСҸ /vvv==vvv=҂֠=uuұuа vССٺޥӆv~ ~$ܩ=QדA===`̇ڦ3vХvС=Ұ׆=TСuZұ=ۥذ С.СvvХ $ ӥ .~XXܻҐvЁұ= ХWvv=u=Хކ`С-Zұu=۰i vvСvvЦԦӥ ޥ~~$zzzұvб޲!RޥvvvСu=SLРڵuZZҰذiӦޥvv $2ޥ~Х.$zջl҂С=С~ZmvvvССаҹұ`Сұ إަӥvӥ 2шtӥ vСС$Zٺ<ܲvұvбْ)RAvvvvС=ұұ==Ғ~= ٹإӦiUԦӋŦŦ22Us.~а$ٹҒҺ<դv~vкMv===ҹҡбϬбҹҹ/Ԧ°ёӥ2ttԑ/ň ѓԦСҹб$ܯ-=-= g==v=vХҲ~vСЂСЂQttш\ [[[2 \ \2ԮԦ ͡ЁҁҐ=>u Xv0vؒwІСvСvv~uu=СаԑԮY\\ /g 22Ԧ2 ӥՒ=ҁҁ===.X==а=zҥv=v=uҐϵޥ==إ [2 \ [ a[ 2Ԧӡձа==ҁҁ.XX=vذzvْ=vuu?= Сҹ/ [ [ .ӥ/2222 ӥ=lu==Ґ-=ަ. аvՒކ==uu=Ҥvڵ~= [ [aޥ 3 [ӥ¥ ԦХl=====ޥ.. vvu==uҒϵކ.ޥ$X [..бަv  إ // ކ кܒСҐu===ҁ=v. . . Х=В=u==Ҳ͐ڬ~ абa g  [ӥӥ ӦԦ йձҐ=Ҥұ=ҁކ.[vvХ==ٴ=vҤ=ͱQX СX = v إ\ ӆ vдܰ=Ҥҁ=====ҐХ аvi=Һvu=Ҥұ=vvvޡu [аXaXa Ғviذ Ӧ/ Ԧ ޺Ҥҁҁ=vv Сv==ْҤu===ނڵ  .a vаiڥӥ ޥ޹ܹҐҐҐҒ҂ X =iа=vu=-ұҡХu X XaX XXаХv/Ԧаa g ԱҤu=С=ނ= vvذZЂ=u-vҁСv=`.aaaХvvȦӥӥ ӥ ӦwҐҐҐ=u==v٤vХ. vv=~=Ҥ=ǡ-=vҡڬ.. X aaXvӥԦӋӥޥ ܱ=-u==vС=vС. [vvv=Ёu ҡvҹO .Xg[g X . v v 0vӦӥӦ X . [=uu=С׆аХ gv0vvСҲv ҁҤұ=ҁ X .[X ӥإ ư؋Х [ a .[ޥޥ v=-==ЁІڵХ. ӥvvv/u-v~=Ґ=zc. [ Ԧ 2 2vvv ަ [ 2[g \$u~~Ёuҁuv& ӥӥӥiХv۱еuЂ=ҤXX g ȬХ_ ӥ2Ӌva/ Ӧ [a 222$u~Ёǡuұ=vUȦ2ӥӦvХҡЁ-vҁ=Og X. Ȭ=yڋ /[ ¦vvaaХyy 3/ 2Vw~ҁǁ ҥэ22 vХӥа=Ґvc\ȬW٦22 ////Qvaa!)#a [V΁ҁЂu ԦӦ2iiiӥi== ҁ>Ґu=ҵW. ڦٱ)s 23ئ б _r) -~ЁҤ=t v0v¥0=Ґ=-`ʸ g=$ [۰v /۟W ٲuҤ-ұ١UȦ2ަvå¥vii=ҁv=v)֬WW ޡҲ) 3إvvv κұ.WIҁҤҁ>ǁҤٲԦӦކviivv=vҒ=vҐҵȵб ҡrޥ2 ذ؋ g  `ϵҁQҹ&ԦޥإӦi=Qv?=ҁ=>~СЂ ٜr Ӱ3؆=vv X$~~u ~ҁuҤ~נzڦކކ а۰iԦӥQvuvv=uС r ޥ3إ==vg رҡ~ЁZuuSթD<1< -vٲ б ԆvԆvQvҁ==ұҡҺ)Rڥ ۰i=. Xuuu *==ҡْޥ Ӱҡ.g ٱv=uЂ-Ҥ~uͲSSܻ<1""6-'   !   !"$%&(*,.023578;!!; 3.%         $'*-159""@$$C%%F''G((I((M**R,,X00Z22K))9%  &,+6W//p==J))   $,-,+0N++l;;O,,    "%(+.26; ?""B$$F&&K((N**S..Y00b55]33@##     $,,-,1L))r>>/.      "$&')+-/124689; =!!@##B$$D&&F''H((K))M**O++S--U//X11^44d77i99T../ !-.1368; =""@##C$$E&&G((J))O++R..W00\22S--8 !  (-,->""Y00m;;MM2/       !"#%')*+-/13578: ""A$$D%%F''H((K))L**O++R--T..Y11_44f88R--/   #-+5L))s??wAA "+-,/C%%c66~EE *    !$'*.159=""A$$F&&I((N++Q,,U00Y00]33f99g99K))#    !+-.A##d66Y11 1      "$&')+-/12468: ""@##C%%E&&H''J))L))N++Q,,U..X00Z11]33_44a55g99n<<_448  '-.1479""@$$C%%G&&I((L**O++Q--T--V//Z22c77i::^44=!!   )-,.?""Z11n<""A$$C%%E''H((J((L**O,,S..U//W00Z11]33a66m<Q--  )-8Q,,xBB/6       !#%'(*,.023689; =!!>""B$$D%%F''H((J((M**P++R--U//X00\22_44a66e77f88g88o<""A$$D&&G''J))M**P,,S..V//Y00[22]33_44e88o>>l<""A$$C%%F&&G''I((L**O,,R--U..X00[22^44a66b66g99q>>k;;K** " ,-,0B$$f77r??. (  (.-4S..o==L** *   #%',/37; >##C%%H''J))O,,S..X00[22_44c77d77i::s??Z37     %.-0E&&s??F''6      !"$&()+-/133689; =""@##B$$E&&G''I((K))M++P++T..V//Y11]33`55b66e77h99k;;l;;o==xBBFFi99,,-0358:!!=!!?##B$$E%%H''J))M++Q,,S..V//Y11\33_44c55d66f88j;;vAAp==S..,  ,-,/B$$]22p==RS65       !#%&()+-/124679;!!>""@##C%%F&&G''J((L**O,,R--U..X00[22^33a55d77g88i99o==xCCm<<9 * +.-=!!_33r>?J)* ')   %.-,1J))g88f88 )     !#'*-16: >!!B##F%%J))M**R..V..Z22^33b55f88h99p==j;;   ,-=!!\22f88(=       !"$&()+-/13579; ""@##C%%F&&H((J))L))N++Q--T..W00Z11]33a55c77f88i99l;;o==r>>s??vAA~EEwAA""=       "#%')*,.023579: =!!?""@$$D%%F&&H((J))L**O++R,,T..W00Z22]44b66c77f88i::l<>r??v@@xBByCC~EE}EEY11 (-.1468; >""@##C%%F''H((K))N++Q--T//W00Z11]33`55c66f88i::l;;o==p>>q>>xBB{DDc66* -,/E&&^33q>>RS6?       !#$&')+-/124689; =""@##B$$D&&G''I((K))N**Q,,T..W00Z11]33`55c66f88i::m<>wAAGGr>>+ 0  (-,5P++o==vAA&($  *- 9 U//zCC8"*   !%(*.26: >##C$$F&&K))O++S--V//Z22_44b66f88k::n<=^46   #,-.?##k;;Q,,>     !#$&()*,.135579; =!!?##A$$D%%F''H((J))L**O,,R--T..X00[22^44a66d77g88i::m<

>r??u@@xBB{DD|DD~EEIIf87  +-.1469 ;!!>""@##C%%F''I((K**N++Q--U//W00Y11]33`55c55e88h::k;;n==p??t@@u@@wBBEEvAA@## -,/E&&^33q>>RS5?       !#$&')+,.024689; =""@##A$$C&&F''H((K))N**P--S..V//Y11\33_55b66e88i::k<=   *-,7U//d77.>       !#$&()*,.024579 :!!=""?##A$$D%%G''I((K))M**P,,S--U//Y00\22_44b55d77h88k::m<>v@@yBB{CC~DDFF}EEPOD') ,, /1469 ;"">""@$$C%%F&&H((K**N++R,,U..W//Z11]33`55d77f88i99l;;o<>t??w@@xAAyBB~EEGGZ11  !,/F&&_44r==ST5 ?       !"$&')*+-/13578: ##A$$C&&E''H((J))L**P--R--U..X00[22^44a55d77h99k;;n<>u@@xBBzDDFFu@A 7  #,+0D%%d77v@@$ '(  &-,0F&&b66k;<*     #&),037;!!?##C%%G((K**O++S..W00[22_55c66f88k;;o==;#)    &-,1C%%t??M++>       "#$&(*+-/13568: ;!!>""@##B$$E&&G''I((K))M**P,,S..W//Y00\22`44c66e88i99l::n<##@$$C&&F''J((L))O++R--U//X00Z11^33a55d77f88i99l;;o==q>>t??v@@xBBzCC|DDGGHHV//  #, +/G''`55s??QQO-. @      !"$&'()+-/02458: ##A$$C%%E&&G''I((L**O++S,,U..X00[22]33a44d66g88k::n<>t@@wAA{CC|DDJKe74'(4'+,-=""^33r???"" *'(   ", +,>""W//HG+*    "$'*-159 >""A$$F&&J((N++Q,,V//Y11]33b55e77i99m<>q??u@@xBBzCC|DDEEIHm<@  )-%.1368:!!<""?##A$$D&&H((J))M**O,,S..U00Y11\33^44a55e77g99j;;m;;p>>r@@u@@wAAyBB{CC}DDFFIIHH9  %- ,1I((a66t@@QQP./  A        !"$&'(*,.0135789 ;!!>##A$$C%%E&&G''I))L**O++Q--T//X11[22]44a55c77f99j;;n;;q==t??xAA{CC~EE~EFOLX5C:+ ,.-,9W11p==P,, )(# +- 7O+,wAAE'*  *   !$'*,048=!!@$$E%%I))M**P,,U..Y00\33`55e77h99l;;vA@$! )-,3N**i::B$$6       !#%&(*,-/13578: < =""@##B$$D&&G''J((L**N++Q,,S..V00Z11\22_44b66f88h::k;;m<

>t??vAAyCC{DD}EEFFKKV14 ,-&.1369>s@@uAAyBBzCC|DD~EEGGHHJJII. '- ,1J))c77vAARSQ.0   A        !"$&'(*,.013578: >t@@wBB{DD}FF~FGLI`8D#?-  +.- ,5Q--l;;k;;  ('(%  *- 2I((l<=?$+     %-/>""n<<_44 ?      "$%&(*,-/13578: >u@@wAAzCC|DD~EEGGFFNM;"&  .-&/2479;!!>##A##C%%F''I((K))N++Q--U//W00[22^33`55c77g88i99l;;o==r>>u@@vAAyBBzCC}DDEEGGHHIIIIGG   (- ,2L))d77vAASSQ/0   A        !"$&'(*,.013578: >t@@xBB{DD~FFFFJHl>F1$A1  ).- ,2K))h99EE  +'(' (-/C$$_55r?@**     #%(+/26; >""C%%G''K))M++S..V00Y11_44b66f88j;;o<!!?##A$$D%%G&&H((L))N++O,,R--U//X00Z11_33b55d77h99j::n;;o==r??uAAyBBzCC}DDFFGGGFIK( &.-'/247: =!!>""A$$C%%F''J))L**O++R--U//X11[33^33a55d77g99i::l;;o==r??t@@wAAyBB|CC}EEFFGGHHIIJJOOC$$  )-3N++e88xAASTQ/0  !  A         "$%&(*,./13578 : !"#A$$C%%E&&H''J((L))O,,R--U..X00[22]44a55c77f99j::n<>t@@xBB{DD~EEEFJHq@F6(B4  '.- ,0F&&d77EE  $(   %- ; T..FF="&*    "$'*.15: <"#B$$F''J()M**Q--U//Y11]33a55e88i::k::xB@+# (-,1H''j::W00 >       "$&')+-.02578: < >""?$%B$%E&'G'(J((L**N++Q,,R..W00Z11\22_44b66f88i99k;;n<>t@@wBByCC|DD~EEFFFGIIk;>*-(.1358; =""?##B$$D&&G''K((M**P,,S..V//Y11\22_44b66e88h88j::m<""@$%B&'E&'G'(I()L**O,,Q--T..W00Z22]33`44c66g88j99m<>t@@wAA{CC}EEFFIH}FHC,D6  %- ,/@$$^44yCC<""+'(')!  "-- 6M*+vA@O,/  +        "&)+/38< @##D%%H''L*+O,-S..X11\33a55d66h88j::s@?C'-    $---.: !e88k;;  @    $"&)()**++,-/#70%=2%91#22!.4#/5#07$19"&:!$<#'?"!B!D#!F%"H&%J)(L*+N,-Q-.T..W00Z22^33`55c66f88j::l<>t@@xBBzCC|DD~EEFFGGKKL+0  -,-*,.1368; "="$?$%B$%D&'G((K()M**P,,S..W00Y22]33_44b66e88h99j::m<

>s??uAAxBBzCC|DD~EEFFGGHHIIJJJJQQ@$$  +-6P,+h9:xBBTUQ/1 &  A        !#!')())**+,+. 1/$;1%;2%:1"02!.4#05#07$08#,;"&>$'A!D#F%!H&$J(&L))N*+Q,-T./W00Z11\33`44b66e88i::m;;o==s??wAAzCC}EEFFHHGHH.D8  !,- ,-; Y00s?@P,-  *'()# +-0F&%i::`68"*   "#%)())),//$92%83"06#19%1>$'B&)F'(L($P*'S-,V/0Z23^44b66f88i::n<>t@@vAAxAAzCC|DD~EEFFHHIIJJKKJJLLm== /!20"2 0!17"-M-3j97zBATUQ/1#&    +!2'#A+'I.*R1.[2/Z31`43c42c42b43c54e65j66j65h53b42`52`&53_52]61Y71Y8/S;.M<-H@,>D+8H*1O*(S+(T.,V//Y12[34_44b66f88i::l;;p==s??vAAzCC|EEFFEFLIT4E :'  !/!/0"30"10"2 0"10"2/!07"-Q.3p;9f77 )'(&  ,%0"2 0"3>&/[22v@?9 #.0$ =+'L/,W2/]32c43e53d42c43e55i65g53a52a53`71Y82Y91W<1PB/EK/9T//\0+^21a55e78i9:i::wA@6 (  *'0"10"20"10"20"12"1A(0e89l97  ! >,+V21c33f65k77o88q::u9:v89r88q78o67o67n67m66j66k66j55k56l55k55j56k46j46i55f54d64`83\93Z=2TD1IP0:Y00]2/^33a55d77g99j;;m==p>>r??vAAxBBzCC|DD~FFGGGG~DD'-!$P75i42c43e54e54d54e54d54e54d54e54d52`41]51^51\61X71X8/P;-G@+>C*6J*-P*&R,*U.,X0/Y22]33`55c77f88i99k;;n==q>>t@@wAA yCC|DD}EEFFHHIIJJKKKKJJNO3 ?44h32d54f54e54d54e54d54e54d 54e54d84`>6^T?[tCISTP/0 ,)  % ;-,V21c43g55k66m88r9:u9:w89t89r88q78o67n67m67n66m66k66j66l56k55j#55i56j46k46j46l46j55g54b63_83]:3X?1PH1BS04[1.]30_43b66e88h::l;;o==r??uAAyCC|DD~EE}EFNJ[7E<(!!F44j53f54d54e54d54e54d54e54d 54e54d74`=5]R>]pAI  +'(* -,X64h64d54e54d54e54d54e54d54e 64d:3]=6\mI_E)/, /'&N00a44k88p99u;;x;6\H5OU5@a57f76i88k;:m=>s??v@@xAAzCC}DDEEFFGHh>LLFDF=<}67p66k66l66k66l66k66l66k66l66k67k56k%46j46k46j45h55e54b64`63_93[>3QI1DT05[10^21`54c76f88h99k::n==q==t??vAAxBBzBB{CC~EEFFGGHHIIJJKKHITU9  ..^NNAA89v66m66l66k66l66k66l66k 56l76k>8gD?nSJybOzV`S., .(   !!C,+X65l88r99u<kPIyoV'('(+ @@@GG>?89s66l66k66l66k66l66k66l 87k=8dD@o^SH;X  ?00c88r;:x==}==~<9gHBsWKzF6N "  &&O::v==|==}<<{::w99t99s88r88q66o55n55m33k22i11i11h11g00g00f//f11f22f11d//d//c//b00b11b22b33c44c54c55c65d66e66f97e;8d>9cL9Wb9Al;;o=;q>=t??vAAxBBzCC|DD~EEGGGErVXVFG:9x55m55h55i55h55i55h55i55h55i55h55g44g44f44e44f44e45e45f35f45e75d96bA6XN5J[5;c67f88i98k::n<>t??vAAwBByBB{DD}EEFFGGHHIIJJKKIJSSI))>NNOO>>88s55j55i55h55i55h55i55h 45i64fC9aWLzcTdZ_zP03 -(    -00d==|;;{>=}==};;z;;w99t88r88q77p66o55n44l22j22i11h11g00f00e00f11g22g22f00d..c//b00b#11c22c33c44c54e44c54c55e55f45f55f66e77c?7]Q8Mb8 *')#;GG\\FF<<}77o55i55h55i55h55i55h55i 86gE>@@??==};;z;;x::v99t88s77q55p44n33k11i11h11g00f11f22f11d..c//b00c00b11b22c44c65d65c55c55d77g:8g=:gH;_Y:KtBE53OMYYKK>>88s55j55h55i55h55i 55h45j74cF>==|<>n<;kA=kS>[g>Fp>?v@?xA@xBC{CC~DDFFGFGDyceePP>=11j--b..c--c--b--c--b--c--b--c..b//b//c00c11c22d33e66f66e66f55e55d66f77g97g:8g<8fD9_T9Me:>l;;p<:q>>s?@wAAxBBzBB|DD~EEFFGGHHIIJJKKIJRST01 00_ffXXEE77t..d--c--b--c--b--c--b ..b,,c0.bL@hfWhXnckN4?.)    ##F<<{CC@@??>>~==|<>t@@uDDxEExDDwBBuGGy[[llooMM|??qDDtCCs&BBr==m<>vAAxEEyCCvMM~ddmmXX@@rCCs??o==m::j44e.._//^22`55c78f98f;9h=;j?>yHHOORRrr$游آňllVVNNzFFt99h/.^/.]43b98f=;h=:h=;h@=jC?mEAoGBpWBalBMxBA|CB|EE~FFGFGFHE{dvvqqVVJJSSQQQQQQQQQQQQQQQQPPKK{FFwGGx&DDt==n;;l66f,,]**[--_00`33c88f98g99g:8g:9f;9h=;i>wBAyBB{DC|EEEEFFHHIIJJJKKKKJOPl>> 11^qqvveeOONNQQQQQQQQQQQQ PQSQcVpbznypmN4?#/)   &&ODDGGBBAA@@????==}88x44s11p99uBB{KKTTdd}}ź໻ۡÄrrZZKKwEEr99h00`,,]21a66e:9g<:h>;i?mC?oQ@cl@HwAAzCB}DE~EFIHtAF<*B;=|{ttjjMMMMRRQQQQQQQQQQ QQQQRQ]Ro`ymv@;e*&)( *(IInnbbgg__JJQQRRQQQQQQQQQQQQQRh\scrh^%!8 11fFFEECCBBBBBBBB<<66y55w=={IIUUggɴ䯯І[[GGtBBn55d00_87e?kC?mD?kKF}VUZ[ZY[[\\JJOORRQQQQQQ PQSQbWuf~qpf 61O5==|LLDDEEDDDD@@44y99{JJUUll%雚poUTFEr74c/-]97eB>mC?mE@nHBpJCqKDtMFwbF`yDG~DDFFGGHGHF~\wrxzji⫫+⩩̠čjjWWQQ}FFs77g+*\0/_76e=;iAmB@pJAk_AXoAIzB@zCB{DE~EEFFGGHHIIJJKKLLKKQRk=?11_oovvoo℄ ~r}pypnO4?/)   .<<{JJGGCCCCCCDD>>55y88zKKYYhh"ᙙssWWHGu55d..]75d@=kA>kA=kD>lE@mFArJCrdCXvCF~CB~EEIJEFM1F:>{zvvxxoo }q|pv?9c*&)( * --]ZZhhddddhhˑ rfwh^'$< ?DDKKFFEEDDEEEE==55|EEZZppӈ\[@=l3/_<8gEAnFAoFAnHBpRO\\[ZZZXX zo}r\S +&< --ZLLMMFFGGHHDD88BBaaЎnmLIw51`@ 77rPPNNJJLLII??KKpp|[V;4eJBrPIwPHwSIxVLyTN\N{sJ]HGIIHG\wrxzjiࠠ#˅ba=:i73cEAnIDrHBqJDqMDsNGvQHwbGeyEKEBGGHHIIJJKKLLLLLKOQJL133crrwwooက }q}pypnO4?/*   ::uUUMMKKJJKKFF<8hLFtKDsNFuRHvRK|WKynJ_HKHAjDYKQzyvvwwnnӁ|pw94[&()(""HVVkkddffccʆ؁񊀽thz\T ABUUMMLLKKMMHH@@ZZ׆SN{Bm<6fKEtMFtMEuPHvSJxQK_KrtHWGHHHIJJJKKLLLMLMOPNQ7"&&Iffzzoo }q}pypnO4?0*! ;;vXXOOOONNOOCCPP㞜id>6gOHwPIxSJyVKzXM}ZPnKfICsGYOSzyvvwwjj }q|px)&F +() DDffffffaarrи򊁽tg}RJv3AAZYRRQQOOQQDDLL ytIAnKE|VUcd xtzo>8Y" ))RSSVVPPTTHHNNxqQFwUK{[P[O^Q_TbVvPhIIQbxow{mlߕ}yMGuH?oRJwRIxTJzWKzWN[OpKdHJIJJJKKLLLMLLQRMP6!2[[}}nn߀ }q}pypnO4?0+ 88sZZTTRRRRPPCCll픐OGvOEuVL|XN|[O~\R_RyM^yIX_Zxxvvvv~~ 􌂿}q|px(%E +( ')7YYllddhh]]~vixbZIH]]WWVVSSTTHHpp d^SN sgvym72O!RR[[VVWWII\\򓍴ZOVJ{aT`ScUdWgX}O`Qbxow{mlޕrlJ@qTKzVM}XM}[O~\Q^SrNgHDJKKKLLLMLLQRNQ6!7]]||nn߀ }q}pypnO4?1, ::v]]XXVVUURRQQrjRGxYM}]R_S_VjUnPsj[wxvvvv劊 }q|px(%E +( '&77p__ggeecckk̥xxktpi[\[[ZZXXWWPP嶴obxwl"1 ??\\\\[[PPiisiWJ}eXdWfYhZlYUpynuznmߏ𕏵QFvUJz[O]P`R_UeTxNaHFKLLLLMKMQRNQ6!6\\{{mm |p|oxomO4?3$))UUU``XXYYRRVV 𓌳]S\PcVdWdXi\riuwuu 󍃿|p{ow(%E +( ')XXhhddgg[[Łނwxl|qkf[\]]\\XXTTqdwvk- __\\[[VVyp_Qh[hZi\j]q\tpvxoo߆h^WK|_RaTcUcXiW}N\JIKKLLMMPSMP5  5\\{{nn~~ |p|oxomN3>3$GGccā\\WWZZ _RbUfZgYj^pkuvuu 򍃾|p{ow(%D +( &(++Xaahhddff^^ŗ ނwylxnhe^___\\[[sfwui ++Vbb````RRk_hZk]k]m_m_spwxoo߆shYL~eXdXfYg\oYMRKKLLMNQTNQ6! 6\\zzoozz䲲 |p|oxomN4? 0((TXXff__^^YY}_Ri\i\k^phuvuu 򌂾|p{org" > *( )$+NNeeeeff^^}} فvzmumfeab``^^uurfxti  IIcccc^^vvcUn`m_o`o`slvvopᆆwk]Pi]h[j]l^wWyKLKJNOOQY\G)+ 5\\zzoozz䱱 |p|oxomN3> .KKddddddWWyy }`Qnam^peuvuuuu㇇ sf}q|pi` ; *( % DddggddhhZZė|p|orleeff^^hhƷthwrg  eeffffWW󜔾k\pbqcrcsjvtqr䀀任sgeWm_ maq`NVLKNQOR\`M-. 6\\zzoozz岲 |p{oxomO4? @``lleedd``ėpcn`qbsgutށuutg}q|pj` < *()".@@eeffggccvvм |p|oqmghii``||xlt`W""Dpphhhh``viserdsdtivttuxw㬬l^oao`ocrd}YvMOOOPS\`M-. 5]]{{pp{{泳 }q|oypnO4? ++]ddnnjj__{{ hXuhthvsvvuu唔uh~r}qj` < *(* >ccffffhh[[Ɣ }q{oqnlmgfss԰쓉zm~rWM| ,,WppkkiiЅ rdsdugvgvstvyx㮮dTtfrcsewdPWPOPT\`M-. 7^^{{pp{{泳 }q|oypnN4?::xiippmmbbϛ n`wiwkvtvvuu夤uh~r}qmc = *(&-44khhggffgghh˷{n{qsoopecӁ y}q{pNGp ,,Ussnniiԩ wiufwixhwrtu{z䱱 毪rdugtfugviWmQTPR\`M-. /YY||pp{{泳 }q|ozqnR6A  BBmmrrllqqذ 狀teznxsvvuu墢uh~rcZ9 )+ =ZZffffhh``ȋ ywi{ssqqrggא xtwl83Q ,,Xuuppjj׸ xjwjykwrvwqp㡡 vjwNjܝ񘎾o`xjwixj]~SYOP]`M-.  MMpp{{泳 }q|ozql_J6/32467:9 = ?""@##=""=!!>"";!!973) WWttuull܇y_Trewm**S::qtrԂu~m}sմ te}qxtvvuu墢xk~rQJ{2 #, ?MMhhffffee|| |wjztwvqq||㳳yopexla[ssxwysvo׈obxsh)$: ..Yxxssnn߷ ~сx˄ԍzw僄 ~rvh{mxpxwjj◗zn}r}q{op}uylylzm}hV`ONZ_X34 JJpp{{岲 }q|ozqlb>J3.01235579:""?##B%%E&&I((O++M++K))I((G&&C%%. WWuuxxkkߖpcszsh5&&Xkly{xxihݢ se~sxtuvuu䡡xk~rQJ{2 #, ,,\jjddǁff^^ǫ yxjztwwqq₂潽tgv~rbZpowxvwpq儅n`zod" //[yyuuppḸyzn}oyrb^wrqq{z벲 ~rvh{nxpxviiᖖwk}q|p{rgzqx{yxꩩ쏅xkzn{nzoWeNLY]a9;  IIoozz䲲 |p{nypkb>I4/1234668:; ;!!="">##@##B$$E&&G''J((N++R--W//Z11[22V//B##&WWuuxxkkߜobsusi<++^mmyywwhiᡡ sf~sxstutt㡡wj}q QJz2$&1AAkkddeeffmm xxkyswvnnቊsf~r}pTNmlxxuuqpᄄ忿pdxne$ 5zzuuqq᷷ uxl}pzrd[x{jsuut zmzmyqxvklᎎ wj}q|p|p}kwpvxkkߓxk{p|ozrXgMKY]`8:  IIoozz㱱 |p{nypkb=I3.0123579: ;!!="">##@$$C%%E''H((J((M**P++Q,,U..[22c66g88g99e880WWuuxxkkߚob}rush:**\llyywwhhޠ sf~sxstutt㠟wj}q PIz1' ++Z``ddeeddccǜxxkyswwllߎuh~r|pTPmlwxvvllqdyj_ $}}uuqqᶶ twl|pyqh^{itwqquu ~rymzpxulm㊊ vj|q{p{o|kvquwlk݌vj|q{pzrYnNMY\`8:  II}}qquu▖{pznypjb=I4.101235"79: ;!!="">##@$$C%%E&&H''J((M**P,,R--V..Z11`44e88l;;q>>yAAL))mmyyvvllߚob}rush:))\llxxvvhhޠ sf}swsttrr⹹vj}q}r73X)(#>>}mmbbeeddccwwkwtvvllލvi}r{pa]ppuvuullߏqdzi_ #xxuurr⣣ uxl}pzqh^|itwrrvv ڀuyl{qyulm䋋 wj}q|p|p~jwqvxmlލvj}q|p{q_~PUXZ`9;  II~~qquu㖖 |p{nzpm`?M3/1'234658:; ##@$$C%%E&&H((J))M++P--R..V//Z22`55e88k;;p>>s??GGj::$nnzzvvllob~rush;**\llyywwhhߡ tf}svtttrr⻻xl}q~r62X+ ('RVVhhddddeeɌ vykwtvwllގvi~r|pWTmmwwvvll듉uhyd[  ]]uuss䠠wxk}q{qj]zdtxsrvv ߁vyl|ryumn勋 wj}r|q{rc{muzmlގwj}r|q{r`}QUY[a9;  JJ~~rruu䗗 |q{ozosT""?##A$$D%%F&&I((K))N++Q--S..W//[22a55f88l;;q>>vAA HHyBC4nozzvvmmᛛpc~suti;**]mmyyxxhhࠠ tg}tvtttss㻻zn}r~s73Y-=<|jjddffbbhh˽ t{mwtwyjjߖwk~r}qMLklyxxxii됆ym|pIBi ccvvtt嚚xxl~q|q|o`atytsww{xk~rzuop煅uh~r}q|rgypvyon vi~r}q|r`~QUY[_8:  IIrrvv嘘 }q|ozotN8I% 31'234578:; ""@##A$$D%%F&&I((K))N++Q--S..W//[22a55f88l;;q>>vAAyCCzBBJJ|DD mn{{wwmm✜pcsvsi;++^mmzzwwll⦦ ug~twuuuss似zn~rs73Z(@  LLrrvv嘘 }q|ozotO8J& 31'234578:; ""@##A$$D%%F&&I((K))N++Q--S..W//[22a55f88l;;q>>vAAyCC}DDFFIIo=; nm{{wwmm✜pcsvuj;((Ymm{{ttyy嵵 ug~twuuuss佽zn~rs;7` ::weeffffbbllͮ ؀tznxuxyjizm~rvk^]pqxxxxiiឞ݀u~rxm@;\  ??{vvww牉|o}p}q|p_{^tztsww{xk~qzupq肂忿vi~r}q|rlyqvxqpჃ uh~r}q|r`RVVXvFH) AA~rrvv嘘4}q|ozotO8J& 312235678:; ""@##A$$D%%F&&I((K))N++Q--S..W//[22a55f88l;;q>>vAAyCC}DDFFJJHFS1;sqwyxxmm✜pcsumc<66rppzztt{{嶶 wi~twuuuss任znst,)K&OOmmddgg``ww ~r{pxuwxmlᠠ|p}qe\bartxxvvtt䬬߁vtqf+(= GGvvxxww}r{o}qzt`|Yqszutvv寯 }wkrzupq聁弼sf~r}q|rhzpuyqpჃ翿 uh~r}q|r`}RUVXtEG%55gqqvv嘘4}q|ozotO8J& 312235678:; ""@##A$$D%%F&&I((K))N++Q--S..W//[22a55f88l;;q>>vAAyCC}DDFFIIGEqAKvrvxxxmm✜pbu|pYP=DDssyytt{{嶶 풉xk}sxuuuss{ost0)*\^^iheeddii̝ }q{pxvuvxw䮮}~r|pe\qovvvvtt||浵vjvsh3/H //Zvvzzii|p{o}pzuaYtrzutvv妦 vi~r{stsyy媩w}q}q|sc{nuyqp uh~r}q|rbSZUWtEH&77lqqvv嘘4}q|ozotO8J& 312235678:; ""@##A$$D%%F&&I((K))N++Q--S..W//[22a55f88k;;q>>vAAyCC}DDFFIIGEj=Gurvxxxmm✜pbu{oVN~=AArryytt{{嶶 xk}sxuuurr|p~rt1IIkkddhh]]xx }qzpxvtuzz䲲}~r{o]Tsswxvvttxx䰰m`zi_& $$Euuzzkkـuym}pytbXovutsvv䩩 vi}q{rutvv䣢|p|q{rfzouxrq~~嵵 tg}r|q{reU^UUtEH&77kqquu䗗4|q{oyntO8J& 312235678:; ""@##A$$D%%F&&I((K))N++Q--S..W//[22a55f88j;;p>>uAAxCC|DDFFIIGEl>Htruwwwmmᛛpbt|pZR=BBrrxxttzz䵵 퓊xk|svuttqq~|p}rs.,WUVllddff``ȍ |pyqwutuxx㯯y~rznPJqpwxvvppↆma{e[ ?uuxxnnಲ݁vxl}pyre\wxpttuu㖖 ~uh}qzrtsvv㤣|p|p{qixptvssvv㥥 yl}q|p{qeT^TTsDG&77jppuu㗗4|p{nzoqL6H& 212235678:; ;!!=""?##@$$C%%E&&H((J))M++P--R..V//Z22`55e88j;;o==t@@xBB|CCEEHHFDk=Gtquwwwlloat{pYQ>t@@yBB{EE~FFIIGEk>Htquwwwllrfs{pYQ=BBqqxxsszz㵵 둈xk|ruuttppzo}r|pqkfeddhhYYĊ ~rylxtvvooለuimd55j66k44fNNrroo晙vjwQIu  XXwwrr四 {wj~q{rj_~huwvuoo }r{n|rzwll㋋|p|p}q}o|kxqtvut⟟򍃿}q|qfU_RRPTB&(77jssqq|| }q{o}qtgC3L*3 *2(3 (%5!*6 %7 $7!$:!; =! ?!A!B#E$!F%$I('K))M+,P-.R./V//[22a55f88k::p>>u@@yBB|EEFFIIGEl>Hurvxxxmm᜜sgt|qZR=BBrryytt{{䶶 y{n{suvuuvv¾qdt|qmhÁffggbbȩ ~s{nytxwno␐j^CB~55k55j66l//_QQhhڜ苁xkzoA:]  VVvvtt摑 vj~q{rj_~fuwvuqq ܃xyl|szvmn剉|p|p}q|mxqwykkዋ}q}qjWeRQPTB&(88lssqq||4}qzns[U97h42`64b63b53b43b53b53c6/V6.Q5/R7,I7+F:+D;);<):=)9A)4D(/G(,K)'P*&S,)T.,X/.Z23`56f88k::p>>u@@yBB|EEFFIIGEl>Hurvxxxmm✜sgt|qZR=BBrryyttyy崴 w|o|suvvv勋 ÿret|qigffhh^^lj ~s{nytxxlm⚚f]>@77n88m::p88fGG{{nyn?8Z BBttxx~~ ui~r|r~na`uxvvqqzyl}rzuoo慅|p|p}q}q|nxrwyllᎎ󋀾}qnXjQOPUB&(44fttqq|| |pr_Y88l23f77l66i66k55k55j55i56l56k56j56l57m47l47n46k64c92Y;0R?0JC/CH/>M/9T05]1.c52f88j:;p>>u@@xBB|EEFFIIGEm>Hurvxxxnn⚚sgt|qZR=BBrrzzrr⃃翿 w|p{tuvvv厎 ÿret{pgfeejiZZƧ ~s{nxuxxmm♙mfmnφĠĚ{ptod-)A ;;tttxx郃th~r|q}od_uxvvss似{ym~szuoo愄|p|p}q}rjzowzllፍʂ}qmXiQOPUB&(**Pqqvvqq||vf^;;o44h88l77j77k66k66j65i55g55f55g55e55d55e55f46h46i36k26j65c94]>5XJ5MV6Ef88n:7q>>t@AxBB|EEFFIIHEGKvsvxyyjj⦦sgt|qZR=BBrrzzppᏏ w|pztuuvv厎 retvogfggedyy ~s|oxuxymlᚚrjƄstlb'$8 33esszzrr{o|p}q}ob_uxvvss任{zn~tzvoo愄{o|p}q|re|lvzll |p}p}qmXiQOPUB&(&&Illwwpp||e\21i33g55j45h55h55i44i44h33h77k99k88j88i77i77h66f55e65d55d45g66h89k@:fK<]ZCw@=yBA{EFFFHIHELLwsuxyyhhᰰsgt|qYQ=CCrrzzpp⍍ w|pztuuvv厎sf~ssmffhhZ[ƥ ~r|owuxyji॥ oiɁuhxh^!/  ?qq}}ff߹szn}p{sdWltxvvss䷷{zn~t{vop悂 {o|p}q|q~jyovyml |p}p}qmYiPOQVE(*''Jmmwwpp|| utnnQQHHyKK{KKzJJzJJ{ KK|44h&&[%%Z((]++^**],,_//b00b44e77h66g66f65d66d86e<9h?pF@mNAh[C^rBI~CA~GGHIHEKLwsuxyyhh᭭sgs}q\T>TTuuxxpp⍍ w|pztuuvv厎uh}rljffggjj ~r|owuxyihપ玅pmҁob|]T :pp||hh߻}qzo|oyteVfsxuuss㣣|zo~uzupq~}䷷ zn{o|p{p}lxpuwnn {o|o|p~lYhNLZ_Z57''Jllvvoo{{ %ᯯИvvmmLLy--_++].._00`22a55d98f<:iAZZvvwwooጌ w{oysttuu䍍 vi{qhgffaaȖ }qzovtxxhgߨzpl҄oc{[S "nn||kkާقwxl|o|ux^pGVvyuuss⟟}zp~vyupq}|㵵 zn{o|p{p}kxouwnn߄ {o|o|p~lXhMK\`^79''Illvvoo{{$ԕwwUU@?m64c;8g@;jD?mGBoLCqNEtPHyXKvmJ_GFGEJKvrtwxxgg߬revsi:5Z=XYuuwwoo }r|pyrttuu㌌ vh{qdeff[[ſ |pyovtwwkk߫znk҅qe|UMz nn||kkޤzwk{owkZD/?_`uutt㟟~{qwzvpq}|㶶 zn{o|p{qhzmuxnmބ {o|p|p|oYlMJ[`]79''Illvvoo{{TQ~GBpE?mHBoNFtQHvTJyWN~ZPkOoGCJKvrtwxxgg߭reuvkAXXuuwwoo pc~syrstuu⚚ tgunddddɈ |pzpwust{{㹹~vnm܆qd~MFp``||mmyuixm|`W%]]uuuu䋋 w}uwzvpqzz㬬 ym{o|pzrd{ktynmބ {o|p|ozs[qLI[`]68''Illvvppzz߂RLyIAoRIyXN}[O~\SaUuNcIHwrtwxxgg߬reuvk@YYuuwwooጌ ob~txtssvv䩩 tinjeeww |pyrvuuuzz㹹lbzz⟟zxl{o94R==iyyЃ{{zz{{Ɂ{{||{{}|ʃ͆ςЃρΆхyyzyā}Ljϒ鎌舅WS ""Emmkknnهyq{}xxvttwv㛛 zn|p}q|rkzpuxrq}}嵵 zn|p}p{t\rMJ\a]79 ''Illwwrrzz󌄭\PbVeXgZj[pZusvvyyhhᮮrevwlAYYvvxxpp⍍ pcuyuttww媪 vkgfffʨ {|pzswvtt䁁mdyz렠{ylzn82O 22NHHpPP{OOyOPzPPzQQ~RQ|^Wf\g]g\g]g]g\f\i^cZSQyWWcajfhfc`WS<8b&$D+*TBB[[ddiiњ ꆀ|xȁ{}zxytsxw䟟 wk|p}q|rkzpuxrq~~湹 zn|p}p{t\rMJ\a`8:))Moowwrrzz^Pl_j\l^m`tqvvyyhhᮮtgvwlAYYvvxxpp⍍ pcuyuttww媪 tkcdoo wj|p{txwqq咒og}فu|osi1,F# $ #% /&&S,+]--_..b00e23i78s==|??MM\\``Õ ܀|~ź~~sxpuwts㐐 |}q}q|sg|muyrq~~游 zn|p}p{t\sNJZ_j>@ ;bbyyrrzz`Roao`pbunvvyzhhம鎄xkuwlAYYvvxxpp⍍ pcuyuttww嫫 ogijϗ zm|pztxwqq吐me{ote] .  +100-<0PSUJH==}88o88n99n99p88o88p99u==}FFTT[[ ~{ЀԀv~axfv{on~~ }q|p|sd}kuyrq~~游 zn|p}p{t[pNIY^n@B 'TT||qqzzylpbqcrdulvuyzhhம됇wjuwlAYYvvyymm☘ pcuyuttww姧 f`mn yl|pyuwwrr䎎nfŀ칸|ptf]"/,--,0$IAvY[CC;;z77m88l99m99p99q;;t==w<<|99EE܀ր}р`Qgykvypoႂ }q|p|ri{nuxrq}}浵 zn|p}q{s`QSX\m@C +WW{{qqzzhYtfseukvtyzhhமꏆwjuwlAYYvvyyll៟ sf~tyussxx廻 hd zm}pyuxxnn✜플mhʅuiy[S#--+/!QF~noRR99w11g00f11g00h//h--g11nDDllڀ؁nJNOcylvxpo}q|p|rj{ouwtsww塡 zn|p}q{sbRXXZm@C *VV{{qqzz vguhugvjvtyzhh߭鏆wjuwlAXXvvyyll tg~tyussxx~vqq˷ zn}pyuxxllᣣ뒉lgljqd|OHs ).--,-PF{{|oo__nnzzzz̼℆qMYC=M[zeuypo~~|p{o{qizntwtsuu㛛 xl{o|pzraQVWZl@C *UUzzppyy 𒇺sfwixiusxyggޭ莅vitvkA]]vvxxkkߝ sf}swtrrww tl ym|owtwwllᠠ镍ok҉um}74V+.,,+.OE{z{srvv侾爊ꈉw}KT}C@GGIOzbtypo||}qzn{qj|jvrstvu⛛ xl{o|pzraQVWZl?B *UUzzppyy rdxjyjusxyggݬ獅vitvkAnnxxvvllߜ sf}svurrww{Ť ym|ovuwwllߠ݁vyҘHHw $, .&@3Q{}qpvvl{EG|B?~FGFEIOzbsxqo{{|qynzp~k}hxorsvu᜜ wlzo{pyraQVWZl?B )UUyyppyy qcxlyluswxggݬ獄uivpf)&H>ppyyuullߜ sf|suurrvvⓏ yn{ouuwwhhݳs{o|Æ{u~x}w~x~x}w}x~x}wyzvddHIx) )- /&A3R}rqvv㸸XqyA>|CB}EEFGGFIN{btyqo||}qzn|p{p{lxostut♙ xl{o|pzraQVVYtDG!*UUzzppyy ¾xݪ vhzmzmvtxyggޭ莅uiwod" ??ppyyvvll sf}svurrww髩 {n|pvuxxhh޵~rspe7-E )(2V-*j97*,- /&@2Oz{ssuu䦦ꃂzxmka]`Jmr@B|CB}ED~FFGGIKG@}^t{rqzz常}q{o|q{p{mxpvwppᆆ xl{p|p{rbSWUW|IL0 )UU{{rrww䫫 |qxltכ 􋁺{o|owtxxhh߭鎅ujvqf'%K?qqyyvvmm᝝ sf~svussww {n|qvuyyggߴthvqg60J -+1K))g99Y01 %- .' ;,Amlttvv媪ꜜkk[ZZXQNA=g>8`D=hG@mKEvTGrkFY{EIFDGGJMD7\t{srzz毯~r{o}q|q|lyovxooႂ ym|p}q|rfU_UV{IL/ +WW{{rrxx孭 }q{p~qzrgx |p}pytyyhhᮮꏆvjwqg(&N?qqzzwwmm➞ tg~twvssxx |o{rvvxxnn⹹naxpe.)A *-,->""`44q>>  +- .( ;+Amkuuvv堠ۏkjIGo40\83aFApKFtKDsMEtPGvRIySK|cKlzHPGEJMD8\t{srzz汱tzn}q|ri|kvyooႂ ~|p}q|rhVdUU{IL/ %SS||rrxx孭 }r{o}pymGQmR|{ }q}pytyyhhᮮꏆvjwqg(&N?qqzzwwmm➞ wj}txvrryy |q{rwvuv~~na{i`& %-5V//r??-- .( :)=ifvvvv卍ܚrnKEtD=lMEtOGvQHwTKzXM|WPcOwzJWJME9[uztrzz毯tzn}q|ri|kvyooႂ }q|p|rhVcUU{IL/ DD~~rrxx孭 ~r{n}pxqM]nTx~vu||렠 }q}pytyyhhᮮꏆvjwqg(&N?qqzzwwmm➞ ꎅxk}twwsryy 󌂾}q{swvuv恁 pc{g^-.-,0I))f88X00  %- .*5#0^Wwwvv卍{wIApPGvWM|WL|ZO^Q]SeS{M^F;X{xtutww䜜 tzn}q|q~lznvxpoႂ }q|p|rhVcUU{IL/ ??zqqxx孭~rzn}pxpKZnSx~vtrr䄄 }q}pytyyhhᮮ됇vjwqg(&N?qqzzxxkk⣣ ꎅxk|tvwsryy쿿 }qztwvuv~~ sfzi_ *.-,-=""\22{DD  +- .*4#0]Uvwvv億]TQEv\Q\Q_SbTbWiVKLUpwruuvv䒒 tzn}q|q~lzovxqp }q|p|rhVcUU{IL/ @@|qqxx孭~rzn}pxpKZnSw}vuqq{{ }q}pytyyhhᮮÿ勀wkwqg(&N?qqzzxxhhᮮ ꎅxk|tvwsryyݳ 򋀼}qztwwss勋 qe|bX&-,4Q,-u@@6-- -+.NBq~uurrTGy`SaTcVfWd[rSp}Zxqttvv㔔 szm|q|p}lyovwqq}} |q{p{rhVcUUzIL/ @@{~~qqww䬬}ryn|p~wpKZnSw|utqq}} |q|pwtxxhh߭܁vymvqg(&N?qqyywwggర 鍄wk{tuvsryy|zڮ xk}rysvwqr䖖 rf}^U ,--,/G'&f88V00  )(.(.) /,):,Dywۉ||eWbUeXgYj[k[s`ynstuu└ txl}pzrf|itxpo}} |p{o{qgUbTTzHK/ ??{~~ppww㬬}qym|o~woJYmRv|utpp|| |p|ovtxxhgޭtymupf(&M>ppyywwgg߮ 荄wj{suvrqwwrp se}rysvvqq㕕狁th{`W ,$/*-(.)-).)<$+W0/yB@'22f99v43g54g54f54g54f32d;:q]]yyՔeXeWk]l^k^octntuqqyy twl|pyqf|hswpo|| {pzo{p~kXkSQzHL/ ??z}}ppvv⫫|qxm{o}voKYmSu{utpp{{ {p{ovtwwhgݬ~txmtpf'&M>ppxxvvggޮ 獄vjzsturr|kj tf|rwsvvqqᔔ ÿ劀visNFt+44j77o54h54f54g54f54g54f54g85d:5_fE^1 6DDHH::w66m66k66j66k66j66l56k44g55i44i54h;7fPIzngӜvhZk^n`oapcsmvvqqwwtxl|p{q~kzntwpp|| }qzn|p}mYnTRrDH ??{~~ppww⬬}qym|o~woKYmSv|utpp|| |p|ovtxxhgݬtymuoe*(P''Uppxxwwggޮ ~xk{sstuuᔔ{xlk tf}rwtwwnnদ ~xkznLEt$%PQQDD;hXLwaShY{hʎykiZrdqdsctkuwqqxx txl|p{q~lzotwrqzz䴴 }qzn|p}mYnUSk?D @@{~~ppww㩩}qym|o~woKYmSv|utpp|| |p|ovtxxhgޭtymvod*'Q11jqqxxwwgg߯ s{nzrstuu└ywlk vi}qwtwwmm⫫ |r}rui_YZZSRDD;;{77n88k88l88k88l88k88l88k 88l78l88kB:cWL|eVdW+??yhhUU;;}++c''_((_((^((_((^((_ ''_0+ZREpiYl[si}kQT}焆 xjpathuevkvwrrxx zn|p|rk{ntxsrzz尰 ~r{o}q~nYoVTk?C  ??{~~rrvv䔔~rzn}pxoLYmTw}vuqq}} }q}pwuyyih߭ۀuznxla911jrryyxxhh௯ ڀt{ozttuvv㕕 }wwvrr wj~rwuwxnn⫫ ~sslbZUtubbPP??22j++a,,b,,a,,c,,b,,c,,a,,c,,b,,c,,a ,,b+,b--bG;eeVo_l`"0;;qttrr__bbrrqqqqqqqqqq ppqrmhnbvh{o}tnV_{m{|ss l^wjvhwkvussxx }q|o|sfhtysrzz汱 ~r{o}q~nYoXVb:=  BB}}ssvv呑~rzn}pxrM[oUw}vuqq}} }q}pwuyyihம܀uznyk_(22jssyyxxhhᰰ ۀt{ozttuvv䕕 ~yvv䆆 wj~rvvwxnn⯯}qui_UQz{wwoo^^QQYY__]]^^^^^^^^^^^^^^f\rd}qnd-++Siiww꿿wjs|r~o\q~kwvrs厎 xkwizkynxtstxx }q|o{sh~kuysrzz汱 ~r{o}q~nYoYW[6; 66issvv呑~rzn}pyhGUhPy~vuqq}} }q}pwuyyihம܀uznyk_"22jssyyxxhhᰰ ۀt{ozttuvv䖖~w{yvv剉 xk~rvvxxll⾾thusiidwxvvwwww줤 ~ss\S%%Hffyyttߧtgs|r~oZl|lwvuv zuh|ozoxsstxx }q|o|rl|ouxsszz氰 ~r{o}q}n\qQOJ,0 ''Krrvv呑~rzn|o{X=KYGx|vtqq}} }q}pwuyyihம܀uznyk_!22jssyyxxiiᱱ ۀt{ozttuvv䓓 |vyxvv劊 zm}rvvxxkkqdxlbZWyzuuvvppⶶ |psWN|OL;`mqwvoo|| |p|ovtxxhgޭtymxk^12iqrxxss}}俿 pc}txtrryy㰰 zt}ytutttt㢢 }{pysuuuu䃃 ꋁuiuog`axwuuuuoo ÿ|pxl|!0HHjjڈ w{o|q|piZwxqvykjޠ }xl}pzqtuuu㌌ ܀tym|p{p{mxntvrr ~rym}ovqeZ0+ ))Oqquu㐐}qym{ny[@SH7Ygkxwoo|| |p|ovtxxhgެsf|pwl^01gqrxxss}}侾 pc}txtrryy㰰yszzwtutt {{pytuust㑑 zvj~rme`axwttuu㊊ |pxly .66jttpp 侾w{o|q|qjYpyqvylkߝ 鏅wj~qzqtuuu䍍 zwk|q{q|mynuwqqyy ~rym}pupjO*& ))Oqquu䐐}qym{nyVAWE8]imxwoo|| |p|ovtxxji߮pc}qwl^ 45orsxxtt}}忿 pc}txtsryy䯯 xqzxvuuttss丸 zm~rysuurr䞝 |zmqe\Wggwwttuu䉉 |p{ooe"55gssqq 彽z{o}q|r}oRQzov{mlߝ 鏅xkr{rtvvv吐 zxl~q|ri}iuxrrzz szm}qxqiF*. ))Qrruu䃃~rzn{o{A9X32_nnxxpp}} }q}pwuvvvv㸸qd~rxl^$FGttxxuu~~ qd~uyurszz嵵 }y~yvuvvuutt徾 qctztvvss坜 ߃y|pqefauvvuuuvv吐 }q|pmb"..[mmtt}}䶶됇ym~r|r}pSUypv{on ꏅxkr{rvvvv億 zxl~q|rk|kuxrrzz tzm}p|sz`3!% ''L~~ttttssszn{o|?7U10]ooxxpp}} }q}pxvuu~~忿qd~rxl^%IJttxxuu~~ qd~uyuqr~} wq‚|{xuuvvuutt徾 rdtytvvss垝 |ptlad_yzvuuuvv夤Ё}qd[<``yyvvᣣxl~r|r}qTZ}nwyqq⋋ vis|qxuuuoo zxl~r|q~m{ovxrrzz tzm}p~ut\-"  7V//[nnyxpp}} }q}pxvuu}}徾qct}q]Lq+KHttxxuu~~ug}twvqq}} zs{vB@u>?ttuuss uh~swuvwqq䵵 uhuofheyxvuttuu庺 z}qtA;] MMjj܈sgs|q|ovN_aToqwvzz㵵 sfs|qxtuurr ~vj}q~svbp_wzsrxx tymzozLDj  7iivvttuu}qym{D=`;;ropqqoo}} }q}pxvuu}}佽qct}q]Lq,KHttxxtt ug}twvqq}}~xÇ\X)(UJJ||ttuuss uh~svuuwpp㹹 sfxaYVT{{uuttuu wk}qu1,FNNjj܇sh~rs~rVHpNFnowyyy⵵ pcs{pxsttrr㻻 }ui|q~sreg_rrrqww tzn{p|M@_ 7hhuusstt|pznsSOHHbcffggww |p|oxvtu||㽽pbs|p^Lp,LFssxxqqᐐtf|svupp||xq>;mJ\\yyttttrr tg}svvvvmm sfuiba`yyutsstt㽽 vj|pt2-H==vjj؃qd|qaXC?j65h12fVLrkvv毮 obs{pxsttrr⺺ |ui|psjbVVhhiiss vzo{q72P 6hhuusstt{or_XA@DDTT]]`` |p|pxwuvww㸸qct|p]Nx/+OIssxyppᒒuh|uvupp||{ŀygb&%L#$R^^xxttttrr wj|rwwwwnn ~uhulcdcyyuusstt þxk|pv --YuuooaTOHl3-J32`23e23g;6fYJ|`V ob~szqwstsrr⹹wk~roeLJGH]]__iiv{pzr40N 6hhuusstt~rh`@?y78t@@IIOO\\ |r}qyx{|kk㭭qdpfNHu;8j45g99sXQrnqp 范wlzuuuonysC@u.**Y[[wwsstt⍍ xk|ryyyyqq }wkpfEBvDEpovussst yl|qsi$$Gkkuuÿi^@8`96b44d77i77j68pA;uYQ pcu|rxtttss㫫~rxlPL68tEEQQTTgg w|s~vyn($9 7hhuusstt si@>x55m88t66x;;PP |q}s~r{z}~mn魭QFz>8V1.T54h66i55l<7lYHwg\ {o{uuvonz}vok--Y ++*[[[xxssuu㎎ xk}s{{{{tt{ZP@=l44gGA|qerott {o}r\T &XX}}}}鰰SMxA?n00b((^++b55nCC{z qew}uzutvuu䠠 ΂wWR9:r;;x::}::__ z{t|XS 6hhvvtttt B?y56m66pBB|QQii xn~uu}{tsE;g=7^<;l77h77k99o<=yIB{KC ـw}tzvvvooကyń~DAp?2/.cccxxttvv䏏 yk}s~~}~xx e[70[87d88k89m=>uvsɃurYY__vv}}Ճut) OOzzttuuwtȁ~yw99h玎 }{usppwwttuu䖖Ʉ~~x#"7  %??zzttttww嫫rftynoi{wzx+*EqqʎutɌdd1KKvvvv刈~~و}$#< OOyytttt俿Ѓ}97\LL}zyNM[\||ssvv䝝ysƒ}lg  DDrrttvv䨨nawshC>cggꄃ~|MM~ tt͐yyщmm1 DDvvwwoo삂77] NNyysstt㾾܁~CBo XX߀~ׇ,+K''Tefzzrruu㚚΀zzu31P  CCrrrrxxnawuj0+E~~ޗڀ~VV oo~~܉ut,,K EEuuwwkk덍ss,,I NNxxsstt⾾偀PP !cc熅䈇>=i''Qhhwwrruu⚚rlql CC~~rrrrxxobwqf%..P睝ᅄWVrr“눈ꊊ}}++ICCvvwwll RS NNyysstt⾾ꈈPP ``슊~~44W++Wggxxrruu⚚ztzu@=c EE}}rrrrxxrexqf%??kޚ 燇MM PP⡡hh1--Xvvwwmm vv..O NNyysstt㾾tt66\ <>ruuxx琊džւ}31Q,IIpmm}}Λ __AAq( ),,J>>j[[ͬ }}hhHHx44T##7TT 압煅jjSSFFv77[))A!//Qrrś 똘샃rrkk\\RRKK~99^))C- +//LGGvggԯppTT88_$$<.dd\[ 5 EEw㥥tu99^ (//HHHskkߨ \\@@p**K+ """9**I@@mFFwiiwwͤqqWWMMAAj((A'  3**F))F((E((F((E))E))F((E))E))F((E))E))F))E((E))F ((F))F**E++F$$<0.&((@++F))F((E((F((E))F))E((E))F))E((E))E))F))E((E))E**E**F$$<00  $((@..K;;cSSffzz㦦 jjWWJJ55[((F2 %%<,,F**F))F((E))E))F((E))E))F((E))E))F((F'(B0 *--F))F((F((E))F))E((E))F((E%%> +''=,,HIIyXXddЛ ||``SS@@n,,M 9$  &./%%>==e??h==f??h::`''C//%    '//1/--LCCm==e>>f==g>>g 88^ 8/0/-&  $+///155X>>g??f>>f==f<>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~aG4(\+sA| |ˌ)=;z*+s)ϿkmKXsMф u<y# ,Ek@AlS0&@ վ1lQ$} S~NwE'9"3 3I.!c\(1 l2/j/j' V_ p[ͷ?/LG/6/GyS'e41__}_b./??? ???4]C  JUmN4ag /4tkQr9 f5c3}q'|qT;TNI1nm@Qpb!6/ ܥojX]{ζ98|Wޤ<My*~ǽ9@65hn1   ޢa[6{"iM?`/?2yk)JR_VsVsV?V?}ZV,#[mH5j^n$o}ZV,#[mH5j^n$1 l> xi l> xiY5wΪTFv+qLKjҩw5wΪTFv+qLKjҩwR7aӭMK-k9eש7aӭMK-k9eש07aӭMKI9e߼7aӭMKI9e߼F0ӭMK+z+#9eB0ӭMK+z+#9eB$ӭMKib79e߼ӭMKib79e߼JӭMKĉ9eשzӭMKĉ9eשzӪPIar9hթӪPIar9hթdoL9u@`9>ealREGu@`9>ealREqWf,;%FgHA(z if,;%FgHA(z iiG*G*G~9_~9_={    &+ TN*fTN*f88TTUUUUULULSWSW$rH$rH%ig _TgR%ig _TgR_[ ,JHJ5 5Mr Gd {q invBT.iujfKM2Pt Jeyr ejy?08'PL< Lw!7~ G JR6Rq'  H݋S[z܅ohExw!70SSZq')P[^~py!7DJƅ /Pa|Y~j s'N@F)@.`^o7a\ /F(fYuv)_Yڴ`lt ~s\7f2 /[]ԺZrv o`)?7HF6 /EjmR<)2\q7gJ /,bu          XXHH<<<<+) h3ח4+) h3ח4|!5ʣN#+Pib&OG !5ʣN#+Pib&3)0w )0w3??Mf1V<f1V<*8NV*8NV2N <z172N <z17b"OD.k)Ⱥb"OD.k)Ⱥ<~\|%Ϛkȿ%%7~\|%Ϛkȿ%%7BTc 8 c dd!G._u R Y1._u R ~~y>% ~~y>%