diff --git a/specter/include/specter/TextView.hpp b/specter/include/specter/TextView.hpp index 241bae304..a92249dfa 100644 --- a/specter/include/specter/TextView.hpp +++ b/specter/include/specter/TextView.hpp @@ -28,6 +28,22 @@ public: zeus::CMatrix4f m_mv; zeus::CVector3f m_uv[4]; zeus::CColor m_color; + char _dummy[48]; + + RenderGlyph& operator=(const RenderGlyph& other) + { + m_pos[0] = other.m_pos[0]; + m_pos[1] = other.m_pos[1]; + m_pos[2] = other.m_pos[2]; + m_pos[3] = other.m_pos[3]; + m_mv = other.m_mv; + m_uv[0] = other.m_uv[0]; + m_uv[1] = other.m_uv[1]; + m_uv[2] = other.m_uv[2]; + m_uv[3] = other.m_uv[3]; + m_color = other.m_color; + return *this; + } RenderGlyph(int& adv, const FontAtlas::Glyph& glyph, const zeus::CColor& defaultColor); }; diff --git a/specter/lib/RootView.cpp b/specter/lib/RootView.cpp index e53f42e7f..853db43f0 100644 --- a/specter/lib/RootView.cpp +++ b/specter/lib/RootView.cpp @@ -16,7 +16,7 @@ RootView::RootView(IViewManager& viewMan, ViewResources& res, boo::IWindow* wind { buildResources(ctx, res); m_splitMenuSystem.emplace(*this, ctx); - m_renderTex = ctx.newRenderTexture(rect.size[0], rect.size[1], true, false); + m_renderTex = ctx.newRenderTexture(rect.size[0], rect.size[1], 1, 2); return true; }); resized(rect, rect); diff --git a/specter/lib/TextView.cpp b/specter/lib/TextView.cpp index b6c14d48d..1105fc450 100644 --- a/specter/lib/TextView.cpp +++ b/specter/lib/TextView.cpp @@ -77,12 +77,12 @@ void TextView::Resources::init(boo::GLDataFactory::Context& ctx, FontCache* fcac m_regular = ctx.newShaderPipeline(GLSLVS, GLSLFSReg, 1, TexNames, 1, BlockNames, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); m_subpixel = ctx.newShaderPipeline(GLSLVS, GLSLFSSubpixel, 1, TexNames, 1, BlockNames, boo::BlendFactor::SrcColor1, boo::BlendFactor::InvSrcColor1, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None); } #if _WIN32 @@ -174,12 +174,12 @@ void TextView::Resources::init(boo::ID3DDataFactory::Context& ctx, FontCache* fc m_regular = ctx.newShaderPipeline(VS, FSReg, nullptr, nullptr, nullptr, m_vtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, boo::CullMode::None); m_subpixel = ctx.newShaderPipeline(VS, FSSubpixel, nullptr, nullptr, nullptr, m_vtxFmt, boo::BlendFactor::SrcColor1, boo::BlendFactor::InvSrcColor1, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, boo::CullMode::None); } #endif @@ -256,7 +256,7 @@ void TextView::Resources::init(boo::MetalDataFactory::Context& ctx, FontCache* f m_regular = ctx.newShaderPipeline(VS, FSReg, m_vtxFmt, 1, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None); } #endif @@ -287,7 +287,7 @@ void TextView::Resources::init(boo::VulkanDataFactory::Context& ctx, FontCache* m_regular = ctx.newShaderPipeline(GLSLVS, GLSLFSReg, m_vtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, boo::CullMode::None); } #endif @@ -338,14 +338,14 @@ void TextView::_commitResources(size_t capacity) m_shaderBinding = ctx.newShaderDataBinding(shader, m_vtxFmt, nullptr, vBufInfo.first, nullptr, 1, uBufs, nullptr, uBufOffs, uBufSizes, - 1, texs, 0, vBufInfo.second); + 1, texs, nullptr, nullptr, 0, vBufInfo.second); } else { m_shaderBinding = ctx.newShaderDataBinding(shader, res.m_textRes.m_vtxFmt, nullptr, vBufInfo.first, nullptr, 1, uBufs, nullptr, uBufOffs, uBufSizes, - 1, texs, 0, vBufInfo.second); + 1, texs, nullptr, nullptr, 0, vBufInfo.second); } } return true; diff --git a/specter/lib/View.cpp b/specter/lib/View.cpp index b15b8bf48..bdae2ae71 100644 --- a/specter/lib/View.cpp +++ b/specter/lib/View.cpp @@ -81,11 +81,13 @@ void View::Resources::init(boo::GLDataFactory::Context& ctx, const IThemeData& t { m_solidShader = ctx.newShaderPipeline(GLSLSolidVS, GLSLSolidFS, 0, nullptr, 1, BlockNames, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, + boo::CullMode::None); m_texShader = ctx.newShaderPipeline(GLSLTexVS, GLSLTexFS, 1, TexNames, 1, BlockNames, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, + boo::CullMode::None); } #if _WIN32 @@ -270,7 +272,7 @@ void View::Resources::init(boo::MetalDataFactory::Context& ctx, const IThemeData m_solidShader = ctx.newShaderPipeline(SolidVS, SolidFS, m_solidVtxFmt, 1, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None); boo::VertexElementDescriptor texvdescs[] = { @@ -281,7 +283,7 @@ void View::Resources::init(boo::MetalDataFactory::Context& ctx, const IThemeData m_texShader = ctx.newShaderPipeline(TexVS, TexFS, m_texVtxFmt, 1, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, - boo::Primitive::TriStrips, false, false, boo::CullMode::None); + boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None); } #endif @@ -402,7 +404,7 @@ void View::VertexBufferBindingSolid::init(boo::IGraphicsDataFactory::Context& ct m_shaderBinding = ctx.newShaderDataBinding(res.m_viewRes.m_solidShader, m_vtxFmt, vBufInfo.first, nullptr, nullptr, 1, bufs, nullptr, bufOffs, - bufSizes, 0, nullptr, vBufInfo.second); + bufSizes, 0, nullptr, nullptr, nullptr, vBufInfo.second); } else { @@ -410,7 +412,7 @@ void View::VertexBufferBindingSolid::init(boo::IGraphicsDataFactory::Context& ct res.m_viewRes.m_solidVtxFmt, vBufInfo.first, nullptr, nullptr, 1, bufs, nullptr, bufOffs, - bufSizes, 0, nullptr, vBufInfo.second); + bufSizes, 0, nullptr, nullptr, nullptr, vBufInfo.second); } } @@ -439,7 +441,7 @@ void View::VertexBufferBindingTex::init(boo::IGraphicsDataFactory::Context& ctx, m_shaderBinding = ctx.newShaderDataBinding(res.m_viewRes.m_texShader, m_vtxFmt, vBufInfo.first, nullptr, nullptr, 1, bufs, nullptr, bufOffs, - bufSizes, 1, tex, vBufInfo.second); + bufSizes, 1, tex, nullptr, nullptr, vBufInfo.second); } else { @@ -447,7 +449,7 @@ void View::VertexBufferBindingTex::init(boo::IGraphicsDataFactory::Context& ctx, res.m_viewRes.m_texVtxFmt, vBufInfo.first, nullptr, nullptr, 1, bufs, nullptr, bufOffs, - bufSizes, 1, tex, vBufInfo.second); + bufSizes, 1, tex, nullptr, nullptr, vBufInfo.second); } } diff --git a/specter/zeus b/specter/zeus index 5e008737e..f1e3db1c5 160000 --- a/specter/zeus +++ b/specter/zeus @@ -1 +1 @@ -Subproject commit 5e008737e0a5bfaa84ddf422e2feb5ac3b2537e2 +Subproject commit f1e3db1c504ccdc7fc5ab62d9b64e1ff6692087a