screen resolution...

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
dreamport
Posts: 188
Joined: Sun Jul 26, 2009 9:02 am
Location: philippines

screen resolution...

Post by dreamport »

is there a way to automatically scale my guis when resizing the screen resolution?

also

is there a way to resize the resolution while inside the application?
^^
opensource = freedom
<br>
how can you face the problem if the problem is your face?
m3ltd0wn
Posts: 107
Joined: Wed Dec 12, 2007 8:32 am
Location: Romania

reply

Post by m3ltd0wn »

try the search button on forums, and yes you can change the resolution of your application while it is running, i think in code snippets forum someone wrote a code to do that :)

so try the little search button ;)
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

You have to poll the screen resolution with videoDriver->getScreenSize() and compare it always to the resolution of the last frame. Then make sure that your gui-elements all have one common parent element (that's useful anyway). Resize that parent element. All child-elements will then be resized depending on their alignment settings. You can change those for each element with setAlignment.

I think there is currently no way to resize the main-window with irrlicht functions. It is probably possible with some system functions.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Changing the size of the device should change the size of the video driver and the root GUI element, this should cascade down through the alignment settings and adjust your GUI automatically, providing the alignment is set up correctly.
IIRC, the image in the bottom left corner of the meshviewer app should demonstrate this behaviour.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Well, we have no function so far to change the size of the device...
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Don't all windowing systems send a notification when the window size changes? Windows provides WM_SIZE notification and X provides the ResizeRequest event type. It seems like the device could receive the appropriate messages and then either send them on to the user through the event receiver or just call OnResize(). That way the user wouldn't need to poll.

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

Post by hybrid »

Yes, we're planning for system events in the Irrlicht event types. But that does not exsit so far.
rekk1986
Posts: 5
Joined: Wed Jan 06, 2010 1:39 am

Post by rekk1986 »

I think This problem can't be solved by software, so you can't change the resolution of these
Post Reply