我有以下...
GLfloat test[8] = {-0.3f,-0.4f,0.3f,0.4f,0.2f,-0.4f,-0.2f,0.4f};
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, test);
glEnableVertexAttribArray(0);
glDrawArrays(GL_LINES, 0, 8);
问题是当它被渲染时它看起来像这样......
任何人都可以帮助我解决我所缺少的吗?我对OpenGL相当陌生