After debugging some really weird behaviors, like vectors going from size 0 to negative values out of nowhere, I realized this was happening after allocating 4000 ints with new. I dont understand, 4k ints (~15KB) is not that huge, and even if it was, why its messing with my mem?
Video:
https://drive.google.com/file/d/0B_iN9pcbyoiKQV9lNllLWktfOGc/edit?usp=sharing
struct TileMap{
int * pTileMap; // indexes on m_vTiles
int mapW, mapH;
float hSpacing, vSpacing;
sprite::InstancedSprites m_tileInstSprites;
sprite::InstancesVertexBuffer m_IVB;
TileMap():pTileMap(nullptr){}
~TileMap(){ if(pTileMap) delete [] pTileMap; }
};
std::vector<TileMap> m_vTileMaps;
This is the structure you see in the vid.
Both InstancedSprites and InstancesVertexBuffer hold vectors on its internals, those are getting screwed..that doesnt make any sense, theres a memory constrain Idont know about? Dx
Im hopping is something really stupid, but the vid pretty much shows Im not overwriting stuff myself right?