buildProjectionMatrixOrthoRH() & lower right (0,0) origin pt

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
Mars_999
Posts: 136
Joined: Sat Dec 08, 2012 7:59 pm

buildProjectionMatrixOrthoRH() & lower right (0,0) origin pt

Post by Mars_999 »

Code: Select all

 
irr::core::matrix4 projMatrix;
    projMatrix.buildProjectionMatrixOrthoRH(800, 600, -1.0f, 100.0f);
    
    driver->setTransform(irr::video::ETS_PROJECTION, projMatrix);
    driver->setTransform(irr::video::ETS_VIEW, irr::core::matrix4());
    driver->setTransform(irr::video::ETS_WORLD,irr::core::matrix4());
 
Is what I am using currently. But my screen at (0,0) is the center of the screen. So who can I set the lower right as (0,0) and top right as (800,600) or DX if choose(800,0)

Thanks!
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: buildProjectionMatrixOrthoRH() & lower right (0,0) origi

Post by mongoose7 »

Is that zNear that you have set to -1?!!
Mars_999
Posts: 136
Joined: Sat Dec 08, 2012 7:59 pm

Re: buildProjectionMatrixOrthoRH() & lower right (0,0) origi

Post by Mars_999 »

irr::core::matrix4 projMatrix;
projMatrix.buildProjectionMatrixOrthoRH(800, 600, -1.0f, 100.0f);

yes, and changing to 0 or 1 didn't do anything to fix the issue?

anyone else have any ideas?

if I use
draw2DPolygon() it renders a simple polygon at the right coordinates on the screen using the same positional data for
drawIndexedTriangleFan()//this wants to render to the center of the screen?
draw2DVertexPrimitiveList()// this will not render anything at all?
Mars_999
Posts: 136
Joined: Sat Dec 08, 2012 7:59 pm

Re: buildProjectionMatrixOrthoRH() & lower right (0,0) origi

Post by Mars_999 »

Anyone?

I really need to find the problem and get this working....

Thanks!
Post Reply