Win32 and Resolution (solved)
Win32 and Resolution (solved)
Hi,
if you start the Win32 demo, the resolution used by Irrlicht is always the desktop resolution !!!
I tried to change the WindowSize creation parameter, but this has no affect when creating Irrlicht with a Win32 device !?!?!
I mean if the window is 100*100 sized and the desktop is 1024*768 the Irrlicht resolution don't have to be 1024*768, too !!!
Also this causes a wrong aspect ratio !!!
A resolution of 100*100 would fit 1:1 !!!
if you start the Win32 demo, the resolution used by Irrlicht is always the desktop resolution !!!
I tried to change the WindowSize creation parameter, but this has no affect when creating Irrlicht with a Win32 device !?!?!
I mean if the window is 100*100 sized and the desktop is 1024*768 the Irrlicht resolution don't have to be 1024*768, too !!!
Also this causes a wrong aspect ratio !!!
A resolution of 100*100 would fit 1:1 !!!
Last edited by Acki on Sun Jul 09, 2006 3:19 pm, edited 1 time in total.
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Posts: 275
- Joined: Fri May 12, 2006 6:37 pm
- Location: Germany
@geekworx: I would be glad if it works this way, but it doesn't...
Also you can't create Irrlicht in a W32 window this way...
For learning whar I mean, just open the tutorial #14-Win32Window and try different resolutions for the device...
Then draw a 2d line on the screen half the length your screen is wide...
Let's say your desktop is 1024 wide.
You create a W32 window 500 wide.
Then create Irrlicht in the window.
If you draw a line from (0,x) to (500,x), where does it end on the screen ???
Because the Irr screen is 500 and the line is 500, the line should go over the whole Irrlicht screen.
But it ends at the center of the Irr screen, because the intern resolution is 1024 !!!
Also you can't create Irrlicht in a W32 window this way...
For learning whar I mean, just open the tutorial #14-Win32Window and try different resolutions for the device...
Then draw a 2d line on the screen half the length your screen is wide...
Let's say your desktop is 1024 wide.
You create a W32 window 500 wide.
Then create Irrlicht in the window.
If you draw a line from (0,x) to (500,x), where does it end on the screen ???
Because the Irr screen is 500 and the line is 500, the line should go over the whole Irrlicht screen.
But it ends at the center of the Irr screen, because the intern resolution is 1024 !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
No problem, it seems nobody can help with this...
Well, I think I'll have to investigate the Irrlicht source for this...
thx
Well, I think I'll have to investigate the Irrlicht source for this...
thx
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Just solved the problem !!!
But I had to edit the Irrlicht source for this...
The changes are now also included to my IrrExtensions !!!
But I had to edit the Irrlicht source for this...
The changes are now also included to my IrrExtensions !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Try this one:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=9136
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=9136
Yes, this is the code section I also changed !!!
But the code in this post doesn't really solve the problem...
Right, with this changes Irrlicht doesn't use the desktop resolution, but the resolution of the window...
Now what if I whant to use another resolution ???
The resolution from the creation parameter still has no affect on the device creation !!!
But the code in this post doesn't really solve the problem...
Right, with this changes Irrlicht doesn't use the desktop resolution, but the resolution of the window...
Now what if I whant to use another resolution ???
The resolution from the creation parameter still has no affect on the device creation !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
This is not my goal !!!
What if the window is resizable !?!?!
No, I want to define the resolution on my own !!!
If I create a window I know it's dimensions and can use this for creating the device, so why should Irrlicht choose what dimensions to use ???
What if the window is resizable !?!?!
No, I want to define the resolution on my own !!!
If I create a window I know it's dimensions and can use this for creating the device, so why should Irrlicht choose what dimensions to use ???
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
The external window creation is thought to use an external handle and skip everything else from the window creation part of Irrlicht. That's why Irrlicht takes the value of the window Irrlicht's going to be embedded into. What would happen if your window is just 300x400 pixels large, but you want 800x600?
The same as now ?!?!?
I have a desktop of 1024*768 and the win32 window is just 100*100...
Now the Irrlicht creates a device with 1024*768 and scales it down to the 100*100 to fit the window...
I have a desktop of 1024*768 and the win32 window is just 100*100...
Now the Irrlicht creates a device with 1024*768 and scales it down to the 100*100 to fit the window...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
No, I'd say that a device of 800x600 gives you 800x600 pixels, not internal resolution. So you have to offer Irrlicht the required space for that. You may later on reduce the resolution, but taking it as default might not be a good decision. You cannot change the resolution, either. But maybe it could be a good thing to make two dimensions, something like internal and external, or window size and resolution. I guess that's what is meant?