Jump to content
  • Advertisement
Sign in to follow this  
Jacob Jingle

New Nvidia Driver = New OpenGL Errors

This topic is 2537 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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?

// 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);
m_vert.at(1) = 100.0f;
m_vert.at(2) = 100.0f;
m_vert.at(3) = 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!