Sign in to follow this  
Jacob Jingle

New Nvidia Driver = New OpenGL Errors

Recommended Posts

Under Nvidia driver 275.33 this code works fine. Under the new drivers 280.26 and 280.28(international) both glVertexAttribPointer and glDrawArrays generate GL_INVALID_OPERATION. Are these errors because of a buggy driver or bad code and a new driver finally catching my mistakes?

[code]// Setup Code
GLuint m_vboID;
GLuint m_vaoID;

GLuint m_programID;
GLuint m_MVPMatrixID;
std::vector<GLfloat> m_vert;

m_vert.assign(6, 0.0f); = 100.0f; = 100.0f; = 100.0f;

glGenVertexArrays(1, &m_vaoID);

glGenBuffers(1, &m_vboID);
glBindBuffer(GL_ARRAY_BUFFER, m_vboID);
glBufferData(GL_ARRAY_BUFFER, m_vert.size() * sizeof(std::vector<GLfloat>::size_type), &m_vert.front(), GL_STATIC_DRAW);

// Draw Code
glBindBuffer(GL_ARRAY_BUFFER, m_vboID);
glVertexAttribPointer((GLuint)0, 2, GL_FLOAT, GL_FALSE, 0, 0);

HDC hDC = GetDC(m_hWnd);
glDrawArrays(GL_TRIANGLES, 0, m_vert.size() / 2);

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this