mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Rework internal module registration to happen in constructors.
This commit is contained in:
@@ -106,7 +106,8 @@ love::graphics::Graphics *createInstance()
|
||||
}
|
||||
|
||||
Graphics::Graphics()
|
||||
: windowHasStencil(false)
|
||||
: love::graphics::Graphics("love.graphics.opengl")
|
||||
, windowHasStencil(false)
|
||||
, mainVAO(0)
|
||||
, internalBackbufferFBO(0)
|
||||
, requestedBackbufferMSAA(0)
|
||||
@@ -147,11 +148,6 @@ Graphics::~Graphics()
|
||||
delete[] bufferMapMemory;
|
||||
}
|
||||
|
||||
const char *Graphics::getName() const
|
||||
{
|
||||
return "love.graphics.opengl";
|
||||
}
|
||||
|
||||
love::graphics::StreamBuffer *Graphics::newStreamBuffer(BufferUsage type, size_t size)
|
||||
{
|
||||
return CreateStreamBuffer(type, size);
|
||||
|
||||
@@ -56,9 +56,6 @@ public:
|
||||
Graphics();
|
||||
virtual ~Graphics();
|
||||
|
||||
// Implements Module.
|
||||
const char *getName() const override;
|
||||
|
||||
love::graphics::Texture *newTexture(const Texture::Settings &settings, const Texture::Slices *data = nullptr) override;
|
||||
love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector<Buffer::DataDeclaration> &format, const void *data, size_t size, size_t arraylength) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user