Loading...
Searching...
No Matches
Go to the source code of this file.
Typedefs | |
typedef void(* | GlFunctionPointer) (void) |
Functions | |
sfContext * | sfContext_create (void) |
Create a new context. | |
void | sfContext_destroy (sfContext *context) |
Destroy a context. | |
sfBool | sfContext_isExtensionAvailable (const char *name) |
Check whether a given OpenGL extension is available. | |
sfBool | sfContext_setActive (sfContext *context, sfBool active) |
Activate or deactivate explicitely a context. | |
GlFunctionPointer | sfContext_getFunction (const char *name) |
Get the address of an OpenGL function. | |
sfContextSettings | sfContext_getSettings (const sfContext *context) |
Get the settings of the context. | |
sfUint64 | sfContext_getActiveContextId (void) |
Get the currently active context's ID. | |
Typedef Documentation
◆ GlFunctionPointer
Function Documentation
◆ sfContext_create()
sfContext * sfContext_create | ( | void | ) |
Create a new context.
This function activates the new context.
- Returns
- New sfContext object
◆ sfContext_destroy()
void sfContext_destroy | ( | sfContext * | context | ) |
Destroy a context.
- Parameters
-
context Context to destroy
◆ sfContext_getActiveContextId()
sfUint64 sfContext_getActiveContextId | ( | void | ) |
Get the currently active context's ID.
The context ID is used to identify contexts when managing unshareable OpenGL resources.
- Returns
- The active context's ID or 0 if no context is currently active
◆ sfContext_getFunction()
GlFunctionPointer sfContext_getFunction | ( | const char * | name | ) |
Get the address of an OpenGL function.
- Parameters
-
name Name of the function to get the address of
- Returns
- Address of the OpenGL function, 0 on failure
◆ sfContext_getSettings()
sfContextSettings sfContext_getSettings | ( | const sfContext * | context | ) |
Get the settings of the context.
- Parameters
-
context Context object
Note that these settings may be different than the ones passed to the constructor; they are indeed adjusted if the original settings are not directly supported by the system.
- Returns
- Structure containing the settings
◆ sfContext_isExtensionAvailable()
sfBool sfContext_isExtensionAvailable | ( | const char * | name | ) |
Check whether a given OpenGL extension is available.
- Parameters
-
name Name of the extension to check for
- Returns
- True if available, false if unavailable