mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-19 05:50:23 +01:00
gl: Use the GL core 2.0 shader implementation for both GL 1.x ARB and GL 2.x
The GL core 2.0 shader implementation can be used by both GL 1.x and 2.x thanks to the dispatch table.
This commit is contained in:
parent
cf518b29e0
commit
a6facced8d
1 changed files with 4 additions and 5 deletions
|
|
@ -543,12 +543,11 @@ _cairo_gl_context_init_shaders (cairo_gl_context_t *ctx)
|
|||
cairo_status_t status;
|
||||
|
||||
/* XXX multiple device support? */
|
||||
if (GLEW_VERSION_2_0) {
|
||||
if (GLEW_VERSION_2_0 ||
|
||||
(GLEW_ARB_shader_objects &&
|
||||
GLEW_ARB_fragment_shader &&
|
||||
GLEW_ARB_vertex_program)) {
|
||||
ctx->shader_impl = &shader_impl_core_2_0;
|
||||
} else if (GLEW_ARB_shader_objects &&
|
||||
GLEW_ARB_fragment_shader &&
|
||||
GLEW_ARB_vertex_program) {
|
||||
ctx->shader_impl = &shader_impl_arb;
|
||||
} else {
|
||||
ctx->shader_impl = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue