Re: 2D in a 3D world

Matt J <[email protected]> Sun, 8 Aug 2010 15:01:05 -0400
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
Another thing to check for is how you are loading the texture..e.g. if you
are using something like D3DXCreateTextureFromFileEx make sure it isn't
rounding something to the nearest power of 2, e.g. use *D3DX_DEFAULT_NONPOW2
* to prevent that...  and check that you aren't using a filter e.g. use *
D3DX_FILTER_NONE*



The aspect ratio of the orthogonal matrix (e.g. width/height) needs to match
> the aspect ratio of the viewport...otherwise you get stretching.. not sure
> if that is the issue....
>
> If you are creating an orthogonal matrix that ranges from -0.5 to 0.5 for
> left and right planes, you need to multiply the -0.5 and 0.5 by 0.5859375
> (600/1024) for the bottom and top planes to account for the aspect ratio.
> Maybe you are, but you didn't mention that.
>
> If this part isn't right, it could mess up how your adding the half texel
> offset to y as well. Just a hunch, I didn't try doing the math.
>
> Matthew
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev

_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list