fixed some small bugs and updated version to 0.1.3

This commit is contained in:
2026-01-25 10:55:06 +01:00
parent 11e8d343af
commit bf4189bba0
9 changed files with 57 additions and 10 deletions

View File

@@ -0,0 +1,17 @@
#pragma once
#include "BehaviourScripts/Camera.hpp"
#include "GL/gl3w.h"
#include "GL/gl.h"
namespace TSE::GLFW
{
class CameraHelperOpenGL : public ICameraHelper
{
public:
inline void OnRenderTargetChanged(float width, float height) override
{
glViewport(0, 0, width, height);
};
};
} // namespace TSE::GLFW

View File

@@ -13,6 +13,7 @@
#include "interfaces/IRenderer.hpp"
#include "BehaviourScripts/Camera.hpp"
#include "RenderTextureCreatorOpenGL.hpp"
#include "CameraHelperOpenGL.hpp"
TSE::GLFW::OpenGLRenderingBackend::OpenGLRenderingBackend(Color _backgroundColor, bool _vsync)
: OpenGLRenderingBackend(_backgroundColor, _vsync, 0, false){ }
@@ -39,6 +40,7 @@ void TSE::GLFW::OpenGLRenderingBackend::InitPreWindow()
{
IRenderTexture::factory = new RenderTextureCreatorOpenGL();
Texture::helper = new TextureHelperOpenGL();
Camera::helper = new CameraHelperOpenGL();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, TSE_OPENGL_VERSION_MAJOR);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, TSE_OPENGL_VERSION_MINOR);