Jump to content
  • Advertisement

OpenGL type error and access violation error

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

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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

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