Move some Canvas code to Texture, devirtualize Texture::draw.

This commit is contained in:
Alex Szpakowski
2020-02-03 19:02:58 -04:00
parent f9248d478c
commit b46b3ed552
19 changed files with 136 additions and 128 deletions
+4 -5
View File
@@ -202,8 +202,7 @@ public:
int drawCallsBatched;
int canvasSwitches;
int shaderSwitches;
int canvases;
int images;
int textures;
int fonts;
int64 textureMemory;
};
@@ -551,8 +550,8 @@ public:
RenderTargets getCanvas() const;
bool isCanvasActive() const;
bool isCanvasActive(Canvas *canvas) const;
bool isCanvasActive(Canvas *canvas, int slice) const;
bool isRenderTargetActive(Texture *texture) const;
bool isRenderTargetActive(Texture *texture, int slice) const;
/**
* Scissor defines a box such that everything outside that box is discarded
@@ -781,7 +780,7 @@ public:
/**
* Converts PIXELFORMAT_NORMAL and PIXELFORMAT_HDR into a real format.
**/
virtual PixelFormat getSizedFormat(PixelFormat format) const = 0;
virtual PixelFormat getSizedFormat(PixelFormat format, bool rendertarget, bool readable, bool sRGB) const = 0;
/**
* Gets whether the specified pixel format is supported.