started working with MRT
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user