Skip to main content

GLSurface

The GLSurface class extends the Surface class to provide OpenGL-specific functionality for managing a rendering surface. It includes methods for interacting with OpenGL contexts and managing texture identifiers and framebuffers, enabling rendering operations in the context of OpenGL. The class supports managing color and depth textures, along with their respective internal formats, and facilitates handling of framebuffer objects essential for rendering.

#include <platform/TellusimSurface.h>

Inheritance

Constructors

GLSurface()
explicit GLSurface(GLContext &context)

Methods

Current context.

void *getContext() const

Texture identifiers.

void setColorTextureID(uint32_t texture_id)
void setDepthTextureID(uint32_t texture_id)
uint32_t getColorTextureID() const
uint32_t getDepthTextureID() const

Framebuffer identifier.

void setFramebufferID(uint32_t framebuffer_id)
uint32_t getFramebufferID() const

Surface formats.

uint32_t getColorInternalFormat() const
uint32_t getDepthInternalFormat() const