From 0ba1235d350a3136bdfd8691907cf024fd581bc8 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 31 Jan 2019 00:05:23 +0100 Subject: [PATCH] ShaderGenerator: print out generated shader in spam output mode --- panda/src/pgraphnodes/shaderGenerator.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index 77575371dd..7198024648 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -1684,6 +1684,11 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { } text << "}\n"; + if (pgraphnodes_cat.is_spam()) { + pgraphnodes_cat.spam() << "Generated shader:\n" + << text.str() << "\n"; + } + // Insert the shader into the shader attrib. PT(Shader) shader = Shader::make(text.str(), Shader::SL_Cg); nassertr(shader != nullptr, nullptr);