12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "Game.h"
- #include "LayeredFramebuffer.h"
- #include "MarchingCubes.h"
- #include "gaming-core/rendering/Shader.h"
- #include "gaming-core/rendering/Window.h"
- #include "gaming-core/wrapper/GL.h"
- int main() {
- WindowOptions options(4, 0, {1024, 620}, false, "test");
- TextInput* input = nullptr;
- Window w(input, options);
- if(w.getError().has()) {
- std::cout << w.getError().message << '\n';
- return 0;
- }
- Shader shader("resources/vertex.vs", "resources/fragment.fs",
- "resources/geometry.gs");
- if(shader.hasError()) {
- return 0;
- }
- Shader noiceShader("resources/noiceVertex.vs",
- "resources/noiceFragment.fs");
- if(noiceShader.hasError()) {
- return 0;
- }
- Shader particleShader("resources/particles.vs", "resources/particles.fs",
- "resources/particles.gs");
- if(particleShader.hasError()) {
- return 0;
- }
- LayeredFramebuffer buffer(64, 64, 64);
- if(buffer.hasError()) {
- return 0;
- }
- Game game(shader, noiceShader, particleShader, buffer, w.getButtons(),
- w.getSize());
- GL::printError("setup error");
- GL::enableDepthTesting();
- w.run(game, 50'000'000);
- return 0;
- }
|