From ccc725334a57d7e7b13b021481b6d8c05d2974dc Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 14 Jun 2011 21:13:44 +0000 Subject: [PATCH] build: check for glBegin, which we won't end up using anyway. --- configure.ac | 6 ++++++ src/debugquad.cpp | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index eb3bb030..964096a5 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,12 @@ if test "${ac_cv_my_have_gl}" = "no"; then AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]]) fi +dnl Poor man's GL feature detection. +save_LIBS="${LIBS}" +LIBS="${LIBS} ${GL_LIBS} ${GLES2_LIBS}" +AC_CHECK_FUNCS(glBegin) +LIBS="${save_LIBS}" + dnl Use SDL? (always required) ac_cv_my_have_sdl="yes" AC_PATH_PROG(SDL_CONFIG, sdl-config, no) diff --git a/src/debugquad.cpp b/src/debugquad.cpp index 819c9cec..2f002e70 100644 --- a/src/debugquad.cpp +++ b/src/debugquad.cpp @@ -388,6 +388,7 @@ void DebugQuad::TickDraw(float deltams) GLfloat const texcoords[] = { f1, f3, f3, f2, f2, f4, f2, f4, f4, f1, f1, f3 }; +#if defined HAVE_GLBEGIN /* Quad #1: simple glBegin program */ glColor3f(0.8f, 0.5f, 0.2f); glBegin(GL_TRIANGLES); @@ -505,8 +506,9 @@ void DebugQuad::TickDraw(float deltams) glDisable(GL_TEXTURE_2D); Advance(); +#endif - /* Quad #7: simple vertex buffer */ + /* Quad #7: simple vertex buffer, no shader */ GLfloat const vertices1[] = { data->aa.x, data->bb.y, 0.0f, data->bb.x, data->bb.y, 0.0f, data->bb.x, data->aa.y, 0.0f,