3D cube
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
#version 130
|
||||
|
||||
in vec2 position;
|
||||
in vec3 position;
|
||||
in vec2 texcoord;
|
||||
in vec3 colour;
|
||||
|
||||
out vec3 Colour;
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
uniform mat4 proj;
|
||||
|
||||
void main() {
|
||||
Colour = colour;
|
||||
TexCoord = texcoord;
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
// Equivilent to vec4(position.x, position.y, 0.0, 1.0)
|
||||
gl_Position = proj * view * model * vec4(position, 1.0);
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB |
BIN
OpenGL/cube/resources/textures/dirt.png
Normal file
BIN
OpenGL/cube/resources/textures/dirt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 266 B |
Binary file not shown.
|
Before Width: | Height: | Size: 7.5 KiB |
BIN
OpenGL/cube/resources/textures/grass_side.png
Normal file
BIN
OpenGL/cube/resources/textures/grass_side.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 660 B |
BIN
OpenGL/cube/resources/textures/grass_top.png
Normal file
BIN
OpenGL/cube/resources/textures/grass_top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
Reference in New Issue
Block a user