Mercurial > sdl-ios-xcode
annotate src/video/android/SDL_androidgl.c @ 4701:d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
author | Paul Hunkin <paul@bieh.net> |
---|---|
date | Thu, 10 Jun 2010 18:54:23 +1200 |
parents | |
children | c93b44ddc63e |
rev | line source |
---|---|
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
1 /* |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
3 Copyright (C) 1997-2010 Sam Lantinga |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
4 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
9 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
14 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
18 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
19 Sam Lantinga |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
20 slouken@libsdl.org |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
21 */ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
22 #include "SDL_config.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
23 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
24 /* Android SDL video driver implementation |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
25 */ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
26 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
27 #include "SDL_video.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
28 #include "SDL_mouse.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
29 #include "../SDL_sysvideo.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
30 #include "../SDL_pixels_c.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
31 #include "../../events/SDL_events_c.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
32 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
33 #include "SDL_androidvideo.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
34 #include "SDL_androidevents_c.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
35 #include "SDL_androidrender_c.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
36 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
37 /* Android header */ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
38 #include "egl.h" |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
39 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
40 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
41 //EGL globals |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
42 static EGLDisplay iEglDisplay; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
43 static EGLConfig iEglConfig; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
44 static EGLContext iEglContext; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
45 static EGLSurface iEglSurface; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
46 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
47 EGLint attribList [] = |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
48 { |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
49 EGL_BUFFER_SIZE, 16, //16 bit color |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
50 EGL_DEPTH_SIZE, 15, |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
51 EGL_NONE |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
52 }; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
53 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
54 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
55 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
56 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
57 /* GL functions */ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
58 int Android_GL_LoadLibrary(_THIS, const char *path){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
59 printf("[STUB] GL_LoadLibrary\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
60 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
61 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
62 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
63 void *Android_GL_GetProcAddress(_THIS, const char *proc){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
64 printf("[STUB] GL_GetProcAddress\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
65 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
66 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
67 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
68 void Android_GL_UnloadLibrary(_THIS){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
69 printf("[STUB] GL_UnloadLibrary\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
70 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
71 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
72 /* |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
73 int *Android_GL_GetVisual(_THIS, Display * display, int screen){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
74 printf("[STUB] GL_GetVisual\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
75 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
76 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
77 */ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
78 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
79 SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
80 printf("[STUB] GL_CreateContext\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
81 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
82 //Start up the display |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
83 iEglDisplay = eglGetDisplay (EGL_DEFAULT_DISPLAY); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
84 if(iEglDisplay == EGL_NO_DISPLAY){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
85 printf("Unable to find a suitable EGLDisplay\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
86 return NULL; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
87 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
88 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
89 printf("1\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
90 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
91 if(!eglInitialize(iEglDisplay, 0, 0)){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
92 printf("Couldn't init display\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
93 return NULL; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
94 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
95 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
96 printf("2\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
97 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
98 EGLint numConfigs; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
99 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
100 if(!eglChooseConfig(iEglDisplay, attribList, &iEglConfig, 1, &numConfigs)){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
101 printf("Couldn't choose config\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
102 return NULL; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
103 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
104 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
105 printf("3\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
106 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
107 iEglContext = eglCreateContext(iEglDisplay, iEglConfig, EGL_NO_CONTEXT, 0); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
108 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
109 if(iEglContext == 0){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
110 printf("Couldn't create context\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
111 return NULL; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
112 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
113 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
114 printf("4\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
115 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
116 NativeWindowType iWindow = 1; //android_createDisplaySurface(); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
117 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
118 iEglSurface = eglCreateWindowSurface(iEglDisplay, iEglConfig, iWindow, 0); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
119 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
120 printf("5\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
121 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
122 if(iEglSurface == NULL){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
123 printf("Couldn't create surface\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
124 return NULL; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
125 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
126 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
127 printf("6\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
128 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
129 eglMakeCurrent(iEglDisplay, iEglSurface, iEglSurface, iEglContext); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
130 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
131 printf("fininshed making context\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
132 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
133 return iEglSurface; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
134 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
135 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
136 int Android_GL_MakeCurrent(_THIS, SDL_Window * window, |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
137 SDL_GLContext context){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
138 printf("[STUB] GL_MakeCurrent\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
139 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
140 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
141 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
142 int Android_GL_SetSwapInterval(_THIS, int interval){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
143 printf("[STUB] GL_SetSwapInterval\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
144 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
145 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
146 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
147 int Android_GL_GetSwapInterval(_THIS){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
148 printf("[STUB] GL_GetSwapInterval\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
149 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
150 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
151 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
152 void Android_GL_SwapWindow(_THIS, SDL_Window * window){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
153 printf("[STUB] GL_SwapWindow\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
154 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
155 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
156 void Android_GL_DeleteContext(_THIS, SDL_GLContext context){ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
157 printf("[STUB] GL_DeleteContext\n"); |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
158 } |