I'm looking for a way to center a "cross hair" sprite.
I tried the following but I see that the sprite is not centered in the screen and it's scaled as well:
D3DXVECTOR2 position(WINDOW_WIDTH/2, WINDOW_HEIGHT/2); D3DXVECTOR2 scale(1.0f, 1.0f); D3DXMatrixTransformation2D(&matrix, NULL, NULL, &scale, NULL, NULL, &position); sprites[i]->sprite->Draw(sprite->texture, NULL, NULL, NULL, color);
I even tried: position = position - textureSizeInPixels;
I am looking for a way to make the sprite appear in the center with exactly the same size as the texture.