mirror of
https://github.com/bloeys/nmage.git
synced 2025-12-29 13:28:20 +00:00
Ep5: Obj file loading+indexed drawing+uniforms
This commit is contained in:
@ -6,5 +6,6 @@ out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = vec4(outColor, 1.0);
|
||||
fragColor = vec4(1,1,1, 1.0);
|
||||
// fragColor = vec4(outColor, 1.0);
|
||||
}
|
||||
|
||||
@ -5,8 +5,10 @@ in vec3 vertColor;
|
||||
|
||||
out vec3 outColor;
|
||||
|
||||
uniform mat4 modelMat;
|
||||
|
||||
void main()
|
||||
{
|
||||
outColor = vertColor;
|
||||
gl_Position = vec4(vertPos, 1.0); // vec4(vertPos.x, vertPos.y, vertPos.z, 1.0)
|
||||
gl_Position = modelMat * (vec4(vertPos, 1.0)); // vec4(vertPos.x, vertPos.y, vertPos.z, 1.0)
|
||||
}
|
||||
Reference in New Issue
Block a user