Browse Source

GL: don't treat NV_depth_buffer_float as being core in GL 3.0.

The glDepthRangedNV() and glClearDepthdNV() behave differently from
glDepthRange() and glClearDepth() -- they don't clamp. There doesn't
seem to be any change in recent GL related to this, so this extension is
still valuable for improving depth buffer precision. Or, alternatively,
it's possible to use the glClipControl() API from GL 4.5 to achieve the
same.
pull/601/head
Vladimír Vondruš 3 years ago
parent
commit
1a2378407a
  1. 4
      src/Magnum/GL/Context.cpp
  2. 2
      src/Magnum/GL/Extensions.h

4
src/Magnum/GL/Context.cpp

@ -110,6 +110,7 @@ constexpr Extension ExtensionList[]{
Extensions::KHR::texture_compression_astc_hdr{},
Extensions::KHR::texture_compression_astc_ldr{},
Extensions::KHR::texture_compression_astc_sliced_3d{},
Extensions::NV::depth_buffer_float{},
Extensions::NV::fragment_shader_barycentric{},
Extensions::NV::sample_locations{},
Extensions::OVR::multiview{},
@ -135,8 +136,7 @@ constexpr Extension ExtensionList300[]{
Extensions::EXT::texture_shared_exponent{},
Extensions::EXT::transform_feedback{},
Extensions::MAGNUM::shader_vertex_id{},
Extensions::NV::conditional_render{},
Extensions::NV::depth_buffer_float{}
Extensions::NV::conditional_render{}
};
constexpr Extension ExtensionList310[]{
Extensions::ARB::copy_buffer{},

2
src/Magnum/GL/Extensions.h

@ -261,7 +261,7 @@ namespace AMD {
_extension(171,MAGNUM,shader_vertex_id, GL300, GL300)
} namespace NV {
_extension(175,NV,primitive_restart, GL210, GL310) // #285
_extension(176,NV,depth_buffer_float, GL210, GL300) // #334
_extension(176,NV,depth_buffer_float, GL210, None) // #334
_extension(177,NV,conditional_render, GL210, GL300) // #346
/* NV_draw_texture not supported */ // #430
_extension(178,NV,sample_locations, GL210, None) // #472

Loading…
Cancel
Save