Hello, im rendering a 150*150 vertex map.
Here's my vertex
D3DVERTEX quad[] =
{
{1.0f, -1.0f, tilez, D3DCOLOR_ARGB(255,255,255,255),1,0},
{3.0f, -1.0f, tilez, D3DCOLOR_ARGB(255,255,255,255),0,0},
{1.0f, 1.0f, tilez, D3DCOLOR_ARGB(255,255,255,255),1,1},
{3.0f, 1.0f, tilez, D3DCOLOR_ARGB(255,255,255,255),0,1}
};
Here's what i use for the map rendering:
for(int i = 0; i < 150; i++)
{
for(int c = 0; c < 150; c++)
{
D3DXMatrixTranslation(&pos, tilex, tiley, 10.0f);
d3ddev->SetTransform(D3DTS_WORLD, &pos);
d3ddev->SetStreamSource(0, vbuffer, 0, sizeof(D3DVERTEX));
d3ddev->SetTexture(0, text);
d3ddev->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
tilex += 2.0f;
d3ddev->Present(NULL, NULL, NULL, NULL);
}
tilex = 0.0f;
tiley += 2.0f;
}
Do you guys know what's causing this slow rendering?
Rendering 100*100 doesn't render slow..but i need way more tiles the this...hope you can help me.