# Drawing an Interface [solved]

This topic is 4465 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i'm currently trying to draw a console ( and an interface later... ). jollyjeffers tols me that i can set the view & proj matrix to identity matrices, so i don't need to rotate & reposition the whole interface. but i've problems doing this. i think i defined my vertices the wrong way, because the result isn't what i expected: in general, i tried to draw a quad (consistend of 4 vertices) to the screen, wich is takes the upper half of the screen ( it's vertices are not positioned at the edge of the screen, but with an offset of 10%)
pColVertices[0].position = D3DXVECTOR4(-0.9f, 0.9f , 0.0f, 1.0f);
pColVertices[1].position = D3DXVECTOR4(-0.9f, -0.9f , 0.0f, 1.0f);
pColVertices[2].position = D3DXVECTOR4(0.9f, 0.9f , 0.0f, 1.0f);
pColVertices[3].position = D3DXVECTOR4(0.9f,  -0.9f, 0.0f, 1.0f);

the shader gets the needed information;

D3DXMatrixIdentity(&Transformationsmatrix);
Effect->SetMatrix("matWorldViewProjection", &Transformationsmatrix);
...
Out.Pos = mul(Pos, matWorldViewProjection);


it just multiplies the Position with the identity matrix, but the result isn't what i expect. can someone tell me what i did wrong here? ********EDIT********** i could slap myself *slaps head* i didn't use the right flexible vertex format for the buffer, that's why it didn't work... sorry for the post ^^ [Edited by - SiS-Shadowman on April 2, 2006 2:32:57 PM]

1. 1
2. 2
3. 3
4. 4
Rutin
17
5. 5

• 11
• 37
• 12
• 12
• 11
• ### Forum Statistics

• Total Topics
631414
• Total Posts
2999950
×