Fixed OSX build.

This commit is contained in:
Branimir Karadžić 2015-09-01 13:34:36 -07:00
parent 818c231d49
commit 9f1b7866d0
2 changed files with 10 additions and 8 deletions

View file

@ -301,8 +301,8 @@ GL_IMPORT______(true, PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMes
GL_IMPORT______(false, PFNGLGETERRORPROC, glGetError);
GL_IMPORT______(false, PFNGLGETFLOATVPROC, glGetFloatv);
GL_IMPORT______(false, PFNGLGETINTEGERVPROC, glGetIntegerv);
GL_IMPORT______(false, PFNGLGETINTERNALFORMATIVPROC, glGetInternalformativ);
GL_IMPORT______(false, PFNGLGETINTERNALFORMATI64VPROC, glGetInternalformati64v);
GL_IMPORT______(true, PFNGLGETINTERNALFORMATIVPROC, glGetInternalformativ);
GL_IMPORT______(true, PFNGLGETINTERNALFORMATI64VPROC, glGetInternalformati64v);
GL_IMPORT______(true, PFNGLGETOBJECTLABELPROC, glGetObjectLabel);
GL_IMPORT______(true, PFNGLGETOBJECTPTRLABELPROC, glGetObjectPtrLabel);
GL_IMPORT______(true, PFNGLGETPOINTERVPROC, glGetPointerv);

View file

@ -1603,24 +1603,26 @@ namespace bgfx { namespace gl
if (NULL != glGetInternalformativ)
{
GLint maxSamples;
GL_CHECK(glGetInternalformativ(GL_RENDERBUFFER
glGetInternalformativ(GL_RENDERBUFFER
, s_textureFormat[ii].m_internalFmt
, GL_SAMPLES
, 1
, &maxSamples
) );
supported |= maxSamples > 0
);
GLenum err = glGetError();
supported |= 0 == err && maxSamples > 0
? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
GL_CHECK(glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE
glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE
, s_textureFormat[ii].m_internalFmt
, GL_SAMPLES
, 1
, &maxSamples
) );
supported |= maxSamples > 0
);
err = glGetError();
supported |= 0 == err && maxSamples > 0
? BGFX_CAPS_FORMAT_TEXTURE_MSAA
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;