Browse Source

core update

Kajetan Johannes Hammerle 3 years ago
parent
commit
5057598a2b
5 changed files with 16 additions and 16 deletions
  1. 1 1
      Game.cpp
  2. 2 2
      Game.h
  3. 5 5
      Main.cpp
  4. 1 1
      gaming-core
  5. 7 7
      meson.build

+ 1 - 1
Game.cpp

@@ -40,7 +40,7 @@ void Game::render(float lag) {
     GL::setViewport(size.width, size.height);
     shader.use();
     GL::bindMainFramebuffer();
-    GL::clearFramebuffer();
+    GL::clear();
     Vector3 interPos = Utils::interpolate(oldPosition, position, lag);
     shader.setMatrix("proj", frustum.updateProjection().getValues());
 

+ 2 - 2
Game.h

@@ -4,9 +4,9 @@
 #include "LayeredFramebuffer.h"
 #include "gaming-core/input/Buttons.h"
 #include "gaming-core/math/Frustum.h"
+#include "gaming-core/rendering/Shader.h"
+#include "gaming-core/rendering/VertexBuffer.h"
 #include "gaming-core/utils/Size.h"
-#include "gaming-core/wrapper/Shader.h"
-#include "gaming-core/wrapper/VertexBuffer.h"
 
 class Game final {
     Shader& shader;

+ 5 - 5
Main.cpp

@@ -1,13 +1,13 @@
 #include "Game.h"
 #include "LayeredFramebuffer.h"
 #include "gaming-core/input/Buttons.h"
+#include "gaming-core/rendering/Shader.h"
+#include "gaming-core/rendering/Window.h"
+#include "gaming-core/rendering/WindowOptions.h"
 #include "gaming-core/utils/Clock.h"
 #include "gaming-core/wrapper/GL.h"
 #include "gaming-core/wrapper/GLEW.h"
 #include "gaming-core/wrapper/GLFW.h"
-#include "gaming-core/wrapper/Shader.h"
-#include "gaming-core/wrapper/Window.h"
-#include "gaming-core/wrapper/WindowOptions.h"
 
 void updateSize(const Window& window, Size& size) {
     Size newSize = window.getSize();
@@ -53,13 +53,13 @@ int main() {
 
     Game game(shader, noiceShader, buffer, buttons, size);
 
-    GL::checkAndPrintError("setup error");
+    GL::printError("setup error");
     GL::enableDepthTesting();
 
     const Clock::Nanos nanosPerTick = 50000000;
     Clock::Nanos lag = 0;
     while(!window.shouldClose()) {
-        GL::checkAndPrintError("loop error");
+        GL::printError("loop error");
         updateSize(window, size);
         game.render(static_cast<float>(lag) / nanosPerTick);
         window.swapBuffers();

+ 1 - 1
gaming-core

@@ -1 +1 @@
-Subproject commit 740eae7b0f10e4f0947dc65a9dac55bf2e0c570f
+Subproject commit 48800a9c38ca720dbdc9132109def675c65f99e1

+ 7 - 7
meson.build

@@ -9,13 +9,13 @@ sources = ['Main.cpp',
     'gaming-core/wrapper/GLFW.cpp',
     'gaming-core/wrapper/GL.cpp',
     'gaming-core/wrapper/GLEW.cpp',
-    'gaming-core/wrapper/Window.cpp',
-    'gaming-core/wrapper/WindowOptions.cpp',
-    'gaming-core/wrapper/Shader.cpp',
-    'gaming-core/wrapper/VertexBuffer.cpp',
-    'gaming-core/wrapper/Attributes.cpp',
-    'gaming-core/wrapper/Texture.cpp',
-    'gaming-core/wrapper/TextureFormat.cpp',
+    'gaming-core/rendering/Window.cpp',
+    'gaming-core/rendering/WindowOptions.cpp',
+    'gaming-core/rendering/Shader.cpp',
+    'gaming-core/rendering/VertexBuffer.cpp',
+    'gaming-core/rendering/Attributes.cpp',
+    'gaming-core/rendering/Texture.cpp',
+    'gaming-core/rendering/TextureFormat.cpp',
     'gaming-core/math/Frustum.cpp',
     'gaming-core/math/Plane.cpp',
     'gaming-core/math/Matrix.cpp',