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 5546 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!