SmoothEddy

Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

102 Neutral

About SmoothEddy

  • Rank
    Newbie
  1. locking LPDIRECT3DVERTEXBUFFER9

    At first I am not smoothey for you - I am SmoothEddy... At second can you add a little own mind? [CODE] m_pWallVB->Lock( 0, 0, (void**)&v, 0 ); float x = v[0].p.x ; float y = v[0].p.y ; float z = v[0].p.z ; ................... m_pWallVB->Unlock(); [/CODE]
  2. locking LPDIRECT3DVERTEXBUFFER9

    Hi Anddos! It`s very simple if you to work in 3D: [CODE] LPDIRECT3DVERTEXBUFFER9 m_pWallVB; struct WALLVERTEX { D3DXVECTOR3 p; D3DXVECTOR3 n; FLOAT tu, tv; static const DWORD FVF; }; const DWORD WALLVERTEX::FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1; p_d3d_Device->CreateVertexBuffer( 3*sizeof(WALLVERTEX),D3DUSAGE_WRITEONLY, D3DFVF_XYZ | D3DFVF_NORMAL| D3DFVF_TEX1| D3DFVF_TEXCOORDSIZE2(0), D3DPOOL_MANAGED, &m_pWallVB, NULL ); WALLVERTEX* v; m_pWallVB->Lock( 0, 0, (void**)&v, 0 ); v[0].p = D3DXVECTOR3( -2.0f, 3.0f, 25.0f ); v[0].n = D3DXVECTOR3( 0.0f, 0.0f, -1.0f ); v[0].tu = 0.0f; v[0].tv = 0.0f; v[1].p = D3DXVECTOR3( 2.0f, 3.0f, 25.0f ); v[1].n = D3DXVECTOR3( 0.0f, 0.0f, -1.0f ); v[1].tu = 1.0f; v[1].tv = 0.0f; v[2].p = D3DXVECTOR3( 2.0f, 0.0f, 25.0f ); v[2].n = D3DXVECTOR3( 0.0f, 0.0f, -1.0f ); v[2].tu = 1.0f; v[2].tv = 1.0f; m_pWallVB->Unlock(); //------------------------------------------------------ //Next step draw triangle p_d3d_Device->SetFVF( D3DFVF_XYZ | D3DFVF_NORMAL| D3DFVF_TEX1| D3DFVF_TEXCOORDSIZE2(0) ); p_d3d_Device->SetStreamSource( 0, m_pWallVB, 0, sizeof(WALLVERTEX) ); p_d3d_Device->DrawPrimitive( D3DPT_TRIANGLELIST, 0, 1 ); [/CODE] If you to work in 2D just changle D3DFVF_XYZ -> D3DFVF_XYZRHW Regards!
  3. Hi gdboy! I can help you. I developed my own simple source code of skeletal animation for DirectX 9.0c. You can download it from: [url="https://rapidshare.com/files/391835359/SkeletalAnimSRC.rar"]https://rapidshare.com/files/391835359/SkeletalAnimSRC.rar[/url] Best regards!