2D, Buttons and textures get blurry upon resize

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
yellowfever13
Posts: 34
Joined: Thu Aug 17, 2006 10:32 pm

2D, Buttons and textures get blurry upon resize

Post by yellowfever13 »

I have an irrlicht engine running inside a windows form. I catch the resize and send it to irrlicht and call onresize. The aspect ratio stays correct as it should, but buttons and textures get blurry for no reason. They are being displayed the same size still as they should, but get blurry.

Any ideas on this? When I return the parent window back to original resolution, the buttons and textures are sharp again.

Need advice on this!

Thanks guys, Irrlicht has one of the best forums around for helping people.
Fashizzle
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There's a bug in the OpenGL driver in SVN/trunk, however I cannot tell from here if you use that version, or the stable SDK. And which driver are you using? Is it reproducible with example 05 (when setting the window to resizable)?
yellowfever13
Posts: 34
Joined: Thu Aug 17, 2006 10:32 pm

fixed it

Post by yellowfever13 »

Well it wasnt reproducable, I guess its unique to forms? I noticed that the problem didnt happen if the form was first created at maximum resolution. So in order to fix it, I start it large, wait till my new thread initializes the irrlicht driver, then set the size back down. Here is the following code in case anyone else runs into this issue. The "have_started_driver" variable is a global that gets set right after creating the irrlicht driver. Also this switch in size is not visible to the user.

This code works, I can now maximize or size the window and the textures and buttons stay sharp as they should.

Code: Select all

private: System::Void dialog_Load(System::Object^  sender, System::EventArgs^  e) 
			 {
				Manager^ Mgr;
				parenthWnd = (HWND)this->Handle.ToPointer();
				Threading::Thread^ dThread;
				Mgr = gcnew Manager;
				this->Size = System::Drawing::Size( System::Drawing::Point(1920,1200));
				dThread = gcnew Thread( gcnew ThreadStart( Mgr, &Manager::run_main ));
				dThread->Start();
				while( !have_started_driver )
				{	
					//lets pause here to establish the driver
					//do nothing...hack to get around some graphic issues with blur and maximizing crap
				}
				this->Size = System::Drawing::Size( System::Drawing::Point(1024,768));
			 }
Thanks to hybrid, you have helped me alot on these forums!
Fashizzle
Post Reply