]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/programstate.h
Basic tracking and inspection of shaders and programs
[gldbg.git] / flavors / gl / source / programstate.h
diff --git a/flavors/gl/source/programstate.h b/flavors/gl/source/programstate.h
new file mode 100644 (file)
index 0000000..b255291
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef PROGRAMSTATE_H_
+#define PROGRAMSTATE_H_
+
+#include <string>
+#include <vector>
+#include "opengl.h"
+
+struct ShaderState
+{
+       unsigned id;
+       GLenum type;
+       std::vector<std::string> source;
+       bool source_changed;
+       bool compile_status;
+       std::string info_log;
+       bool pending_delete;
+
+       ShaderState();
+
+       std::string describe() const;
+};
+
+struct ProgramState
+{
+       unsigned id;
+       std::vector<ShaderState *> shaders;
+       bool shaders_changed;
+       bool link_status;
+       std::string info_log;
+
+       ProgramState();
+
+       std::string describe() const;
+};
+
+#endif