summaryrefslogtreecommitdiff
path: root/themes/src/summer
diff options
context:
space:
mode:
Diffstat (limited to 'themes/src/summer')
-rw-r--r--themes/src/summer/SummerTheme.cpp20
-rw-r--r--themes/src/summer/SummerTheme.h6
2 files changed, 13 insertions, 13 deletions
diff --git a/themes/src/summer/SummerTheme.cpp b/themes/src/summer/SummerTheme.cpp
index 522b44c..1f76b56 100644
--- a/themes/src/summer/SummerTheme.cpp
+++ b/themes/src/summer/SummerTheme.cpp
@@ -6,10 +6,10 @@
#include "../shaders/sun_vert.h"
#include <vector>
-SummerTheme::SummerTheme(Renderer2d* renderer, WebglContext* context)
- : renderer{renderer}
+SummerTheme::SummerTheme(WebglContext* context)
{
- load(renderer, context);
+ renderer.load(context);
+ load(context);
}
SummerTheme::~SummerTheme()
@@ -17,12 +17,12 @@ SummerTheme::~SummerTheme()
unload();
}
-void SummerTheme::load(Renderer2d* renderer, WebglContext* context) {
- renderer->load(context, shader_sun_vert, shader_sun_frag);
- renderer->clearColor = Vector4(0, 181, 286, 255.f).toNormalizedColor();
+void SummerTheme::load(WebglContext* context) {
+ renderer.load(context, shader_sun_vert, shader_sun_frag);
+ renderer.clearColor = Vector4(0, 181, 286, 255.f).toNormalizedColor();
sun.sectors = 180;
- sun.radius = renderer->context->width / 4.f;
- sun.load(renderer);
+ sun.radius = renderer.context->width / 4.f;
+ sun.load(&renderer);
}
void SummerTheme::update(f32 dtSeconds) {
@@ -30,8 +30,8 @@ void SummerTheme::update(f32 dtSeconds) {
}
void SummerTheme::render() {
- renderer->render();
- sun.render(renderer);
+ renderer.render();
+ sun.render(&renderer);
}
void SummerTheme::unload() {
diff --git a/themes/src/summer/SummerTheme.h b/themes/src/summer/SummerTheme.h
index 030f20a..2ce6b7f 100644
--- a/themes/src/summer/SummerTheme.h
+++ b/themes/src/summer/SummerTheme.h
@@ -17,13 +17,13 @@ struct Sun {
class SummerTheme : public Theme {
public:
- SummerTheme(Renderer2d*, WebglContext*);
+ SummerTheme(WebglContext*);
~SummerTheme();
Sun sun;
- void load(Renderer2d*, WebglContext*);
+ void load(WebglContext*);
void update(f32 dtSeconds);
void render();
void unload();
private:
- Renderer2d* renderer;
+ Renderer2d renderer;
};