src/video/android/SDL_androidgl.c
author Sam Lantinga <slouken@libsdl.org>
Sun, 06 Feb 2011 02:35:14 -0800
changeset 5204 daa5463466c5
parent 5090 327f181542f1
child 5222 c66b2a778b7e
permissions -rw-r--r--
Fixed building on Android, added SDL_opengles2.h, removed unnecessary SDL_glesfuncs.h
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2010 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 
    24 /* Android SDL video driver implementation */
    25 
    26 #include "SDL_video.h"
    27 
    28 #include "SDL_androidvideo.h"
    29 #include "../../core/android/SDL_android.h"
    30 
    31 #include <android/log.h>
    32 
    33 
    34 /* GL functions */
    35 int
    36 Android_GL_LoadLibrary(_THIS, const char *path)
    37 {
    38     __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_LoadLibrary\n");
    39     return 0;
    40 }
    41 
    42 void *
    43 Android_GL_GetProcAddress(_THIS, const char *proc)
    44 {
    45     __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetProcAddress\n");
    46     return 0;
    47 }
    48 
    49 void
    50 Android_GL_UnloadLibrary(_THIS)
    51 {
    52     __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_UnloadLibrary\n");
    53 }
    54 
    55 SDL_GLContext
    56 Android_GL_CreateContext(_THIS, SDL_Window * window)
    57 {
    58     Android_JNI_CreateContext();
    59     return (SDL_GLContext)1;
    60 }
    61 
    62 int
    63 Android_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
    64 {
    65     /* There's only one context, nothing to do... */
    66     return 0;
    67 }
    68 
    69 int
    70 Android_GL_SetSwapInterval(_THIS, int interval)
    71 {
    72     __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_SetSwapInterval\n");
    73     return 0;
    74 }
    75 
    76 int
    77 Android_GL_GetSwapInterval(_THIS)
    78 {
    79     __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_GetSwapInterval\n");
    80     return 0;
    81 }
    82 
    83 void
    84 Android_GL_SwapWindow(_THIS, SDL_Window * window)
    85 {
    86     Android_JNI_SwapWindow();
    87 }
    88 
    89 void
    90 Android_GL_DeleteContext(_THIS, SDL_GLContext context)
    91 {
    92     __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n");
    93 }