Jump to content
  • Advertisement
Sign in to follow this  

Drawing an Interface [solved]

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

If you intended to correct an error in the post then please contact us.

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;

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

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]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!