From c9f8bba932022ffd90031713c51861587f86b244 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 28 Dec 2013 23:06:17 +0300 Subject: Add cached draw methods into renderers. --- src/render/normalopenglgraphics.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/render/normalopenglgraphics.h') diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index a62a97df7..73457ef0d 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -160,12 +160,16 @@ class NormalOpenGLGraphics final : public Graphics inline void drawQuadArrayfi(const int size); + inline void drawQuadArrayfiCached(const int size); + inline void drawQuadArrayfi(const GLint *const intVertArray, const GLfloat *const floatTexArray, const int size); inline void drawQuadArrayii(const int size); + inline void drawQuadArrayiiCached(const int size); + inline void drawQuadArrayii(const GLint *const intVertArray, const GLint *const intTexArray, const int size); @@ -200,6 +204,15 @@ class NormalOpenGLGraphics final : public Graphics const int width, const int height, const bool useColor) override final; + void drawImageCached(const Image *const image, + int x, int y) override final; + + void drawPatternCached(const Image *const image, + const int x, const int y, + const int w, const int h) override final; + + void completeCache() override final; + #ifdef DEBUG_DRAW_CALLS unsigned int getDrawCalls() const { return mLastDrawCalls; } @@ -229,10 +242,16 @@ class NormalOpenGLGraphics final : public Graphics GLfloat *mFloatTexArray; GLint *mIntTexArray; GLint *mIntVertArray; + GLfloat *mFloatTexArrayCached; + GLint *mIntTexArrayCached; + GLint *mIntVertArrayCached; + float mAlphaCached; + int mVpCached; bool mTexture; bool mIsByteColor; gcn::Color mByteColor; + GLuint mImageCached; float mFloatColor; int mMaxVertices; bool mColorAlpha; -- cgit v1.2.3-60-g2f50