src/video/android/SDL_androidvideo.c
changeset 7659 ac4ce59c40e7
parent 7253 eee81780005e
child 7786 cfc1285375e1
equal deleted inserted replaced
7658:4033ba4fcc31 7659:ac4ce59c40e7
    42 
    42 
    43 /* Initialization/Query functions */
    43 /* Initialization/Query functions */
    44 static int Android_VideoInit(_THIS);
    44 static int Android_VideoInit(_THIS);
    45 static void Android_VideoQuit(_THIS);
    45 static void Android_VideoQuit(_THIS);
    46 
    46 
       
    47 #include "../SDL_egl.h"
    47 /* GL functions (SDL_androidgl.c) */
    48 /* GL functions (SDL_androidgl.c) */
    48 extern int Android_GL_LoadLibrary(_THIS, const char *path);
    49 extern SDL_GLContext Android_GLES_CreateContext(_THIS, SDL_Window * window);
    49 extern void *Android_GL_GetProcAddress(_THIS, const char *proc);
    50 extern int Android_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
    50 extern void Android_GL_UnloadLibrary(_THIS);
    51 extern void Android_GLES_SwapWindow(_THIS, SDL_Window * window);
    51 extern SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window);
    52 extern int Android_GLES_LoadLibrary(_THIS, const char *path);
    52 extern int Android_GL_MakeCurrent(_THIS, SDL_Window * window,
    53 #define Android_GLES_GetProcAddress SDL_EGL_GetProcAddress
    53                               SDL_GLContext context);
    54 #define Android_GLES_UnloadLibrary SDL_EGL_UnloadLibrary
    54 extern int Android_GL_SetSwapInterval(_THIS, int interval);
    55 #define Android_GLES_SetSwapInterval SDL_EGL_SetSwapInterval
    55 extern int Android_GL_GetSwapInterval(_THIS);
    56 #define Android_GLES_GetSwapInterval SDL_EGL_GetSwapInterval
    56 extern void Android_GL_SwapWindow(_THIS, SDL_Window * window);
    57 #define Android_GLES_DeleteContext SDL_EGL_DeleteContext
    57 extern void Android_GL_DeleteContext(_THIS, SDL_GLContext context);
       
    58 
    58 
    59 /* Android driver bootstrap functions */
    59 /* Android driver bootstrap functions */
    60 
    60 
    61 
    61 
    62 /* These are filled in with real values in Android_SetScreenResolution on init (before SDL_main()) */
    62 /* These are filled in with real values in Android_SetScreenResolution on init (before SDL_main()) */
   112     device->DestroyWindow = Android_DestroyWindow;
   112     device->DestroyWindow = Android_DestroyWindow;
   113 
   113 
   114     device->free = Android_DeleteDevice;
   114     device->free = Android_DeleteDevice;
   115 
   115 
   116     /* GL pointers */
   116     /* GL pointers */
   117     device->GL_LoadLibrary = Android_GL_LoadLibrary;
   117     device->GL_LoadLibrary = Android_GLES_LoadLibrary;
   118     device->GL_GetProcAddress = Android_GL_GetProcAddress;
   118     device->GL_GetProcAddress = Android_GLES_GetProcAddress;
   119     device->GL_UnloadLibrary = Android_GL_UnloadLibrary;
   119     device->GL_UnloadLibrary = Android_GLES_UnloadLibrary;
   120     device->GL_CreateContext = Android_GL_CreateContext;
   120     device->GL_CreateContext = Android_GLES_CreateContext;
   121     device->GL_MakeCurrent = Android_GL_MakeCurrent;
   121     device->GL_MakeCurrent = Android_GLES_MakeCurrent;
   122     device->GL_SetSwapInterval = Android_GL_SetSwapInterval;
   122     device->GL_SetSwapInterval = Android_GLES_SetSwapInterval;
   123     device->GL_GetSwapInterval = Android_GL_GetSwapInterval;
   123     device->GL_GetSwapInterval = Android_GLES_GetSwapInterval;
   124     device->GL_SwapWindow = Android_GL_SwapWindow;
   124     device->GL_SwapWindow = Android_GLES_SwapWindow;
   125     device->GL_DeleteContext = Android_GL_DeleteContext;
   125     device->GL_DeleteContext = Android_GLES_DeleteContext;
   126 
   126 
   127     /* Text input */
   127     /* Text input */
   128     device->StartTextInput = Android_StartTextInput;
   128     device->StartTextInput = Android_StartTextInput;
   129     device->StopTextInput = Android_StopTextInput;
   129     device->StopTextInput = Android_StopTextInput;
   130     device->SetTextInputRect = Android_SetTextInputRect;
   130     device->SetTextInputRect = Android_SetTextInputRect;