summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-10 13:09:10 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-10 13:09:10 +0300
commitfcb2f8b6fdfa683ce5ba319b46873a0b61c9c75f (patch)
tree98182f19e3e42443abfcbaff0cc1158eaa335a68
parent61e9fc59323157bbd3ea024e816981b975d5b2c8 (diff)
downloadManaVerse-fcb2f8b6fdfa683ce5ba319b46873a0b61c9c75f.tar.gz
ManaVerse-fcb2f8b6fdfa683ce5ba319b46873a0b61c9c75f.tar.bz2
ManaVerse-fcb2f8b6fdfa683ce5ba319b46873a0b61c9c75f.tar.xz
ManaVerse-fcb2f8b6fdfa683ce5ba319b46873a0b61c9c75f.zip
Use same varaible names in simple and texture shaders.
-rw-r--r--data/graphics/shaders/simple_frag.glsl4
-rw-r--r--data/graphics/shaders/simple_vertex.glsl4
-rw-r--r--data/graphics/shaders/texture_vertex.glsl4
-rw-r--r--src/render/modernopenglgraphics.cpp6
4 files changed, 9 insertions, 9 deletions
diff --git a/data/graphics/shaders/simple_frag.glsl b/data/graphics/shaders/simple_frag.glsl
index a8687cb68..02fbf5519 100644
--- a/data/graphics/shaders/simple_frag.glsl
+++ b/data/graphics/shaders/simple_frag.glsl
@@ -1,7 +1,7 @@
#version 150 core
out vec4 outColor;
-uniform vec4 simpleColor;
+uniform vec4 color;
void main()
{
- outColor = simpleColor;
+ outColor = color;
}
diff --git a/data/graphics/shaders/simple_vertex.glsl b/data/graphics/shaders/simple_vertex.glsl
index 1ffca8f77..3be44c6d8 100644
--- a/data/graphics/shaders/simple_vertex.glsl
+++ b/data/graphics/shaders/simple_vertex.glsl
@@ -1,7 +1,7 @@
#version 150 core
-in vec2 simplePos;
+in vec2 position;
uniform vec2 screen;
void main()
{
- gl_Position = vec4(simplePos.x / screen.x - 1, 1 - simplePos.y / screen.y, 0.0, 1.0);
+ gl_Position = vec4(position.x / screen.x - 1, 1 - position.y / screen.y, 0.0, 1.0);
}
diff --git a/data/graphics/shaders/texture_vertex.glsl b/data/graphics/shaders/texture_vertex.glsl
index 383181cd9..c86d9211f 100644
--- a/data/graphics/shaders/texture_vertex.glsl
+++ b/data/graphics/shaders/texture_vertex.glsl
@@ -1,10 +1,10 @@
#version 150 core
-in vec2 texturePos;
+in vec2 position;
in vec2 texcoord;
out vec2 Texcoord;
uniform vec2 screen;
void main()
{
Texcoord = texcoord;
- gl_Position = vec4(texturePos.x / screen.x - 1, 1 - texturePos.y / screen.y, 0.0, 1.0);
+ gl_Position = vec4(position.x / screen.x - 1, 1 - position.y / screen.y, 0.0, 1.0);
}
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index 98e125170..fd700a9cf 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -124,12 +124,12 @@ void ModernOpenGLGraphics::postInit()
{
logger->log("Shaders compilation done.");
mglUseProgram(mSimpleProgramId);
- mSimplePosAttrib = mglGetAttribLocation(mSimpleProgramId, "simplePos");
+ mSimplePosAttrib = mglGetAttribLocation(mSimpleProgramId, "position");
mglEnableVertexAttribArray(mSimplePosAttrib);
- mSimpleColorUniform = mglGetUniformLocation(mSimpleProgramId, "simpleColor");
+ mSimpleColorUniform = mglGetUniformLocation(mSimpleProgramId, "color");
mSimpleScreenUniform = mglGetUniformLocation(mSimpleProgramId, "screen");
- mTexturePosAttrib = mglGetAttribLocation(mTextureProgramId, "texturePos");
+ mTexturePosAttrib = mglGetAttribLocation(mTextureProgramId, "position");
mTexAttrib = mglGetAttribLocation(mTextureProgramId, "texcoord");
mTextureScreenUniform = mglGetUniformLocation(mTextureProgramId, "screen");