+ 3
OpenGL error
my GL.glDrawArrays(GL.GL_TRIANGLES,0,6) gives me an access violation error,before this I error get another error saying the third argument in the function has a wrong type,so I decided to explicitly write 6,instead of askimg the computer to calculate it. notes: 1)I am using python 2)I have post this question to opengl,python,gamedev forum with the name 'type error and access violation error',but the only answer I get is convert it to a unsigned integer,but error still occur
4 Answers
0
my vertex buffer contains 6 vertices and I'm trying to draw 2 triangle side by side to form a rectangle..
my array with data:
vertices=[-0.5,0.5,0, (top left corner)
-0.5,-0.5,0, (bottom left corner)
0.5,-0.5,0,(bottom right corner)
0.5,-0.5,0,(bottom right corner)
0.5,0.5,0,(top right corner)
-0.5,0.5,0](top left corner)
0
Two of my python file:
http://www.mediafire.com/file/8vfudfolkzgfqb5/Ballopia.py
http://www.mediafire.com/file/peenhcfta6b8671/loader.py
may be you could take a look and may be find and solve this error that have been around with me for quite a long time.
thanksš
0
thanks..
but it looks like you replaced some of my code,such as GL.glGenVertexArrays(),GL.glGenBuffers(),GL.glBufferData() to something else entirely..
so,
Is this what you called 'drawing everything in an 'old way' ',which is needed for my code to work?
If not,why do you removed this code?
0
Huh