Muto 0.0.1
Cross-Platform Application Template
GitHub Repo | Muto Updates | Muto's Author
Loading...
Searching...
No Matches
Sandbox2D.h
Go to the documentation of this file.
1#pragma once
2
3#include <Muto.h>
4
5#include "App/Layer.h"
6#include "ParticleSystem/ParticleSystem.h"
7
8struct RandomProperties;
9
10class Sandbox2D : public Muto::Layer
11{
12public:
13 Sandbox2D();
14 virtual ~Sandbox2D();
15 virtual void OnAttach() override;
16 virtual void OnDetach() override;
17 virtual void OnUpdate(Muto::Timestep ts) override;
18 virtual void OnImGuiRender() override;
19 virtual void OnEvent(Muto::Event& e) override;
20private:
22 glm::vec4 m_BackgroundColor = { 0.1f, 0.1f, 0.1f, 1.0f };
23 glm::vec4 m_ClearColor = { 0.1f, 0.3f, 0.3f, 1.0f };
27};
#define MU_PROFILE_SCOPE(name)
Definition Instrumentor.h:239
#define MU_PROFILE_FUNCTION()
Definition Instrumentor.h:240
The core application class that manages the main loop, window, layers, and event handling.
Definition Application.h:70
Window & GetWindow()
Retrieves the application window.
Definition Application.h:110
static Application & Get()
Retrieves the singleton instance of the Application.
Definition Application.h:107
Abstract base class for all events.
Definition Event.h:35
Base input class for querying input states.
Definition Input.h:15
static bool IsMouseButtonPressed(int button)
Checks if the specified mouse button is currently pressed.
Definition WindowsInput.cpp:16
Represents a reusable application layer that receives lifecycle callbacks (attach,...
Definition Layer.h:17
Definition OrthographicCameraController.h:30
A simple particle system for stress testing the renderer. This is a temporary starter particle system...
Definition ParticleSystem.h:45
A static class that provides an interface for issuing rendering commands.
Definition RenderCommand.h:13
static void Clear()
Clears the rendering buffers.
Definition RenderCommand.h:35
A 2D renderer for drawing quads and sprites.
Definition Renderer2D.h:21
static void EndScene()
Ends the current scene.
Definition Renderer2D.cpp:165
static void ResetStats()
Resets the rendering statistics.
Definition Renderer2D.cpp:516
static Statistics GetStats()
Retrieves the current rendering statistics.
Definition Renderer2D.cpp:521
Represents a time step in seconds.
Definition Timestep.h:11
virtual uint32_t GetHeight() const =0
Retrieves the height of the window.
virtual uint32_t GetWidth() const =0
Retrieves the width of the window.
Definition Sandbox2D.h:11
glm::vec4 m_ClearColor
Definition Sandbox2D.h:23
virtual void OnEvent(Muto::Event &e) override
Called when an event is dispatched to the layer.
Definition Sandbox2D.cpp:130
int ParticleEmitCount
Definition Sandbox2D.h:24
Sandbox2D()
Definition Sandbox2D.cpp:8
virtual void OnDetach() override
Called when the layer is detached from the application.
Definition Sandbox2D.cpp:40
Muto::ParticleProps m_ParticleProps
Definition Sandbox2D.h:26
virtual void OnUpdate(Muto::Timestep ts) override
Called every frame to update the layer with the given timestep.
Definition Sandbox2D.cpp:45
glm::vec4 m_BackgroundColor
Definition Sandbox2D.h:22
virtual void OnImGuiRender() override
Called when the layer should render its ImGui components.
Definition Sandbox2D.cpp:91
virtual void OnAttach() override
Called when the layer is attached to the application.
Definition Sandbox2D.cpp:18
Muto::OrthographicCameraController m_CameraController
Definition Sandbox2D.h:21
Muto::ParticleSystem m_ParticleSystem
Definition Sandbox2D.h:25
virtual ~Sandbox2D()
Definition Sandbox2D.cpp:14
@ MBC_ButtonLeft
Definition MouseButtonCodes.h:29
The main namespace for the Muto engine.
Definition Application.cpp:15
Definition ParticleSystem.h:12