[SOLVED] Resolution & Quality [ Widescreen Question ]
-
- Posts: 40
- Joined: Tue Aug 15, 2006 6:01 am
- Location: Hong Kong
- Contact:
[SOLVED] Resolution & Quality [ Widescreen Question ]
I've solved my previous problem on adding images to Irrlicht program .
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=18024
but now , there is a similar problem .
I use AddImage function to add an image of dimension 1024x 768 to my program . when it is shown on 4:3 PC (1280x 1024) , it looks OK ; but if i run the same stuff on a 16:9 PC (1280 x800) , the image collapsed like the print screen in the previous post .
does Irrlicht know how to stretch images ? or additional codes needed ?
please help .
i am using Irrlicht 1.2 .NET version .
i write my program in C# .
codes of C++ are welcome too ~
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=18024
but now , there is a similar problem .
I use AddImage function to add an image of dimension 1024x 768 to my program . when it is shown on 4:3 PC (1280x 1024) , it looks OK ; but if i run the same stuff on a 16:9 PC (1280 x800) , the image collapsed like the print screen in the previous post .
does Irrlicht know how to stretch images ? or additional codes needed ?
please help .
i am using Irrlicht 1.2 .NET version .
i write my program in C# .
codes of C++ are welcome too ~
Last edited by shivanraptor on Fri Jan 05, 2007 3:27 pm, edited 2 times in total.
Irrlicht.NET user
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
No, the AddImage function can't strech the image !!!
If you want to strech an image you'll have to use draw2DImage instead !!!
If you want to strech an image you'll have to use draw2DImage instead !!!
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: 40
- Joined: Tue Aug 15, 2006 6:01 am
- Location: Hong Kong
- Contact:
i tried the Draw2DImage function.
my sequence of drawing is :
//start loop
BeginScene
Draw2DImage
AddGUIButton
AddGUIButton
AddGUIButton
AddGUIButton
GUIEnvironment.DrawAll
EndScene
//end loop
i hope you know what i am talking about .
only GUI buttons are shown , but the 2DImage flashes in a second and is replaced with a gray layer .
Can GUI mix with Draw2DImage ? or with GUI , AddImage must be used ?
my sequence of drawing is :
//start loop
BeginScene
Draw2DImage
AddGUIButton
AddGUIButton
AddGUIButton
AddGUIButton
GUIEnvironment.DrawAll
EndScene
//end loop
i hope you know what i am talking about .
only GUI buttons are shown , but the 2DImage flashes in a second and is replaced with a gray layer .
Can GUI mix with Draw2DImage ? or with GUI , AddImage must be used ?
Irrlicht.NET user
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
-
- Posts: 40
- Joined: Tue Aug 15, 2006 6:01 am
- Location: Hong Kong
- Contact:
( confused ... )BlindSide wrote:Offcourse he knows what hes talking about. You will get distortion if you shrink the image...I thot u can you 1024X1024 to solve your problem like in previous post? Or if irrlicht's shrinking is too blurry maybe then a different library can do that for u. I wonder if Magic2D can help...
i just want to find a way to tackle different resolution , or actually deal with different aspect ratio . i glanced through MSDN , i found some useless codes to detect screen resolution , instead of the display resolution . please help !
Irrlicht.NET user
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
who is talking about what ???
draw2DImage creates no gui image, it must be called every render loop (between startScene and endScene) !!!
draw2DImage creates no gui image, it must be called every render loop (between startScene and endScene) !!!
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: 40
- Joined: Tue Aug 15, 2006 6:01 am
- Location: Hong Kong
- Contact:
i successfully modified the codes and let the Draw2DImage be run in every render loop , however , the image is still corrupted like before .
am i making mistakes ?
this is my function call :
can the function call above stretch the image ?
am i making mistakes ?
this is my function call :
Code: Select all
pathname : the path of the texture
driver : IrrlichtDevice.VideoDriver
my screen resolution is 1024x768
my display resolution is 1440x900
the texture size is 1024x768
Draw2DImage(driver.GetTexture(pathname), new Position2D(0, 0), new Rect(new Position2D(0,0), new Dimension2D(1440, 900)), new Irrlicht.Video.Color(255, 255, 255, 255), true);
Irrlicht.NET user
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
texture size must be in the power of 2 !!!
So the next suitable size would be 1024*1024 !!!
and don't use a color with draw2DImage !!!
It's not a color, it's an array of four colors !!!
Use 0 instead !!!!
it should be like this:look ito the api for more informations...
So the next suitable size would be 1024*1024 !!!
and don't use a color with draw2DImage !!!
It's not a color, it's an array of four colors !!!
Use 0 instead !!!!
it should be like this:
Code: Select all
draw2DImage(texture, recDest, recSource, 0, 0, true);
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: 40
- Joined: Tue Aug 15, 2006 6:01 am
- Location: Hong Kong
- Contact:
it works , thanks !
i change the texture to 1024x1024 , then clip it by the size i need .
however , isn't the update of Irrlicht 1.2 include the following??
i change the texture to 1024x1024 , then clip it by the size i need .
however , isn't the update of Irrlicht 1.2 include the following??
or it represents other meaning ? actually i don't quite understand this line .- Non-power-of-two textures are left unscaled if the driver supports such textures.
Irrlicht.NET user
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
AFAIK
ITexture must still have a resolution with 2^n
IImage can have any resoultion you want
ITexture must still have a resolution with 2^n
IImage can have any resoultion you want
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: 40
- Joined: Tue Aug 15, 2006 6:01 am
- Location: Hong Kong
- Contact:
-
- Posts: 40
- Joined: Tue Aug 15, 2006 6:01 am
- Location: Hong Kong
- Contact:
do you mean display card ? mine is an ATi Raedon 9800 Pro .hybrid wrote:No, it's supported for all textures, but your hardware must also support it. If you don't have the hardware support you still have to handle this on your own.
what is the hardware requirement ? which hardware will support the non-power-two textures ?
Irrlicht.NET user
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine
* * * * * * * * * * * * *
Currently working on:
RPG Turbulence 2
Game Engine Turbulence Engine