mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: platform: sdl2: Allow SDL to use wgl to create gles context, if it can
This commit is contained in:
@@ -894,6 +894,7 @@ int GL_SetAttribute( int attr, int val )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_SHARE_WITH_CURRENT_CONTEXT );
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_FRAMEBUFFER_SRGB_CAPABLE );
|
||||
case REF_GL_CONTEXT_PROFILE_MASK:
|
||||
#if !XASH_WIN32
|
||||
#ifdef SDL_HINT_OPENGL_ES_DRIVER
|
||||
if( val == REF_GL_CONTEXT_PROFILE_ES )
|
||||
{
|
||||
@@ -901,6 +902,7 @@ int GL_SetAttribute( int attr, int val )
|
||||
SDL_SetHint( "SDL_VIDEO_X11_FORCE_EGL", "1" );
|
||||
}
|
||||
#endif // SDL_HINT_OPENGL_ES_DRIVER
|
||||
#endif
|
||||
return SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, val );
|
||||
#if SDL_VERSION_ATLEAST( 2, 0, 4 )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_RELEASE_BEHAVIOR );
|
||||
|
||||
Reference in New Issue
Block a user