Functions that are used to do OpenGL rendering on Evas. More...
Data Structures | |
struct | _Evas_GL_Config |
Evas GL Surface configuration. More... | |
Typedefs | |
typedef struct _Evas_GL | Evas_GL |
Evas GL Object for rendering gl in Evas. | |
typedef struct _Evas_GL_Surface | Evas_GL_Surface |
Evas GL Surface object, a GL rendering target in Evas GL. | |
typedef struct _Evas_GL_Context | Evas_GL_Context |
Evas GL Context object, a GL rendering context in Evas GL. | |
typedef struct _Evas_GL_Config | Evas_GL_Config |
Evas GL Surface configuration object for surface creation. | |
typedef struct _Evas_GL_API | Evas_GL_API |
Evas GL API object that contains the GL APIs to be used in Evas GL. | |
typedef void * | Evas_GL_Func |
Evas GL Function Object used as a function pointer. | |
typedef void * | EvasGLImage |
Evas GL Image Object used in Evas GL Image extension. | |
typedef enum _Evas_GL_Color_Format | Evas_GL_Color_Format |
Surface Color Format. | |
typedef enum _Evas_GL_Depth_Bits | Evas_GL_Depth_Bits |
Surface Depth Format. | |
typedef enum _Evas_GL_Stencil_Bits | Evas_GL_Stencil_Bits |
Surface Stencil Format. | |
typedef enum _Evas_GL_Options_Bits | Evas_GL_Options_Bits |
Configuration Options. More... | |
typedef enum _Evas_GL_Multisample_Bits | Evas_GL_Multisample_Bits |
Configuration Option for Multisample Anti-aliased (MSAA) rendering surface. More... | |
Enumerations | |
enum | _Evas_GL_Color_Format |
Surface Color Format. | |
enum | _Evas_GL_Depth_Bits |
Surface Depth Format. | |
enum | _Evas_GL_Stencil_Bits |
Surface Stencil Format. | |
enum | _Evas_GL_Options_Bits { EVAS_GL_OPTIONS_NONE = 0, EVAS_GL_OPTIONS_DIRECT = (1<<0) } |
Configuration Options. More... | |
enum | _Evas_GL_Multisample_Bits { EVAS_GL_MULTISAMPLE_NONE = 0, EVAS_GL_MULTISAMPLE_LOW = 1, EVAS_GL_MULTISAMPLE_MED = 2, EVAS_GL_MULTISAMPLE_HIGH = 3 } |
Configuration Option for Multisample Anti-aliased (MSAA) rendering surface. More... | |
Functions | |
Evas_GL * | evas_gl_new (Evas *e) |
Creates a new Evas_GL object and returns a handle for gl rendering on efl. More... | |
void | evas_gl_free (Evas_GL *evas_gl) |
Frees the created Evas_GL object. More... | |
Evas_GL_Config * | evas_gl_config_new (void) |
Allocates a new config object for the user to fill out. More... | |
void | evas_gl_config_free (Evas_GL_Config *cfg) |
Frees a config object created from evas_gl_config_new. More... | |
Evas_GL_Surface * | evas_gl_surface_create (Evas_GL *evas_gl, Evas_GL_Config *cfg, int w, int h) |
Creates and returns new Evas_GL_Surface object for GL Rendering. More... | |
void | evas_gl_surface_destroy (Evas_GL *evas_gl, Evas_GL_Surface *surf) |
Destroys the created Evas GL Surface. More... | |
Evas_GL_Context * | evas_gl_context_create (Evas_GL *evas_gl, Evas_GL_Context *share_ctx) |
Creates and returns a new Evas GL context object. More... | |
void | evas_gl_context_destroy (Evas_GL *evas_gl, Evas_GL_Context *ctx) |
Destroys the given Evas GL context object. More... | |
Eina_Bool | evas_gl_make_current (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx) |
Sets the given context as a current context for the given surface. More... | |
const char * | evas_gl_string_query (Evas_GL *evas_gl, int name) EINA_PURE |
Returns a pointer to a static, zero-terminated string describing some aspect of evas_gl. More... | |
Evas_GL_Func | evas_gl_proc_address_get (Evas_GL *evas_gl, const char *name) EINA_PURE |
Returns a GL or the Glue Layer's extension function. More... | |
Eina_Bool | evas_gl_native_surface_get (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns) |
Fills in the Native Surface information from the given Evas GL surface. More... | |
Evas_GL_API * | evas_gl_api_get (Evas_GL *evas_gl) |
Get the API for rendering using OpenGL. More... | |
Detailed Description
Functions that are used to do OpenGL rendering on Evas.
Evas allows you to use OpenGL to render to specially set up image objects (which act as render target surfaces).
Below is an illlustrative example of how to use OpenGL to render to an object in Evas.
Typedef Documentation
typedef enum _Evas_GL_Multisample_Bits Evas_GL_Multisample_Bits |
Configuration Option for Multisample Anti-aliased (MSAA) rendering surface.
Only works in supported device.
- Since
- 1.2
typedef enum _Evas_GL_Options_Bits Evas_GL_Options_Bits |
Configuration Options.
- Since
- 1.1
Enumeration Type Documentation
Configuration Option for Multisample Anti-aliased (MSAA) rendering surface.
Only works in supported device.
- Since
- 1.2
Function Documentation
Evas_GL_API* evas_gl_api_get | ( | Evas_GL * | evas_gl | ) |
Get the API for rendering using OpenGL.
- Parameters
-
evas_gl The given Eva_GL object.
- Returns
- The API to use.
This returns a structure that contains all the OpenGL functions you can use to render in Evas. These functions consist of all the standard OpenGL-ES2.0 functions and any extra ones Evas has decided to provide in addition. This means that if you have your code ported to OpenGL-ES2.0, it will be easy to render to Evas.
void evas_gl_config_free | ( | Evas_GL_Config * | cfg | ) |
Frees a config object created from evas_gl_config_new.
As long as the Evas creates a config object for the user, it takes care of the backward compatibility issue.
Evas_GL_Config* evas_gl_config_new | ( | void | ) |
Allocates a new config object for the user to fill out.
As long as the Evas creates a config object for the user, it takes care of the backward compatibility issue.
Evas_GL_Context* evas_gl_context_create | ( | Evas_GL * | evas_gl, |
Evas_GL_Context * | share_ctx | ||
) |
Creates and returns a new Evas GL context object.
- Parameters
-
evas_gl The given Evas_GL object.
- Returns
- The created context, or NULL on failure.
void evas_gl_context_destroy | ( | Evas_GL * | evas_gl, |
Evas_GL_Context * | ctx | ||
) |
Destroys the given Evas GL context object.
- Parameters
-
evas_gl The given Evas_GL object. ctx The given Evas GL context.
Referenced by evas_gl_free().
void evas_gl_free | ( | Evas_GL * | evas_gl | ) |
Frees the created Evas_GL object.
- Parameters
-
evas_gl The given Evas_GL object.
References evas_gl_context_destroy(), and evas_gl_surface_destroy().
Eina_Bool evas_gl_make_current | ( | Evas_GL * | evas_gl, |
Evas_GL_Surface * | surf, | ||
Evas_GL_Context * | ctx | ||
) |
Sets the given context as a current context for the given surface.
- Parameters
-
evas_gl The given Evas_GL object. surf The given Evas GL surface. ctx The given Evas GL context.
- Returns
EINA_TRUE
if successful,EINA_FALSE
if not.
Eina_Bool evas_gl_native_surface_get | ( | Evas_GL * | evas_gl, |
Evas_GL_Surface * | surf, | ||
Evas_Native_Surface * | ns | ||
) |
Fills in the Native Surface information from the given Evas GL surface.
- Parameters
-
evas_gl The given Evas_GL object. surf The given Evas GL surface to retrieve the Native Surface info from. ns The native surface structure that the function fills in.
- Returns
EINA_TRUE
if successful,EINA_FALSE
if not.
Creates a new Evas_GL object and returns a handle for gl rendering on efl.
- Parameters
-
e The given evas canvas OpenGL is to be used on.
- Returns
- The created evas_gl object, or NULl on fasilure.
Evas_GL_Func evas_gl_proc_address_get | ( | Evas_GL * | evas_gl, |
const char * | name | ||
) |
Returns a GL or the Glue Layer's extension function.
- Parameters
-
evas_gl The given Evas_GL object. name The name of the function to return.
const char* evas_gl_string_query | ( | Evas_GL * | evas_gl, |
int | name | ||
) |
Returns a pointer to a static, zero-terminated string describing some aspect of evas_gl.
- Parameters
-
evas_gl The given Evas_GL object. name Specifies a symbolic constant, one of EVAS_GL_EXTENSIONS...
Evas_GL_Surface* evas_gl_surface_create | ( | Evas_GL * | evas_gl, |
Evas_GL_Config * | cfg, | ||
int | w, | ||
int | h | ||
) |
Creates and returns new Evas_GL_Surface object for GL Rendering.
- Parameters
-
evas_gl The given Evas_GL object. cfg The pixel format and configuration of the rendering surface. w The width of the surface. h The height of the surface.
- Returns
- The created GL surface object, or NULL on failure.
void evas_gl_surface_destroy | ( | Evas_GL * | evas_gl, |
Evas_GL_Surface * | surf | ||
) |
Destroys the created Evas GL Surface.
- Parameters
-
evas_gl The given Evas_GL object. surf The given GL surface object.
Referenced by evas_gl_free().