Mercurial > sdl-ios-xcode
annotate android/testproject/jni/importgl.cpp @ 4711:ed040b480a9f
- Restructured threads and application structure.
- Moved to SurfaceView instead of GLSurfaceView
- Moved to C++ for the android library
author | Paul Hunkin <paul@bieh.net> |
---|---|
date | Tue, 29 Jun 2010 00:40:12 +1200 |
parents | |
children |
rev | line source |
---|---|
4711
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
1 /* San Angeles Observation OpenGL ES version example |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
2 * Copyright 2004-2005 Jetro Lauha |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
3 * All rights reserved. |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
4 * Web: http://iki.fi/jetro/ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
5 * |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
6 * This source is free software; you can redistribute it and/or |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
7 * modify it under the terms of EITHER: |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
8 * (1) The GNU Lesser General Public License as published by the Free |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
9 * Software Foundation; either version 2.1 of the License, or (at |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
10 * your option) any later version. The text of the GNU Lesser |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
11 * General Public License is included with this source in the |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
12 * file LICENSE-LGPL.txt. |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
13 * (2) The BSD-style license that is included with this source in |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
14 * the file LICENSE-BSD.txt. |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
15 * |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
16 * This source is distributed in the hope that it will be useful, |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
19 * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details. |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
20 * |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
21 * $Id: importgl.c,v 1.4 2005/02/08 18:42:55 tonic Exp $ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
22 * $Revision: 1.4 $ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
23 */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
24 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
25 #undef WIN32 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
26 #undef LINUX |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
27 #ifdef _MSC_VER |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
28 // Desktop or mobile Win32 environment: |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
29 #define WIN32 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
30 #else |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
31 // Linux environment: |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
32 #define LINUX |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
33 #endif |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
34 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
35 #ifndef DISABLE_IMPORTGL |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
36 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
37 #if defined(WIN32) |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
38 #define WIN32_LEAN_AND_MEAN |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
39 #include <windows.h> |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
40 #include <tchar.h> |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
41 static HMODULE sGLESDLL = NULL; |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
42 #endif // WIN32 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
43 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
44 #ifdef LINUX |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
45 #include <stdlib.h> |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
46 #include <dlfcn.h> |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
47 static void *sGLESSO = NULL; |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
48 #endif // LINUX |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
49 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
50 #endif /* DISABLE_IMPORTGL */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
51 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
52 #define IMPORTGL_NO_FNPTR_DEFS |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
53 #define IMPORTGL_API |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
54 #define IMPORTGL_FNPTRINIT = NULL |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
55 #include "importgl.h" |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
56 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
57 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
58 /* Imports function pointers to selected function calls in OpenGL ES Common |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
59 * or Common Lite profile DLL or shared object. The function pointers are |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
60 * stored as global symbols with equivalent function name but prefixed with |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
61 * "funcPtr_". Standard gl/egl calls are redirected to the function pointers |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
62 * with preprocessor macros (see importgl.h). |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
63 */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
64 int importGLInit() |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
65 { |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
66 int result = 1; |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
67 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
68 #ifndef DISABLE_IMPORTGL |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
69 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
70 #undef IMPORT_FUNC |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
71 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
72 #ifdef WIN32 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
73 sGLESDLL = LoadLibrary(_T("libGLES_CM.dll")); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
74 if (sGLESDLL == NULL) |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
75 sGLESDLL = LoadLibrary(_T("libGLES_CL.dll")); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
76 if (sGLESDLL == NULL) |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
77 return 0; // Cannot find OpenGL ES Common or Common Lite DLL. |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
78 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
79 /* The following fetches address to each egl & gl function call |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
80 * and stores it to the related function pointer. Casting through |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
81 * void * results in warnings with VC warning level 4, which |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
82 * could be fixed by casting to the true type for each fetch. |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
83 */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
84 #define IMPORT_FUNC(funcName) do { \ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
85 void *procAddress = (void *)GetProcAddress(sGLESDLL, _T(#funcName)); \ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
86 if (procAddress == NULL) result = 0; \ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
87 *((void **)&FNPTR(funcName)) = procAddress; } while (0) |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
88 #endif // WIN32 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
89 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
90 #ifdef LINUX |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
91 #ifdef ANDROID_NDK |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
92 sGLESSO = dlopen("libGLESv1_CM.so", RTLD_NOW); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
93 #else /* !ANDROID_NDK */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
94 sGLESSO = dlopen("libGLES_CM.so", RTLD_NOW); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
95 if (sGLESSO == NULL) |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
96 sGLESSO = dlopen("libGLES_CL.so", RTLD_NOW); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
97 #endif /* !ANDROID_NDK */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
98 if (sGLESSO == NULL) |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
99 return 0; // Cannot find OpenGL ES Common or Common Lite SO. |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
100 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
101 #define IMPORT_FUNC(funcName) do { \ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
102 void *procAddress = (void *)dlsym(sGLESSO, #funcName); \ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
103 if (procAddress == NULL) result = 0; \ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
104 *((void **)&FNPTR(funcName)) = procAddress; } while (0) |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
105 #endif // LINUX |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
106 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
107 #ifndef ANDROID_NDK |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
108 IMPORT_FUNC(eglChooseConfig); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
109 IMPORT_FUNC(eglCreateContext); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
110 IMPORT_FUNC(eglCreateWindowSurface); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
111 IMPORT_FUNC(eglDestroyContext); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
112 IMPORT_FUNC(eglDestroySurface); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
113 IMPORT_FUNC(eglGetConfigAttrib); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
114 IMPORT_FUNC(eglGetConfigs); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
115 IMPORT_FUNC(eglGetDisplay); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
116 IMPORT_FUNC(eglGetError); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
117 IMPORT_FUNC(eglInitialize); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
118 IMPORT_FUNC(eglMakeCurrent); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
119 IMPORT_FUNC(eglSwapBuffers); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
120 IMPORT_FUNC(eglTerminate); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
121 #endif /* !ANDROID_NDK */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
122 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
123 IMPORT_FUNC(glBlendFunc); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
124 IMPORT_FUNC(glClear); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
125 IMPORT_FUNC(glClearColorx); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
126 IMPORT_FUNC(glColor4x); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
127 IMPORT_FUNC(glColorPointer); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
128 IMPORT_FUNC(glDisable); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
129 IMPORT_FUNC(glDisableClientState); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
130 IMPORT_FUNC(glDrawArrays); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
131 IMPORT_FUNC(glEnable); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
132 IMPORT_FUNC(glEnableClientState); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
133 IMPORT_FUNC(glFrustumx); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
134 IMPORT_FUNC(glGetError); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
135 IMPORT_FUNC(glLightxv); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
136 IMPORT_FUNC(glLoadIdentity); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
137 IMPORT_FUNC(glMaterialx); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
138 IMPORT_FUNC(glMaterialxv); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
139 IMPORT_FUNC(glMatrixMode); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
140 IMPORT_FUNC(glMultMatrixx); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
141 IMPORT_FUNC(glNormalPointer); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
142 IMPORT_FUNC(glPopMatrix); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
143 IMPORT_FUNC(glPushMatrix); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
144 IMPORT_FUNC(glRotatex); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
145 IMPORT_FUNC(glScalex); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
146 IMPORT_FUNC(glShadeModel); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
147 IMPORT_FUNC(glTranslatex); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
148 IMPORT_FUNC(glVertexPointer); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
149 IMPORT_FUNC(glViewport); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
150 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
151 #endif /* DISABLE_IMPORTGL */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
152 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
153 return result; |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
154 } |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
155 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
156 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
157 void importGLDeinit() |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
158 { |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
159 #ifndef DISABLE_IMPORTGL |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
160 #ifdef WIN32 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
161 FreeLibrary(sGLESDLL); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
162 #endif |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
163 |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
164 #ifdef LINUX |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
165 dlclose(sGLESSO); |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
166 #endif |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
167 #endif /* DISABLE_IMPORTGL */ |
ed040b480a9f
- Restructured threads and application structure.
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
168 } |