diff --git a/of/Active Tripod/bin/Active_Tripod.lib b/of/Active Tripod/bin/Active_Tripod.lib
index c0eb44e..e5bbfb7 100644
Binary files a/of/Active Tripod/bin/Active_Tripod.lib and b/of/Active Tripod/bin/Active_Tripod.lib differ
diff --git a/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml b/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml
index 09efc90..1ec4460 100644
--- a/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml
+++ b/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml
@@ -1,3 +1,13 @@
+
+ 2
+ Toggle Video Visibility
+ 1
+
+
+ 2
+ Toggle Image Visibility
+ 0
+
4
Brightness
diff --git a/of/Active Tripod/bin/data/GUI/SIMULATIONguiPagesettings.xml b/of/Active Tripod/bin/data/GUI/SIMULATIONguiPagesettings.xml
index 1908c35..65a6ee7 100644
--- a/of/Active Tripod/bin/data/GUI/SIMULATIONguiPagesettings.xml
+++ b/of/Active Tripod/bin/data/GUI/SIMULATIONguiPagesettings.xml
@@ -1,7 +1,7 @@
2
Toggle Data Simulation
- 0
+ 1
4
diff --git a/of/Active Tripod/src/gui/GUI.cpp b/of/Active Tripod/src/gui/GUI.cpp
index 6529621..36e66f0 100644
--- a/of/Active Tripod/src/gui/GUI.cpp
+++ b/of/Active Tripod/src/gui/GUI.cpp
@@ -139,6 +139,9 @@ void GUI::addBackgroundGUI()
string title = "BACKGROUND";
ofxUICanvas* gui = getNewGUI(title);
+ gui->addToggle("Toggle Video Visibility", &app->scene.isVideoVisible, toggleDim, toggleDim);
+ gui->addToggle("Toggle Image Visibility", &app->scene.isImageVisible, toggleDim, toggleDim);
+
gui->addLabel("VIDEO IMAGE SETTINGS");
gui->addSlider("Brightness", 0, 2, &app->scene.brightness, length, dim);
gui->addSlider("Contrast", 0, 2, &app->scene.contrast, length, dim);
diff --git a/of/Active Tripod/src/visual/Scene.cpp b/of/Active Tripod/src/visual/Scene.cpp
index 797d841..ed637b0 100644
--- a/of/Active Tripod/src/visual/Scene.cpp
+++ b/of/Active Tripod/src/visual/Scene.cpp
@@ -11,6 +11,9 @@
void Scene::setup()
{
+ vidGrabber.initGrabber(1280, 720);
+ vidGrabber.setDesiredFrameRate(30);
+
bgImg.loadImage("images/tanks.jpg");
rgbShader.load("shaders/RGBShader");
barGraph.setup();
@@ -25,6 +28,8 @@ void Scene::setup()
void Scene::update()
{
+ vidGrabber.update();
+
activeGraph->update();
text.setLineLength(lineLength);
@@ -54,7 +59,10 @@ void Scene::drawVideo()
rgbShader.setUniform1f("blue", blue);
rgbShader.setUniform1f("alpha", alpha);
- bgImg.draw(0, 0, ofGetWidth(), ofGetHeight());
+ if (isVideoVisible)
+ vidGrabber.draw(0, 0, ofGetWidth(), ofGetHeight());
+ if (isImageVisible)
+ bgImg.draw(0, 0, ofGetWidth(), ofGetHeight());
rgbShader.end();
}
diff --git a/of/Active Tripod/src/visual/Scene.h b/of/Active Tripod/src/visual/Scene.h
index c403f00..b1cc87e 100644
--- a/of/Active Tripod/src/visual/Scene.h
+++ b/of/Active Tripod/src/visual/Scene.h
@@ -32,6 +32,7 @@ public:
BarGraph barGraph;
BodyGraph bodyGraph;
ofShader rgbShader;
+ ofVideoGrabber vidGrabber;
ofImage bgImg;
ofxFTGLSimpleLayout text;
@@ -47,6 +48,8 @@ public:
float green;
float blue;
float alpha;
+ bool isVideoVisible;
+ bool isImageVisible;
// HUD background vars
float hudColour[4];