mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-23 17:18:10 +02:00
Simplify SDL_GL_EGL_PLATFORM handling
This commit is contained in:
committed by
Sam Lantinga
parent
eceb35c96c
commit
f8331d50ff
@@ -27,16 +27,16 @@
|
||||
|
||||
// EGL implementation of SDL OpenGL support
|
||||
|
||||
void RPI_GLES_DefaultProfileConfig(SDL_VideoDevice *_this, int *mask, int *major, int *minor)
|
||||
void RPI_GLES_SetDefaultProfileConfig(SDL_VideoDevice *_this)
|
||||
{
|
||||
*mask = SDL_GL_CONTEXT_PROFILE_ES;
|
||||
*major = 2;
|
||||
*minor = 0;
|
||||
_this->gl_config.mask = SDL_GL_CONTEXT_PROFILE_ES;
|
||||
_this->gl_config.major = 2;
|
||||
_this->gl_config.minor = 0;
|
||||
}
|
||||
|
||||
bool RPI_GLES_LoadLibrary(SDL_VideoDevice *_this, const char *path)
|
||||
{
|
||||
return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0);
|
||||
return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY);
|
||||
}
|
||||
|
||||
bool RPI_GLES_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
|
||||
@@ -40,7 +40,7 @@ extern bool RPI_GLES_LoadLibrary(SDL_VideoDevice *_this, const char *path);
|
||||
extern SDL_GLContext RPI_GLES_CreateContext(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern bool RPI_GLES_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window);
|
||||
extern bool RPI_GLES_MakeCurrent(SDL_VideoDevice *_this, SDL_Window *window, SDL_GLContext context);
|
||||
extern void RPI_GLES_DefaultProfileConfig(SDL_VideoDevice *_this, int *mask, int *major, int *minor);
|
||||
extern void RPI_GLES_SetDefaultProfileConfig(SDL_VideoDevice *_this);
|
||||
|
||||
#endif // SDL_VIDEO_DRIVER_RPI && SDL_VIDEO_OPENGL_EGL
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ static SDL_VideoDevice *RPI_Create(void)
|
||||
device->GL_GetSwapInterval = RPI_GLES_GetSwapInterval;
|
||||
device->GL_SwapWindow = RPI_GLES_SwapWindow;
|
||||
device->GL_DestroyContext = RPI_GLES_DestroyContext;
|
||||
device->GL_DefaultProfileConfig = RPI_GLES_DefaultProfileConfig;
|
||||
device->GL_SetDefaultProfileConfig = RPI_GLES_SetDefaultProfileConfig;
|
||||
|
||||
device->PumpEvents = RPI_PumpEvents;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user