GLUS
Functions
glus_window_egl_es.c File Reference
#include "GL/glus.h"

Functions

GLUSvoid _glusOsPollEvents (GLUSvoid)
 
EGLNativeDisplayType _glusOsGetNativeDisplayType (GLUSvoid)
 
EGLNativeWindowType _glusOsCreateNativeWindowType (const char *title, const GLUSint width, const GLUSint height, const GLUSboolean fullscreen, const GLUSboolean noResize, const GLUSint nativeVisualID)
 
GLUSvoid _glusOsDestroyNativeWindowDisplay (GLUSvoid)
 
double _glusOsGetRawTime (GLUSvoid)
 
GLUSvoid _glusOsGetWindowSize (GLUSint *width, GLUSint *height)
 
GLUSint _glusWindowGetCurrentRecordingFrame (GLUSvoid)
 
GLUSint _glusWindowGetCurrentAndIncreaseRecordingFrame (GLUSvoid)
 
GLUSint _glusWindowGetRecordingFrames (GLUSvoid)
 
GLUSfloat _glusWindowGetRecordingTime (GLUSvoid)
 
const GLUStgaimage_glusWindowGetRecordingImageTga (GLUSvoid)
 
GLUSvoid GLUSAPIENTRY glusWindowSetKeyFunc (GLUSvoid(*glusNewKey)(GLUSboolean pressed, GLUSint key))
 Sets the users key handler. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSetMouseFunc (GLUSvoid(*glusNewMouse)(GLUSboolean pressed, GLUSint button, GLUSint xPos, GLUSint yPos))
 Sets the users mouse handler. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSetMouseWheelFunc (GLUSvoid(*glusNewMouseWheel)(GLUSint buttons, GLUSint ticks, GLUSint xPos, GLUSint yPos))
 Sets the users mouse wheel function. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSetMouseMoveFunc (GLUSvoid(*glusNewMouseMove)(GLUSint buttons, GLUSint xPos, GLUSint yPos))
 Sets the users mouse move function. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSetInitFunc (GLUSboolean(*glusNewInit)(GLUSvoid))
 Sets the users initialization function. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSetReshapeFunc (GLUSvoid(*glusNewReshape)(GLUSint width, GLUSint height))
 Sets the users reshape function. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSetUpdateFunc (GLUSboolean(*glusNewUpdate)(GLUSfloat time))
 Sets the users update function, which is called every frame. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSetTerminateFunc (GLUSvoid(*glusNewTerminate)(GLUSvoid))
 Sets the users terminate function, which is called in any case. More...
 
GLUSvoid _glusWindowInternalReshape (GLUSint width, GLUSint height)
 
GLUSvoid _glusWindowInternalClose (GLUSvoid)
 
GLUSvoid _glusWindowInternalKey (GLUSint key, GLUSint state)
 
GLUSvoid _glusWindowInternalMouse (GLUSint button, GLUSint action)
 
GLUSvoid _glusWindowInternalMouseWheel (GLUSint pos)
 
GLUSvoid _glusWindowInternalMouseMove (GLUSint x, GLUSint y)
 
GLUSvoid GLUSAPIENTRY glusWindowDestroy (GLUSvoid)
 Cleans up the window and frees all resources. More...
 
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. More...
 
GLUSboolean GLUSAPIENTRY glusWindowRun (GLUSvoid)
 Starts the main loop. More...
 
GLUSboolean GLUSAPIENTRY glusWindowStartup (GLUSvoid)
 Starts everything before the main loop. More...
 
GLUSboolean GLUSAPIENTRY glusWindowLoop (GLUSvoid)
 Calls the main loop once. More...
 
GLUSboolean GLUSAPIENTRY glusWindowLoopDoRecording (GLUSvoid)
 Calls the main loop once. More...
 
GLUSvoid GLUSAPIENTRY glusWindowShutdown (GLUSvoid)
 Called after the main loop. More...
 
GLUSvoid GLUSAPIENTRY glusWindowSwapInterval (GLUSint interval)
 Specifies the minimum number of video frame periods per buffer swap for the window. More...
 
GLUSint GLUSAPIENTRY glusWindowGetWidth (GLUSvoid)
 Get window width. More...
 
GLUSint GLUSAPIENTRY glusWindowGetHeight (GLUSvoid)
 Get window height. More...
 
void *GLUSAPIENTRY glusExtensionGetFuncAddress (const GLUSchar *procname)
 Gathers the function pointer of an extension. More...
 
EGLDisplay GLUSAPIENTRY glusEGLGetDefaultDisplay (GLUSvoid)
 Returns the created default EGL display. More...
 
EGLSurface GLUSAPIENTRY glusEGLGetDefaultSurface (GLUSvoid)
 Returns the created default EGL surface. More...
 
EGLContext GLUSAPIENTRY glusEGLGetDefaultContext (GLUSvoid)
 Returns the created default EGL context. More...
 

Function Documentation

EGLNativeWindowType _glusOsCreateNativeWindowType ( const char *  title,
const GLUSint  width,
const GLUSint  height,
const GLUSboolean  fullscreen,
const GLUSboolean  noResize,
const GLUSint  nativeVisualID 
)
GLUSvoid _glusOsDestroyNativeWindowDisplay ( GLUSvoid  )
EGLNativeDisplayType _glusOsGetNativeDisplayType ( GLUSvoid  )
double _glusOsGetRawTime ( GLUSvoid  )
GLUSvoid _glusOsGetWindowSize ( GLUSint width,
GLUSint height 
)
GLUSvoid _glusOsPollEvents ( GLUSvoid  )
GLUSint _glusWindowGetCurrentAndIncreaseRecordingFrame ( GLUSvoid  )
GLUSint _glusWindowGetCurrentRecordingFrame ( GLUSvoid  )
GLUSint _glusWindowGetRecordingFrames ( GLUSvoid  )
const GLUStgaimage* _glusWindowGetRecordingImageTga ( GLUSvoid  )
GLUSfloat _glusWindowGetRecordingTime ( GLUSvoid  )
GLUSvoid _glusWindowInternalClose ( GLUSvoid  )
GLUSvoid _glusWindowInternalKey ( GLUSint  key,
GLUSint  state 
)
GLUSvoid _glusWindowInternalMouse ( GLUSint  button,
GLUSint  action 
)
GLUSvoid _glusWindowInternalMouseMove ( GLUSint  x,
GLUSint  y 
)
GLUSvoid _glusWindowInternalMouseWheel ( GLUSint  pos)
GLUSvoid _glusWindowInternalReshape ( GLUSint  width,
GLUSint  height 
)
EGLContext GLUSAPIENTRY glusEGLGetDefaultContext ( GLUSvoid  )

Returns the created default EGL context.

Returns
the EGL context.
EGLDisplay GLUSAPIENTRY glusEGLGetDefaultDisplay ( GLUSvoid  )

Returns the created default EGL display.

Returns
the EGL display.
EGLSurface GLUSAPIENTRY glusEGLGetDefaultSurface ( GLUSvoid  )

Returns the created default EGL surface.

Returns
the EGL surface.
void* GLUSAPIENTRY glusExtensionGetFuncAddress ( const GLUSchar procname)

Gathers the function pointer of an extension.

Parameters
procnameThe name of the function.
Returns
The function pointer.
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.

Parameters
titleTitle of the window.
widthWidth of the window.
heightHeight of the window.
fullscreenFlag for setting the window to fullscreen.
noResizeGLUS_TRUE, if it should not be possible to resize the window.
configAttribListEGL configuration attribute list.
contextAttribListEGL context attribute list.
Returns
GLUS_TRUE, if creation of OpenGL context and window succeeded.
GLUSvoid GLUSAPIENTRY glusWindowDestroy ( GLUSvoid  )

Cleans up the window and frees all resources.

Only needs to be called, if creation of the window failed.

GLUSint GLUSAPIENTRY glusWindowGetHeight ( GLUSvoid  )

Get window height.

Returns
The height of the window.
GLUSint GLUSAPIENTRY glusWindowGetWidth ( GLUSvoid  )

Get window width.

Returns
The width of the window.
GLUSboolean GLUSAPIENTRY glusWindowLoop ( GLUSvoid  )

Calls the main loop once.

Update function is called. Use this function, if glusRun can not be used.

Returns
GLUS_ TRUE, if looping should continue.
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.

Returns
GLUS_ TRUE, if looping should continue.
GLUSboolean GLUSAPIENTRY glusWindowRun ( GLUSvoid  )

Starts the main loop.

First the init, reshape, update and - if terminated - terminate functions are called.

Returns
GLUS_ TRUE, if running the main loop succeeded.
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.

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.

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.

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.

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.

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.

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.

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.

GLUSvoid GLUSAPIENTRY glusWindowShutdown ( GLUSvoid  )

Called after the main loop.

The terminate function is called. Use this function, if glusRun can not be used.

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.

Returns
GLUS_ TRUE, if startup succeeded.
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.

Parameters
intervalSpecifies the minimum number of video frames that are displayed before a buffer swap will occur.