diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2012-07-19 11:01:27 -0700 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2012-07-24 15:41:59 -0700 |
commit | cbc697433011bf048f4176335844051c4c661d61 (patch) | |
tree | a7846f22093f51dc9b607f74d8593980bc3a4609 /src/mesa | |
parent | f7a395f9707d1f883f54df4794b90c7eb54e92dd (diff) |
mesa: add api check macros
These macros make it easier to check for multiple API types.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 7d779565e49..7a715b3b9d7 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3340,6 +3340,10 @@ typedef enum API_OPENGL_CORE, } gl_api; +#define IS_CTX_IN2(ctx, api1, api2) ((ctx->API == api1) || (ctx->API == api2)) +#define IS_CTX_DESKTOP_GL(ctx) IS_CTX_IN2(ctx, API_OPENGL, API_OPENGL_CORE) +#define IS_CTX_GLES(ctx) IS_CTX_IN2(ctx, API_OPENGLES, API_OPENGLES2) + /** * Driver-specific state flags. * |