summaryrefslogtreecommitdiff
path: root/src/lib/evas/Evas_GL.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-09-19 15:17:08 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-10-20 12:16:08 +0900
commit29e7f54ea0458e4634fd0d9d3f1290063a1bdbf3 (patch)
tree1d97d06b2a343de013dd78aaf9e2e99a2fea1f40 /src/lib/evas/Evas_GL.h
parent81bf993c6cb234e2b4550625bbba32a47183d1b5 (diff)
Evas GL: Add evas_gl_surface_query
When using EGL, this function should return the properties of a surface. Limited to a subset of known attributes. Right now, this function will only work fine with EGL. GLX support or any other engine is not implemented. @feature
Diffstat (limited to 'src/lib/evas/Evas_GL.h')
-rw-r--r--src/lib/evas/Evas_GL.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h
index c5e607abe7..f6b595a90e 100644
--- a/src/lib/evas/Evas_GL.h
+++ b/src/lib/evas/Evas_GL.h
@@ -605,6 +605,26 @@ EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA
605EAPI int evas_gl_rotation_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; 605EAPI int evas_gl_rotation_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
606 606
607/** 607/**
608 * @brief Query a surface for its properties
609 *
610 * @param[in] evas_gl The current Evas_GL object
611 * @param[in] surface An Evas_GL_Surface surface to query
612 * @param[in] attribute Specifies the attribute to query.
613 * @param[out] value Returns the requested value (usually an int)
614 *
615 * The currently accepted attributes are the following:
616 * @li @ref EVAS_GL_WIDTH,
617 * @li @ref EVAS_GL_HEIGHT,
618 * @li @ref EVAS_GL_TEXTURE_FORMAT,
619 * @li @ref EVAS_GL_TEXTURE_TARGET
620 *
621 * @return EINA_TRUE in case of success, EINA_FALSE in case of error.
622 *
623 * @since_tizen 2.3
624 */
625EAPI Eina_Bool evas_gl_surface_query (Evas_GL *evas_gl, Evas_GL_Surface *surface, int attribute, void *value) EINA_ARG_NONNULL(1,2);
626
627/**
608 * @brief Returns the last error of any evas_gl function called in the current thread. 628 * @brief Returns the last error of any evas_gl function called in the current thread.
609 * Initially, the error is set to @ref EVAS_GL_SUCCESS. A call to @ref evas_gl_error_get 629 * Initially, the error is set to @ref EVAS_GL_SUCCESS. A call to @ref evas_gl_error_get
610 * resets the error to @ref EVAS_GL_SUCCESS. 630 * resets the error to @ref EVAS_GL_SUCCESS.
@@ -1522,6 +1542,17 @@ typedef unsigned long long EvasGLTime;
1522#define EVAS_GL_NO_SYNC ((EvasGLSync) NULL) /**< @brief Empty sync object, see @ref evasglCreateSync */ 1542#define EVAS_GL_NO_SYNC ((EvasGLSync) NULL) /**< @brief Empty sync object, see @ref evasglCreateSync */
1523/** @} */ 1543/** @} */
1524 1544
1545/**
1546 * @name Surface attributes
1547 * The attributes can be queried using @ref evas_gl_surface_query
1548 * @{
1549 */
1550#define EVAS_GL_HEIGHT 0x3056 /**< Attribute for @ref evas_gl_surface_query, returns the surface width in pixels (@c value should be an @c int) */
1551#define EVAS_GL_WIDTH 0x3057 /**< Attribute for @ref evas_gl_surface_query, returns the surface width in pixels (@c value should be an @c int) */
1552#define EVAS_GL_TEXTURE_FORMAT 0x3080 /**< Attribute for @ref evas_gl_surface_query, returns an @ref Evas_GL_Color_Format */
1553#define EVAS_GL_TEXTURE_TARGET 0x3081 /**< Attribute for @ref evas_gl_surface_query, returns @ref EVAS_GL_TEXTURE_2D (if format is @c EVAS_GL_RGB_888 or @c EVAS_GL_RGBA_8888) or 0 (meaning @c NO_TEXTURE, from @c EVAS_GL_NO_FBO) (@c value should be an @c int) */
1554/** @} */
1555
1525#define EVAS_GL_API_VERSION 1 1556#define EVAS_GL_API_VERSION 1
1526 1557
1527/** 1558/**