|
@@ -2,8 +2,7 @@
|
|
|
#include <cfloat>
|
|
|
|
|
|
#include "client/rendering/Engine.h"
|
|
|
-#include "client/rendering/wrapper/GLFWWrapper.h"
|
|
|
-#include "client/rendering/wrapper/GLWrapper.h"
|
|
|
+#include "gaming-core/wrapper/GL.h"
|
|
|
#include "client/rendering/Renderer.h"
|
|
|
|
|
|
Engine::Engine(Shaders& shaders, Framebuffers& fb, const Size& size, RenderSettings& renderSettings) :
|
|
@@ -36,7 +35,7 @@ void Engine::renderTick(float lag, const Game& game) {
|
|
|
|
|
|
void Engine::renderShadow(float lag, const Game& game) {
|
|
|
framebuffers.shadow.bind();
|
|
|
- GLWrapper::enableDepthTesting();
|
|
|
+ GL::enableDepthTesting();
|
|
|
shaders.shadow.use();
|
|
|
worldShadowProjView = worldShadowProj;
|
|
|
worldShadowProjView *= worldShadowView;
|
|
@@ -49,7 +48,7 @@ void Engine::renderShadow(float lag, const Game& game) {
|
|
|
|
|
|
void Engine::renderWorld(float lag, const Game& game) {
|
|
|
framebuffers.world.bind();
|
|
|
- GLWrapper::enableDepthTesting();
|
|
|
+ GL::enableDepthTesting();
|
|
|
shaders.world.use();
|
|
|
|
|
|
Matrix rWorldShadowProjView;
|
|
@@ -95,7 +94,7 @@ void Engine::renderSSAO() {
|
|
|
}
|
|
|
|
|
|
void Engine::renderPostWorld() {
|
|
|
- GLWrapper::prepareMainFramebuffer();
|
|
|
+ GL::prepareMainFramebuffer();
|
|
|
shaders.postWorld.use();
|
|
|
framebuffers.world.bindColorTexture(0);
|
|
|
framebuffers.ssaoBlur.bindRedTexture(1);
|
|
@@ -107,7 +106,7 @@ void Engine::renderPostWorld() {
|
|
|
}
|
|
|
|
|
|
void Engine::renderTextOverlay(float lag, const Game& game) {
|
|
|
- GLWrapper::disableDepthTesting();
|
|
|
+ GL::disableDepthTesting();
|
|
|
shaders.text.use();
|
|
|
|
|
|
Matrix m;
|
|
@@ -117,10 +116,10 @@ void Engine::renderTextOverlay(float lag, const Game& game) {
|
|
|
model.clear();
|
|
|
shaders.text.setMatrix("model", model.peek().getValues());
|
|
|
|
|
|
- GLWrapper::enableBlending();
|
|
|
+ GL::enableBlending();
|
|
|
Renderer renderer(shaders.text, model, m);
|
|
|
game.renderTextOverlay(lag, renderer, fontRenderer);
|
|
|
- GLWrapper::disableBlending();
|
|
|
+ GL::disableBlending();
|
|
|
}
|
|
|
|
|
|
void Engine::updateWorldProjection() {
|