chore: more debug info for the pretty printer

This commit is contained in:
Almamu 2025-04-16 17:14:10 +02:00
parent b67021fae8
commit 8adeefad9c
3 changed files with 35 additions and 2 deletions

View File

@ -219,6 +219,34 @@ void CPrettyPrinter::printPass (const CPass& pass, int passId) {
this->decreaseIndentation ();
}
const auto fragmentTextures = pass.getShader ()->getFragmentTextures();
if (fragmentTextures.size () > 0) {
this->m_out << "Fragment textures " << fragmentTextures.size () << ":";
this->increaseIndentation ();
for (const auto& texture : fragmentTextures) {
this->m_out << texture.first << ": " << texture.second;
this->lineEnd ();
}
this->decreaseIndentation ();
}
const auto vertexTextures = pass.getShader ()->getVertexTextures ();
if (vertexTextures.size () > 0) {
this->m_out << "Vertex textures " << textures.size () << ":";
this->increaseIndentation ();
for (const auto& texture : vertexTextures) {
this->m_out << texture.first << ": " << texture.second;
this->lineEnd ();
}
this->decreaseIndentation ();
}
const auto combos = base->getCombos();
if (combos.size () > 0) {

View File

@ -314,6 +314,10 @@ const Core::Objects::Images::Materials::CPass* CPass::getPass () const {
return this->m_pass;
}
Render::Shaders::CShader* CPass::getShader () const {
return this->m_shader;
}
GLuint CPass::compileShader (const char* shader, GLuint type) {
// reserve shaders in OpenGL
const GLuint shaderID = glCreateShader (type);

View File

@ -35,10 +35,11 @@ class CPass final : public Helpers::CContextAware {
void setModelMatrix (const glm::mat4* model);
void setViewProjectionMatrix (const glm::mat4* viewProjection);
void setBlendingMode (std::string blendingmode);
const std::string& getBlendingMode () const;
[[nodiscard]] const std::string& getBlendingMode () const;
[[nodiscard]] const CMaterial* getMaterial () const;
const Core::Objects::Images::Materials::CPass* getPass () const;
[[nodiscard]] const Core::Objects::Images::Materials::CPass* getPass () const;
[[nodiscard]] Render::Shaders::CShader* getShader () const;
private:
enum UniformType {