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
16#include "AbstractViewStateInterface.h"16#include "AbstractViewStateInterface.h"
17#include "RenderUtilsLogging.h"17#include "RenderUtilsLogging.h"
18#include "DebugDraw.h"18#include "DebugDraw.h"
19#include "StencilMaskPass.h"
19 20
20#include "animdebugdraw_vert.h"21#include "animdebugdraw_vert.h"
21#include "animdebugdraw_frag.h"22#include "animdebugdraw_frag.h"
@@ -70,7 +71,7 @@ public: · 48 unmodified lines
70typedef render::Payload<AnimDebugDrawData> AnimDebugDrawPayload;71typedef render::Payload<AnimDebugDrawData> AnimDebugDrawPayload;
71 72
72namespace render {73namespace 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); }
74 template <> const Item::Bound payloadGetBound(const AnimDebugDrawData::Pointer& data) { return data->_bound; }75 template <> const Item::Bound payloadGetBound(const AnimDebugDrawData::Pointer& data) { return data->_bound; }
75 template <> void payloadRender(const AnimDebugDrawData::Pointer& data, RenderArgs* args) {76 template <> void payloadRender(const AnimDebugDrawData::Pointer& data, RenderArgs* args) {
76 data->render(args);77 data->render(args);
@@ -104,6 +105,7 @@ AnimDebugDraw::AnimDebugDraw() : · 27 unmodified lines
104 state->setBlendFunction(false, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD,105 state->setBlendFunction(false, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD,
105 gpu::State::INV_SRC_ALPHA, gpu::State::FACTOR_ALPHA,106 gpu::State::INV_SRC_ALPHA, gpu::State::FACTOR_ALPHA,
106 gpu::State::BLEND_OP_ADD, gpu::State::ONE);107 gpu::State::BLEND_OP_ADD, gpu::State::ONE);
108 PrepareStencil::testMaskDrawShape(*state.get());
107 auto vertShader = animdebugdraw_vert::getShader();109 auto vertShader = animdebugdraw_vert::getShader();
108 auto fragShader = animdebugdraw_frag::getShader();110 auto fragShader = animdebugdraw_frag::getShader();
109 auto program = gpu::Shader::createProgram(vertShader, fragShader);111 auto program = gpu::Shader::createProgram(vertShader, fragShader);