c++ - Why does GLEW say that I don't have extensions? -
i'm @ initialization phase of opengl application, , i'm adding code check various extensions. hit stumbling point:
/* check ext_texture_compression_s3tc */ if (glew_ext_texture_compression_s3tc) infomore("gl_ext_texture_compression_s3tc supported.\n"); else errormore("gl_ext_texture_compression_s3tc unsupported.\n"); /* check anisotropic filtering */ if (glew_ext_texture_filter_anisotropic) infomore("gl_ext_texture_filter_anisotropic supported.\n"); else warnmore("gl_ext_texture_filter_anisotropic unsupported.\n");
according this, both s3tc , anisotropic filtering unsupported video card, though know fact have it. have used both myself opengl on same project no issue. glew initializes fine (with glewexperimental = true), context set properly, , else works fine, reason glew thinks don't have these extensions.
what's going on here?
please allow sume (moderately) wild guesses: you, chance, use core profile context? , use glewexperimental = true
because of this?
the problem glew broken respect core profiles. tries use glgetstring(gl_extensions)
, invalid in core profiles (the modern way use glgetintegerv(gl_num_extensions, &ext_cnt); (i=0; i<ext_cnt; i++) glgetstringi(gl_extension,i)
), , generate error. glew fails query extensions available. glewexperimental = true
is: ignore fact extensions seem missing, , query function pointers anyway. big hack, , fact function pointer might present not guarantee repective gl extension present , useable. other side effect of mess experiencing: glew, these extensions not present.
i don't know why glew hasn't fixed isse since years (and there proposed patches make compatible modern core profiles), looks behavior stay long time.
Comments
Post a Comment