viewports and draw2dimage

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
mk.1
Posts: 76
Joined: Wed Oct 10, 2007 7:37 pm

viewports and draw2dimage

Post by mk.1 »

hey guys. I'm using a viewport (640,800) in a 1280x800 resolution and the level is fine. I'm using some draw2DImage instructions to draw parts of the GUI and somehow all the images are scaled down (half the width of the original image). Now this seems to be 640/1280 = .5, fine. But how can I display my images as usual? Is this a bug or intented?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I'm not realy sure what you mean... :lol:
but maybe change the viewport back to full resolution before drawing the gui ??? ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

The problem might be your "camera" projection matrix in that viewport?
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

Your aspect ratio should be corrected?
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

he is using draw2dimage, what has nothing to do with the camera
yeah you should check out the aspect ratio, maybe there is the problem
Image
Image
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

Yes, not real camera anyway, but he must have projection matrix on witch he could
try to change aspect ratio.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
Post Reply