diff options
author | jaroWMR <jarorutjes07@gmail.com> | 2024-10-07 18:07:17 +0200 |
---|---|---|
committer | jaroWMR <jarorutjes07@gmail.com> | 2024-10-07 18:07:17 +0200 |
commit | 5f84969c851530ebc430be2cf8e99c945ff7a4a7 (patch) | |
tree | 9fcd2755dbfd456f20f0ad37c18c7281b81382b1 /src/crepe/SDLApp.cpp | |
parent | 5cf5cf64d6f9597849ed5558da4f1bc201165fed (diff) |
improved particle system from 90ms to ~ 0.7ms
Diffstat (limited to 'src/crepe/SDLApp.cpp')
-rw-r--r-- | src/crepe/SDLApp.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/crepe/SDLApp.cpp b/src/crepe/SDLApp.cpp index a5e3621..0779af1 100644 --- a/src/crepe/SDLApp.cpp +++ b/src/crepe/SDLApp.cpp @@ -1,5 +1,8 @@ #include "SDLApp.hpp" #include <iostream> +#include <vector> +#include "Particle.hpp" +#include "ParticleEmitter.hpp" SDLApp::SDLApp(int windowWidth, int windowHeight) : windowWidth(windowWidth), windowHeight(windowHeight), window(nullptr), renderer(nullptr) {} @@ -58,6 +61,12 @@ void SDLApp::drawSquare(int x, int y, int size) { SDL_RenderFillRect(renderer, &rect); } +SDL_Texture* squareTexture = nullptr; // Load this with an image or create it + + + + + void SDLApp::cleanUp() { if (renderer) { SDL_DestroyRenderer(renderer); |