Mercurial > sdl-ios-xcode
annotate src/video/android/SDL_androidgl.c @ 4707:8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
author | Paul Hunkin <paul@bieh.net> |
---|---|
date | Fri, 18 Jun 2010 00:03:09 +1200 |
parents | c93b44ddc63e |
children | 6dc26b9d8368 |
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" |
4703
c93b44ddc63e
Fixed #includes to fix naming conventions
Paul Hunkin <paul@bieh.net>
parents:
4701
diff
changeset
|
34 #include "SDL_androidevents.h" |
c93b44ddc63e
Fixed #includes to fix naming conventions
Paul Hunkin <paul@bieh.net>
parents:
4701
diff
changeset
|
35 #include "SDL_androidrender.h" |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
36 |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
37 #include <android/log.h> |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
38 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
39 |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
40 /* |
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
41 These things are in the JNI android support |
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
42 */ |
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
43 |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
44 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
45 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
46 /* GL functions */ |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
47 int Android_GL_LoadLibrary(_THIS, const char *path){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
48 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
49 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
50 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
51 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
52 void *Android_GL_GetProcAddress(_THIS, const char *proc){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
53 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
54 return 0; |
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 void Android_GL_UnloadLibrary(_THIS){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
58 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
59 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
60 |
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 int *Android_GL_GetVisual(_THIS, Display * display, int screen){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
63 __android_log_print(ANDROID_LOG_INFO, "SDL","[STUB] GL_GetVisual\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
64 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
65 } |
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 SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
69 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_CreateContext\n"); |
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
70 return NULL; |
4701
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_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
|
74 SDL_GLContext context){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
75 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
76 return 0; |
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 int Android_GL_SetSwapInterval(_THIS, int interval){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
80 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
81 return 0; |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
82 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
83 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
84 int Android_GL_GetSwapInterval(_THIS){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
85 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
86 return 0; |
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 void Android_GL_SwapWindow(_THIS, SDL_Window * window){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
90 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SwapWindow\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
91 } |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
92 |
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
93 void Android_GL_DeleteContext(_THIS, SDL_GLContext context){ |
4707
8b109f0dcd2f
Removed old video subsystem, along with (now-unncessary) egl files.
Paul Hunkin <paul@bieh.net>
parents:
4703
diff
changeset
|
94 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n"); |
4701
d40bb3165d2b
Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents:
diff
changeset
|
95 } |