Renderers no longer have an init function and are expected to be prepared in their constructor (whatever it is)
We can do something similar for input processor (probably a good idea?) or go with the plan for game and use a template, engine can know about the renderers as long as it treats them as generic pointers, but shouldn't know about the game Game can either be a templated make_unique or we can just enforce a game class naming Or pass game in at start loop
This commit is contained in:
@@ -18,8 +18,10 @@ struct SDL_WindowDeleter {
|
||||
class SdlRenderer : public Renderer {
|
||||
public:
|
||||
~SdlRenderer() override;
|
||||
|
||||
SdlRenderer(RendererParams renderer_params);
|
||||
|
||||
void draw_text(std::optional<TextRenderDetails> details, std::string text, int x, int y) override;
|
||||
void initialize(RendererParams params) override;
|
||||
void flush() override;
|
||||
void draw_point(int x, int y, Color color) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user