Saturday, 17 August 2013

Some OpenGL features working, some not

Some OpenGL features working, some not

I have been trying to start using OpenGL with C++ on my new arch linux
box, but I can only use functions from before OpenGL 3.0.
For example, the following code works:
glBegin(GL_TRIANGLES);
{
glColor3f(0.0f,0.0f,1.0f);
glVertex3f( 0.0f, 1.0f, 0.0f);
glColor3f(0.0f,1.0f,0.0f);
glVertex3f(-1.0f,-1.0f, 0.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f( 1.0f,-1.0f, 0.0f);
}
glEnd();
but the following does not:
GLuint vertexArrayID;
glGenVertexArrays(1, &vertexArrayID);
glBindVertexArray(vertexArrayID);
It cannot find the functions glGenVertexArrays and glBindVertexArray
So what would cause this? Bad library linking? Old drivers?
My glxinfo:
OpenGL renderer string: AMD Radeon HD 6450
OpenGL core profile version string: 4.3.12414 Core Profile Context
13.15.100.1 OpenGL core profile shading language version string: 4.30

No comments:

Post a Comment