Skip to main content
GameDev.net gamedev.net
🔒 Locked

Making Perspective 2D

Started by Graham Jan 4, 2003 at 11:12 PM 2 replies 350+ views
Original Post
Graham
Graham
I want to create a 2D breakout game using DX8, but i do not want the perspective matrix causing objects on the left or right parts of the screen to look smaller. Is there a way to create a perspective matrix that simulates using 2D graphics like in DX7. Go on an Intense Rampage
Go on an Intense Rampage
billybob
billybob
Orthogonal projection matrices
Graham
Graham
Can you explain more about this. How do I do it, and what does it do.

Go on an Intense Rampage
Go on an Intense Rampage
M4X
M4X
well... you can setup a orthogonal projection matrix in d3d8 by doing something like this:

D3DXMATRIX ProjectionMatrix;
D3DXMatrixOrthoLH(&ProjectionMatrix, WidthOfYourViewport, HeightOfYourViewport, 0.1f, 1.0f);
pD3DDevice->SetTransform(D3DTS_PROJECTION, &ProjectionMatrix);

and well... that''s all :=)
gluck!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.