Jump to content
  • Advertisement
hsunteik

OpenGL type error and access violation error

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

GL.glDrawArrays(GL.GL_TRIANGLES,0,model1.vertexcou nt)
gives me an error saying:
ctypes.ArgumentError:argument 3:<class 'TypeError'>: wrong type
which i interpret as:
the 3rd argument given to this function/method is in the wrong type
so,i search on the internet for what type they want for the third argument ,it says:
it wants GLsizei type,which is a non-negative binary integer.
After that,i checked the model1.vertexcount's type by doing print(type(model1.vertexcount)) using python,it prints <class 'float'>
I tried to change it to integer by doing int(model1.vertexcount),but it gives me an error:
OSError:exception:access violation reading 0x0A56BAA8
I also tried to input the value 6 myself,instead of letting the raw model class do the job,but it still output an Error:
OSError:exception:access violation reading 0x0CD5DD98

Notes:
1)The hexadecimal number at the back part of the error differ in every run.
2)i am learning opengl from Thin Matrix.
3)i am using numpy to create the arrays
4)If more information is needed,ask below in the reply....

Hope anyone can help me
Thanks.....İmage

Share this post


Link to post
Share on other sites
Advertisement

  • 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!