mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00: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_CONTEXT_FLAGS );
|
||||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_SHARE_WITH_CURRENT_CONTEXT );
|
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_SHARE_WITH_CURRENT_CONTEXT );
|
||||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_FRAMEBUFFER_SRGB_CAPABLE );
|
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 );
|
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_RESET_NOTIFICATION );
|
||||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_NO_ERROR );
|
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_NO_ERROR );
|
||||||
|
#endif
|
||||||
case REF_GL_CONTEXT_PROFILE_MASK:
|
case REF_GL_CONTEXT_PROFILE_MASK:
|
||||||
#ifdef SDL_HINT_OPENGL_ES_DRIVER
|
#ifdef SDL_HINT_OPENGL_ES_DRIVER
|
||||||
if (val == REF_GL_CONTEXT_PROFILE_ES)
|
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_CONTEXT_FLAGS );
|
||||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_SHARE_WITH_CURRENT_CONTEXT );
|
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_SHARE_WITH_CURRENT_CONTEXT );
|
||||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_FRAMEBUFFER_SRGB_CAPABLE );
|
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 );
|
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_RESET_NOTIFICATION );
|
||||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_NO_ERROR );
|
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_NO_ERROR );
|
||||||
|
#endif
|
||||||
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_PROFILE_MASK );
|
MAP_REF_API_ATTRIBUTE_TO_SDL( GL_CONTEXT_PROFILE_MASK );
|
||||||
#undef MAP_REF_API_ATTRIBUTE_TO_SDL
|
#undef MAP_REF_API_ATTRIBUTE_TO_SDL
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user