Various utility functions for internal use.
More...
|
void | _glfwAllocGammaArrays (GLFWgammaramp *ramp, unsigned int size) |
|
_GLFWmonitor * | _glfwAllocMonitor (const char *name, int widthMM, int heightMM) |
| Allocates and returns a monitor object with the specified name and dimensions. More...
|
|
const _GLFWfbconfig * | _glfwChooseFBConfig (const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count) |
| Chooses the framebuffer config that best matches the desired one. More...
|
|
const GLFWvidmode * | _glfwChooseVideoMode (_GLFWmonitor *monitor, const GLFWvidmode *desired) |
|
int | _glfwCompareVideoModes (const GLFWvidmode *first, const GLFWvidmode *second) |
| Performs lexical comparison between two GLFWvidmode structures. More...
|
|
void | _glfwFreeGammaArrays (GLFWgammaramp *ramp) |
|
void | _glfwFreeMonitor (_GLFWmonitor *monitor) |
| Frees a monitor object and any data associated with it. More...
|
|
void | _glfwFreeMonitors (_GLFWmonitor **monitors, int count) |
|
GLboolean | _glfwIsValidContext (const _GLFWctxconfig *ctxconfig) |
| Checks whether the current context fulfils the specified hard constraints. More...
|
|
GLboolean | _glfwIsValidContextConfig (const _GLFWctxconfig *ctxconfig) |
| Checks whether the desired context attributes are valid. More...
|
|
GLboolean | _glfwRefreshContextAttribs (const _GLFWctxconfig *ctxconfig) |
| Retrieves the attributes of the current context. More...
|
|
void | _glfwSplitBPP (int bpp, int *red, int *green, int *blue) |
| Splits a color depth into red, green and blue bit depths. More...
|
|
int | _glfwStringInExtensionString (const char *string, const char *extensions) |
| Searches an extension string for the specified extension. More...
|
|
Various utility functions for internal use.
These functions are shared code and may be used by any part of GLFW Each platform may add its own utility functions, but those may only be called by the platform-specific code
Allocates and returns a monitor object with the specified name and dimensions.
- Parameters
-
[in] | name | The name of the monitor. |
[in] | widthMM | The width, in mm, of the monitor's display area. |
[in] | heightMM | The height, in mm, of the monitor's display area. |
- Returns
- The newly created object.
Definition at line 166 of file monitor.c.
Chooses the framebuffer config that best matches the desired one.
- Parameters
-
[in] | desired | The desired framebuffer config. |
[in] | alternatives | The framebuffer configs supported by the system. |
[in] | count | The number of entries in the alternatives array. |
- Returns
- The framebuffer config most closely matching the desired one, or
NULL
if none fulfilled the hard constraints of the desired values.
Definition at line 191 of file context.c.
Frees a monitor object and any data associated with it.
Definition at line 176 of file monitor.c.
Checks whether the current context fulfils the specified hard constraints.
- Parameters
-
[in] | ctxconfig | The desired context attributes. |
- Returns
GL_TRUE
if the context fulfils the hard constraints, or GL_FALSE
otherwise.
Definition at line 478 of file context.c.
Checks whether the desired context attributes are valid.
- Parameters
-
[in] | ctxconfig | The context attributes to check. |
- Returns
GL_TRUE
if the context attributes are valid, or GL_FALSE
otherwise.
This function checks things like whether the specified client API version exists and whether all relevant options have supported and non-conflicting values.
Definition at line 90 of file context.c.
Retrieves the attributes of the current context.
- Parameters
-
[in] | ctxconfig | The desired context attributes. |
- Returns
GL_TRUE
if successful, or GL_FALSE
if the context is unusable.
Definition at line 354 of file context.c.
Splits a color depth into red, green and blue bit depths.
Definition at line 271 of file monitor.c.
int _glfwStringInExtensionString |
( |
const char * |
string, |
|
|
const char * |
extensions |
|
) |
| |
Searches an extension string for the specified extension.
- Parameters
-
[in] | string | The extension string to search. |
[in] | extensions | The extension to search for. |
- Returns
GL_TRUE
if the extension was found, or GL_FALSE
otherwise.
Definition at line 500 of file context.c.