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/mobileopenglgraphics.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/render/mobileopenglgraphics.h') diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index 8a2469267..dbee649d0 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -165,6 +165,8 @@ class MobileOpenGLGraphics final : public Graphics inline void drawTriangleArrayfs(const int size); + inline void drawTriangleArrayfsCached(const int size); + inline void drawLineArrays(const int size); inline void drawVertexes(const NormalOpenGLGraphicsVertexes &ogl); @@ -193,6 +195,15 @@ class MobileOpenGLGraphics 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; } @@ -220,10 +231,15 @@ class MobileOpenGLGraphics final : public Graphics GLint *mIntTexArray; GLint *mIntVertArray; GLshort *mShortVertArray; + GLfloat *mFloatTexArrayCached; + GLshort *mShortVertArrayCached; + 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