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.
2D, Buttons and textures get blurry upon resize
-
- Posts: 34
- Joined: Thu Aug 17, 2006 10:32 pm
-
- Posts: 34
- Joined: Thu Aug 17, 2006 10:32 pm
fixed it
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.
Thanks to hybrid, you have helped me alot on these forums!
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));
}
Fashizzle