#ifndef CONTEXT_H
#define CONTEXT_H
#include "imports.h"
#include "mtypes.h"
#ifdef __cplusplus
extern "C" {
#endif
static inline GLboolean
_mesa_is_desktop_gl(const struct gl_context *ctx)
{
return ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGL_CORE;
}
static inline GLboolean
_mesa_is_gles(const struct gl_context *ctx)
{
return ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2;
}
static inline GLboolean
_mesa_is_gles3(const struct gl_context *ctx)
{
return ctx->API == API_OPENGLES2 && ctx->Version >= 30;
}
static inline GLboolean
_mesa_has_geometry_shaders(const struct gl_context *ctx)
{
return _mesa_is_desktop_gl(ctx) &&
(ctx->Version >= 32 || ctx->Extensions.ARB_geometry_shader4);
}
#ifdef __cplusplus
}
#endif
#endif