diff --git a/include/ngl/ShaderLib.h b/include/ngl/ShaderLib.h index e85c3bcd..7bbb54d7 100644 --- a/include/ngl/ShaderLib.h +++ b/include/ngl/ShaderLib.h @@ -426,6 +426,8 @@ class NGL_DLLEXPORT ShaderLib static std::shared_ptr< ngl::Shader > getShader(std::string_view _shaderName) noexcept; static bool setUniformBuffer(std::string_view _uniformBlockName, size_t _size, void *_data); + + protected: //---------------------------------------------------------------------------------------------------------------------- /// @brief get shader type from string (used for json parsing) diff --git a/src/Mat4.cpp b/src/Mat4.cpp index dadffbd8..c84d2dcc 100644 --- a/src/Mat4.cpp +++ b/src/Mat4.cpp @@ -446,21 +446,21 @@ Quaternion Mat4::asQuaternion() const noexcept { case 0: { - auto S = static_cast< Real >(sqrtf(1.0f + m_openGL[0] - m_openGL[5] - m_openGL[10]) * 2.0f); + auto S = sqrtf(1.0f + m_openGL[0] - m_openGL[5] - m_openGL[10]) * 2.0f; return Quaternion( 0.5f / S, (m_openGL[1] + m_openGL[4]) / S, (m_openGL[2] + m_openGL[8]) / S, (m_openGL[6] + m_openGL[9]) / S); } case 1: { - auto S = static_cast< Real >(sqrtf(1.0f + m_openGL[5] - m_openGL[0] - m_openGL[10]) * 2.0f); + auto S = sqrtf(1.0f + m_openGL[5] - m_openGL[0] - m_openGL[10]) * 2.0f; return Quaternion( (m_openGL[1] + m_openGL[4]) / S, 0.5f / S, (m_openGL[6] + m_openGL[9]) / S, (m_openGL[2] + m_openGL[8]) / S); } case 2: { - auto S = static_cast< Real >(sqrtf(1.0f + m_openGL[10] - m_openGL[0] - m_openGL[5]) * 2.0f); + auto S = sqrtf(1.0f + m_openGL[10] - m_openGL[0] - m_openGL[5]) * 2.0f; return Quaternion( (m_openGL[2] + m_openGL[8]) / S, (m_openGL[6] + m_openGL[9]) / S, 0.5f / S, (m_openGL[1] + m_openGL[4]) / S);