A GLView widget allows for simple GL rendering in elementary environment. GLView hides all the complicated evas_gl details so that the user only has to deal with registering a few callback functions for rendering to a surface using OpenGL APIs.
This widget emits the following signals, besides the ones sent from GLView:
"focused"
- when glview has received focus.
"unfocused"
- when glview has lost focus.
"language,changed"
- the program's language changed
Below is an illustrative example of how to use GLView and and OpenGL to render in elementary environment. glview_example_01_page
Function Documentation
Add a new glview to the parent
- Parameters:
-
- Returns:
- The new object or NULL if it cannot be created
- Since :
- 2.3
- Examples:
- glview_example_01.c.
Notifies that there has been changes in the GLView.
- Parameters:
-
- Since :
- 2.3
- Examples:
- glview_example_01.c.
Set the delete function that runs in the main loop.
- Parameters:
-
obj | The GLView object |
func | The callback function |
- Since :
- 2.3
- Examples:
- glview_example_01.c.
Set the render function that runs in the main loop.
- Parameters:
-
obj | The GLView object |
func | The callback function |
- Since :
- 2.3
- Examples:
- glview_example_01.c.
Set the resize function that gets called when resize happens.
- Parameters:
-
obj | The GLView object |
func | The callback function |
- Since :
- 2.3
- Examples:
- glview_example_01.c.
Gets the size of the GLView.
- Parameters:
-
obj | The GLView object |
w | pointer of int width |
h | pointer of int height |
- Since :
- 2.3
- Examples:
- glview_example_01.c.
Sets the size of the GLView.
- Parameters:
-
obj | The GLView object |
w | width of GLView |
h | height of GLView |
- Since :
- 2.3