Merge branch '12.0-development' into metal

This commit is contained in:
Alex Szpakowski
2020-12-22 22:37:17 -04:00
288 changed files with 15292 additions and 12550 deletions
+20 -2
View File
@@ -63,7 +63,7 @@ public:
love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector<Buffer::DataDeclaration> &format, const void *data, size_t size, size_t arraylength) override;
void setViewportSize(int width, int height, int pixelwidth, int pixelheight) override;
bool setMode(void *context, int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, int backbufferdepth) override;
bool setMode(void *context, int width, int height, int pixelwidth, int pixelheight, bool windowhasstencil, int msaa) override;
void unSetMode() override;
void setActive(bool active) override;
@@ -79,6 +79,9 @@ public:
void present(void *screenshotCallbackData) override;
int getRequestedBackbufferMSAA() const override;
int getBackbufferMSAA() const override;
void setColor(Colorf c) override;
void setScissor(const Rect &rect) override;
@@ -110,6 +113,9 @@ public:
// Internal use.
void cleanupRenderTexture(love::graphics::Texture *texture);
void *getBufferMapMemory(size_t size);
void releaseBufferMapMemory(void *mem);
private:
struct CachedFBOHasher
@@ -139,15 +145,27 @@ private:
void getAPIStats(int &shaderswitches) const override;
void endPass();
void bindCachedFBO(const RenderTargets &targets);
GLuint bindCachedFBO(const RenderTargets &targets);
void discard(OpenGL::FramebufferTarget target, const std::vector<bool> &colorbuffers, bool depthstencil);
void updateBackbuffer(int width, int height, int pixelwidth, int pixelheight, int msaa);
GLuint getInternalBackbufferFBO() const;
GLuint getSystemBackbufferFBO() const;
void setDebug(bool enable);
std::unordered_map<RenderTargets, GLuint, CachedFBOHasher> framebufferObjects;
bool windowHasStencil;
GLuint mainVAO;
StrongRef<love::graphics::Texture> internalBackbuffer;
StrongRef<love::graphics::Texture> internalBackbufferDepthStencil;
GLuint internalBackbufferFBO;
int requestedBackbufferMSAA;
char *bufferMapMemory;
size_t bufferMapMemorySize;
// Only needed for buffer types that can be bound to shaders.
StrongRef<love::graphics::Buffer> defaultBuffers[BUFFERTYPE_MAX_ENUM];