diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-22 12:15:03 +0200 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-10-22 12:15:03 +0200 |
commit | 9037aca03bfa4312794a6954752628381256f777 (patch) | |
tree | b5402ae6552ca84bb4cdf9a2f1507dc460a399ac /src/crepe/renderSystem.cpp | |
parent | 176ac90fce318334f1377d94d6e637e1eff84c3c (diff) |
merged further and changed to standard
Diffstat (limited to 'src/crepe/renderSystem.cpp')
-rw-r--r-- | src/crepe/renderSystem.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/crepe/renderSystem.cpp b/src/crepe/renderSystem.cpp new file mode 100644 index 0000000..a06aeba --- /dev/null +++ b/src/crepe/renderSystem.cpp @@ -0,0 +1,37 @@ + + + +#include "renderSystem.h" +#include <vector> + +#include "api/Color.h" +#include "api/Sprite.h" +#include "api/Transform.h" +#include "facade/SdlContext.h" +#include "facade/Texture.h" + +using namespace crepe::api; + + +static crepe::Texture player("../asset/texture/img.png"); + + +void RenderSystem::render(){ + + Sprite sprite(player, Color::get_red(), {1,1}); + Transform transform ={ + .position = {0,0}, + .rotation = 0, + .scale = 1, + }; + + // this will get changed to ecs getter of componets + crepe::SdlContext& ctx = crepe::SdlContext::get_instance(); + + ctx.draw(sprite, transform); + /* + for(const auto& S : test_objects){ + ctx.draw(S, const api::Transform &) + } + */ +} |