Global CommandsCommands to create, manage and destroy GLC contexts.
More...Functions
Detailed Description
Commands to create, manage and destroy GLC contexts.
Those commands do not use GLC context state variables and can therefore be executed successfully if the issuing thread has no current GLC context.
Each GLC context has a nonzero ID of type GLint. When a client is linked with a GLC library, the library maintains a list of IDs that contains one entry for each of the client's GLC contexts. The list is initially empty.
Each client thread has a private GLC context ID variable that always contains either the value zero, indicating that the thread has no current GLC context, or the ID of the thread's current GLC context. The initial value is zero.
When the ID of a GLC context is stored in the GLC context ID variable of a client thread, the context is said to be current to the thread. It is not possible for a GLC context to be current simultaneously to multiple threads.With the exception of the per-thread GLC error code and context ID variables, all of the GLC state variables that are used during the execution of a GLC command are stored in the issuing thread's current GLC context. To make a context current, call glcContext().
When a client thread issues a GLC command, the thread's current GLC context executes the command.
Note that the results of issuing a GL command when there is no current GL context are undefined. Because GLC issues GL commands, you must create a GL context and make it current before calling GLC.
All other GLC commands raise GLC_STATE_ERROR if the issuing thread has no current GLC context.
Function Documentation
GLboolean glcIsContext |
( |
GLint |
inContext |
) |
|
This command checks whether inContext is the ID of one of the client's GLC context and returns GLC_TRUE if and only if it is.
- Parameters:
-
| inContext | The context ID to be tested |
- Returns:
- GL_TRUE if inContext is the ID of a GLC context, GL_FALSE otherwise
- See also:
- glcDeleteContext()
glcGenContext()
glcGetAllContexts()
glcContext()
GLint glcGetCurrentContext |
( |
void |
|
) |
|
void glcDeleteContext |
( |
GLint |
inContext |
) |
|
Marks for deletion the GLC context identified by inContext.
If the marked context is not current to any client thread, the command deletes the marked context immediatly. Otherwise, the marked context will be deleted during the execution of the next glcContext() command that causes it not to be current to any client thread.
The command raises GLC_PARAMETER_ERROR if inContext is not the ID of one of the client's GLC contexts. - Parameters:
-
| inContext | The ID of the context to be deleted |
- See also:
- glcGetAllContexts()
glcIsContext()
glcContext()
glcGetCurrentContext()
void glcContext |
( |
GLint |
inContext |
) |
|
Assigns the value inContext to the issuing thread's current GLC context ID variable.
If another context is already current to the thread, no error is generated but the context is released and the context identified by inContext is made current to the thread.
Call glcContext with inContext set to zero to release a thread's current context.
The command raises GLC_PARAMETER_ERROR if inContext is not zero and is not the ID of one of the client's GLC contexts.
The command raises GLC_STATE_ERROR if inContext is the ID of a GLC context that is current to a thread other than the issuing thread.
The command raises GLC_STATE_ERROR if the issuing thread is executing a callback function that has been called from GLC. - Parameters:
-
| inContext | The ID of the context to be made current |
- See also:
- glcGetCurrentContext()
glcDeleteContext()
glcGenContext()
glcGetAllContexts()
glcIsContext()
GLint glcGenContext |
( |
void |
|
) |
|
GLint* glcGetAllContexts |
( |
void |
|
) |
|
Returns a zero terminated array of GLC context IDs that contains one entry for each of the client's GLC contexts.
GLC uses the ISO C library command malloc to allocate the array. The client should use the ISO C library command free to deallocate the array when it is no longer needed. - Returns:
- The pointer to the array of context IDs.
- See also:
- glcContext()
glcDeleteContext()
glcGenContext()
glcGetCurrentContext()
glcIsContext()
GLCenum glcGetError |
( |
void |
|
) |
|
Retrieves the value of the issuing thread's GLC error code variable, assigns the value GLC_NONE to that variable, and returns the retrieved value.
- Note:
- In contrast to the GL function
glGetError , glcGetError only returns one error, not a list of errors.
- Returns:
- An error code from the table below :
Error codes
Name | Enumerant |
GLC_NONE | 0x0000 |
GLC_PARAMETER_ERROR | 0x0040 |
GLC_RESOURCE_ERROR | 0x0041 |
GLC_STATE_ERROR | 0x0042 |
|