|
-
Dec 30th, 2001, 06:31 AM
#1
Thread Starter
Addicted Member
DX8 problem - Perspective
Hiyas,
I've just started learning DX8, and IMO it's not that much harder than DX7. It's different, but not really harder...
I have a problem with it though. Whenever I try to blit something which isn't the same perspective as the original texture, the render will become sort-of distorted (I'm guessing it's to do with how the vectors form the polygons).
I've attached a BMP screenshot (zipped). It's supposed to be a trapezoid with straight lines from top to bottom, but the lines aren't straight. FYI the original texture was 64x64 pixels (I remember reading DX8 textures must be to a power of 2).
Here's my code for the render...
Code:
TileVertices(0) = CreateTLVertex(200, 50, 0, 1, RGB(255, 255, 255), 0, 0, 0)
TileVertices(1) = CreateTLVertex(440, 50, 0, 1, RGB(255, 255, 255), 0, 1, 0)
TileVertices(2) = CreateTLVertex(100, 430, 0, 1, RGB(255, 255, 255), 0, 0, 1)
TileVertices(3) = CreateTLVertex(540, 430, 0, 1, RGB(255, 255, 255), 0, 1, 1)
D3DDevice.SetTexture 0, TileTexture
D3DDevice.DrawPrimitiveUP D3DPT_TRIANGLESTRIP, 2, TileVertices(0), Len(TileVertices(0))
Anyone know what's wrong with it?
BTW why aren't blits/renders anti-aliased in DX8, whenever the render size is different to the original texture size?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|