fixed 2D texturing

This commit is contained in:
Anselme 2016-07-22 12:10:40 +02:00
parent cb4b696e12
commit 66a5399fba
3 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
layout(location = 0)in vec2 inPosition; layout(location = 0)in vec2 inPosition;
#ifdef TEXTURABLE #ifdef TEXTURABLE
layout(location = 0)in vec2 inTexCoord; layout(location = 2)in vec2 inTexCoord;
out vec2 texCoord; out vec2 texCoord;
#endif #endif

View File

@ -189,6 +189,8 @@ void DeferredPipeline::renderGL(Scene *scene)
// 2D GUI PASS // 2D GUI PASS
glClear(GL_DEPTH_BUFFER_BIT); glClear(GL_DEPTH_BUFFER_BIT);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
for(GeometryNode* node : mesh2D) for(GeometryNode* node : mesh2D)
{ {
Shader *shader = m_mesh2DShaders[node->mesh->getFlags()]; Shader *shader = m_mesh2DShaders[node->mesh->getFlags()];

View File

@ -44,7 +44,7 @@ void TrackBallCamera::moveCamera(const glm::vec3 &diff)
void TrackBallCamera::lookAt(const glm::vec3 &pos) void TrackBallCamera::lookAt(const glm::vec3 &pos)
{ {
m_dist = glm::length(target); //m_dist = glm::length(target);
m_center = pos; m_center = pos;
computeView(); computeView();
} }