mirror of https://github.com/encounter/SDL.git
Vita: PVROGL: fix indentation and ifdef guards
This commit is contained in:
parent
b5700ab31e
commit
95c0fec518
src
|
@ -30,7 +30,7 @@
|
||||||
#include <OpenGL/OpenGL.h>
|
#include <OpenGL/OpenGL.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __psp2__
|
#ifdef SDL_VIDEO_VITA_PVR_OGL
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1738,7 +1738,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
|
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
|
||||||
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
|
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
|
||||||
|
|
||||||
#ifndef __psp2__
|
#ifndef SDL_VIDEO_VITA_PVR_OGL
|
||||||
window_flags = SDL_GetWindowFlags(window);
|
window_flags = SDL_GetWindowFlags(window);
|
||||||
if (!(window_flags & SDL_WINDOW_OPENGL) ||
|
if (!(window_flags & SDL_WINDOW_OPENGL) ||
|
||||||
profile_mask == SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {
|
profile_mask == SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {
|
||||||
|
|
|
@ -94,9 +94,9 @@ VITA_GL_CreateContext(_THIS, SDL_Window * window)
|
||||||
int temp_minor = _this->gl_config.minor_version;
|
int temp_minor = _this->gl_config.minor_version;
|
||||||
int temp_profile = _this->gl_config.profile_mask;
|
int temp_profile = _this->gl_config.profile_mask;
|
||||||
|
|
||||||
/* Set version to 2.1 and PROFILE to ES */
|
/* Set version to 2.0 and PROFILE to ES */
|
||||||
_this->gl_config.major_version = 2;
|
_this->gl_config.major_version = 2;
|
||||||
_this->gl_config.minor_version = 1;
|
_this->gl_config.minor_version = 0;
|
||||||
_this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES;
|
_this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES;
|
||||||
|
|
||||||
context = SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
|
context = SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
|
||||||
|
|
|
@ -142,16 +142,20 @@ VITA_Create()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_VITA_PIB) || defined(SDL_VIDEO_VITA_PVR)
|
#if defined(SDL_VIDEO_VITA_PIB) || defined(SDL_VIDEO_VITA_PVR)
|
||||||
|
#if defined(SDL_VIDEO_VITA_PVR_OGL)
|
||||||
if(SDL_getenv("VITA_PVR_OGL") != NULL) {
|
if(SDL_getenv("VITA_PVR_OGL") != NULL) {
|
||||||
device->GL_LoadLibrary = VITA_GL_LoadLibrary;
|
device->GL_LoadLibrary = VITA_GL_LoadLibrary;
|
||||||
device->GL_CreateContext = VITA_GL_CreateContext;
|
device->GL_CreateContext = VITA_GL_CreateContext;
|
||||||
device->GL_GetProcAddress = VITA_GL_GetProcAddress;
|
device->GL_GetProcAddress = VITA_GL_GetProcAddress;
|
||||||
}
|
} else {
|
||||||
else {
|
#endif
|
||||||
device->GL_LoadLibrary = VITA_GLES_LoadLibrary;
|
device->GL_LoadLibrary = VITA_GLES_LoadLibrary;
|
||||||
device->GL_CreateContext = VITA_GLES_CreateContext;
|
device->GL_CreateContext = VITA_GLES_CreateContext;
|
||||||
device->GL_GetProcAddress = VITA_GLES_GetProcAddress;
|
device->GL_GetProcAddress = VITA_GLES_GetProcAddress;
|
||||||
|
#if defined(SDL_VIDEO_VITA_PVR_OGL)
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
device->GL_UnloadLibrary = VITA_GLES_UnloadLibrary;
|
device->GL_UnloadLibrary = VITA_GLES_UnloadLibrary;
|
||||||
device->GL_MakeCurrent = VITA_GLES_MakeCurrent;
|
device->GL_MakeCurrent = VITA_GLES_MakeCurrent;
|
||||||
device->GL_SetSwapInterval = VITA_GLES_SetSwapInterval;
|
device->GL_SetSwapInterval = VITA_GLES_SetSwapInterval;
|
||||||
|
|
Loading…
Reference in New Issue