SGCT master (487fac4)
Simple Graphics Cluster Toolkit
Loading...
Searching...
No Matches
sgct::Engine::Callbacks Struct Reference

This struct holds all of the callback functions that can be used by the client library to be called during the different times of the frame. More...

#include <sgct/engine.h>

Collaboration diagram for sgct::Engine::Callbacks:

Public Attributes

void(*) preWindow () = nullptr
 This function is called before the window is created (before OpenGL context is created).
void(*) initOpenGL (GLFWwindow *) = nullptr
 This function is called once before the starting the render loop and after creation of the OpenGL context.
void(*) preSync () = nullptr
 This function is called before the synchronization stage.
void(*) postSyncPreDraw () = nullptr
 This function is called once per frame after sync but before draw stage.
void(*) draw (const RenderData &) = nullptr
 This function draws the scene and could be called several times per frame as it's called once per viewport and once per eye if stereoscopy is used.
void(*) draw2D (const RenderData &) = nullptr
 This function is be called after overlays and post effects has been drawn and can used to render text and HUDs that will not be filtered or antialiased.
void(*) postDraw () = nullptr
 This function is called after the draw stage but before the OpenGL buffer swap.
void(*) cleanup () = nullptr
 This is called before all SGCT components will be destroyed.
std::vector< std::byte >(*) encode () = nullptr
 This function is called to encode all shared data that is sent to the connected nodes in a clustered setup.
void(*) decode (const std::vector< std::byte > &) = nullptr
 This function is called by decode all shared data sent to us from the master.
void(*) externalDecode (const char *, int) = nullptr
 This function is called when a TCP message is received.
void(*) externalStatus (bool) = nullptr
 This function is called when the connection status changes.
void(*) dataTransferDecode (void *, int, int, int) = nullptr
 This function is called when a TCP message is received.
void(*) dataTransferStatus (bool, int) = nullptr
 This function is called when the connection status changes.
void(*) dataTransferAcknowledge (int, int) = nullptr
 This function is called when data is successfully sent.
void(*) keyboard (Key, Modifier, Action, int, Window *) = nullptr
 This function sets the keyboard callback (GLFW wrapper) for all windows.
void(*) character (unsigned int, int, Window *) = nullptr
 All windows are connected to this callback.
void(*) mouseButton (MouseButton, Modifier, Action, Window *) = nullptr
 This function sets the mouse button callback (GLFW wrapper) for all windows.
void(*) mousePos (double, double, Window *) = nullptr
 All windows are connected to this callback.
void(*) mouseScroll (double, double, Window *) = nullptr
 All windows are connected to this callback.
void(*) drop (const std::vector< std::string_view > &) = nullptr
 Drop files to any window. All windows are connected to this callback.

Detailed Description

This struct holds all of the callback functions that can be used by the client library to be called during the different times of the frame.

Member Data Documentation

◆ character

void(*) sgct::Engine::Callbacks::character(unsigned int, int, Window *) = nullptr

All windows are connected to this callback.

◆ cleanup

void(*) sgct::Engine::Callbacks::cleanup() = nullptr

This is called before all SGCT components will be destroyed.

The same shared context is active that was passed in the Callbacks::initOpenGL callback

◆ dataTransferAcknowledge

void(*) sgct::Engine::Callbacks::dataTransferAcknowledge(int, int) = nullptr

This function is called when data is successfully sent.

◆ dataTransferDecode

void(*) sgct::Engine::Callbacks::dataTransferDecode(void *, int, int, int) = nullptr

This function is called when a TCP message is received.

◆ dataTransferStatus

void(*) sgct::Engine::Callbacks::dataTransferStatus(bool, int) = nullptr

This function is called when the connection status changes.

◆ decode

void(*) sgct::Engine::Callbacks::decode(const std::vector< std::byte > &) = nullptr

This function is called by decode all shared data sent to us from the master.

The parameter is the block of data that contains the data to be decoded

◆ draw

void(*) sgct::Engine::Callbacks::draw(const RenderData &) = nullptr

This function draws the scene and could be called several times per frame as it's called once per viewport and once per eye if stereoscopy is used.

◆ draw2D

void(*) sgct::Engine::Callbacks::draw2D(const RenderData &) = nullptr

This function is be called after overlays and post effects has been drawn and can used to render text and HUDs that will not be filtered or antialiased.

◆ drop

void(*) sgct::Engine::Callbacks::drop(const std::vector< std::string_view > &) = nullptr

Drop files to any window. All windows are connected to this callback.

◆ encode

std::vector< std::byte >(*) sgct::Engine::Callbacks::encode() = nullptr

This function is called to encode all shared data that is sent to the connected nodes in a clustered setup.

◆ externalDecode

void(*) sgct::Engine::Callbacks::externalDecode(const char *, int) = nullptr

This function is called when a TCP message is received.

◆ externalStatus

void(*) sgct::Engine::Callbacks::externalStatus(bool) = nullptr

This function is called when the connection status changes.

◆ initOpenGL

void(*) sgct::Engine::Callbacks::initOpenGL(GLFWwindow *) = nullptr

This function is called once before the starting the render loop and after creation of the OpenGL context.

The window that is passed in this callback is the shared context between all created windows

◆ keyboard

void(*) sgct::Engine::Callbacks::keyboard(Key, Modifier, Action, int, Window *) = nullptr

This function sets the keyboard callback (GLFW wrapper) for all windows.

◆ mouseButton

void(*) sgct::Engine::Callbacks::mouseButton(MouseButton, Modifier, Action, Window *) = nullptr

This function sets the mouse button callback (GLFW wrapper) for all windows.

◆ mousePos

void(*) sgct::Engine::Callbacks::mousePos(double, double, Window *) = nullptr

All windows are connected to this callback.

◆ mouseScroll

void(*) sgct::Engine::Callbacks::mouseScroll(double, double, Window *) = nullptr

All windows are connected to this callback.

◆ postDraw

void(*) sgct::Engine::Callbacks::postDraw() = nullptr

This function is called after the draw stage but before the OpenGL buffer swap.

◆ postSyncPreDraw

void(*) sgct::Engine::Callbacks::postSyncPreDraw() = nullptr

This function is called once per frame after sync but before draw stage.

◆ preSync

void(*) sgct::Engine::Callbacks::preSync() = nullptr

This function is called before the synchronization stage.

◆ preWindow

void(*) sgct::Engine::Callbacks::preWindow() = nullptr

This function is called before the window is created (before OpenGL context is created).

At this stage the configuration file has been read and network is initialized


The documentation for this struct was generated from the following file: