I have a vector defined std::vector<LPDIRECT3DTEXTURE9> textures;Later, I pass an object to it LPDIRECT3DTEXTURE9, for example textures.push_back(texture);Here is an example of this:
void SpriteManager::AddSprite(float x, float y, float z, LPDIRECT3DTEXTURE9 texture)
{
textures.push_back(texture);
}
This causes a runtime error. It breaks a vector class into a function size(). Why can this happen?
Edit:
I also encounter the same problem performing the same operation on an object vector D3DXVECTOR3. Since it LPDIRECT3DTEXTURE9is a pointer to IDIRECT3DTEXTURE9, should I use this instead?
user189320
source
share