Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualcifa

Posted 12 April 2013 - 01:07 AM

Gah, I'm not so familiar with these core profiles and stuff, but I think I found your problem: http://www.gamedev.net/topic/609951-glvertexattribpointer-giving-gl-invalid-operation/
 
As V-Man says there, "If you are using core profile on GL 3.2, then you must use VAO when you call glBindBuffer and glVertexAttribPointer."
 
I found my way to that thread by starting up gDebugger and turned on breakpoints on errors, then noticed an invalid operation on glVertexAttribPointer, and googled for "glVertexAttribPointer invalid operation"
 
Maybe try with these hints and you should at least see something:
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 0);
//glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

And btw, in c++, int/int = int, so your aspect ratio is wrong, float(viewportWidth)/viewporthHeight would work better.

 

Oh! With those hints it works fine, I'm going to study those core profile-stuff biggrin.png

Thank you so much!


#1cifa

Posted 12 April 2013 - 01:06 AM

Gah, I'm not so familiar with these core profiles and stuff, but I think I found your problem: http://www.gamedev.net/topic/609951-glvertexattribpointer-giving-gl-invalid-operation/
 
As V-Man says there, "If you are using core profile on GL 3.2, then you must use VAO when you call glBindBuffer and glVertexAttribPointer."
 
I found my way to that thread by starting up gDebugger and turned on breakpoints on errors, then noticed an invalid operation on glVertexAttribPointer, and googled for "glVertexAttribPointer invalid operation"
 
Maybe try with these hints and you should at least see something:
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 0);
//glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

And btw, in c++, int/int = int, so your aspect ratio is wrong, float(viewportWidth)/viewporthHeight would work better.

 

Oh! With those hints it works fine, I'm going to study those core-stuff :D 

Thank you so much!


PARTNERS