mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa: add api check functions
These functions make it easier to check for multiple API types. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
1c29b73f4d
commit
3d284dcba6
1 changed files with 20 additions and 0 deletions
|
|
@ -290,6 +290,26 @@ do { \
|
|||
/*@}*/
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the context is for Desktop GL (Compatibility or Core)
|
||||
*/
|
||||
static inline GLboolean
|
||||
_mesa_is_desktop_gl(const struct gl_context *ctx)
|
||||
{
|
||||
return ctx->API == API_OPENGL || ctx->API == API_OPENGL_CORE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the context is for any GLES version
|
||||
*/
|
||||
static inline GLboolean
|
||||
_mesa_is_gles(const struct gl_context *ctx)
|
||||
{
|
||||
return ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue