Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kingpinzs

Help with steps of making multiple quade textures

This topic is 5424 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

Advertisement
Do I make a differnt Panel/Quad for each tecture or how do I tell the computer how big and were to put the texture on the screen?

Share this post


Link to post
Share on other sites
quote:

I bet this is wrong but I dont know how else to do it.



I reordered your source; give it a try:


void render2D()
{
g_pD3DDevice->SetVertexShader (D3DFVF_PANELVERTEX);
g_pD3DDevice->SetStreamSource (0, p_VertexBuffer, sizeof(PANELVERTEX));

D3DXMATRIX Position;
D3DXMatrixTranslation(&Position, 0.0f, 0.0f, 0.0f);
g_pD3DDevice->SetTransform(D3DTS_WORLD, &Position);
g_pD3DDevice->SetTexture(0,m_pD3DTexture[0]);
g_pD3DDevice->DrawPrimitive (D3DPT_TRIANGLEFAN, 0, 2);

D3DXMatrixTranslation(&Position, -500.0f, -500.0f, 0.0f);
g_pD3DDevice->SetTransform(D3DTS_WORLD, &Position);
g_pD3DDevice->SetTexture(0,m_pD3DTexture[1]);
g_pD3DDevice->DrawPrimitive (D3DPT_TRIANGLEFAN, 0, 2);

D3DXMatrixTranslation(&Position, 500.0f, 500.0f, 0.0f);
g_pD3DDevice->SetTransform(D3DTS_WORLD, &Position);
g_pD3DDevice->SetTexture(0,m_pD3DTexture[1]);
g_pD3DDevice->DrawPrimitive (D3DPT_TRIANGLEFAN, 0, 2);
}



Understanding is a three edged sword...

Share this post


Link to post
Share on other sites

  • 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!