From 74edd6cbabd8e4900d873cf14c9731567b8df98e Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 24 Jun 2012 19:10:14 +0000 Subject: [PATCH] build: OS X compilation fixes: use GL_INVALID_ENUM instead of GL_INVALID_INDEX and support automake 1.12 in the bootstrap script. --- bootstrap | 2 +- src/gpu/framebuffer.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap b/bootstrap index 8ec24e1a..550ea92a 100755 --- a/bootstrap +++ b/bootstrap @@ -46,7 +46,7 @@ aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am 2>/dev/n # Check for automake amvers="no" -for v in 11 10 9 8 7 6 5; do +for v in 12 11 10 9 8 7 6 5; do if automake-1.${v} --version >/dev/null 2>&1; then amvers="-1.${v}" break diff --git a/src/gpu/framebuffer.cpp b/src/gpu/framebuffer.cpp index e335d239..9e1889f1 100644 --- a/src/gpu/framebuffer.cpp +++ b/src/gpu/framebuffer.cpp @@ -82,8 +82,8 @@ FrameBuffer::FrameBuffer(ivec2 size) glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_data->m_texture, 0); - m_data->m_depth = GL_INVALID_INDEX; - if (depth != GL_INVALID_INDEX) + m_data->m_depth = GL_INVALID_ENUM; + if (depth != GL_INVALID_ENUM) { glGenRenderbuffers(1, &m_data->m_depth); glBindRenderbuffer(GL_RENDERBUFFER, m_data->m_depth); @@ -106,7 +106,7 @@ FrameBuffer::~FrameBuffer() #elif GL_VERSION_1_1 glDeleteFramebuffers(1, &m_data->m_fbo); glDeleteTextures(1, &m_data->m_texture); - if (m_data->m_depth != GL_INVALID_INDEX) + if (m_data->m_depth != GL_INVALID_ENUM) glDeleteRenderbuffers(1, &m_data->m_depth); #else #endif