Import sRGB, multisampling and timer GL extensions.

This commit is contained in:
bkaradzic 2012-06-01 23:51:51 -07:00
parent de78be9ac3
commit a553b28a7f
2 changed files with 38 additions and 0 deletions

View file

@ -58,10 +58,28 @@ GL_IMPORT(false, PFNGLUNIFORM4FVPROC, glUniform4fv);
GL_IMPORT(false, PFNGLUNIFORMMATRIX3FVPROC, glUniformMatrix3fv); GL_IMPORT(false, PFNGLUNIFORMMATRIX3FVPROC, glUniformMatrix3fv);
GL_IMPORT(false, PFNGLUNIFORMMATRIX4FVPROC, glUniformMatrix4fv); GL_IMPORT(false, PFNGLUNIFORMMATRIX4FVPROC, glUniformMatrix4fv);
GL_IMPORT(false, PFNGLGENQUERIESPROC, glGenQueries);
GL_IMPORT(false, PFNGLDELETEQUERIESPROC, glDeleteQueries);
GL_IMPORT(false, PFNGLBEGINQUERYPROC, glBeginQuery);
GL_IMPORT(false, PFNGLENDQUERYPROC, glEndQuery);
GL_IMPORT(false, PFNGLGETQUERYIVPROC, glGetQueryiv);
GL_IMPORT(false, PFNGLGETQUERYOBJECTIVPROC, glGetQueryObjectiv);
GL_IMPORT(false, PFNGLGETQUERYOBJECTUIVPROC, glGetQueryObjectuiv);
GL_IMPORT(true, PFNGLGETPROGRAMBINARYPROC, glGetProgramBinary); GL_IMPORT(true, PFNGLGETPROGRAMBINARYPROC, glGetProgramBinary);
GL_IMPORT(true, PFNGLPROGRAMBINARYPROC, glProgramBinary); GL_IMPORT(true, PFNGLPROGRAMBINARYPROC, glProgramBinary);
GL_IMPORT(true, PFNGLPROGRAMPARAMETERIPROC, glProgramParameteri); GL_IMPORT(true, PFNGLPROGRAMPARAMETERIPROC, glProgramParameteri);
GL_IMPORT(true, PFNGLBLITFRAMEBUFFEREXTPROC, glBlitFramebufferEXT);
GL_IMPORT(true, PFNGLQUERYCOUNTERPROC, glQueryCounter);
GL_IMPORT(true, PFNGLGETQUERYOBJECTI64VPROC, glGetQueryObjecti64v);
GL_IMPORT(true, PFNGLGETQUERYOBJECTUI64VPROC, glGetQueryObjectui64v);
GL_IMPORT(true, PFNGLGETQUERYOBJECTI64VEXTPROC, glGetQueryObjecti64vEXT);
GL_IMPORT(true, PFNGLGETQUERYOBJECTUI64VEXTPROC, glGetQueryObjectui64vEXT);
GL_IMPORT(true, PFNGLSAMPLECOVERAGEARBPROC, glSampleCoverageARB);
#if BGFX_CONFIG_DEBUG_GREMEDY #if BGFX_CONFIG_DEBUG_GREMEDY
GL_IMPORT(true, PFNGLSTRINGMARKERGREMEDYPROC, glStringMarkerGREMEDY); GL_IMPORT(true, PFNGLSTRINGMARKERGREMEDYPROC, glStringMarkerGREMEDY);
GL_IMPORT(true, PFNGLFRAMETERMINATORGREMEDYPROC, glFrameTerminatorGREMEDY); GL_IMPORT(true, PFNGLFRAMETERMINATORGREMEDYPROC, glFrameTerminatorGREMEDY);

View file

@ -396,6 +396,13 @@ namespace bgfx
OES_standard_derivatives, OES_standard_derivatives,
ARB_get_program_binary, ARB_get_program_binary,
OES_get_program_binary, OES_get_program_binary,
EXT_framebuffer_blit,
ARB_timer_query,
EXT_timer_query,
EXT_texture_sRGB,
ARB_framebuffer_sRGB,
EXT_framebuffer_sRGB,
ARB_multisample,
Count Count
}; };
@ -417,6 +424,13 @@ namespace bgfx
{ "GL_OES_standard_derivatives", false, true }, { "GL_OES_standard_derivatives", false, true },
{ "GL_ARB_get_program_binary", false, true }, { "GL_ARB_get_program_binary", false, true },
{ "GL_OES_get_program_binary", false, false }, { "GL_OES_get_program_binary", false, false },
{ "GL_EXT_framebuffer_blit", false, true },
{ "GL_ARB_timer_query", false, true },
{ "GL_EXT_timer_query", false, true },
{ "GL_EXT_texture_sRGB", false, true },
{ "GL_ARB_framebuffer_sRGB", false, true },
{ "GL_EXT_framebuffer_sRGB", false, true },
{ "GL_ARB_multisample", false, true },
}; };
static const GLenum s_primType[] = static const GLenum s_primType[] =
@ -1429,6 +1443,12 @@ namespace bgfx
pos += len+1; pos += len+1;
} }
BX_TRACE("Supported extensions:");
for (uint32_t ii = 0; ii < Extension::Count; ++ii)
{
BX_TRACE("\t%2d: %s", ii, s_extension[ii].m_name);
}
s_renderCtx.m_dxtSupport = true s_renderCtx.m_dxtSupport = true
&& s_extension[Extension::EXT_texture_compression_dxt1].m_supported && s_extension[Extension::EXT_texture_compression_dxt1].m_supported
&& s_extension[Extension::CHROMIUM_texture_compression_dxt3].m_supported && s_extension[Extension::CHROMIUM_texture_compression_dxt3].m_supported