From 7cc11245f9e5916bc3e1ec42e6ced8c3cb31c1c9 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 15 Feb 2017 07:13:00 +0100 Subject: [PATCH 1/4] Core/Flags: Move external operators to the global scope Fixes usage of those operators outside of the Nz namespace, global scoping is not an issue thanks to the enable_if --- include/Nazara/Core/Flags.hpp | 10 +-- include/Nazara/Core/Flags.inl | 115 +++++++++++++++++----------------- 2 files changed, 62 insertions(+), 63 deletions(-) diff --git a/include/Nazara/Core/Flags.hpp b/include/Nazara/Core/Flags.hpp index f356a04a5..cb336def6 100644 --- a/include/Nazara/Core/Flags.hpp +++ b/include/Nazara/Core/Flags.hpp @@ -54,13 +54,13 @@ namespace Nz private: BitField m_value; }; - - template constexpr std::enable_if_t::value, Flags> operator~(E lhs); - template constexpr std::enable_if_t::value, Flags> operator|(E lhs, E rhs); - template constexpr std::enable_if_t::value, Flags> operator&(E lhs, E rhs); - template constexpr std::enable_if_t::value, Flags> operator^(E lhs, E rhs); } +template constexpr std::enable_if_t::value, Nz::Flags> operator~(E lhs); +template constexpr std::enable_if_t::value, Nz::Flags> operator|(E lhs, E rhs); +template constexpr std::enable_if_t::value, Nz::Flags> operator&(E lhs, E rhs); +template constexpr std::enable_if_t::value, Nz::Flags> operator^(E lhs, E rhs); + #include #endif // NAZARA_FLAGS_HPP diff --git a/include/Nazara/Core/Flags.inl b/include/Nazara/Core/Flags.inl index 57ffd9e7e..973da958d 100644 --- a/include/Nazara/Core/Flags.inl +++ b/include/Nazara/Core/Flags.inl @@ -209,68 +209,67 @@ namespace Nz { return 1U << static_cast(enumValue); } +} +/*! +* \brief Override binary NOT operator on enum to turns into a Flags object. +* \return A Flags object with reversed bits. +* +* \param lhs Enumeration value to reverse. +* +* Returns a Flags object with all state enabled except for the enum one. +*/ +template +constexpr std::enable_if_t::value, Nz::Flags> operator~(E lhs) +{ + return ~Nz::Flags(lhs); +} - /*! - * \brief Override binary NOT operator on enum to turns into a Flags object. - * \return A Flags object with reversed bits. - * - * \param lhs Enumeration value to reverse. - * - * Returns a Flags object with all state enabled except for the enum one. - */ - template - constexpr std::enable_if_t::value, Flags> operator~(E lhs) - { - return ~Flags(lhs); - } +/*! +* \brief Override binary OR operator on enum to turns into a Flags object. +* \return A Flags object with combined enum states. +* +* \param lhs First enumeration value to combine. +* \param rhs Second enumeration value to combine. +* +* Returns a Flags object with combined states from the two enumeration values. +*/ +template +constexpr std::enable_if_t::value, Nz::Flags> operator|(E lhs, E rhs) +{ + return Nz::Flags(lhs) | rhs; +} - /*! - * \brief Override binary OR operator on enum to turns into a Flags object. - * \return A Flags object with combined enum states. - * - * \param lhs First enumeration value to combine. - * \param rhs Second enumeration value to combine. - * - * Returns a Flags object with combined states from the two enumeration values. - */ - template - constexpr std::enable_if_t::value, Flags> operator|(E lhs, E rhs) - { - return Flags(lhs) | rhs; - } +/*! +* \brief Override binary AND operator on enum to turns into a Flags object. +* \return A Flags object with compare enum states. +* +* \param lhs First enumeration value to compare. +* \param rhs Second enumeration value to compare. +* +* Returns a Flags object with compared states from the two enumeration values. +* In this case, only one flag will be enabled if both enumeration values are the same. +*/ +template +constexpr std::enable_if_t::value, Nz::Flags> operator&(E lhs, E rhs) +{ + return Nz::Flags(lhs) & rhs; +} - /*! - * \brief Override binary AND operator on enum to turns into a Flags object. - * \return A Flags object with compare enum states. - * - * \param lhs First enumeration value to compare. - * \param rhs Second enumeration value to compare. - * - * Returns a Flags object with compared states from the two enumeration values. - * In this case, only one flag will be enabled if both enumeration values are the same. - */ - template - constexpr std::enable_if_t::value, Flags> operator&(E lhs, E rhs) - { - return Flags(lhs) & rhs; - } - - /*! - * \brief Override binary XOR operator on enum to turns into a Flags object. - * \return A Flags object with XORed enum states. - * - * \param lhs First enumeration value to compare. - * \param rhs Second enumeration value to compare. - * - * Returns a Flags object with XORed states from the two enumeration values. - * In this case, two flags will be enabled if both the enumeration values are different. - */ - template - constexpr std::enable_if_t::value, Flags> operator^(E lhs, E rhs) - { - return Flags(lhs) ^ rhs; - } +/*! +* \brief Override binary XOR operator on enum to turns into a Flags object. +* \return A Flags object with XORed enum states. +* +* \param lhs First enumeration value to compare. +* \param rhs Second enumeration value to compare. +* +* Returns a Flags object with XORed states from the two enumeration values. +* In this case, two flags will be enabled if both the enumeration values are different. +*/ +template +constexpr std::enable_if_t::value, Nz::Flags> operator^(E lhs, E rhs) +{ + return Nz::Flags(lhs) ^ rhs; } #include From dc158d06a8c8bcc591e19f174b011bf4a0ed1ef4 Mon Sep 17 00:00:00 2001 From: Lynix Date: Fri, 17 Feb 2017 00:21:28 +0100 Subject: [PATCH 2/4] Fix warnings reported by Clang --- src/Nazara/Graphics/DepthRenderTechnique.cpp | 2 +- .../Graphics/ForwardRenderTechnique.cpp | 2 - src/Nazara/Graphics/ParticleGroup.cpp | 8 ++-- src/Nazara/Utility/Image.cpp | 1 - src/Nazara/Utility/IndexBuffer.cpp | 4 +- src/Nazara/Utility/SimpleTextDrawer.cpp | 4 +- src/Nazara/Utility/VertexBuffer.cpp | 4 +- src/Nazara/Utility/X11/CursorImpl.cpp | 40 ++++++++++--------- src/Nazara/Utility/X11/Display.cpp | 6 +-- src/Nazara/Utility/X11/WindowImpl.cpp | 6 +-- src/Nazara/Utility/X11/WindowImpl.hpp | 1 - 11 files changed, 38 insertions(+), 40 deletions(-) diff --git a/src/Nazara/Graphics/DepthRenderTechnique.cpp b/src/Nazara/Graphics/DepthRenderTechnique.cpp index d58975d7f..13f8b30af 100644 --- a/src/Nazara/Graphics/DepthRenderTechnique.cpp +++ b/src/Nazara/Graphics/DepthRenderTechnique.cpp @@ -68,7 +68,7 @@ namespace Nz * \param sceneData Data of the scene */ - void DepthRenderTechnique::Clear(const SceneData& sceneData) const + void DepthRenderTechnique::Clear(const SceneData& /*sceneData*/) const { Renderer::Enable(RendererParameter_DepthBuffer, true); Renderer::Enable(RendererParameter_DepthWrite, true); diff --git a/src/Nazara/Graphics/ForwardRenderTechnique.cpp b/src/Nazara/Graphics/ForwardRenderTechnique.cpp index c0493e74b..543587b3d 100644 --- a/src/Nazara/Graphics/ForwardRenderTechnique.cpp +++ b/src/Nazara/Graphics/ForwardRenderTechnique.cpp @@ -990,7 +990,6 @@ namespace Nz if (uniforms.locations.shadowMapping != -1) shader->SendBoolean(uniforms.locations.shadowMapping + uniformOffset, light.shadowMap != nullptr); - unsigned int textureUnit = Material::GetTextureUnit(static_cast(TextureMap_ShadowCube_1 + index)); if (light.shadowMap) { unsigned int textureUnitCube = Material::GetTextureUnit(static_cast(TextureMap_ShadowCube_1 + index)); @@ -1014,7 +1013,6 @@ namespace Nz if (uniforms.locations.shadowMapping != -1) shader->SendBoolean(uniforms.locations.shadowMapping + uniformOffset, light.shadowMap != nullptr); - unsigned int textureUnit = Material::GetTextureUnit(static_cast(TextureMap_Shadow2D_1 + index)); if (light.shadowMap) { unsigned int textureUnit2D = Material::GetTextureUnit(static_cast(TextureMap_Shadow2D_1 + index)); diff --git a/src/Nazara/Graphics/ParticleGroup.cpp b/src/Nazara/Graphics/ParticleGroup.cpp index 08743a58e..ab9f6568c 100644 --- a/src/Nazara/Graphics/ParticleGroup.cpp +++ b/src/Nazara/Graphics/ParticleGroup.cpp @@ -40,9 +40,9 @@ namespace Nz ParticleGroup::ParticleGroup(unsigned int maxParticleCount, ParticleDeclarationConstRef declaration) : m_declaration(std::move(declaration)), - m_processing(false), m_maxParticleCount(maxParticleCount), - m_particleCount(0) + m_particleCount(0), + m_processing(false) { // In case of error, the constructor can only throw an exception ErrorFlags flags(ErrorFlag_ThrowException, true); @@ -64,10 +64,10 @@ namespace Nz m_generators(system.m_generators), m_declaration(system.m_declaration), m_renderer(system.m_renderer), - m_processing(false), m_maxParticleCount(system.m_maxParticleCount), m_particleCount(system.m_particleCount), - m_particleSize(system.m_particleSize) + m_particleSize(system.m_particleSize), + m_processing(false) { ErrorFlags flags(ErrorFlag_ThrowException, true); diff --git a/src/Nazara/Utility/Image.cpp b/src/Nazara/Utility/Image.cpp index bdfe57007..15d9133fe 100644 --- a/src/Nazara/Utility/Image.cpp +++ b/src/Nazara/Utility/Image.cpp @@ -835,7 +835,6 @@ namespace Nz if (!PixelFormat::IsCompressed(m_sharedImage->format)) { const PixelFormatInfo& info = PixelFormat::GetInfo(m_sharedImage->format); - const UInt8* pixel = GetConstPixels(); Bitset<> workingBitset; std::size_t pixelCount = m_sharedImage->width * m_sharedImage->height * ((m_sharedImage->type == ImageType_Cubemap) ? 6 : m_sharedImage->depth); diff --git a/src/Nazara/Utility/IndexBuffer.cpp b/src/Nazara/Utility/IndexBuffer.cpp index ed49535cd..306fffb7f 100644 --- a/src/Nazara/Utility/IndexBuffer.cpp +++ b/src/Nazara/Utility/IndexBuffer.cpp @@ -35,10 +35,10 @@ namespace Nz IndexBuffer::IndexBuffer(const IndexBuffer& indexBuffer) : RefCounted(), m_buffer(indexBuffer.m_buffer), - m_largeIndices(indexBuffer.m_largeIndices), m_endOffset(indexBuffer.m_endOffset), m_indexCount(indexBuffer.m_indexCount), - m_startOffset(indexBuffer.m_startOffset) + m_startOffset(indexBuffer.m_startOffset), + m_largeIndices(indexBuffer.m_largeIndices) { } diff --git a/src/Nazara/Utility/SimpleTextDrawer.cpp b/src/Nazara/Utility/SimpleTextDrawer.cpp index 1b8c41653..fb153185c 100644 --- a/src/Nazara/Utility/SimpleTextDrawer.cpp +++ b/src/Nazara/Utility/SimpleTextDrawer.cpp @@ -365,12 +365,14 @@ namespace Nz { case '\n': { + // Extend the line bounding rect to the last glyph it contains, thus extending upon all glyphs of the line if (!m_glyphs.empty()) { - Glyph& glyph = m_glyphs.back(); + Glyph& lastGlyph = m_glyphs.back(); m_lines.back().bounds.ExtendTo(glyph.bounds); } + // Reset cursor advance = 0; m_drawPos.x = 0; m_drawPos.y += sizeInfo.lineHeight; diff --git a/src/Nazara/Utility/VertexBuffer.cpp b/src/Nazara/Utility/VertexBuffer.cpp index 371ba2efa..f06d46ed0 100644 --- a/src/Nazara/Utility/VertexBuffer.cpp +++ b/src/Nazara/Utility/VertexBuffer.cpp @@ -31,10 +31,10 @@ namespace Nz VertexBuffer::VertexBuffer(const VertexBuffer& vertexBuffer) : RefCounted(), m_buffer(vertexBuffer.m_buffer), - m_vertexDeclaration(vertexBuffer.m_vertexDeclaration), m_endOffset(vertexBuffer.m_endOffset), m_startOffset(vertexBuffer.m_startOffset), - m_vertexCount(vertexBuffer.m_vertexCount) + m_vertexCount(vertexBuffer.m_vertexCount), + m_vertexDeclaration(vertexBuffer.m_vertexDeclaration) { } diff --git a/src/Nazara/Utility/X11/CursorImpl.cpp b/src/Nazara/Utility/X11/CursorImpl.cpp index 2925b2b6d..94f10629e 100644 --- a/src/Nazara/Utility/X11/CursorImpl.cpp +++ b/src/Nazara/Utility/X11/CursorImpl.cpp @@ -232,25 +232,27 @@ namespace Nz std::array CursorImpl::s_systemCursorIds = { - // http://gnome-look.org/content/preview.php?preview=1&id=128170&file1=128170-1.png&file2=&file3=&name=Dummy+X11+cursors&PHPSESSID=6 - "crosshair", // SystemCursor_Crosshair - "left_ptr", // SystemCursor_Default - "hand", // SystemCursor_Hand - "help", // SystemCursor_Help - "fleur", // SystemCursor_Move - nullptr, // SystemCursor_None - "hand", // SystemCursor_Pointer - "watch", // SystemCursor_Progress - "right_side", // SystemCursor_ResizeE - "top_side", // SystemCursor_ResizeN - "top_right_corner", // SystemCursor_ResizeNE - "top_left_corner", // SystemCursor_ResizeNW - "bottom_side", // SystemCursor_ResizeS - "bottom_right_corner", // SystemCursor_ResizeSE - "bottom_left_corner", // SystemCursor_ResizeSW - "left_side", // SystemCursor_ResizeW - "xterm", // SystemCursor_Text - "watch" // SystemCursor_Wait + { + // http://gnome-look.org/content/preview.php?preview=1&id=128170&file1=128170-1.png&file2=&file3=&name=Dummy+X11+cursors&PHPSESSID=6 + "crosshair", // SystemCursor_Crosshair + "left_ptr", // SystemCursor_Default + "hand", // SystemCursor_Hand + "help", // SystemCursor_Help + "fleur", // SystemCursor_Move + nullptr, // SystemCursor_None + "hand", // SystemCursor_Pointer + "watch", // SystemCursor_Progress + "right_side", // SystemCursor_ResizeE + "top_side", // SystemCursor_ResizeN + "top_right_corner", // SystemCursor_ResizeNE + "top_left_corner", // SystemCursor_ResizeNW + "bottom_side", // SystemCursor_ResizeS + "bottom_right_corner", // SystemCursor_ResizeSE + "bottom_left_corner", // SystemCursor_ResizeSW + "left_side", // SystemCursor_ResizeW + "xterm", // SystemCursor_Text + "watch" // SystemCursor_Wait + } }; static_assert(SystemCursor_Max + 1 == 18, "System cursor array is incomplete"); diff --git a/src/Nazara/Utility/X11/Display.cpp b/src/Nazara/Utility/X11/Display.cpp index 8a9ff719c..1232cea64 100644 --- a/src/Nazara/Utility/X11/Display.cpp +++ b/src/Nazara/Utility/X11/Display.cpp @@ -229,14 +229,14 @@ namespace Nz return screen_nbr; } - xcb_screen_t* X11::XCBScreenOfDisplay(xcb_connection_t* connection, int screen_nbr) + xcb_screen_t* X11::XCBScreenOfDisplay(xcb_connection_t* connection, int screenIndex) { NazaraAssert(connection == sharedConnection, "The model is meant for one connection to X11 server"); xcb_screen_iterator_t iter = xcb_setup_roots_iterator(xcb_get_setup(connection)); - for (; iter.rem; --screen_nbr, xcb_screen_next (&iter)) + for (; iter.rem; --screenIndex, xcb_screen_next (&iter)) { - if (screen_nbr == 0) + if (screenIndex == 0) return iter.data; } diff --git a/src/Nazara/Utility/X11/WindowImpl.cpp b/src/Nazara/Utility/X11/WindowImpl.cpp index d0cf3da59..884244287 100644 --- a/src/Nazara/Utility/X11/WindowImpl.cpp +++ b/src/Nazara/Utility/X11/WindowImpl.cpp @@ -58,7 +58,6 @@ namespace Nz m_style(0), m_parent(parent), m_smoothScrolling(false), - m_scrolling(0), m_mousePos(0, 0), m_keyRepeat(true) { @@ -1134,7 +1133,6 @@ namespace Nz // if (std::isprint(codePoint)) Is not working ? + handle combining ? { - WindowEvent event; event.type = Nz::WindowEventType_TextEntered; event.text.character = codePoint; event.text.repeated = false; @@ -1396,7 +1394,7 @@ namespace Nz hints.functions |= MWM_FUNC_CLOSE; } - ScopedXCB error(xcb_request_check( + ScopedXCB propertyError(xcb_request_check( connection, xcb_change_property_checked( connection, @@ -1410,7 +1408,7 @@ namespace Nz ) )); - if (error) + if (propertyError) NazaraError("xcb_change_property failed, could not set window hints"); } else diff --git a/src/Nazara/Utility/X11/WindowImpl.hpp b/src/Nazara/Utility/X11/WindowImpl.hpp index 8ce44f178..d82ff06cc 100644 --- a/src/Nazara/Utility/X11/WindowImpl.hpp +++ b/src/Nazara/Utility/X11/WindowImpl.hpp @@ -111,7 +111,6 @@ namespace Nz bool m_ownsWindow; bool m_smoothScrolling; bool m_threadActive; - short m_scrolling; Vector2i m_mousePos; bool m_keyRepeat; From a4100d5b4e210f70a105d5cd728584e9f6014f9f Mon Sep 17 00:00:00 2001 From: Lynix Date: Fri, 17 Feb 2017 00:21:40 +0100 Subject: [PATCH 3/4] Utility/X11: Fix crash at startup --- src/Nazara/Utility/X11/CursorImpl.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Nazara/Utility/X11/CursorImpl.cpp b/src/Nazara/Utility/X11/CursorImpl.cpp index 94f10629e..aa59290b3 100644 --- a/src/Nazara/Utility/X11/CursorImpl.cpp +++ b/src/Nazara/Utility/X11/CursorImpl.cpp @@ -164,8 +164,19 @@ namespace Nz ScopedXCBConnection connection; xcb_screen_t* screen = X11::XCBDefaultScreen(connection); - if (xcb_cursor_context_new(connection, screen, &m_cursorContext) >= 0) - m_cursor = xcb_cursor_load_cursor(m_cursorContext, s_systemCursorIds[cursor]); + const char* cursorName = s_systemCursorIds[cursor]; + if (cursorName) + { + if (xcb_cursor_context_new(connection, screen, &m_cursorContext) >= 0) + m_cursor = xcb_cursor_load_cursor(m_cursorContext, cursorName); + else + { + NazaraError("Failed to create cursor context"); + return false; + } + } + else + m_cursor = s_hiddenCursor; return true; } From ee9712fdcdf41fa9a10868bf4f151497ceb16a3d Mon Sep 17 00:00:00 2001 From: Lynix Date: Fri, 17 Feb 2017 00:38:44 +0100 Subject: [PATCH 4/4] Some more warning fixes --- src/Nazara/Renderer/RenderTexture.cpp | 20 +++++++++---------- .../Renderer/UberShaderPreprocessor.cpp | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Nazara/Renderer/RenderTexture.cpp b/src/Nazara/Renderer/RenderTexture.cpp index aa32dd447..8ae1a4bb1 100644 --- a/src/Nazara/Renderer/RenderTexture.cpp +++ b/src/Nazara/Renderer/RenderTexture.cpp @@ -36,7 +36,7 @@ namespace Nz unsigned int width; }; - unsigned int attachmentIndex[AttachmentPoint_Max+1] = + unsigned int s_attachmentIndex[AttachmentPoint_Max+1] = { 3, // AttachmentPoint_Color 0, // AttachmentPoint_Depth @@ -117,7 +117,7 @@ namespace Nz return false; } - unsigned int depthStencilIndex = attachmentIndex[AttachmentPoint_DepthStencil]; + unsigned int depthStencilIndex = s_attachmentIndex[AttachmentPoint_DepthStencil]; if (m_impl->attachments.size() > depthStencilIndex && m_impl->attachments[depthStencilIndex].isUsed) { if (attachmentPoint == AttachmentPoint_Depth) @@ -154,7 +154,7 @@ namespace Nz Unlock(); - unsigned int attachIndex = attachmentIndex[attachmentPoint] + index; + unsigned int attachIndex = s_attachmentIndex[attachmentPoint] + index; if (attachIndex >= m_impl->attachments.size()) m_impl->attachments.resize(attachIndex+1); @@ -223,7 +223,7 @@ namespace Nz return false; } - unsigned int depthStencilIndex = attachmentIndex[AttachmentPoint_DepthStencil]; + unsigned int depthStencilIndex = s_attachmentIndex[AttachmentPoint_DepthStencil]; if (attachmentPoint == AttachmentPoint_Depth && m_impl->attachments.size() > depthStencilIndex && m_impl->attachments[depthStencilIndex].isUsed) { @@ -288,7 +288,7 @@ namespace Nz Unlock(); - unsigned int attachIndex = attachmentIndex[attachmentPoint] + index; + unsigned int attachIndex = s_attachmentIndex[attachmentPoint] + index; if (attachIndex >= m_impl->attachments.size()) m_impl->attachments.resize(attachIndex+1); @@ -394,7 +394,7 @@ namespace Nz } #endif - unsigned int attachIndex = attachmentIndex[attachmentPoint] + index; + unsigned int attachIndex = s_attachmentIndex[attachmentPoint] + index; if (attachIndex >= m_impl->attachments.size()) return; @@ -575,7 +575,7 @@ namespace Nz #if NAZARA_RENDERER_SAFE for (unsigned int i = 0; i < targetCount; ++i) { - unsigned int index = attachmentIndex[AttachmentPoint_Color] + targets[i]; + unsigned int index = s_attachmentIndex[AttachmentPoint_Color] + targets[i]; if (index >= m_impl->attachments.size() || !m_impl->attachments[index].isUsed) { NazaraError("Target " + String::Number(targets[i]) + " not attached"); @@ -598,7 +598,7 @@ namespace Nz #if NAZARA_RENDERER_SAFE for (UInt8 target : targets) { - unsigned int index = attachmentIndex[AttachmentPoint_Color] + target; + unsigned int index = s_attachmentIndex[AttachmentPoint_Color] + target; if (index >= m_impl->attachments.size() || !m_impl->attachments[index].isUsed) { NazaraError("Target " + String::Number(target) + " not attached"); @@ -752,7 +752,7 @@ namespace Nz for (UInt8 index : m_impl->colorTargets) { - Attachment& attachment = m_impl->attachments[attachmentIndex[AttachmentPoint_Color] + index]; + Attachment& attachment = m_impl->attachments[s_attachmentIndex[AttachmentPoint_Color] + index]; if (!attachment.isBuffer) attachment.texture->InvalidateMipmaps(); } @@ -833,7 +833,7 @@ namespace Nz m_impl->colorTargets.clear(); unsigned int colorIndex = 0; - for (unsigned int index = attachmentIndex[AttachmentPoint_Color]; index < m_impl->attachments.size(); ++index) + for (unsigned int index = s_attachmentIndex[AttachmentPoint_Color]; index < m_impl->attachments.size(); ++index) m_impl->colorTargets.push_back(colorIndex++); } diff --git a/src/Nazara/Renderer/UberShaderPreprocessor.cpp b/src/Nazara/Renderer/UberShaderPreprocessor.cpp index 6f838d6cf..b6d524645 100644 --- a/src/Nazara/Renderer/UberShaderPreprocessor.cpp +++ b/src/Nazara/Renderer/UberShaderPreprocessor.cpp @@ -93,7 +93,7 @@ namespace Nz } catch (const std::exception&) { - ErrorFlags errFlags(ErrorFlag_ThrowExceptionDisabled); + ErrorFlags errFlags2(ErrorFlag_ThrowExceptionDisabled); NazaraError("Shader code failed to compile (" + stage.GetLog() + ")\n" + code.ToString()); throw;