mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-13 21:02:34 +08:00
chore: more debug info for the pretty printer
This commit is contained in:
parent
b67021fae8
commit
8adeefad9c
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user