2 — Opengl
To get started with OpenGL 2, you'll need to install the OpenGL 2 SDK and a compatible graphics driver.
glutSwapBuffers();
Here is a deep dive into why OpenGL 2.0 was a landmark in computing history and why it still matters to developers today. The Shift to Programmability: GLSL opengl 2
To start programming with OpenGL 2, you'll need a development environment that includes: To get started with OpenGL 2, you'll need
// Specify the vertex data GLfloat vertices[] = -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f ; To get started with OpenGL 2
// Create a VAO and VBO GLuint vao, vbo; glGenVertexArrays(1, &vao); glGenBuffers(1, &vbo); glBindVertexArray(vao); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
Buffers and vertex arrays are used to store and manage vertex data.