Documentation de SFML 2.6.0

Attention: cette page se réfère à une ancienne version de SFML. Cliquez ici pour passer à la dernière version.
Loading...
Searching...
No Matches
sf::GlResource Class Reference

Base class for classes that require an OpenGL context. More...

#include <SFML/Window/GlResource.hpp>

Inheritance diagram for sf::GlResource:
sf::Context sf::Shader sf::Texture sf::VertexBuffer sf::Window sf::RenderWindow

Classes

class  TransientContextLock
 RAII helper class to temporarily lock an available context for use. More...
 

Protected Member Functions

 GlResource ()
 Default constructor.
 
 ~GlResource ()
 Destructor.
 

Static Protected Member Functions

static void registerContextDestroyCallback (ContextDestroyCallback callback, void *arg)
 Register a function to be called when a context is destroyed.
 

Detailed Description

Base class for classes that require an OpenGL context.

This class is for internal use only, it must be the base of every class that requires a valid OpenGL context in order to work.

Definition at line 46 of file GlResource.hpp.

Constructor & Destructor Documentation

◆ GlResource()

sf::GlResource::GlResource ( )
protected

Default constructor.

◆ ~GlResource()

sf::GlResource::~GlResource ( )
protected

Destructor.

Member Function Documentation

◆ registerContextDestroyCallback()

static void sf::GlResource::registerContextDestroyCallback ( ContextDestroyCallback  callback,
void *  arg 
)
staticprotected

Register a function to be called when a context is destroyed.

This is used for internal purposes in order to properly clean up OpenGL resources that cannot be shared between contexts.

Parameters
callbackFunction to be called when a context is destroyed
argArgument to pass when calling the function

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