• Advertisement
Sign in to follow this  

2D grid rendering problem

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

For some reason that i cant seem to figure out but in the last 2 col the texture is not coming out right. In the second to last col the texture is the next texture in the texturesheet and the last col there is just no texture showing up at all. Can't seem to figureout a fix or why thats happening .

CDirectX::GetInstance()->GetDevice()->Clear(0,0,D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,D3DCOLOR_ARGB(255,255,0,0),1.0f,0);
for(int HeightTiles = 0; HeightTiles < NumTilesHeight; HeightTiles++)
for(int WidthTiles = 0; WidthTiles < NumTilesWidth; WidthTiles++)
D3DXVECTOR3* pos = new D3DXVECTOR3(0,0,0);
D3DCOLOR color = D3DCOLOR_ARGB(255,0,255,0);
pos->x = (float)WidthTiles * TILE_WIDTH;
pos->y = (float)HeightTiles * TILE_WIDTH;

RECT rTile;
rTile.bottom = 288;
rTile.left = 256;
rTile.right = 192;
rTile.top = 256;


while ( true )
world.RenderWorld(); <-Function with rendercode
if ( msg.message == WM_QUIT )
TranslateMessage( &msg );
DispatchMessage( &msg );

Share this post

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

  • Advertisement