SRM  v0.11.0-1
Simple Rendering Manager
SRMConnectorInterface Struct Reference

Interface for OpenGL events handling. More...

#include <SRMConnector.h>

Data Fields

void(* initializeGL )(SRMConnector *connector, void *data)
 Notifies that the connector has been initialized. More...
 
void(* paintGL )(SRMConnector *connector, void *data)
 Render event. More...
 
void(* pageFlipped )(SRMConnector *connector, void *data)
 Notifies a page flip. More...
 
void(* resizeGL )(SRMConnector *connector, void *data)
 Notifies a change in the framebuffer's dimensions. More...
 
void(* uninitializeGL )(SRMConnector *connector, void *data)
 Notifies the connector's uninitialization. More...
 

Detailed Description

Interface for OpenGL events handling.

The SRMConnectorInterface defines a set of functions for managing various OpenGL events, including initialization, rendering, page flipping, resizing, and uninitialization. This interface is used in the srmConnectorInitialize() function.

Field Documentation

◆ initializeGL

void(* SRMConnectorInterface::initializeGL) (SRMConnector *connector, void *data)

Notifies that the connector has been initialized.

In this event, you should set up shaders, load textures, and perform any necessary setup.

Parameters
connectorPointer to the SRMConnector.
dataUser data passed in srmConnectorInitialize().

◆ paintGL

void(* SRMConnectorInterface::paintGL) (SRMConnector *connector, void *data)

Render event.

During this event, you should handle all rendering for the current frame.

Parameters
connectorPointer to the SRMConnector.
dataUser data passed in srmConnectorInitialize().

◆ pageFlipped

void(* SRMConnectorInterface::pageFlipped) (SRMConnector *connector, void *data)

Notifies a page flip.

This event is triggered when the framebuffer being displayed on the screen changes.

Parameters
connectorPointer to the SRMConnector.
dataUser data passed in srmConnectorInitialize().

◆ resizeGL

void(* SRMConnectorInterface::resizeGL) (SRMConnector *connector, void *data)

Notifies a change in the framebuffer's dimensions.

This event is invoked when the current connector mode changes.

Parameters
connectorPointer to the SRMConnector.
dataUser data passed in srmConnectorInitialize().

◆ uninitializeGL

void(* SRMConnectorInterface::uninitializeGL) (SRMConnector *connector, void *data)

Notifies the connector's uninitialization.

In this method, you should release resources created during initialization.

Parameters
connectorPointer to the SRMConnector.
dataUser data passed in srmConnectorInitialize().