made Editor non reliant on GLFW aka i added an IRenderTexture interface of use in non renderer specific aplications
This commit is contained in:
23
TSE_Core/src/interfaces/IRenderTexture.hpp
Normal file
23
TSE_Core/src/interfaces/IRenderTexture.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "IResizeNotifiable.hpp"
|
||||
#include "IRenderTarget.hpp"
|
||||
#include "ITexture.hpp"
|
||||
|
||||
namespace TSE
|
||||
{
|
||||
class IRenderTextureCreator;
|
||||
|
||||
class IRenderTexture : public IRenderTarget, public ITexture, public IResizeNotifiable
|
||||
{
|
||||
public:
|
||||
inline static IRenderTextureCreator* factory = nullptr;
|
||||
virtual void SetSize(Vector2 v) = 0;
|
||||
};
|
||||
|
||||
class IRenderTextureCreator
|
||||
{
|
||||
public:
|
||||
virtual IRenderTexture* CreateTextureHeap(Vector2 v) = 0;
|
||||
};
|
||||
} // namespace TSE
|
||||
@@ -9,8 +9,8 @@ namespace TSE
|
||||
public:
|
||||
virtual ~ITexture() = default;
|
||||
virtual Vector2 size() const = 0;
|
||||
virtual float width() const = 0;
|
||||
virtual float height() const = 0;
|
||||
virtual float Width() const = 0;
|
||||
virtual float Height() const = 0;
|
||||
virtual uint GetTextureId() const = 0;
|
||||
};
|
||||
} // namespace TSE
|
||||
|
||||
Reference in New Issue
Block a user