Mercurial > sdl-ios-xcode
comparison src/video/android/SDL_androidgl.c @ 4989:58b6bb4a45e9
More Android cleanup:
* Formalized the interface with Java methods in SDL_android.h
* We don't need the feature system, at least right now
* Fixed waiting for the SDLMain thread
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 12 Jan 2011 17:53:06 -0800 |
parents | d9fdff945ec9 |
children | 327f181542f1 |
comparison
equal
deleted
inserted
replaced
4988:f9af88a9c823 | 4989:58b6bb4a45e9 |
---|---|
24 /* Android SDL video driver implementation */ | 24 /* Android SDL video driver implementation */ |
25 | 25 |
26 #include "SDL_video.h" | 26 #include "SDL_video.h" |
27 | 27 |
28 #include "SDL_androidvideo.h" | 28 #include "SDL_androidvideo.h" |
29 #include "../../SDL_android.h" | |
29 | 30 |
30 #include <android/log.h> | 31 #include <android/log.h> |
31 | 32 |
32 #include <pthread.h> | |
33 | |
34 /* | |
35 These things are in the JNI android support | |
36 */ | |
37 extern void Android_CreateContext(); | |
38 extern void Android_Render(); | |
39 | 33 |
40 /* GL functions */ | 34 /* GL functions */ |
41 int Android_GL_LoadLibrary(_THIS, const char *path){ | 35 int |
42 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n"); | 36 Android_GL_LoadLibrary(_THIS, const char *path) |
43 return 0; | 37 { |
38 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n"); | |
39 return 0; | |
44 } | 40 } |
45 | 41 |
46 void *Android_GL_GetProcAddress(_THIS, const char *proc){ | 42 void * |
47 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n"); | 43 Android_GL_GetProcAddress(_THIS, const char *proc) |
48 return 0; | 44 { |
45 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n"); | |
46 return 0; | |
49 } | 47 } |
50 | 48 |
51 void Android_GL_UnloadLibrary(_THIS){ | 49 void |
52 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n"); | 50 Android_GL_UnloadLibrary(_THIS) |
51 { | |
52 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n"); | |
53 } | 53 } |
54 | 54 |
55 SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){ | 55 SDL_GLContext |
56 Android_CreateContext(); | 56 Android_GL_CreateContext(_THIS, SDL_Window * window) |
57 return 1; | 57 { |
58 Android_JNI_CreateContext(); | |
59 return 1; | |
58 } | 60 } |
59 | 61 |
60 int Android_GL_MakeCurrent(_THIS, SDL_Window * window, | 62 int |
61 SDL_GLContext context){ | 63 Android_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) |
62 //__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n"); | 64 { |
63 return 0; | 65 /* There's only one context, nothing to do... */ |
66 return 0; | |
64 } | 67 } |
65 | 68 |
66 int Android_GL_SetSwapInterval(_THIS, int interval){ | 69 int |
67 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n"); | 70 Android_GL_SetSwapInterval(_THIS, int interval) |
68 return 0; | 71 { |
72 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n"); | |
73 return 0; | |
69 } | 74 } |
70 | 75 |
71 int Android_GL_GetSwapInterval(_THIS){ | 76 int |
72 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n"); | 77 Android_GL_GetSwapInterval(_THIS) |
73 return 0; | 78 { |
79 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n"); | |
80 return 0; | |
74 } | 81 } |
75 | 82 |
76 void Android_GL_SwapWindow(_THIS, SDL_Window * window){ | 83 void |
77 Android_Render(); | 84 Android_GL_SwapWindow(_THIS, SDL_Window * window) |
85 { | |
86 Android_JNI_SwapWindow(); | |
78 } | 87 } |
79 | 88 |
80 void Android_GL_DeleteContext(_THIS, SDL_GLContext context){ | 89 void |
81 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n"); | 90 Android_GL_DeleteContext(_THIS, SDL_GLContext context) |
91 { | |
92 __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n"); | |
82 } | 93 } |