mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
@@ -119,6 +119,17 @@ void GraphicsReadback::update()
|
||||
}
|
||||
}
|
||||
|
||||
bool GraphicsReadback::loadVolatile()
|
||||
{
|
||||
// Don't need to (re)create anything here, since the work is done in sync.fence().
|
||||
return true;
|
||||
}
|
||||
|
||||
void GraphicsReadback::unloadVolatile()
|
||||
{
|
||||
sync.cleanup();
|
||||
}
|
||||
|
||||
} // opengl
|
||||
} // graphics
|
||||
} // love
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
// LOVE
|
||||
#include "graphics/GraphicsReadback.h"
|
||||
#include "graphics/Volatile.h"
|
||||
#include "FenceSync.h"
|
||||
#include "common/math.h"
|
||||
|
||||
@@ -32,7 +33,7 @@ namespace graphics
|
||||
namespace opengl
|
||||
{
|
||||
|
||||
class GraphicsReadback final : public love::graphics::GraphicsReadback
|
||||
class GraphicsReadback final : public love::graphics::GraphicsReadback, public Volatile
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -43,6 +44,9 @@ public:
|
||||
void wait() override;
|
||||
void update() override;
|
||||
|
||||
bool loadVolatile() override;
|
||||
void unloadVolatile() override;
|
||||
|
||||
private:
|
||||
|
||||
FenceSync sync;
|
||||
|
||||
Reference in New Issue
Block a user