sdl/window: added assertion if render-to-texture is not supported

This commit is contained in:
Charles Dang 2022-05-01 23:25:01 -04:00
parent 20af906b54
commit e20bb4ba9e

View file

@ -59,6 +59,10 @@ window::window(const std::string& title,
false);
}
if((info.flags & SDL_RENDERER_TARGETTEXTURE) == 0) {
throw exception("Render-to-texture not supported or enabled!", false);
}
// Set default blend mode to blend.
SDL_SetRenderDrawBlendMode(*this, SDL_BLENDMODE_BLEND);