Нигде не могу найти описание работы с D3DXSprite. Подскажите пожалуйста, как им пользоваться (желательно с примерами).
(DX8)
Модератор: Mikle
Dim r As RECT
r.Top = 0
r.Left = 0
r.Right = 128
r.bottom = 128
Dim vec1 As D3DVECTOR2, vec2 As D3DVECTOR2, vec3 As D3DVECTOR2
vec1.x = 1: vec1.y = 1
vec2.x = 5: vec2.y = 5
vec3.x = 25: vec3.y = 15
D3DXS.Begin
D3DXS.Draw Sp, r, vec1, vec2, 0, vec3, 0
D3DXS.End
D3DXS.Draw Sp, r, vec1, vec2, 0, vec3, &HFFFFFFFF
Public S1 As D3DXSprite
Public Sub Iniz()
Set S1 = d3dx.CreateSprite(d3dDevice) 'Public d3dx As New D3DX8
End Sub
Public Sub DrawSp()
S1.Begin
S1.Draw Texture, RECT(0, 0, 128, 128), vec2(1, 1), vec2(5, 5), 0, vec2(25, 15), &HFFFFFFFF
S1.End
End Sub
Public Function RECT(left As Single, top As Single, right As Single, bottom As Single) As RECT
RECT.left = left
RECT.top = top
RECT.right = right
RECT.bottom = bottom
End Function
Public Function vec2(x, y As Single) As D3DVECTOR2
vec2.x = x
vec2.y = y
End Function
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 60