Jump to content
  • Advertisement
Sign in to follow this  
Geometrian

glVertexAttribPointer

This topic is 3655 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!