Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
set_uniform_event.h
Go to the documentation of this file.
1 #ifndef SET_UNIFORM_EVENT_H
2 #define SET_UNIFORM_EVENT_H
3 #include "graphics/uniform.h"
4 #include "events/event.h"
5 
6 //= SCRIPTABLE
7 //= SCRIPTABLE BASES Event
8 
9 namespace Graphics {
13  class SetUniformEvent : public Events::Event {
14  private:
15  Uniform uniform;
16  public:
17  SetUniformEvent() = delete;
18  //= BEGIN SCRIPTABLE
19 
25  SetUniformEvent(const Uniform& uniform) : Event(Events::EventType::SET_UNIFORM), uniform(uniform) {}
33  static std::shared_ptr<SetUniformEvent> create(const Uniform& uniform) { return std::make_shared<SetUniformEvent>(uniform); }
39  Uniform getUniform() const noexcept { return uniform; }
40  //= END SCRIPTABLE
41  };
42 }
43 #endif
Class for event.
Definition: event.h:10
Definition: event_type.h:29
SetUniformEvent(const Uniform &uniform)
Constructor for setUniformEvent.
Definition: set_uniform_event.h:25
Class for set uniform event.
Definition: set_uniform_event.h:13
Class for shader uniform.
Definition: uniform.h:10
EventType
Event type enum that is used when passing events.
Definition: event_type.h:12
Uniform getUniform() const noexcept
Gets the uniform.
Definition: set_uniform_event.h:39
Event(const EventType &type)
Event constructor.
Definition: event.h:21
static std::shared_ptr< SetUniformEvent > create(const Uniform &uniform)
Factory function for SetUniformEvent.
Definition: set_uniform_event.h:33