Loading [MathJax]/extensions/tex2jax.js
Radium Engine  1.5.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Window management from an openGL context

Enumerations

enum class  Ra::Headless::OpenGLContext::EventMode : int { POLL = 0 , WAIT , TIMEOUT , NUM_MODES }
 

Functions

virtual void Ra::Headless::OpenGLContext::show (EventMode, float)
 Show the window.
 
virtual void Ra::Headless::OpenGLContext::hide ()
 Hide the window.
 
virtual void Ra::Headless::OpenGLContext::resize (const std::array< int, 2 > &)
 Resize the window.
 
virtual void Ra::Headless::OpenGLContext::renderLoop (std::function< void(float)>)
 loop on events and execute the functor render after each event
 
Ra::Core::Utils::Observable< int, int > & Ra::Headless::OpenGLContext::resizeListener ()
 
Ra::Core::Utils::Observable< int, int, int, int > & Ra::Headless::OpenGLContext::keyboardListener ()
 
Ra::Core::Utils::Observable< int, int, int, int, int > & Ra::Headless::OpenGLContext::mouseListener ()
 
Ra::Core::Utils::Observable< int, int > & Ra::Headless::OpenGLContext::mouseMoveListener ()
 
Ra::Core::Utils::Observable< int, int > & Ra::Headless::OpenGLContext::scrollListener ()
 
virtual bool Ra::Headless::OpenGLContext::processEvents ()
 Process the pending events according to the window show mode.
 
void Ra::Headless::OpenGLContext::resizeFrameBuffer (int width, int height)
 Resize callback.
 
void Ra::Headless::OpenGLContext::keyboardEventCallback (int key, int scancode, int action, int mods)
 Keyboard callback.
 
void Ra::Headless::OpenGLContext::mouseEventCallback (int button, int action, int mods, int x, int y)
 Mouse callback.
 
void Ra::Headless::OpenGLContext::mouseMoveEventCallback (int x, int y)
 Mouse move callback.
 
void Ra::Headless::OpenGLContext::scrollEventCallback (int xoffset, int yoffset)
 Scroll callback.
 

Variables

Ra::Core::Utils::Observable< int, int > Ra::Headless::OpenGLContext::m_resizers
 Resize event observable.
 
Ra::Core::Utils::Observable< int, int, int, int > Ra::Headless::OpenGLContext::m_keyboardObservers
 Keyboard event observable.
 
Ra::Core::Utils::Observable< int, int, int, int, int > Ra::Headless::OpenGLContext::m_mouseObservers
 Mouse event observable.
 
Ra::Core::Utils::Observable< int, int > Ra::Headless::OpenGLContext::m_mouseMoveObservers
 Mouse move event observable.
 
Ra::Core::Utils::Observable< int, int > Ra::Headless::OpenGLContext::m_scrollObservers
 Scroll event observable.
 
EventMode Ra::Headless::OpenGLContext::m_mode { EventMode::POLL }
 Event processing mode.
 
float Ra::Headless::OpenGLContext::m_delay { 1.f / 60.f }
 Timeout delay for event processing.
 

Detailed Description

These methods allow to display and interact with a simple window associated with the created OpenGL Context, if any.

Enumeration Type Documentation

◆ EventMode

Identify the event processing method when the window is exposed.

Definition at line 67 of file OpenGLContext.hpp.

Function Documentation

◆ keyboardListener()

Ra::Core::Utils::Observable<int, int, int, int>& Ra::Headless::OpenGLContext::keyboardListener ( )
inline

#include </home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Headless/OpenGLContext/OpenGLContext.hpp>

Give access to the keyboard event observable so that client can add Observer to this event.

The parameters sent to the keyboard listeners are the keyboard key, platform-specific scancode, key action and modifier bits.

See also
https://www.glfw.org/docs/latest/input_guide.html#input_keyboard

Definition at line 94 of file OpenGLContext.hpp.

◆ mouseListener()

Ra::Core::Utils::Observable<int, int, int, int, int>& Ra::Headless::OpenGLContext::mouseListener ( )
inline

#include </home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Headless/OpenGLContext/OpenGLContext.hpp>

Give access to the mouse event observable so that client can add Observer to this event.

The parameters sent to the mouse listeners are the mouse button, button action and modifier bits as well as the mouse position in pixel unit and in the FrameBuffer space. The origin is at the top left of the framebuffer.

See also
https://www.glfw.org/docs/latest/input_guide.html#input_mouse

Definition at line 106 of file OpenGLContext.hpp.

◆ mouseMoveListener()

Ra::Core::Utils::Observable<int, int>& Ra::Headless::OpenGLContext::mouseMoveListener ( )
inline

#include </home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Headless/OpenGLContext/OpenGLContext.hpp>

Give access to the mouse move event observable so that client can add Observer to this event.

The parameters sent to the mouse move listeners are the mouse position in pixel unit and in the FrameBuffer space. The origin is at the top left of the framebuffer.

See also
https://www.glfw.org/docs/latest/input_guide.html#cursor_pos

Definition at line 117 of file OpenGLContext.hpp.

◆ resizeListener()

Ra::Core::Utils::Observable<int, int>& Ra::Headless::OpenGLContext::resizeListener ( )
inline

#include </home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Headless/OpenGLContext/OpenGLContext.hpp>

Give access to the resize event observable so that client can add Observer to this event.

The parameters sent to the resize listeners are in pixels and correspond to the OpenGL Framebuffer size (i.e. the size given to glViewport function)

See also
https://www.glfw.org/docs/latest/window_guide.html#window_fbsize

Definition at line 83 of file OpenGLContext.hpp.

◆ scrollListener()

Ra::Core::Utils::Observable<int, int>& Ra::Headless::OpenGLContext::scrollListener ( )
inline

#include </home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Headless/OpenGLContext/OpenGLContext.hpp>

Give access to the scroll event observable so that client can add Observer to this event.

The parameters sent to the scroll listeners are two-dimensional scroll offsets in pixel unit and in the FrameBuffer space.

See also
https://www.glfw.org/docs/latest/input_guide.html#scrolling

Definition at line 125 of file OpenGLContext.hpp.