started working with MRT

This commit is contained in:
2026-02-20 15:58:51 +01:00
parent 55dce5776a
commit 45501f153d
13 changed files with 746 additions and 36 deletions

View File

@@ -279,3 +279,13 @@ TSE::Vector2 TSE::TileMap::ChunkToLocalPos(const Vector2 &v, const TileMapChunk
{
return v + chunk.pos * chunkSize;
}
TSE::Vector2 TSE::TileMap::RealPosToTileMapPos(const Vector2 &v)
{
return v + nextLine * v.y;
}
TSE::Vector2 TSE::TileMap::TileMapToRealPos(const Vector2 &v)
{
return v - nextLine * v.y;
}

View File

@@ -60,6 +60,8 @@ namespace TSE
const Rect& GetBounds() const { return bounds; }
void SetNextLineOffset(const Vector2& offset);
Vector2 GetNextLineOffset();
Vector2 RealPosToTileMapPos(const Vector2& v);
Vector2 TileMapToRealPos(const Vector2& v);
inline const char* GetName() override
{

View File

@@ -13,11 +13,12 @@ namespace TSE
public:
inline static IRenderTextureCreator* factory = nullptr;
virtual void SetSize(Vector2 v) = 0;
virtual uint GetTextureId(uint id) const = 0;
};
class IRenderTextureCreator
{
public:
virtual IRenderTexture* CreateTextureHeap(Vector2 v) = 0;
virtual IRenderTexture* CreateTextureHeap(Vector2 v, uint textureCount = 1) = 0;
};
} // namespace TSE