Explorar el Código

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 hace 12 años
padre
commit
74edd6cbab
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. +1
    -1
      bootstrap
  2. +3
    -3
      src/gpu/framebuffer.cpp

+ 1
- 1
bootstrap Ver fichero

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

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


Cargando…
Cancelar
Guardar