GLUS
|
Go to the source code of this file.
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowCreate | ( | const GLUSchar * | title, |
const GLUSint | width, | ||
const GLUSint | height, | ||
const GLUSboolean | fullscreen, | ||
const GLUSboolean | noResize, | ||
const EGLint * | configAttribList, | ||
const EGLint * | contextAttribList | ||
) |
Creates the window.
In this function, mainly GLEW and GLFW functions are used. By default, a RGBA color buffer is created.
title | Title of the window. |
width | Width of the window. |
height | Height of the window. |
fullscreen | Flag for setting the window to fullscreen. |
noResize | GLUS_TRUE, if it should not be possible to resize the window. |
configAttribList | EGL configuration attribute list. |
contextAttribList | EGL context attribute list. |
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowDestroy | ( | GLUSvoid | ) |
Cleans up the window and frees all resources.
Only needs to be called, if creation of the window failed.
GLUSAPI GLUSint GLUSAPIENTRY glusWindowGetHeight | ( | GLUSvoid | ) |
Get window height.
GLUSAPI GLUSint GLUSAPIENTRY glusWindowGetWidth | ( | GLUSvoid | ) |
Get window width.
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowIsRecording | ( | GLUSvoid | ) |
Checks, if a recording is running.
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowLoop | ( | GLUSvoid | ) |
Calls the main loop once.
Update function is called. Use this function, if glusRun can not be used.
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowLoopDoRecording | ( | GLUSvoid | ) |
Calls the main loop once.
Update function is called and one screenshot is taken and stored. Use this function, if glusRun can not be used.
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowRun | ( | GLUSvoid | ) |
Starts the main loop.
First the init, reshape, update and - if terminated - terminate functions are called.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetInitFunc | ( | GLUSboolean(*)(GLUSvoid) | glusNewInit | ) |
Sets the users initialization function.
Called before the reshape and update functions.
The function must return GLUS_TRUE, if the initialization succeeded. If not, the program terminates.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetKeyFunc | ( | GLUSvoid(*)(const GLUSboolean pressed, const GLUSint key) | glusNewKey | ) |
Sets the users key handler.
The function receives the values, if a key was pressed or released.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseFunc | ( | GLUSvoid(*)(const GLUSboolean pressed, const GLUSint button, const GLUSint xPos, const GLUSint yPos) | glusNewMouse | ) |
Sets the users mouse handler.
The function receives the state of a button and the x and y position in the window.
Buttons are: 1 Left mouse button. 2 Middle mouse button. 4 Right mouse button.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseMoveFunc | ( | GLUSvoid(*)(const GLUSint buttons, const GLUSint xPos, const GLUSint yPos) | glusNewMouseMove | ) |
Sets the users mouse move function.
The function receives the states of all buttons and the current x and y position.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetMouseWheelFunc | ( | GLUSvoid(*)(const GLUSint buttons, const GLUSint ticks, const GLUSint xPos, const GLUSint yPos) | glusNewMouseWheel | ) |
Sets the users mouse wheel function.
The function receives the states of all buttons, the direction of the wheel in ticks and the current x and y position.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetReshapeFunc | ( | GLUSvoid(*)(const GLUSint width, const GLUSint height) | glusNewReshape | ) |
Sets the users reshape function.
Called after the initialization and before the update function. If the window is resized, this function is also called before the update function.
The function receives the current width and height of the resized window.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetTerminateFunc | ( | GLUSvoid(*)(GLUSvoid) | glusNewTerminate | ) |
Sets the users terminate function, which is called in any case.
It can be used to clean up resources.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSetUpdateFunc | ( | GLUSboolean(*)(const GLUSfloat time) | glusNewUpdate | ) |
Sets the users update function, which is called every frame.
The time difference since last frame is passed in seconds and the resolution is at least in milliseconds.
If the function does not return GLUS_TRUE, the application is terminated.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowShutdown | ( | GLUSvoid | ) |
Called after the main loop.
The terminate function is called. Use this function, if glusRun can not be used.
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowStartRecording | ( | GLUSint | numberFrames, |
GLUSint | framesPerSecond | ||
) |
Starts recording image clips, by making screenshots of the window.
numberFrames | The number of frames to record. |
framesPerSecond | Frames per second to use. |
GLUSAPI GLUSboolean GLUSAPIENTRY glusWindowStartup | ( | GLUSvoid | ) |
Starts everything before the main loop.
The init and reshape functions are called. Use this function, if glusRun can not be used.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowStopRecording | ( | GLUSvoid | ) |
Stops recording the image clips.
GLUSAPI GLUSvoid GLUSAPIENTRY glusWindowSwapInterval | ( | GLUSint | interval | ) |
Specifies the minimum number of video frame periods per buffer swap for the window.
Has to be called after the window is created.
interval | Specifies the minimum number of video frames that are displayed before a buffer swap will occur. |