Jump to content
  • Advertisement
Sign in to follow this  
Geometrian

glVertexAttribPointer

This topic is 3513 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

Hello, I'm having trouble with glVertexAttribPointer(). My current code, in Python is:
location = glGetAttribLocation(program,"vert_tangent")
glVertexAttribPointer(location,3,GL_FLOAT,GL_FALSE,0,vectors)
I'm getting a type error in the last argument; the trouble is in "vectors". I've tried vectors in either a list form or a list of lists form, so when vectors is in the form:
vectors = [,,,,,,,,,,,,,,,,,,,, ... ] #doesn't work
vectors = [[,,],[,,],[,,],[,,], ... ] #also doesn't work
What format should "vectors" be in then? Thanks, -G

Share this post


Link to post
Share on other sites
Advertisement
The exact error is: "ArgumentError: argument 6: <type 'exceptions.TypeError'>: wrong type"
The language, as I mentioned, is Python.

Share this post


Link to post
Share on other sites
OK, I got it working. For future reference, if the list can be make into an (n by 3) Numeric array, the pointer can be found with array.tostring()

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!