Way for use OpenGL glVertexPointer with python ?

23 views
Skip to first unread message

Rémi Deletrain

unread,
Nov 17, 2016, 4:01:56 AM11/17/16
to Python Programming for Autodesk Maya
Hello everyone,

I create script utils for use OpenGl in the viewport without node.
This script Add, edit or remove shape with easy way. But for this moment I use old shcool method for add shape in OpenGl and is heavy for complex shape.

I know this method in C++
glVertexPointer(3, GL_FLOAT, 0, v_triangles);
glTexCoordPointer(2, GL_FLOAT, 0, vt_triangles);
glNormalPointer(GL_FLOAT, 0, vn_triangles);
glDrawArrays(GL_TRIANGLES, 0, 360);

but don't works with python.... If I give an array I have error with GLVoid*
I try to use MScriptUtils doublePtr for give double array pointer. With that I don't have this error but nothing is drawing...

Someone would have a solution ?
Reply all
Reply to author
Forward
0 new messages