mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-16 06:00:33 +01:00
sdl: vid: allow to build with earlier versions of SDL2
This commit is contained in:
parent
a378379ac5
commit
c92f8f71a7
@ -733,9 +733,13 @@ int GL_SetAttribute( int attr, int val )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_FLAGS );
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_SHARE_WITH_CURRENT_CONTEXT );
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_FRAMEBUFFER_SRGB_CAPABLE );
|
||||
#if SDL_VERSION_ATLEAST( 2, 0, 4 )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_RELEASE_BEHAVIOR );
|
||||
#endif
|
||||
#if SDL_VERSION_ATLEAST( 2, 0, 6 )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_RESET_NOTIFICATION );
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_NO_ERROR );
|
||||
#endif
|
||||
case REF_GL_CONTEXT_PROFILE_MASK:
|
||||
#ifdef SDL_HINT_OPENGL_ES_DRIVER
|
||||
if (val == REF_GL_CONTEXT_PROFILE_ES)
|
||||
@ -770,9 +774,13 @@ int GL_GetAttribute( int attr, int *val )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_FLAGS );
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_SHARE_WITH_CURRENT_CONTEXT );
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_FRAMEBUFFER_SRGB_CAPABLE );
|
||||
#if SDL_VERSION_ATLEAST( 2, 0, 4 )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_RELEASE_BEHAVIOR );
|
||||
#endif
|
||||
#if SDL_VERISON_ATLEAST( 2, 0, 6 )
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_RESET_NOTIFICATION );
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_NO_ERROR );
|
||||
#endif
|
||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_PROFILE_MASK );
|
||||
#undef MAP_REF_API_ATTRIBUTE_TO_SDL
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user