toGLprofile method
Convert from a SDL_GLprofile
member.
Implementation
GLprofile toGLprofile() {
switch (this) {
case SDL_GLprofile.SDL_GL_CONTEXT_PROFILE_CORE:
return GLprofile.core;
case SDL_GLprofile.SDL_GL_CONTEXT_PROFILE_COMPATIBILITY:
return GLprofile.compatibility;
case SDL_GLprofile.SDL_GL_CONTEXT_PROFILE_ES:
return GLprofile.es;
default:
throw SdlError(
this,
'Unrecognised `SDL_GLprofile` member.',
);
}
}