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:
Alexandros Frantzis 2010-12-08 14:39:31 +02:00 committed by Chris Wilson
parent cf518b29e0
commit a6facced8d

View file

@ -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;
}