mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Revert most render pass API changes. The APIs need more work and iteration before they’re better to use than the old setCanvas APIs.
love.graphics.captureScreenshot has not been reverted. --HG-- branch : minor
This commit is contained in:
@@ -157,11 +157,11 @@ void Event::exceptionIfInRenderPass()
|
||||
{
|
||||
// Some core OS graphics functionality (e.g. swap buffers on some platforms)
|
||||
// happens inside SDL_PumpEvents - which is called by SDL_PollEvent and
|
||||
// friends. It's probably a bad idea to call those functions while we're in
|
||||
// a render pass.
|
||||
// friends. It's probably a bad idea to call those functions while a Canvas
|
||||
// is active.
|
||||
auto gfx = Module::getInstance<graphics::Graphics>(Module::M_GRAPHICS);
|
||||
if (gfx != nullptr && gfx->isPassActive())
|
||||
throw love::Exception("Cannot call this function while a render pass is active in love.graphics.");
|
||||
if (gfx != nullptr && gfx->isCanvasActive())
|
||||
throw love::Exception("Cannot call this function while a Canvas is active in love.graphics.");
|
||||
}
|
||||
|
||||
Message *Event::convert(const SDL_Event &e)
|
||||
|
||||
Reference in New Issue
Block a user