src/video/android/SDL_androidgl.c
author Sam Lantinga <slouken@libsdl.org>
Mon, 24 Jan 2011 21:20:30 -0800
changeset 5090 327f181542f1
parent 4989 58b6bb4a45e9
child 5204 daa5463466c5
permissions -rw-r--r--
Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.

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