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.

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

Postby Mars_999 » Mon Jun 10, 2013 8:16 pm

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

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

Postby mongoose7 » Mon Jun 10, 2013 11:59 pm

Is that zNear that you have set to -1?!!
mongoose7
 
Posts: 777
Joined: Wed Apr 06, 2011 12:13 pm

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

Postby Mars_999 » Tue Jun 11, 2013 3:36 am

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

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

Postby Mars_999 » Tue Jun 11, 2013 4:31 pm

Anyone?

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

Thanks!
Mars_999
 
Posts: 135
Joined: Sat Dec 08, 2012 7:59 pm


Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest