quote:
I don''t recommend using TLVERTEX to render your tiles, because then you lose all
transformation and lighting functionality that makes Direct3D even worth using.
As I already pointed out clearly, you can use D3DTLVERTEX vertices to draw
isometrically shaped polygons if you want to use 2D with 3D. You can then render
your textures onto these polygons. You *don''t* need lighting and transformation
for this.
Anyway, here is an orthogonal matrix for D3D:
Ortho: Perspective: 2/w 0 0 0 2/W 0 0 0 0 2/h 0 0 0 2/H 0 0 0 0 q 0 0 0 Q 1 0 0 -zq 1 0 0 -ZQ 0 D3DMATRIX ortho = ZeroMatrix(); float q = 1.0f / (far_plane - near_plane); ortho._11 = 2.0f / w; ortho._22 = 2.0f / h; ortho._33 = q; ortho._43 = -(near_plane*q); ortho._44 = 1.0f;
Notice that two of the main differences between an ortho and a
perspective matrix is that member _34 is zero and member _44 is
one for an ortho matrix. The z''s and q''s are a little different
too I think.