Lines Matching refs:ctx

110 _mesa_initialize_context( struct gl_context *ctx,
117 _mesa_free_context_data( struct gl_context *ctx );
120 _mesa_destroy_context( struct gl_context *ctx );
128 _mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height);
131 _mesa_make_current( struct gl_context *ctx, struct gl_framebuffer *drawBuffer,
135 _mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare);
150 _mesa_get_dispatch(struct gl_context *ctx);
153 _mesa_set_context_lost_dispatch(struct gl_context *ctx);
161 _mesa_record_error( struct gl_context *ctx, GLenum error );
165 _mesa_finish(struct gl_context *ctx);
168 _mesa_flush(struct gl_context *ctx);
184 _mesa_inside_begin_end(const struct gl_context *ctx)
186 return ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END;
194 _mesa_inside_dlist_begin_end(const struct gl_context *ctx)
196 return ctx->Driver.CurrentSavePrimitive <= PRIM_MAX;
210 * \param ctx GL context.
217 #define FLUSH_VERTICES(ctx, newstate) \
220 _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", MESA_FUNCTION);\
221 if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) \
222 vbo_exec_FlushVertices(ctx, FLUSH_STORED_VERTICES); \
223 ctx->NewState |= newstate; \
229 * \param ctx GL context.
236 #define FLUSH_CURRENT(ctx, newstate) \
239 _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", MESA_FUNCTION); \
240 if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) \
241 vbo_exec_FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \
242 ctx->NewState |= newstate; \
249 * \param ctx GL context.
252 #define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval) \
254 if (_mesa_inside_begin_end(ctx)) { \
255 _mesa_error(ctx, GL_INVALID_OPERATION, "Inside glBegin/glEnd"); \
264 * \param ctx GL context.
266 #define ASSERT_OUTSIDE_BEGIN_END(ctx) \
268 if (_mesa_inside_begin_end(ctx)) { \
269 _mesa_error(ctx, GL_INVALID_OPERATION, "Inside glBegin/glEnd"); \
281 _mesa_is_desktop_gl(const struct gl_context *ctx)
283 return ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGL_CORE;
291 _mesa_is_gles(const struct gl_context *ctx)
293 return ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2;
301 _mesa_is_gles3(const struct gl_context *ctx)
303 return ctx->API == API_OPENGLES2 && ctx->Version >= 30;
311 _mesa_is_gles31(const struct gl_context *ctx)
313 return ctx->API == API_OPENGLES2 && ctx->Version >= 31;
321 _mesa_is_gles32(const struct gl_context *ctx)
323 return ctx->API == API_OPENGLES2 && ctx->Version >= 32;
331 _mesa_has_geometry_shaders(const struct gl_context *ctx)
333 return _mesa_has_OES_geometry_shader(ctx) ||
334 (_mesa_is_desktop_gl(ctx) && ctx->Version >= 32);
342 _mesa_has_compute_shaders(const struct gl_context *ctx)
344 return _mesa_has_ARB_compute_shader(ctx) ||
345 (ctx->API == API_OPENGLES2 && ctx->Version >= 31);
352 _mesa_has_tessellation(const struct gl_context *ctx)
354 /* _mesa_has_EXT_tessellation_shader(ctx) is redundant with the OES
357 return _mesa_has_OES_tessellation_shader(ctx) ||
358 _mesa_has_ARB_tessellation_shader(ctx);
362 _mesa_has_texture_cube_map_array(const struct gl_context *ctx)
364 return _mesa_has_ARB_texture_cube_map_array(ctx) ||
365 _mesa_has_OES_texture_cube_map_array(ctx);