CG-Project2
Loading...
Searching...
No Matches
ogl::Window Class Reference
Inheritance diagram for ogl::Window:
Collaboration diagram for ogl::Window:

Public Member Functions

 Window (const WindowSettings &settings)
GLFWwindow * getContext () const
Pair< float > getSize () const
float getWidth () const
void setWidth (const float &val)
float getHeight () const
void setHeight (const float &val)
void toggleVsync ()
bool isVsyncEnabled () const
void addClearMask (const unsigned int &val)
void setResizeCallback (std::function< void(GLFWwindow *, int, int)> &&func)
void execResizeCallback (GLFWwindow *context, const int &width, const int &height)
void setKeysCallback (std::function< void(GLFWwindow *, int, int, int, int)> &&func)
void execKeysCallback (GLFWwindow *context, const int &key, const int &code, const int &action, const int &mods)
void setMouseButtonCallback (std::function< void(GLFWwindow *, int, int, int)> &&func)
void execMouseButtonCallback (GLFWwindow *context, const int &button, const int &action, const int &mods)
void setCursorPosCallback (std::function< void(GLFWwindow *, double, double)> &&func)
void execCursorPosCallback (GLFWwindow *context, const double &xpos, const double &ypos)
virtual void onAttach () override
virtual void onDetach () override
virtual void onUpdate () override
virtual void onRender () override
virtual void begin () override
virtual void end () override
Public Member Functions inherited from ogl::Layer
 Layer (const std::string &name)
 Layer (const Layer &other)=delete
std::string getName () const
bool isAttached () const

Additional Inherited Members

Protected Attributes inherited from ogl::Layer
std::string m_name {"Layer"}
bool m_attached = false

Member Function Documentation

◆ begin()

void ogl::Window::begin ( )
overridevirtual

Reimplemented from ogl::Layer.

◆ end()

void ogl::Window::end ( )
overridevirtual

Reimplemented from ogl::Layer.

◆ onAttach()

void ogl::Window::onAttach ( )
overridevirtual

Reimplemented from ogl::Layer.

◆ onDetach()

void ogl::Window::onDetach ( )
overridevirtual

Reimplemented from ogl::Layer.

◆ onRender()

void ogl::Window::onRender ( )
overridevirtual

Reimplemented from ogl::Layer.

◆ onUpdate()

void ogl::Window::onUpdate ( )
overridevirtual

Reimplemented from ogl::Layer.


The documentation for this class was generated from the following files:
  • Opengl-Core/include/Core/Window.hpp
  • Opengl-Core/src/Core/Window.cpp