From 64e85966de7150a7485125d16ad1c184ea0cb139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 14 Sep 2014 18:17:19 +0200 Subject: [PATCH] Replaced NV_half_float with hopefully more standard ARB_half_float. According to reports on delphigl.de this extension is far more supported in comparison to the NV version (and also there's much less FF cruft in the specification). --- doc/opengl-support.dox | 3 +-- src/Magnum/AbstractShaderProgram.h | 2 +- src/Magnum/ColorFormat.h | 2 +- src/Magnum/Context.cpp | 2 +- src/Magnum/Extensions.h | 2 +- src/Magnum/Test/MeshGLTest.cpp | 4 ++-- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/opengl-support.dox b/doc/opengl-support.dox index 9cbd9e238..cef8bbf91 100644 --- a/doc/opengl-support.dox +++ b/doc/opengl-support.dox @@ -49,7 +49,6 @@ following: @todo @extension{EXT,texture_array} overlaps with @extension{ARB,framebuffer_object} @todo Add @extension{ARB,depth_buffer_float} and implement the missing @fn_gl{DepthRange} function, but keep (and implement) @extension{NV,depth_buffer_float} for non-linear depth buffer -@todo @extension{ARB,half_float_pixel}, @extension{ARB,half_float_vertex}? %Extension | Status ------------------------------------------- | ------ @@ -62,6 +61,7 @@ GLSL 1.30 | done @extension{ARB,texture_rg} | done @extension{ARB,vertex_array_object} | done @extension{ARB,framebuffer_object} | done +@extension{ARB,half_float_vertex} | done @extension{EXT,gpu_shader4} | done @extension{EXT,packed_float} | done @extension{EXT,texture_array} | done @@ -71,7 +71,6 @@ GLSL 1.30 | done @extension{EXT,draw_buffers2} | | @extension{EXT,texture_integer} | done (GL 3.0 subset) @extension{EXT,transform_feedback} | | -@extension{NV,half_float} | done (GL 3.0 subset) @extension{NV,depth_buffer_float} | | @extension{NV,conditional_render} | done diff --git a/src/Magnum/AbstractShaderProgram.h b/src/Magnum/AbstractShaderProgram.h index b9305c99a..4d0ba00b5 100644 --- a/src/Magnum/AbstractShaderProgram.h +++ b/src/Magnum/AbstractShaderProgram.h @@ -1137,7 +1137,7 @@ template class AbstractShaderProgram::Attribute { /** * Half float. Only for float attribute types. - * @requires_gl30 %Extension @extension{NV,half_float} + * @requires_gl30 %Extension @extension{ARB,half_float_vertex} * @requires_gles30 %Extension @es_extension{OES,vertex_half_float} * in OpenGL ES 2.0 */ diff --git a/src/Magnum/ColorFormat.h b/src/Magnum/ColorFormat.h index ecfc6ee6e..f7d2f52a4 100644 --- a/src/Magnum/ColorFormat.h +++ b/src/Magnum/ColorFormat.h @@ -331,7 +331,7 @@ enum class ColorType: GLenum { /** * Each component half float. - * @requires_gl30 %Extension @extension{NV,half_float} / @extension{ARB,half_float_pixel} + * @requires_gl30 %Extension @extension{ARB,half_float_pixel} * @requires_gles30 For texture data only, extension * @es_extension2{OES,texture_half_float,OES_texture_float} in OpenGL * ES 2.0 diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index 0add782d0..9fd8c97c7 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -80,6 +80,7 @@ const std::vector& Extension::extensions(Version version) { _extension(GL,ARB,texture_rg), _extension(GL,ARB,vertex_array_object), _extension(GL,ARB,framebuffer_object), + _extension(GL,ARB,half_float_vertex), _extension(GL,EXT,gpu_shader4), _extension(GL,EXT,packed_float), _extension(GL,EXT,texture_array), @@ -89,7 +90,6 @@ const std::vector& Extension::extensions(Version version) { _extension(GL,EXT,draw_buffers2), _extension(GL,EXT,texture_integer), _extension(GL,EXT,transform_feedback), - _extension(GL,NV,half_float), _extension(GL,NV,depth_buffer_float), _extension(GL,NV,conditional_render)}; static const std::vector extensions310{ diff --git a/src/Magnum/Extensions.h b/src/Magnum/Extensions.h index 9032773cf..bb2d8b7c3 100644 --- a/src/Magnum/Extensions.h +++ b/src/Magnum/Extensions.h @@ -82,6 +82,7 @@ namespace GL { _extension(GL,ARB,draw_instanced, GL210, GL310) // #44 _extension(GL,ARB,framebuffer_object, GL210, GL300) // #45 _extension(GL,ARB,geometry_shader4, GL210, GL320) // #47 + _extension(GL,ARB,half_float_vertex, GL210, GL300) // #48 _extension(GL,ARB,instanced_arrays, GL210, GL330) // #49 _extension(GL,ARB,map_buffer_range, GL210, GL300) // #50 _extension(GL,ARB,texture_buffer_object, GL210, GL310) // #51 @@ -207,7 +208,6 @@ namespace GL { _extension(GL,KHR,context_flush_control, GL210, GL450) // #168 _extension(GL,KHR,robustness, GL320, GL450) // #170 } namespace NV { - _extension(GL,NV,half_float, GL210, GL300) // #283 _extension(GL,NV,primitive_restart, GL210, GL310) // #285 _extension(GL,NV,depth_buffer_float, GL210, GL300) // #334 _extension(GL,NV,conditional_render, GL210, GL300) // #346 diff --git a/src/Magnum/Test/MeshGLTest.cpp b/src/Magnum/Test/MeshGLTest.cpp index 51bbf2764..a064dfe8b 100644 --- a/src/Magnum/Test/MeshGLTest.cpp +++ b/src/Magnum/Test/MeshGLTest.cpp @@ -896,8 +896,8 @@ void MeshGLTest::addVertexBufferIntWithShort() { void MeshGLTest::addVertexBufferFloatWithHalfFloat() { #ifndef MAGNUM_TARGET_GLES - if(!Context::current()->isExtensionSupported()) - CORRADE_SKIP(Extensions::GL::NV::half_float::string() + std::string(" is not supported.")); + if(!Context::current()->isExtensionSupported()) + CORRADE_SKIP(Extensions::GL::ARB::half_float_vertex::string() + std::string(" is not supported.")); #elif defined(MAGNUM_TARGET_GLES2) if(!Context::current()->isExtensionSupported()) CORRADE_SKIP(Extensions::GL::OES::vertex_half_float::string() + std::string(" is not supported."));