I didn't know where to put this post.
In directx,when drawing to the screen you call the BeginScene() method,
for sprites you need to call the Begin() method seperatly and within the BeginScene block.
MY question is do you have to call the Sprites Begin() method only once or does every single instance of a sprite need to call it individually?
Like,
Code:
d3ddev->BeginScene(); // Enter scene blitting.
myBackground->d3dspt->Begin(NULL);
// ... do stuff with background...
myShip->d3dspt->Begin(NULL);
// ... do stuff with ship ...
myCloud->d3dspt->Begin(NULL);
// ... do stuff with cloud ...
?
I also have this class,
Code:
class MySprite{
public:
// the pointer to our Direct3D Sprite interface
LPD3DXSPRITE d3dspt;
// the pointer to the sprite
LPDIRECT3DTEXTURE9 sprite;
};
Is it viable to have each instance of class MySprite contain the pointer to
directx's sprite interface,or should I only have one such pointer?