X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=init.cpp;h=944685ca2df6cdb67858771c09b82e6698ff659b;hp=554aa240574a665b005a7fde6a215b729e5a382b;hb=7f1c8bb8b3ce08b94054f0a8990e5b8225d36036;hpb=5dfd8dfbd444210f9c9e3a0baf5c82b49e76e7ff diff --git a/init.cpp b/init.cpp index 554aa24..944685c 100644 --- a/init.cpp +++ b/init.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -284,32 +284,32 @@ void measure_roundoff_problems() bool check_extensions() { // We fundamentally need FBOs and floating-point textures. - if (!glewIsSupported("GL_ARB_framebuffer_object")) return false; - if (!glewIsSupported("GL_ARB_texture_float")) return false; + if (!epoxy_has_gl_extension("GL_ARB_framebuffer_object")) return false; + if (!epoxy_has_gl_extension("GL_ARB_texture_float")) return false; // We assume that we can use non-power-of-two textures without restrictions. - if (!glewIsSupported("GL_ARB_texture_non_power_of_two")) return false; + if (!epoxy_has_gl_extension("GL_ARB_texture_non_power_of_two")) return false; // We also need GLSL fragment shaders. - if (!glewIsSupported("GL_ARB_fragment_shader")) return false; - if (!glewIsSupported("GL_ARB_shading_language_100")) return false; + if (!epoxy_has_gl_extension("GL_ARB_fragment_shader")) return false; + if (!epoxy_has_gl_extension("GL_ARB_shading_language_100")) return false; // FlatInput and YCbCrInput uses PBOs. (They could in theory do without, // but no modern card would really not provide it.) - if (!glewIsSupported("GL_ARB_pixel_buffer_object")) return false; + if (!epoxy_has_gl_extension("GL_ARB_pixel_buffer_object")) return false; // ResampleEffect uses RG textures to encode a two-component LUT. - if (!glewIsSupported("GL_ARB_texture_rg")) return false; + if (!epoxy_has_gl_extension("GL_ARB_texture_rg")) return false; // sRGB texture decode would be nice, but are not mandatory // (GammaExpansionEffect can do the same thing if needed). - movit_srgb_textures_supported = glewIsSupported("GL_EXT_texture_sRGB"); + movit_srgb_textures_supported = epoxy_has_gl_extension("GL_EXT_texture_sRGB"); // We may want to use round() at the end of the final shader, // if supported. We need either GLSL 1.30 or this extension to do that, // and 1.30 brings with it other things that we don't want to demand // for now. - movit_shader_rounding_supported = glewIsSupported("GL_EXT_gpu_shader4"); + movit_shader_rounding_supported = epoxy_has_gl_extension("GL_EXT_gpu_shader4"); return true; } @@ -325,11 +325,6 @@ bool init_movit(const string& data_directory, MovitDebugLevel debug_level) movit_data_directory = new string(data_directory); movit_debug_level = debug_level; - GLenum err = glewInit(); - if (err != GLEW_OK) { - return false; - } - // geez glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_UNPACK_ALIGNMENT, 1);