Python Language Dessiner des points en utilisant Pyglet et OpenGL


Exemple

import pyglet
from pyglet.gl import *

win = pyglet.window.Window()
glClear(GL_COLOR_BUFFER_BIT)

@win.event
def on_draw():
    glBegin(GL_POINTS)
    glVertex2f(x, y) #x is desired distance from left side of window, y is desired distance from bottom of window
    #make as many vertexes as you want
    glEnd

Pour connecter les points, remplacez GL_POINTS par GL_LINE_LOOP .