diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-09 22:11:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-10 12:56:53 +0300 |
commit | 61e9fc59323157bbd3ea024e816981b975d5b2c8 (patch) | |
tree | aec9ac4d650b2949cde80a65d021ac7ab39a2fc9 /src/render/modernopenglgraphics.h | |
parent | 5fe5d3de3c570734d824afac4992a0d00386dbea (diff) | |
download | manaverse-61e9fc59323157bbd3ea024e816981b975d5b2c8.tar.gz manaverse-61e9fc59323157bbd3ea024e816981b975d5b2c8.tar.bz2 manaverse-61e9fc59323157bbd3ea024e816981b975d5b2c8.tar.xz manaverse-61e9fc59323157bbd3ea024e816981b975d5b2c8.zip |
Add basic texture drawing in modernopengl.
Diffstat (limited to 'src/render/modernopenglgraphics.h')
-rw-r--r-- | src/render/modernopenglgraphics.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index 2e80fb56a..8e60c5b5f 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -73,11 +73,17 @@ class ModernOpenGLGraphics final : public Graphics #include "render/openglgraphicsdefadvanced.hpp" private: + void drawQuad(const Image *const image, + const int srcX, const int srcY, + const int dstX, const int dstY, + const int width, const int height); + GLfloat *mFloatTexArray; GLshort *mShortVertArray; GLfloat *mFloatTexArrayCached; GLshort *mShortVertArrayCached; ShaderProgram *mSimpleProgram; + ShaderProgram *mTextureProgram; float mAlphaCached; int mVpCached; bool mTexture; @@ -87,11 +93,16 @@ class ModernOpenGLGraphics final : public Graphics GLuint mImageCached; float mFloatColor; int mMaxVertices; - GLuint mSimpleId; - GLuint mSimpleColor; - GLint mSimplePos; - GLuint mScreenUniform; + GLuint mSimpleProgramId; + GLuint mTextureProgramId; + GLuint mSimpleColorUniform; + GLint mSimplePosAttrib; + GLint mTexturePosAttrib; + GLint mTexAttrib; + GLuint mSimpleScreenUniform; + GLuint mTextureScreenUniform; bool mColorAlpha; + bool mTextureDraw; #ifdef DEBUG_BIND_TEXTURE std::string mOldTexture; unsigned mOldTextureId; |