This commit is contained in:
Jasper 2014-11-17 16:29:10 +01:00
commit d4e38b7a41
2 changed files with 4 additions and 2 deletions

View File

@ -38,6 +38,6 @@ void main()
}
vec3 finalColor = specularColor + diffuseColor + ambientColor;
vec3 texture = texture(uTexture, vTexCoord).rgb;
oColor = vec4(finalColor*texture, 1.0 );
vec4 texture = texture(uTexture, vTexCoord).rgba;
oColor = vec4(finalColor, 1.0f)*texture;
}

View File

@ -112,6 +112,8 @@ int main( int argc, char *argv[] )
//
glClearColor( 0.0, 0.0, 0.0, 1.0 );
glEnable( GL_DEPTH_TEST );
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
app.init();
int frameCount = 0;