History

Fixed compilation with new shader system

Olivier Prat committed 8 years ago

Commit 49549ce1 parent 3911ce531 files · +292 −300Browse files

Showing the changes to libraries/render-utils/src/DebugDeferredBuffer.cpp (1 of 31 files). Show all

Unified · Split

libraries/render-utils/src/DebugDeferredBuffer.cpp+2−3
@@ -369,8 +369,7 @@ bool DebugDeferredBuffer::pipelineNeedsUpdate(Mode mode, std::string customFile) · 368 unmodified lines
369369
370370 const gpu::PipelinePointer& DebugDeferredBuffer::getPipeline(Mode mode, std::string customFile) {
371371 if (pipelineNeedsUpdate(mode, customFile)) {
372− static const std::string VERTEX_SHADER { debug_deferred_buffer_vert };
373− static const std::string FRAGMENT_SHADER { debug_deferred_buffer_frag };
372+ static const std::string FRAGMENT_SHADER { debug_deferred_buffer_frag::getSource() };
374373 static const std::string SOURCE_PLACEHOLDER { "//SOURCE_PLACEHOLDER" };
375374 static const auto SOURCE_PLACEHOLDER_INDEX = FRAGMENT_SHADER.find(SOURCE_PLACEHOLDER);
376375 Q_ASSERT_X(SOURCE_PLACEHOLDER_INDEX != std::string::npos, Q_FUNC_INFO,
@@ -380,7 +379,7 @@ const gpu::PipelinePointer& DebugDeferredBuffer::getPipeline(Mode mode, std::str · 3 unmodified lines
380379 bakedFragmentShader.replace(SOURCE_PLACEHOLDER_INDEX, SOURCE_PLACEHOLDER.size(),
381380 getShaderSourceCode(mode, customFile));
382381
383− static const auto vs = gpu::Shader::createVertex(VERTEX_SHADER);
382+ const auto vs = debug_deferred_buffer_vert::getShader();
384383 const auto ps = gpu::Shader::createPixel(bakedFragmentShader);
385384 const auto program = gpu::Shader::createProgram(vs, ps);
386385