GLuint VBO[2], VAO[2];
glGenVertexArrays(2, VAO);
glGenBuffers(2, VAO);
glBindVertexArray(VAO[0]);
glBindBuffer(GL_ARRAY_BUFFER, VBO[0]);
//Konfiguration bezieht sich jetzt auf VBO[0] wegen glbindvertexarray()
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glVertexAttribPointer(0,3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), (GLvoid *) 0);
glEnableVertexAttribArray(0);
glBindVertexArray(0);
glBindVertexArray(VAO[1]);
glBindBuffer(GL_ARRAY_BUFFER, VBO[1]);
glBufferData(GL_ARRAY_BUFFER, sizeof(secVertices), secVertices, GL_STATIC_DRAW);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE,0, (GLvoid *) 0);
glEnableVertexAttribArray(1);
glBindVertexArray(1);
i am trying to draw two quads with two different vbos/vaos.
i am absolutely new to opengl and i am learning with a pdf tutorial.
when i start the program , only one quad is drawn
its the quad from vao[1] and vbo[1].
it has to do with glbufferdata but i dont really get it.
please tell me what to do. sorry for my english and thanks for answears