]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/programstate.cpp
Basic tracking and inspection of shaders and programs
[gldbg.git] / flavors / gl / source / programstate.cpp
diff --git a/flavors/gl/source/programstate.cpp b/flavors/gl/source/programstate.cpp
new file mode 100644 (file)
index 0000000..f0614c4
--- /dev/null
@@ -0,0 +1,29 @@
+#include "enums.h"
+#include "programstate.h"
+#include "strformat.h"
+
+using namespace std;
+
+ShaderState::ShaderState():
+       id(0),
+       source_changed(false),
+       compile_status(false),
+       pending_delete(false)
+{ }
+
+string ShaderState::describe() const
+{
+       return describe_enum(type, "");
+}
+
+
+ProgramState::ProgramState():
+       id(0),
+       shaders_changed(false),
+       link_status(false)
+{ }
+
+string ProgramState::describe() const
+{
+       return strformat("%d shaders", shaders.size());
+}