diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-08 15:43:45 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-08 15:43:45 +0200 |
commit | afdd12277a43d3ad7755f028e85c569dece84f0b (patch) | |
tree | 1b619bbd2c95cb676c53f2410a94dd16b5fb54fe /src/crepe/facade/Texture.cpp | |
parent | 035444c1b7ee2e76c235e16eafd6115e849eec73 (diff) |
rendering system
Diffstat (limited to 'src/crepe/facade/Texture.cpp')
-rw-r--r-- | src/crepe/facade/Texture.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crepe/facade/Texture.cpp b/src/crepe/facade/Texture.cpp index 220ef2e..b4e3aa8 100644 --- a/src/crepe/facade/Texture.cpp +++ b/src/crepe/facade/Texture.cpp @@ -27,9 +27,13 @@ Texture::~Texture(){ void Texture::load(std::unique_ptr<api::Resource> res) { dbg_trace(); SdlContext& ctx = SdlContext::get_instance(); - m_texture = ctx.setTextureFromPath(res->canonical()); + m_texture = ctx.setTextureFromPath(res->canonical(), srcrect, 1, 1); } SDL_Texture* Texture::get_texture() const{ return m_texture; } + +SDL_Rect& Texture::get_rect() { + return srcrect; +} |