gsdx-ogl: detect support of GL_EXT_texture_filter_anisotropic

This commit is contained in:
Gregory Hainaut 2015-05-02 10:53:19 +02:00
parent 73d04e33e9
commit b1ec8a5a42
2 changed files with 12 additions and 6 deletions

View File

@ -319,6 +319,7 @@ namespace GLLoader {
// Optional // Optional
bool found_GL_ARB_separate_shader_objects = false; // Issue with Mesa and Catalyst... bool found_GL_ARB_separate_shader_objects = false; // Issue with Mesa and Catalyst...
bool found_geometry_shader = true; // we require GL3.3 so geometry must be supported by default bool found_geometry_shader = true; // we require GL3.3 so geometry must be supported by default
bool found_GL_EXT_texture_filter_anisotropic = false;
// Note: except Apple, all drivers support explicit uniform location // Note: except Apple, all drivers support explicit uniform location
bool found_GL_ARB_explicit_uniform_location = false; // need by subroutine and bindless texture bool found_GL_ARB_explicit_uniform_location = false; // need by subroutine and bindless texture
// GL4 hardware // GL4 hardware
@ -418,6 +419,8 @@ namespace GLLoader {
if (gl_GetStringi && max_ext) { if (gl_GetStringi && max_ext) {
for (GLint i = 0; i < max_ext; i++) { for (GLint i = 0; i < max_ext; i++) {
string ext((const char*)gl_GetStringi(GL_EXTENSIONS, i)); string ext((const char*)gl_GetStringi(GL_EXTENSIONS, i));
// Bonus
if (ext.compare("GL_EXT_texture_filter_anisotropic") == 0) found_GL_EXT_texture_filter_anisotropic = true;
// GL4.0 // GL4.0
if (ext.compare("GL_ARB_gpu_shader5") == 0) found_GL_ARB_gpu_shader5 = true; if (ext.compare("GL_ARB_gpu_shader5") == 0) found_GL_ARB_gpu_shader5 = true;
// GL4.1 // GL4.1
@ -463,17 +466,19 @@ namespace GLLoader {
bool status = true; bool status = true;
fprintf(stderr, "\n"); fprintf(stderr, "\n");
// Bonus
status &= status_and_override(found_GL_EXT_texture_filter_anisotropic, "GL_EXT_texture_filter_anisotropic");
// GL4.0 // GL4.0
status &= status_and_override(found_GL_ARB_gpu_shader5,"GL_ARB_gpu_shader5"); status &= status_and_override(found_GL_ARB_gpu_shader5, "GL_ARB_gpu_shader5");
// GL4.1 // GL4.1
status &= status_and_override(found_GL_ARB_separate_shader_objects,"GL_ARB_separate_shader_objects"); status &= status_and_override(found_GL_ARB_separate_shader_objects, "GL_ARB_separate_shader_objects");
status &= status_and_override(found_GL_ARB_shader_subroutine,"GL_ARB_shader_subroutine"); status &= status_and_override(found_GL_ARB_shader_subroutine, "GL_ARB_shader_subroutine");
// GL4.2 // GL4.2
status &= status_and_override(found_GL_ARB_shader_image_load_store,"GL_ARB_shader_image_load_store"); status &= status_and_override(found_GL_ARB_shader_image_load_store, "GL_ARB_shader_image_load_store");
status &= status_and_override(found_GL_ARB_shading_language_420pack,"GL_ARB_shading_language_420pack", true); status &= status_and_override(found_GL_ARB_shading_language_420pack, "GL_ARB_shading_language_420pack", true);
status &= status_and_override(found_GL_ARB_texture_storage, "GL_ARB_texture_storage", true); status &= status_and_override(found_GL_ARB_texture_storage, "GL_ARB_texture_storage", true);
// GL4.3 // GL4.3
status &= status_and_override(found_GL_ARB_explicit_uniform_location,"GL_ARB_explicit_uniform_location"); status &= status_and_override(found_GL_ARB_explicit_uniform_location, "GL_ARB_explicit_uniform_location");
status &= status_and_override(found_GL_ARB_copy_image, "GL_ARB_copy_image"); status &= status_and_override(found_GL_ARB_copy_image, "GL_ARB_copy_image");
// GL4.4 // GL4.4
status &= status_and_override(found_GL_ARB_buffer_storage,"GL_ARB_buffer_storage"); status &= status_and_override(found_GL_ARB_buffer_storage,"GL_ARB_buffer_storage");

View File

@ -360,4 +360,5 @@ namespace GLLoader {
extern bool found_GL_ARB_clip_control; extern bool found_GL_ARB_clip_control;
extern bool found_GL_ARB_direct_state_access; extern bool found_GL_ARB_direct_state_access;
extern bool found_GL_ARB_texture_barrier; extern bool found_GL_ARB_texture_barrier;
extern bool found_GL_EXT_texture_filter_anisotropic;
} }