Module: Demos Branch: master Commit: 82c3f7411bb67c94756d60a86cef8428614c3702 URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=82c3f7411bb67c94756d60a86cef8428614c3702
Author: José Fonseca <[email protected]> Date: Tue Aug 2 22:01:41 2011 +0100 tri-2101010: Build without GL_ARB_vertex_type_2_10_10_10_rev. Latest released Ubuntu only ships glew 1.5 which doesn't have the GL_ARB_vertex_type_2_10_10_10_rev support. So replace build failure by runtime failure in such circumstances. --- src/trivial/tri-2101010.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/trivial/tri-2101010.c b/src/trivial/tri-2101010.c index 34b03fc..817b260 100644 --- a/src/trivial/tri-2101010.c +++ b/src/trivial/tri-2101010.c @@ -41,6 +41,11 @@ static void Init(void) fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); fflush(stderr); +#ifndef GL_ARB_vertex_type_2_10_10_10_rev + fprintf(stderr,"built without ARB_vertex_type_2_10_10_10_rev\n"); + exit(1); +#endif + if (!glutExtensionSupported("GL_ARB_vertex_type_2_10_10_10_rev")){ fprintf(stderr,"requires ARB_vertex_type_2_10_10_10_rev\n"); exit(1); @@ -91,6 +96,7 @@ static void Draw(void) { glClear(GL_COLOR_BUFFER_BIT); +#ifdef GL_ARB_vertex_type_2_10_10_10_rev glBegin(GL_TRIANGLES); glColorP3ui(GL_UNSIGNED_INT_2_10_10_10_REV, conv(820, 0, 0, 0)); glVertexP3ui(GL_INT_2_10_10_10_REV, iconv(-90, -90, -30, 0)); @@ -99,6 +105,7 @@ static void Draw(void) glColorP3ui(GL_UNSIGNED_INT_2_10_10_10_REV, conv(0, 0, 716, 0)); glVertexP3ui(GL_INT_2_10_10_10_REV, iconv(0, 90, -30, 0)); glEnd(); +#endif /* GL_ARB_vertex_type_2_10_10_10_rev */ glFlush(); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
