summaryrefslogtreecommitdiff
path: root/src/lib/evas/Evas_GL.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-09-01 18:11:53 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-10-20 12:16:06 +0900
commit8d6f873354ef67753777b671341438289a4e8876 (patch)
tree3efcd0e0d4c867816a1435a4bc5492c1dcb22be6 /src/lib/evas/Evas_GL.h
parent08889de92b616ca8a8d198a1adb5b040e30abf53 (diff)
Evas GL: Add API evas_gl_error_get()
Similar in meaning to eglGetError() @feature
Diffstat (limited to 'src/lib/evas/Evas_GL.h')
-rw-r--r--src/lib/evas/Evas_GL.h59
1 files changed, 57 insertions, 2 deletions
diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h
index 6249d54084..3a46de8f86 100644
--- a/src/lib/evas/Evas_GL.h
+++ b/src/lib/evas/Evas_GL.h
@@ -436,8 +436,8 @@ typedef enum _Evas_GL_Options_Bits
436typedef enum _Evas_GL_Multisample_Bits 436typedef enum _Evas_GL_Multisample_Bits
437{ 437{
438 EVAS_GL_MULTISAMPLE_NONE = 0, /**< No multisample rendering */ 438 EVAS_GL_MULTISAMPLE_NONE = 0, /**< No multisample rendering */
439 EVAS_GL_MULTISAMPLE_LOW = 1, /**< MSAA with mininum number of samples */ 439 EVAS_GL_MULTISAMPLE_LOW = 1, /**< MSAA with minimum number of samples */
440 EVAS_GL_MULTISAMPLE_MED = 2, /**< MSAA with half the number of max samples */ 440 EVAS_GL_MULTISAMPLE_MED = 2, /**< MSAA with half the maximum number of samples */
441 EVAS_GL_MULTISAMPLE_HIGH = 3 /**< MSAA with maximum allowed samples */ 441 EVAS_GL_MULTISAMPLE_HIGH = 3 /**< MSAA with maximum allowed samples */
442} Evas_GL_Multisample_Bits; 442} Evas_GL_Multisample_Bits;
443 443
@@ -455,6 +455,7 @@ struct _Evas_GL_Config
455 Evas_GL_Multisample_Bits multisample_bits; /**< Optional Surface MSAA Bits */ 455 Evas_GL_Multisample_Bits multisample_bits; /**< Optional Surface MSAA Bits */
456}; 456};
457 457
458/** @brief Constant to use when calling @ref evas_gl_string_query to retrieve the available Evas_GL extensions. */
458#define EVAS_GL_EXTENSIONS 1 459#define EVAS_GL_EXTENSIONS 1
459 460
460 461
@@ -575,6 +576,26 @@ EAPI Eina_Bool evas_gl_native_surface_get (Evas_GL *evas_gl, Evas
575 */ 576 */
576EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); 577EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1);
577 578
579/**
580 * @brief Returns the last error of any evas_gl function called in the current thread.
581 * Initially, the error is set to @ref EVAS_GL_SUCCESS. A call to @ref evas_gl_error_get
582 * resets the error to @ref EVAS_GL_SUCCESS.
583 *
584 * @param[in] evas_gl The given Evas_GL object
585 *
586 * @return @ref EVAS_GL_SUCCESS in case of no error, or any other @c EVAS_GL error code.
587 *
588 * Since Evas GL is a glue layer for GL imitating EGL, the error codes returned
589 * have the same meaning as those defined in EGL.
590 *
591 * @note At the moment of writing, this API is only partially implemented
592 * and might return @c EVAS_GL_SUCCESS even when the last call(s) to
593 * Evas_GL failed.
594 *
595 * @since 1.12
596 */
597EAPI int evas_gl_error_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1);
598
578#if !defined(__gl_h_) && !defined(__gl2_h_) 599#if !defined(__gl_h_) && !defined(__gl2_h_)
579# define __gl_h_ 600# define __gl_h_
580# define __gl2_h_ 601# define __gl2_h_
@@ -1299,6 +1320,40 @@ typedef signed long int GLsizeiptr; // Changed khronos_ssize_t
1299# endif 1320# endif
1300#endif 1321#endif
1301 1322
1323/**
1324 * @name Evas GL error codes
1325 *
1326 * These are the possible return values of @ref evas_gl_error_get.
1327 * The values are the same as EGL error codes - @c EGL_SUCCESS.
1328 *
1329 * Some of the values may be set directly by Evas GL when an obvious error was
1330 * detected (eg. @c NULL pointers or invalid dimensions), otherwise Evas GL will
1331 * call the backend's GetError() function and translate to a valid @c EVAS_GL_
1332 * error code.
1333 *
1334 * @since 1.12
1335 *
1336 * @{
1337 */
1338#define EVAS_GL_SUCCESS 0x0000 /**< The last evas_gl_ operation succeeded. A call to @c evas_gl_error_get() will reset the error. */
1339#define EVAS_GL_NOT_INITIALIZED 0x0001 /**< Evas GL was not initialized or a @c NULL pointer was passed */
1340#define EVAS_GL_BAD_ACCESS 0x0002 /**< Bad access; for more information, please refer to its EGL counterpart */
1341#define EVAS_GL_BAD_ALLOC 0x0003 /**< Bad allocation; for more information, please refer to its EGL counterpart */
1342#define EVAS_GL_BAD_ATTRIBUTE 0x0004 /**< Bad attribute; for more information, please refer to its EGL counterpart */
1343#define EVAS_GL_BAD_CONFIG 0x0005 /**< Bad configuration; for more information, please refer to its EGL counterpart */
1344#define EVAS_GL_BAD_CONTEXT 0x0006 /**< Bad context; for more information, please refer to its EGL counterpart */
1345#define EVAS_GL_BAD_CURRENT_SURFACE 0x0007 /**< Bad current surface; for more information, please refer to its EGL counterpart */
1346#define EVAS_GL_BAD_DISPLAY 0x0008 /**< Bad display; for more information, please refer to its EGL counterpart */
1347#define EVAS_GL_BAD_MATCH 0x0009 /**< Bad match; for more information, please refer to its EGL counterpart */
1348#define EVAS_GL_BAD_NATIVE_PIXMAP 0x000A /**< Bad native pixmap; for more information, please refer to its EGL counterpart */
1349#define EVAS_GL_BAD_NATIVE_WINDOW 0x000B /**< Bad native window; for more information, please refer to its EGL counterpart */
1350#define EVAS_GL_BAD_PARAMETER 0x000C /**< Bad parameter; for more information, please refer to its EGL counterpart */
1351#define EVAS_GL_BAD_SURFACE 0x000D /**< Bad surface; for more information, please refer to its EGL counterpart */
1352/* EGL 1.1 - IMG_power_management */
1353#define EVAS_GL_CONTEXT_LOST 0x000E /**< Context lost; for more information, please refer to its EGL counterpart */
1354
1355/** @} */
1356
1302#define EVAS_GL_API_VERSION 1 1357#define EVAS_GL_API_VERSION 1
1303struct _Evas_GL_API 1358struct _Evas_GL_API
1304{ 1359{