aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-21 22:52:12 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-18 15:21:48 +0100
commitbfd21732b35a3856b1f72c826816c2857710fcb3 (patch)
tree4a3f19551c744db3e339a64ac1afa2ebe1ec015f /src/main.cpp
parentca92d8c90f7103db6d7cae4cef49b278d804b474 (diff)
Added shader program
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fe48ddf..03222f1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4,6 +4,7 @@
#include <glm/glm.hpp>
#include "../include/RenderBackend/OpenGL/VertexShader.hpp"
#include "../include/RenderBackend/OpenGL/PixelShader.hpp"
+#include "../include/RenderBackend/OpenGL/ShaderProgram.hpp"
#include "../include/RenderBackend/OpenGL/DeviceMemory.hpp"
using namespace amalgine;
@@ -54,6 +55,8 @@ int main()
DeviceMemory triangle;
triangle.copyStatic(vertices);
+ ShaderProgram shaderProgram;
+
VertexShader vertexShader;
ShaderInputVec2 inputPosition = vertexShader.defineInputVec2("position");
@@ -63,7 +66,7 @@ int main()
});
PixelShader pixelShader;
- ShaderOutputVec4 outColor = pixelShader.defineOutputVec4("outColor");
+ ShaderOutputVec4 outColor = shaderProgram.defineOutputVec4("outColor");
pixelShader.defineMain([&outColor]()
{