History

Debug Draw rendering now is visible on background skybox

Anthony J. Thibault committed 8 years ago

Commit 21361341 parent 2cae2941 file · +3 −1Browse files

Showing the changes to libraries/render-utils/src/AnimDebugDraw.cpp (1 of 1 file). Show all

Unified · Split

libraries/render-utils/src/AnimDebugDraw.cpp+3−1
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 #include "AbstractViewStateInterface.h"
1717 #include "RenderUtilsLogging.h"
1818 #include "DebugDraw.h"
19+#include "StencilMaskPass.h"
1920
2021 #include "animdebugdraw_vert.h"
2122 #include "animdebugdraw_frag.h"
@@ -70,7 +71,7 @@ public: · 48 unmodified lines
7071 typedef render::Payload<AnimDebugDrawData> AnimDebugDrawPayload;
7172
7273 namespace render {
73− template <> const ItemKey payloadGetKey(const AnimDebugDrawData::Pointer& data) { return (data->_isVisible ? ItemKey::Builder::opaqueShape() : ItemKey::Builder::opaqueShape().withInvisible()).withTagBits(ItemKey::TAG_BITS_ALL); }
74+ template <> const ItemKey payloadGetKey(const AnimDebugDrawData::Pointer& data) { return (data->_isVisible ? ItemKey::Builder::transparentShape() : ItemKey::Builder::transparentShape().withInvisible()).withTagBits(ItemKey::TAG_BITS_ALL); }
7475 template <> const Item::Bound payloadGetBound(const AnimDebugDrawData::Pointer& data) { return data->_bound; }
7576 template <> void payloadRender(const AnimDebugDrawData::Pointer& data, RenderArgs* args) {
7677 data->render(args);
@@ -104,6 +105,7 @@ AnimDebugDraw::AnimDebugDraw() : · 27 unmodified lines
104105 state->setBlendFunction(false, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD,
105106 gpu::State::INV_SRC_ALPHA, gpu::State::FACTOR_ALPHA,
106107 gpu::State::BLEND_OP_ADD, gpu::State::ONE);
108+ PrepareStencil::testMaskDrawShape(*state.get());
107109 auto vertShader = animdebugdraw_vert::getShader();
108110 auto fragShader = animdebugdraw_frag::getShader();
109111 auto program = gpu::Shader::createProgram(vertShader, fragShader);