src/video/android/SDL_androidgl.c
changeset 4989 58b6bb4a45e9
parent 4980 d9fdff945ec9
child 5090 327f181542f1
     1.1 --- a/src/video/android/SDL_androidgl.c	Wed Jan 12 16:35:03 2011 -0800
     1.2 +++ b/src/video/android/SDL_androidgl.c	Wed Jan 12 17:53:06 2011 -0800
     1.3 @@ -26,57 +26,68 @@
     1.4  #include "SDL_video.h"
     1.5  
     1.6  #include "SDL_androidvideo.h"
     1.7 +#include "../../SDL_android.h"
     1.8  
     1.9  #include <android/log.h>
    1.10  
    1.11 -#include <pthread.h>
    1.12 -
    1.13 -/*
    1.14 -These things are in the JNI android support
    1.15 -*/
    1.16 -extern void Android_CreateContext();
    1.17 -extern void Android_Render();
    1.18  
    1.19  /* GL functions */
    1.20 -int Android_GL_LoadLibrary(_THIS, const char *path){
    1.21 -	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n");
    1.22 -	return 0;
    1.23 +int
    1.24 +Android_GL_LoadLibrary(_THIS, const char *path)
    1.25 +{
    1.26 +    __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n");
    1.27 +    return 0;
    1.28  }
    1.29  
    1.30 -void *Android_GL_GetProcAddress(_THIS, const char *proc){
    1.31 -	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n");
    1.32 -	return 0;
    1.33 +void *
    1.34 +Android_GL_GetProcAddress(_THIS, const char *proc)
    1.35 +{
    1.36 +    __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n");
    1.37 +    return 0;
    1.38  }
    1.39  
    1.40 -void Android_GL_UnloadLibrary(_THIS){
    1.41 -	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n");
    1.42 +void
    1.43 +Android_GL_UnloadLibrary(_THIS)
    1.44 +{
    1.45 +    __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n");
    1.46  }
    1.47  
    1.48 -SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window){
    1.49 -	Android_CreateContext();
    1.50 -	return 1;
    1.51 +SDL_GLContext
    1.52 +Android_GL_CreateContext(_THIS, SDL_Window * window)
    1.53 +{
    1.54 +    Android_JNI_CreateContext();
    1.55 +    return 1;
    1.56  }
    1.57  
    1.58 -int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
    1.59 -                              SDL_GLContext context){
    1.60 -	//__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_MakeCurrent\n");
    1.61 -	return 0;
    1.62 +int
    1.63 +Android_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
    1.64 +{
    1.65 +    /* There's only one context, nothing to do... */
    1.66 +    return 0;
    1.67  }
    1.68  
    1.69 -int Android_GL_SetSwapInterval(_THIS, int interval){
    1.70 -	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n");
    1.71 -	return 0;
    1.72 +int
    1.73 +Android_GL_SetSwapInterval(_THIS, int interval)
    1.74 +{
    1.75 +    __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n");
    1.76 +    return 0;
    1.77  }
    1.78  
    1.79 -int Android_GL_GetSwapInterval(_THIS){
    1.80 -	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n");
    1.81 -	return 0;
    1.82 +int
    1.83 +Android_GL_GetSwapInterval(_THIS)
    1.84 +{
    1.85 +    __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n");
    1.86 +    return 0;
    1.87  }
    1.88  
    1.89 -void Android_GL_SwapWindow(_THIS, SDL_Window * window){
    1.90 -	Android_Render();
    1.91 +void
    1.92 +Android_GL_SwapWindow(_THIS, SDL_Window * window)
    1.93 +{
    1.94 +    Android_JNI_SwapWindow();
    1.95  }
    1.96  
    1.97 -void Android_GL_DeleteContext(_THIS, SDL_GLContext context){
    1.98 -	__android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n");
    1.99 +void
   1.100 +Android_GL_DeleteContext(_THIS, SDL_GLContext context)
   1.101 +{
   1.102 +    __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n");
   1.103  }