X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fdevice_backend.cpp;h=7819c98fe68e6d92f095a9edfc3ea2919e0cf48a;hb=b294ef47df0ae87c42fe8114987817fb28326f10;hp=1c51b132ca48500a26f5b78841bbb2e99c855cd3;hpb=d16d28d2ccf7c6255204f02975834f713ff1df08;p=libs%2Fgl.git diff --git a/source/backends/opengl/device_backend.cpp b/source/backends/opengl/device_backend.cpp index 1c51b132..7819c98f 100644 --- a/source/backends/opengl/device_backend.cpp +++ b/source/backends/opengl/device_backend.cpp @@ -25,6 +25,14 @@ OpenGLDevice::OpenGLDevice(Graphics::Window &wnd, const Graphics::GLOptions &opt context(wnd, opts) { } +Graphics::GLOptions OpenGLDevice::create_default_options() +{ + Graphics::GLOptions opts; + opts.gl_version_major = Graphics::GLOptions::LATEST_VERSION; + opts.core_profile = true; + return opts; +} + void OpenGLDevice::fill_info() { DeviceInfo &info = static_cast(this)->info; @@ -79,6 +87,9 @@ void OpenGLDevice::fill_info() feat.ext_texture_array = EXT_texture_array; feat.uniform_binding_range = lim.max_uniform_bindings; feat.texture_binding_range = lim.max_texture_bindings; + + state.bound_tex_targets.resize(lim.max_texture_bindings); + state.bound_uniform_blocks.resize(lim.max_uniform_bindings); } } // namespace GL