Witam
W jaki sposób można dodawać elementy na koniec vectora, którego typem jest struktura?
Próbowałem w ten sposób, jednak nie odnosi on rezultatu - błąd podczas kompilacji.
struct SimpleVertex
{
XMFLOAT3 Pos;
XMFLOAT2 Tex;
};
std::vector <SimpleVertex> Vertexy;
WczObj (Vertexy);
void WczObj(SimpleVertex TVertex){
for (short int KW = 0; KW < 10; KW++){
TVertex.push_back ( XMFLOAT3( -1.0f, 1.0f, -1.0f ), XMFLOAT2( 0.0f, 1.0f ));
}
}