|
Muto 0.0.1
|
Represents a reusable application layer that receives lifecycle callbacks (attach, detach, update, events, render, and ImGui render). Intended as a base class for concrete layers. More...
#include <Layer.h>
Public Member Functions | |
| const std::string & | GetName () const |
| Retrieves the name of the layer for debugging purposes. | |
| Layer (const std::string &name="Layer") | |
| Constructs a Layer with an optional name for debugging purposes. | |
| virtual void | OnAttach () |
| Called when the layer is attached to the application. | |
| virtual void | OnDetach () |
| Called when the layer is detached from the application. | |
| virtual void | OnEvent (Event &event) |
| Called when an event is dispatched to the layer. | |
| virtual void | OnImGuiRender () |
| Called when the layer should render its ImGui components. | |
| virtual void | OnRender () |
| Called when the layer should render its contents. | |
| virtual void | OnUpdate (Timestep ts) |
| Called every frame to update the layer with the given timestep. | |
| virtual | ~Layer () |
Protected Attributes | |
| std::string | m_DebugName |
| The name of the layer assigned at creation, used for debugging. | |
Represents a reusable application layer that receives lifecycle callbacks (attach, detach, update, events, render, and ImGui render). Intended as a base class for concrete layers.
| Muto::Layer::Layer | ( | const std::string & | name = "Layer" | ) |
Constructs a Layer with an optional name for debugging purposes.
| name | The name of the layer, used for debugging, defaulted to "Layer". |
References m_DebugName.
|
virtual |
|
inline |
Called when the layer is attached to the application.
Reimplemented in Muto::EditorLayer, Muto::ImGuiLayer, Muto::OpenGLImGuiLayer, and Sandbox2D.
Referenced by Muto::Application::PushLayer(), and Muto::Application::PushOverlay().
Called when the layer is detached from the application.
Reimplemented in Muto::EditorLayer, Muto::ImGuiLayer, Muto::OpenGLImGuiLayer, and Sandbox2D.
Called when an event is dispatched to the layer.
| event | The event being dispatched. |
Reimplemented in Muto::EditorLayer, Muto::ImGuiLayer, Muto::OpenGLImGuiLayer, Sandbox2D, ExampleLayer, and ExampleLayer.
Called when the layer should render its ImGui components.
Reimplemented in Muto::EditorLayer, Muto::ImGuiLayer, Muto::OpenGLImGuiLayer, Sandbox2D, ExampleLayer, and ExampleLayer.
Called when the layer should render its contents.
Called every frame to update the layer with the given timestep.
| ts | The timestep representing the time elapsed since the last update. |
Reimplemented in Sandbox2D, ExampleLayer, ExampleLayer, and Muto::EditorLayer.
|
protected |