From df7306b25899f3fafa4adb969e70ea83ac567ffb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 10 Mar 2014 00:25:58 +0300 Subject: Remove duplicate code from renderers. --- src/render/nullopenglgraphics.h | 51 +++-------------------------------------- 1 file changed, 3 insertions(+), 48 deletions(-) (limited to 'src/render/nullopenglgraphics.h') diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index ee2a5d189..ebecbe7dd 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -56,8 +56,6 @@ class NullOpenGLGraphics final : public Graphics ~NullOpenGLGraphics(); - #include "render/openglgraphicsdef.hpp" - inline void drawQuadArrayfi(const int size); inline void drawQuadArrayfi(const GLint *const intVertArray, @@ -74,56 +72,13 @@ class NullOpenGLGraphics final : public Graphics inline void drawLineArrayf(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; GLint *mIntTexArray; GLint *mIntVertArray; -- cgit v1.2.3-60-g2f50