how to enlarge device in windows form

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
Kairu
Posts: 18
Joined: Mon Sep 08, 2008 11:03 am

how to enlarge device in windows form

Post by Kairu »

hi ,

i apply irrlicht in windows form, which is resizeable
but when i tried to enlarge the form , the drawing inside irrlicht become sort of stretched, is there any way to tackle this?

many thanks
Kairu
Posts: 18
Joined: Mon Sep 08, 2008 11:03 am

Post by Kairu »

i hv read through the forum, i found out that i need to restart the device
but i cannot do it in windows form,can i?

* note it could be .net wrapper problem since i am using it
can someone please tell me is not wrapper problem :cry:

thanks
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The OnResize method should cope with proper viewports. However, your camera's aspect ratio won't fit the screen's aspect ratio anymore. This will lead to stretching, you need to adapt your camera to the new screen dimensions.
Kairu
Posts: 18
Joined: Mon Sep 08, 2008 11:03 am

Post by Kairu »

i tried to remove and then add the new camera, but it still doesnt work,
is that what you mean?? if not can you please tell me how to do it, i dont mind if the code in C++
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

Code: Select all

f32 ratio = Width / Height;
camera->setAspectRatio( ratio );
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
humorstar
Posts: 25
Joined: Sat Oct 04, 2008 3:50 am

Post by humorstar »

If I am only using Irrlicht, where can I capture this Resize event?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Good question, there's currently no way to do this so you'd have to check each loop. We should have all kinds of events for the device though. You can request new features on the request tracker
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply