diff --git a/pyparticles/ogl/axis_ogl.py b/pyparticles/ogl/axis_ogl.py index f2c074b..73f2fc7 100644 --- a/pyparticles/ogl/axis_ogl.py +++ b/pyparticles/ogl/axis_ogl.py @@ -122,8 +122,8 @@ def draw_plane( self , plane="xy", color=( 0.7 , 0.7 , 0.7 , 0.3 ) , leng=None ) glBegin(GL_LINES) for pts in t : - glVertex3fv( pts[0] ) - glVertex3fv( pts[1] ) + glVertex3fv( pts[0].view(type=np.ndarray) ) + glVertex3fv( pts[1].view(type=np.ndarray) ) glEnd() @@ -199,12 +199,12 @@ def draw_arrow( self , color , axis , leng=None ): glBegin(GL_LINES) for pts in t : - glVertex3fv( pts[0] ) - glVertex3fv( pts[1] ) + glVertex3fv( pts[0].view(type=np.ndarray) ) + glVertex3fv( pts[1].view(type=np.ndarray) ) glEnd() - \ No newline at end of file + diff --git a/pyparticles/ogl/draw_vector_field.py b/pyparticles/ogl/draw_vector_field.py index 6cb0908..9097aa3 100644 --- a/pyparticles/ogl/draw_vector_field.py +++ b/pyparticles/ogl/draw_vector_field.py @@ -195,14 +195,14 @@ def _draw_field( self , key ): glColor4f( color[0] , color[1] , color[2] , color[3] ) - glVertex3fv( pts[0] ) - glVertex3fv( pts[1] ) + glVertex3fv( pts[0].view(type=np.ndarray) ) + glVertex3fv( pts[1].view(type=np.ndarray) ) - glVertex3fv( pts[2] ) - glVertex3fv( pts[3] ) + glVertex3fv( pts[2].view(type=np.ndarray) ) + glVertex3fv( pts[3].view(type=np.ndarray) ) - glVertex3fv( pts[4] ) - glVertex3fv( pts[5] ) + glVertex3fv( pts[4].view(type=np.ndarray) ) + glVertex3fv( pts[5].view(type=np.ndarray) ) glEnd()