i again have a drawing problem.
when i wnat to draw a tile of the tilesheet it draws the right tile but it also draws 1 pixel in height a difrent tile and it goes off the screen i think i got the cord right because with dd7 it worked fine.
VB Code:
'init tilesheet(2x2 tiles) Let Strip(0) = CreateTLVertex(0, 0, 0.5, 0.5) Let Strip(1) = CreateTLVertex(TileWidth, 0, 1, 0.5) Let Strip(2) = CreateTLVertex(0, TileHeight, 0.5, 1) Let Strip(3) = CreateTLVertex(TileWidth, TileHeight, 1, 1) Set CTTiles = New CTexture Call CTTiles.File(D3DX, D3DD, App.Path & "\GFX\GT\" & Dir$(App.Path & "\GFX\GT\*.bmp"), vbHXMagenta) Public Sub File(ByVal D3DX As D3DX8, ByVal D3DD As Direct3DDevice8, ByVal Path As String, Optional ByVal ColorKey As Long) Set D3DT = D3DX.CreateTextureFromFileEx(D3DD, Path, D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_FILTER_POINT, D3DX_FILTER_POINT, ColorKey, ByVal 0, ByVal 0) Call D3DT.GetLevelDesc(0, D3DSD) End Sub 'then draw Call D3DD.SetTexture(0, CTTiles.D3DT) Call D3DD.DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, Strip(0), Len(Strip(0)))


Reply With Quote