aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/SDLApp.cpp
diff options
context:
space:
mode:
authorjaroWMR <jarorutjes07@gmail.com>2024-10-07 18:07:17 +0200
committerjaroWMR <jarorutjes07@gmail.com>2024-10-07 18:07:17 +0200
commit5f84969c851530ebc430be2cf8e99c945ff7a4a7 (patch)
tree9fcd2755dbfd456f20f0ad37c18c7281b81382b1 /src/crepe/SDLApp.cpp
parent5cf5cf64d6f9597849ed5558da4f1bc201165fed (diff)
improved particle system from 90ms to ~ 0.7ms
Diffstat (limited to 'src/crepe/SDLApp.cpp')
-rw-r--r--src/crepe/SDLApp.cpp9
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);