fixed some small bugs and updated version to 0.1.3
This commit is contained in:
17
TSE_GlfwOpenGlImpl/src/CameraHelperOpenGL.hpp
Normal file
17
TSE_GlfwOpenGlImpl/src/CameraHelperOpenGL.hpp
Normal 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
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user