Browse Source

update to new gaming core

Kajetan Johannes Hammerle 3 years ago
parent
commit
3f6300ad51

+ 1 - 1
client/rendering/FontRenderer.cpp

@@ -8,7 +8,7 @@ FontRenderer::FontRenderer() : tex("resources/font8x8.png") {
 }
 
 void FontRenderer::drawString(float x, float y, const char* text) {
-    Buffer<MAX_CHARS * VERTEX_SIZE * 4> buffer;
+    Buffer buffer(MAX_CHARS * VERTEX_SIZE * 4);
 
     int index = 0;
     Color4 color(0xFF, 0xFF, 0xFF, 0xFF);

+ 2 - 1
client/rendering/FontRenderer.h

@@ -3,13 +3,14 @@
 
 #include "gaming-core/wrapper/VertexBuffer.h"
 #include "gaming-core/rendering/FileTexture.h"
+#include "gaming-core/utils/Color.h"
 
 class FontRenderer final {
     static constexpr int MAX_CHARS = 256;
     static constexpr int VERTEX_SIZE = 4 * sizeof (float) + sizeof (Color4);
 
     VertexBuffer vertexBuffer;
-    FileTexture<4> tex;
+    FileTexture tex;
 
 public:
     FontRenderer();

+ 1 - 1
client/rendering/renderer/WorldRenderer.h

@@ -17,7 +17,7 @@ public:
 private:
     const World& world;
     Mesh mesh;
-    FileTexture<4> texture;
+    FileTexture texture;
 };
 
 #endif

+ 1 - 1
gaming-core

@@ -1 +1 @@
-Subproject commit 33d0fc4551fd47d5d1b607df6f2a807b6107c7a1
+Subproject commit 1afdb909090ce8398de997bde094f1fcda3a2e4b

+ 3 - 0
meson.build

@@ -33,6 +33,9 @@ sourcesClient = ['client/Main.cpp',
     'gaming-core/wrapper/VertexBuffer.cpp',
     'gaming-core/wrapper/Attributes.cpp',
     'gaming-core/images/PNGReader.cpp',
+    'gaming-core/rendering/FileTexture.cpp',
+    'gaming-core/memory/StackAllocator.cpp',
+    'gaming-core/utils/Buffer.cpp',
     'gaming-core/wrapper/Window.cpp',
     'gaming-core/wrapper/WindowOptions.cpp',
     'gaming-core/input/Button.cpp',