Mercurial > sdl-ios-xcode
diff 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 |
line wrap: on
line diff
--- a/src/video/android/SDL_androidgl.c Wed Jan 12 16:35:03 2011 -0800 +++ b/src/video/android/SDL_androidgl.c Wed Jan 12 17:53:06 2011 -0800 @@ -26,57 +26,68 @@ #include "SDL_video.h" #include "SDL_androidvideo.h" +#include "../../SDL_android.h" #include <android/log.h> -#include <pthread.h> - -/* -These things are in the JNI android support -*/ -extern void Android_CreateContext(); -extern void Android_Render(); /* GL functions */ -int Android_GL_LoadLibrary(_THIS, const char *path){ - __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n"); - return 0; +int +Android_GL_LoadLibrary(_THIS, const char *path) +{ + __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n"); + return 0; } -void *Android_GL_GetProcAddress(_THIS, const char *proc){ - __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n"); - return 0; +void * +Android_GL_GetProcAddress(_THIS, const char *proc) +{ + __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n"); + return 0; } -void Android_GL_UnloadLibrary(_THIS){ - __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n"); +void +Android_GL_UnloadLibrary(_THIS) +{ + __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n"); +} + +SDL_GLContext +Android_GL_CreateContext(_THIS, SDL_Window * window) +{ + Android_JNI_CreateContext(); + return 1; } -SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){ - Android_CreateContext(); - return 1; +int +Android_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +{ + /* There's only one context, nothing to do... */ + return 0; } -int Android_GL_MakeCurrent(_THIS, SDL_Window * window, - SDL_GLContext context){ - //__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n"); - return 0; +int +Android_GL_SetSwapInterval(_THIS, int interval) +{ + __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n"); + return 0; } -int Android_GL_SetSwapInterval(_THIS, int interval){ - __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n"); - return 0; +int +Android_GL_GetSwapInterval(_THIS) +{ + __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n"); + return 0; } -int Android_GL_GetSwapInterval(_THIS){ - __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n"); - return 0; +void +Android_GL_SwapWindow(_THIS, SDL_Window * window) +{ + Android_JNI_SwapWindow(); } -void Android_GL_SwapWindow(_THIS, SDL_Window * window){ - Android_Render(); +void +Android_GL_DeleteContext(_THIS, SDL_GLContext context) +{ + __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n"); } - -void Android_GL_DeleteContext(_THIS, SDL_GLContext context){ - __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n"); -}