pupil-labs / pyglui

cython powered OpenGL gui that works with glfw
MIT License
29 stars 20 forks source link

Changes for rendering of audio vizualization #101

Closed pointcontrols closed 6 years ago

pointcontrols commented 6 years ago

Yes.

On Wed, Apr 4, 2018, 16:20 Pablo Prietz notifications@github.com wrote:

@papr commented on this pull request.

In pyglui/cygl/utils.pyx https://github.com/pupil-labs/pyglui/pull/101#discussion_r179136109:

@@ -484,6 +484,14 @@ cpdef draw_bars(verts, float height, float thickness=1,RGBA color=RGBA(1.,0.5,0. glVertex2f(pt[0],pt[1] + height/2) glEnd()

+cpdef draw_bars_buffer(verts, float thickness=1,RGBA color=RGBA(1.,0.5,0.5,.5)):

  • glColor4f(color.r,color.g,color.b,color.a)
  • glLineWidth(thickness)
  • cdef float[:] data = verts
  • glEnableClientState(GL_VERTEX_ARRAY)
  • glVertexPointer(2, GL_FLOAT, 0, &data[0])
  • glDrawArrays (GL_LINES, 0, (verts.size)/2)

Can this drawing method be applied to drawing points?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pupil-labs/pyglui/pull/101#pullrequestreview-109321761, or mute the thread https://github.com/notifications/unsubscribe-auth/AMnuX49CJ7jv7Fp5S3djJ5XHeU9ar2y4ks5tlMh-gaJpZM4TGv-8 .