Problem when i switch from OF_WINDOW to OF_FULLSCREEN

Last week i move from Leopard to Snow Leopard and from 0.06 to 0.07 (clone from git). Everything is better except one issue.
When i switch from OF_WINDOW to OF_FULLSCREEN i have a glitch effect (i don’t know i say it ok).
The buffer has the same size with my screen:

  
ofSetupOpenGL(&window, 1440, 900, OF_WINDOW);  

I switch screen mode with following code:

  
	if(key == 'f' or key == 'F'){  
		int previousWindowX, previousWindowY;    
		  
		if(ofGetWindowMode() == 0){    
			ofSetFullscreen(true);  
		}else{    
			ofSetFullscreen(false);  
		}    
	}  

I upload a video (http://www.youtube.com/watch?v=MsrjRXcP3es&feature=youtu.be)
but is not very clear the glitch effect.
I also upload and a screenshot

Any suggestions?

Thanks a lot

Aris

do you have ofSetBackgroundAuto(false)?

this sort of thing can happen when the graphics card allocates new memory without clearing it.

you could try calling ofBackground() right after you switch modes.

Hi Kyle and thanks for your fast report,

Yes, i have ofSetBackgroundAuto(false) (is very important for my performances).

I change the code to:

  
	if(key == 'v' or key == 'V'){  
		int previousWindowX, previousWindowY;    
		  
		if(ofGetWindowMode() == 0){    
  
			ofSetFullscreen(true);  
			ofBackground(0, 0, 0);  
		}else{    
			ofSetFullscreen(false);  
			ofBackground(0, 0, 0);  
		}    
	}  

But i still have the same problem.

P.S. How amazing can be open source community? Special thanks for your time.

I have the same problem and with other applications.
The code is here if you want to checkout is here: https://github.com/igoumeninja/ofSpectrograph/tree/master/ofCode and here: https://github.com/igoumeninja/Joda/tree/lyon.
I am drawing when recieving an OSC message. I am sending a thousands message from SuperColider. Is it a problem with that?
The only i can not understand, is why this happen with the new version oF and Snow Leopard and not before with 0.006 and Leopard.

I have to mention that at my last tries, sometimes i have the same effect and at OF_WINDOW mode.
What happens?

hmm if ofBackground() didn’t fix the problem you’re having, i think i might be misunderstanding the problem.

could you explain again what exactly the problem is?

is it that there is glitchy-noise when you switch modes? or is it that there is flickering? or is it that things show up in the wrong place?

if flickering is a problem, there is a change you can make deep inside OF:

1 open ofAppGlutWindow.cpp
2 search replace GLUT_DOUBLE with GLUT_SINGLE
3 search replace glutSwapBuffers with glutFlush

this will help with ofSetBackgroundAuto(false), but it will make ofSetBackgroundAuto(true) look bad.

Respect!
Thanks a lot. It works like a charm. Finally you recognize it without see it. It was a flickering (my Engilsh are not so good).

So, special thanks Kyle. If you come to Greece i 'll buy you a drink.