summaryrefslogtreecommitdiff
path: root/src/render/mobileopenglgraphics.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-10 00:25:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-10 00:31:05 +0300
commitdf7306b25899f3fafa4adb969e70ea83ac567ffb (patch)
tree2ce725beb08a139852e34bf4748e96481835fcb7 /src/render/mobileopenglgraphics.h
parentbd88033a7d721102544c21d449a541ceb3bcc285 (diff)
downloadplus-df7306b25899f3fafa4adb969e70ea83ac567ffb.tar.gz
plus-df7306b25899f3fafa4adb969e70ea83ac567ffb.tar.bz2
plus-df7306b25899f3fafa4adb969e70ea83ac567ffb.tar.xz
plus-df7306b25899f3fafa4adb969e70ea83ac567ffb.zip
Remove duplicate code from renderers.
Diffstat (limited to 'src/render/mobileopenglgraphics.h')
-rw-r--r--src/render/mobileopenglgraphics.h51
1 files changed, 3 insertions, 48 deletions
diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h
index 0b9cd83e2..6161c7f29 100644
--- a/src/render/mobileopenglgraphics.h
+++ b/src/render/mobileopenglgraphics.h
@@ -56,8 +56,6 @@ class MobileOpenGLGraphics final : public Graphics
~MobileOpenGLGraphics();
- #include "render/openglgraphicsdef.hpp"
-
inline void drawTriangleArrayfs(const GLshort *const shortVertArray,
const GLfloat *const floatTexArray,
const int size);
@@ -68,56 +66,13 @@ class MobileOpenGLGraphics final : public Graphics
inline void drawLineArrays(const int size);
- inline void drawVertexes(const NormalOpenGLGraphicsVertexes &ogl);
-
- bool drawNet(const int x1, const int y1, const int x2, const int y2,
- const int width, const int height) override final;
-
- void initArrays() override final;
-
- /**
- * Draws a rectangle using images. 4 corner images, 4 side images and 1
- * image for the inside.
- */
- void drawImageRect(int x, int y, int w, int h,
- const ImageRect &imgRect);
-
-#ifdef DEBUG_DRAW_CALLS
- unsigned int getDrawCalls() const
- { return mLastDrawCalls; }
-
- static unsigned int mDrawCalls;
-
- static unsigned int mLastDrawCalls;
-#endif
+ #include "render/graphicsdef.hpp"
- protected:
- void setTexturingAndBlending(const bool enable);
+ #include "render/openglgraphicsdef.hpp"
- void debugBindTexture(const Image *const image);
+ #include "render/openglgraphicsdefadvanced.hpp"
private:
- void inline setColorAlpha(const float alpha);
-
- void inline restoreColor();
-
- void inline calcImageRect(ImageVertexes *const vert,
- int x, int y,
- int w, int h,
- const ImageRect &imgRect);
-
- void inline calcPatternInline(ImageVertexes *const vert,
- const Image *const image,
- const int x, const int y,
- const int w, const int h) const;
-
- void inline calcTileVertexesInline(ImageVertexes *const vert,
- const Image *const image,
- int x, int y) const;
-
- bool inline drawImageInline(const Image *const image,
- int dstX, int dstY);
-
GLfloat *mFloatTexArray;
GLshort *mShortVertArray;
GLfloat *mFloatTexArrayCached;