Desktop OpenGL 1.X/2.X PSVita Support
This commit is contained in:
parent
2c04df8d65
commit
8c542a3591
12 changed files with 290 additions and 71 deletions
|
@ -30,6 +30,11 @@
|
|||
#include <OpenGL/OpenGL.h>
|
||||
#endif
|
||||
|
||||
#ifdef __psp2__
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#endif
|
||||
|
||||
/* To prevent unnecessary window recreation,
|
||||
* these should match the defaults selected in SDL_GL_ResetAttributes
|
||||
*/
|
||||
|
@ -1733,6 +1738,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, &major);
|
||||
SDL_GL_GetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, &minor);
|
||||
|
||||
#ifndef __psp2__
|
||||
window_flags = SDL_GetWindowFlags(window);
|
||||
if (!(window_flags & SDL_WINDOW_OPENGL) ||
|
||||
profile_mask == SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {
|
||||
|
@ -1746,6 +1752,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
goto error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
|
||||
if (!renderer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue