aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/core/renderSystem.cpp
blob: a06aebacd1f0685b232a2b6cfd13d11549fa2d6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 &)
	}
	*/
}