aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/Texture.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-10-08 15:43:45 +0200
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-10-08 15:43:45 +0200
commitafdd12277a43d3ad7755f028e85c569dece84f0b (patch)
tree1b619bbd2c95cb676c53f2410a94dd16b5fb54fe /src/crepe/facade/Texture.cpp
parent035444c1b7ee2e76c235e16eafd6115e849eec73 (diff)
rendering system
Diffstat (limited to 'src/crepe/facade/Texture.cpp')
-rw-r--r--src/crepe/facade/Texture.cpp6
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;
+}