summaryrefslogtreecommitdiff
path: root/indra/newview/tests/llviewershadermgr_stub.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/tests/llviewershadermgr_stub.cpp')
-rw-r--r--indra/newview/tests/llviewershadermgr_stub.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/tests/llviewershadermgr_stub.cpp b/indra/newview/tests/llviewershadermgr_stub.cpp
new file mode 100644
index 0000000000..0dae527035
--- /dev/null
+++ b/indra/newview/tests/llviewershadermgr_stub.cpp
@@ -0,0 +1,33 @@
+/**
+ * @file llglslshader_stub.cpp
+ * @brief stub class to allow unit testing
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#include "../llviewershadermgr.h"
+
+LLShaderMgr::LLShaderMgr() {}
+LLShaderMgr::~LLShaderMgr() {}
+
+LLViewerShaderMgr::LLViewerShaderMgr() {}
+LLViewerShaderMgr::~LLViewerShaderMgr() {}
+
+LLViewerShaderMgr* stub_instance = NULL;
+
+LLViewerShaderMgr* LLViewerShaderMgr::instance() {
+ if(NULL == stub_instance)
+ {
+ stub_instance = new LLViewerShaderMgr();
+ }
+
+ return stub_instance;
+}
+LLViewerShaderMgr::shader_iter fake_iter;
+LLViewerShaderMgr::shader_iter LLViewerShaderMgr::beginShaders() const {return fake_iter;}
+LLViewerShaderMgr::shader_iter LLViewerShaderMgr::endShaders() const {return fake_iter;}
+
+void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader* shader) {return;}
+std::string LLViewerShaderMgr::getShaderDirPrefix() {return "SHADER_DIR_PREFIX-";}