Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VERTEX OurVertices[] =
- {
- { D3DXVECTOR3(0.0f, 0.5f, 0.0f), D3DXCOLOR(1.0f, 0.0f, 0.0f, 1.0f) },
- { D3DXVECTOR3(0.45f, -0.5, 0.0f), D3DXCOLOR(0.0f, 1.0f, 0.0f, 1.0f) },
- { D3DXVECTOR3(-0.45f, -0.5f, 0.0f), D3DXCOLOR(0.0f, 0.0f, 1.0f, 1.0f) }
- };
- //there is "OurVertices" a VERTEX[3]
- Mesh *mash = new Mesh(dxc, OurVertices);
- //VERTEX struct:
- struct VERTEX { D3DXVECTOR3 Pos; D3DXCOLOR Color; };
- //Mesh constructor
- Mesh::Mesh(DirectXContext * dxc, VERTEX *vertices)
- {
- //vertices is "VERTEX *", what is no wrong, but it is not an array anymore! Its just contains a first struct
- //vertices have good value only if the Mesh constructor is:
- Mesh::Mesh(DirectXContext * dxc, VERTEX (&vertices)[3])
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement