Skip to content

Commit 939f054

Browse files
committed
small fixes
1 parent 1b34dcf commit 939f054

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/objects/computer_vision/BackgroundSubtraction.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ BackgroundSubtraction::BackgroundSubtraction() : PatchObject("background subtrac
5151

5252
this->initInletsState();
5353

54-
resetTextures(320,240);
55-
5654
bgSubTech = 0; // 0 abs, 1 lighter than, 2 darker than
5755

5856
posX = posY = drawW = drawH = 0.0f;
@@ -101,6 +99,8 @@ void BackgroundSubtraction::newObject(){
10199
void BackgroundSubtraction::setupObjectContent(shared_ptr<ofAppGLFWWindow> &mainWindow){
102100
unusedArgs(mainWindow);
103101

102+
resetTextures(320,240);
103+
104104
bgSubTechVector.push_back("B&W ABS");
105105
bgSubTechVector.push_back("LIGHTER THAN");
106106
bgSubTechVector.push_back("DARKER THAN");
@@ -109,6 +109,7 @@ void BackgroundSubtraction::setupObjectContent(shared_ptr<ofAppGLFWWindow> &main
109109

110110
//--------------------------------------------------------------
111111
void BackgroundSubtraction::updateObjectContent(map<int,shared_ptr<PatchObject>> &patchObjects){
112+
unusedArgs(patchObjects);
112113

113114
// External background reset (BANG)
114115
if(this->inletsConnected[1] && *(float *)&_inletParams[1] == 1.0f){
@@ -132,6 +133,7 @@ void BackgroundSubtraction::updateObjectContent(map<int,shared_ptr<PatchObject>>
132133

133134
//--------------------------------------------------------------
134135
void BackgroundSubtraction::drawObjectContent(ofTrueTypeFont *font, shared_ptr<ofBaseGLRenderer>& glRenderer){
136+
unusedArgs(font,glRenderer);
135137

136138
// UPDATE STUFF
137139
if(this->inletsConnected[0] && static_cast<ofTexture *>(_inletParams[0])->isAllocated()){

src/objects/windowing/OutputWindow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ void OutputWindow::updateObjectContent(map<int,shared_ptr<PatchObject>> &patchOb
267267
window->setWindowPosition(this->getCustomVar("OUTPUT_POSX"),this->getCustomVar("OUTPUT_POSY"));
268268
toggleWindowFullscreen();
269269
}
270+
271+
needReset = true;
270272
}
271273

272274
// auto remove
@@ -492,6 +494,8 @@ void OutputWindow::drawObjectNodeConfig(){
492494
void OutputWindow::removeObjectContent(bool removeFileFromData){
493495
unusedArgs(removeFileFromData);
494496

497+
ofRemoveListener(window->events().draw,this,&OutputWindow::drawInWindow);
498+
495499
if(window->getGLFWWindow() != nullptr){
496500
window->setWindowShouldClose();
497501
}

0 commit comments

Comments
 (0)