Fixed GLES 3.0+ build.

This commit is contained in:
Branimir Karadžić 2015-05-08 10:39:56 -07:00
parent 9e5e7d476b
commit 916693c29b
2 changed files with 7 additions and 2 deletions

View file

@ -188,7 +188,7 @@ namespace bgfx { namespace gl
{ {
result = wglChoosePixelFormatARB(m_hdc, attrs, NULL, 1, &m_pixelFormat, &numFormats); result = wglChoosePixelFormatARB(m_hdc, attrs, NULL, 1, &m_pixelFormat, &numFormats);
if (0 == result if (0 == result
|| 0 == numFormats) || 0 == numFormats)
{ {
attrs[3] >>= 1; attrs[3] >>= 1;
attrs[1] = attrs[3] == 0 ? 0 : 1; attrs[1] = attrs[3] == 0 ? 0 : 1;
@ -212,7 +212,7 @@ namespace bgfx { namespace gl
); );
result = SetPixelFormat(m_hdc, m_pixelFormat, &m_pfd); result = SetPixelFormat(m_hdc, m_pixelFormat, &m_pfd);
// When window is created by SDL and SDL_WINDOW_OPENGL is set SetPixelFormat // When window is created by SDL and SDL_WINDOW_OPENGL is set, SetPixelFormat
// will fail. Just warn and continue. In case it failed for some other reason // will fail. Just warn and continue. In case it failed for some other reason
// create context will fail and it will error out there. // create context will fail and it will error out there.
BX_WARN(result, "SetPixelFormat failed (last err: 0x%08x)!", GetLastError() ); BX_WARN(result, "SetPixelFormat failed (last err: 0x%08x)!", GetLastError() );

View file

@ -563,6 +563,11 @@ GL_IMPORT______(true, PFNGLBEGINQUERYPROC, glBeginQuery)
GL_IMPORT______(true, PFNGLENDQUERYPROC, glEndQuery); GL_IMPORT______(true, PFNGLENDQUERYPROC, glEndQuery);
GL_IMPORT______(true, PFNGLGETQUERYOBJECTUI64VPROC, glGetQueryObjectui64v); GL_IMPORT______(true, PFNGLGETQUERYOBJECTUI64VPROC, glGetQueryObjectui64v);
GL_IMPORT______(true, PFNGLDRAWARRAYSINDIRECTPROC, glDrawArraysIndirect);
GL_IMPORT______(true, PFNGLDRAWELEMENTSINDIRECTPROC, glDrawElementsIndirect);
GL_IMPORT______(true, PFNGLMULTIDRAWARRAYSINDIRECTPROC, glMultiDrawArraysIndirect);
GL_IMPORT______(true, PFNGLMULTIDRAWELEMENTSINDIRECTPROC, glMultiDrawElementsIndirect);
GL_IMPORT______(true, PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer); GL_IMPORT______(true, PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer);
# endif // BGFX_CONFIG_RENDERER_OPENGLES < 30 # endif // BGFX_CONFIG_RENDERER_OPENGLES < 30