Added Texture class
This commit is contained in:
parent
1b2ed0cdf5
commit
e2e15dd98f
13 changed files with 8005 additions and 35 deletions
|
@ -1,11 +1,12 @@
|
|||
#version 330 core
|
||||
in vec3 oCol;
|
||||
in vec2 oUV;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform vec4 ourColor;
|
||||
uniform sampler2D ourTexture;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(oCol, 1.0f) + ourColor;
|
||||
FragColor = texture(ourTexture, oUV) * vec4(oCol, 1.0);
|
||||
}
|
|
@ -1,11 +1,14 @@
|
|||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aCol;
|
||||
layout (location = 2) in vec2 aUV;
|
||||
|
||||
out vec3 oCol;
|
||||
out vec2 oUV;
|
||||
|
||||
void main()
|
||||
{
|
||||
oCol = aCol;
|
||||
oUV = aUV;
|
||||
gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue