Browse Source

build: OS X compilation fixes: use GL_INVALID_ENUM instead of GL_INVALID_INDEX

and support automake 1.12 in the bootstrap script.
legacy
Sam Hocevar sam 12 years ago
parent
commit
74edd6cbab
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      bootstrap
  2. +3
    -3
      src/gpu/framebuffer.cpp

+ 1
- 1
bootstrap View File

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


+ 3
- 3
src/gpu/framebuffer.cpp View File

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


Loading…
Cancel
Save