Browse Source

build: check for glBegin, which we won't end up using anyway.

legacy
Sam Hocevar sam 13 years ago
parent
commit
ccc725334a
2 changed files with 9 additions and 1 deletions
  1. +6
    -0
      configure.ac
  2. +3
    -1
      src/debugquad.cpp

+ 6
- 0
configure.ac View File

@@ -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)


+ 3
- 1
src/debugquad.cpp View File

@@ -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,


Loading…
Cancel
Save