it's in the same function:
std::list<Ausfaelle>Ausfalllinie[10];
for( int x = 0; x < 10; x = x + 1 )
{
Ausfalllinie[x].push_back(Ausfaelle(x,1,22,bremsen,mldgheight));
mldgheight =+30;
}
if (mldg == 0){
for( int x = 0; x < 10; x = x + 1 )
{
for (std::list<Ausfaelle>::iterator it=Ausfalllinie[x].begin(); it != Ausfalllinie[x].end(); ++it)
{
XPLMSetGraphicsState(0, 1, 0, 0, 1, 0, 0); // 1 texture and alpha blending
glPushMatrix();
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
XPLMBindTexture2d(textures[AUSFALL1_TEXTURE].texIMGID, 0);
glColor3f(1, 1, 1);
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
glBegin(GL_QUADS);
glTexCoord2i(0, 0);
glVertex2i(offx + 20, offy - 675 -mldgheight); //no idea on how to get the height from class
glTexCoord2i(0, 1);
glVertex2i(offx + 20, offy - 650-mldgheight);
glTexCoord2i(1, 1);
glVertex2i(offx + 120, offy - 650-mldgheight);
glTexCoord2i(1, 0);
glVertex2i(offx + 120, offy - 675-mldgheight);
glEnd();
glPopMatrix();
}
I'm new to classes in list etc. and try to save time while learning. Basically, for a start I want to display the image one below the other for the 10 list objects.
Many thanks