Skip to content

Commit 208beb0

Browse files
committed
toggle for drawing cube map.
1 parent 98a843f commit 208beb0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/3d/ofxAssimpAdvancedExample/src/ofApp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ void ofApp::setup(){
1616
gui.add(wizardHandOffset.set("WizardHandOffset", glm::vec3(10.0, 12, 38), glm::vec3(-200), glm::vec3(200)));
1717
gui.add(mBEnableCubeMap.set("EnableCubeMap", true));
1818
gui.add(cubeMapExposure.set("CubeMapExposure", 0.25, 0.0, 1.0));
19+
gui.add(mBDrawCubeMap.set("DrawCubeMap", false ));
1920

2021
ofx::assimp::ImportSettings tsettings;
2122
tsettings.filePath = "ofLogoHollow.fbx";
@@ -110,6 +111,7 @@ void ofApp::setup(){
110111
cam.setPosition( 0, 400, 1000 );
111112
cam.lookAt( glm::vec3(0,150,0) );
112113

114+
// cube maps still have an effect on the final output even if an image is not loaded.
113115
// https://polyhaven.com/a/kloppenheim_06_puresky
114116
cubeMap.load( "kloppenheim_06_puresky_1k.hdr", 512 );
115117
}
@@ -195,7 +197,7 @@ void ofApp::draw(){
195197

196198

197199
cam.begin();
198-
if(mBEnableCubeMap) {
200+
if(mBDrawCubeMap) {
199201
cubeMap.draw();
200202
}
201203
renderScene();

examples/3d/ofxAssimpAdvancedExample/src/ofApp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ofApp : public ofBaseApp{
4444
ofCubeMap cubeMap;
4545
ofParameter<float> cubeMapExposure;
4646
ofParameter<bool> mBDebug;
47-
ofParameter<bool> mBEnableCubeMap;
47+
ofParameter<bool> mBEnableCubeMap, mBDrawCubeMap;
4848

4949
ofParameterGroup mShadowParams;
5050
ofParameter<float> mShadowStrength;

0 commit comments

Comments
 (0)