Ok so i want a std::vector of class objects. They will be made on demand.
std::vector<VertexBuffer> vBuffs;
somwehere::someFunction()
{
VertexBuffer vB;
thisNthat = 10;
vB.thisNthat = thisNthat;
......
vBuffs.push_back(vB);
}
Since vB goes out of scope, what happens to vBuffs[vB location] buffer?
What is the best way to do what i am trying to do.
vBuffs.push_back(VertexBuffer());
??
Then just assign values via the vector? (or constructor).