SFML - Simple and Fast Multimedia Library

SFML 3.0.1

- Main Page
- Topics
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Classes | Protected Member Functions | Static Protected Member Functions | List of all members
sf::GlResource Class Reference
Window module

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

`#include <SFML/Window/GlResource.hpp>`

Inheritance diagram for sf::GlResource:

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

## Protected Member Functions
| GlResource ()
| Default constructor.

## Static Protected Member Functions
static void | registerUnsharedGlObject (std::shared_ptr< void > object)
| Register an OpenGL object to be destroyed when its containing context is destroyed.
static void | unregisterUnsharedGlObject (std::shared_ptr< void > object)
| Unregister an OpenGL object from its containing context.

## 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 43 of file GlResource.hpp.

## Constructor & Destructor Documentation

## ◆ GlResource()

sf::GlResource::GlResource | ( |  | ) |
| protected

Default constructor.

## Member Function Documentation

## ◆ registerUnsharedGlObject()

static void sf::GlResource::registerUnsharedGlObject | ( | std::shared_ptr< void > | object | ) |
| staticprotected

Register an OpenGL object to be destroyed when its containing context is destroyed.

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

Parameters

  object | Object to be destroyed when its containing context is destroyed

## ◆ unregisterUnsharedGlObject()

static void sf::GlResource::unregisterUnsharedGlObject | ( | std::shared_ptr< void > | object | ) |
| staticprotected

Unregister an OpenGL object from its containing context.

Parameters

  object | Object to be unregistered

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

- GlResource.hpp