for reason, program works when bind ibo/ebo again , after create vao. read online, and multiple posts , glbindbuffer binds current buffer, , not attach the vao. thought glvertexattribpointer function attached data vao. float points[] = { -0.5f, 0.5f, 0.0f, // top left = 0 0.5f, 0.5f, 0.0f, // top right = 1 0.5f, -0.5f, 0.0f, // bottom right = 2 -0.5f, -0.5f, 0.0f, // bottom left = 3 }; gluint elements[] = { 0, 1, 2, 2, 3, 0, }; // generate vbo (point buffer) gluint pb = 0; glgenbuffers(1, &pb); glbindbuffer(gl_array_buffer, pb); glbufferdata(gl_array_buffer, sizeof(points), points, gl_static_draw); // generate element buffer object (ibo/ebo) gluint ebo = 0; glgenbuffers(1, &ebo); glbindbuffer(gl_element_array_buffer, ebo); glbufferdata(gl_element_array_buffer, sizeof(elements), elements, gl_static_draw); // generate vao gluint vao = 0; glgenvertexarrays(1, &vao); glbindvertexarray(vao); glbindbuffer(gl_array_buffer, pb); g...