Exemplo n.º 1
0
def on_resize(w, h):
    global width, height, scene_changed

    width = w
    height = h
    if height == 0:
        height = 1

    camera.focus(width, height)

    window.invalid = True
    return pyglet.event.EVENT_HANDLED
Exemplo n.º 2
0
def on_resize(w, h):
  global width, height, scene_changed
  
  width = w
  height = h
  if height == 0:
    height = 1

  camera.focus(width, height)
  
  window.invalid = True
  return pyglet.event.EVENT_HANDLED
Exemplo n.º 3
0
def on_draw():
    window.clear()

    logging.info("on_draw: %s" % str(camera))
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
    glLoadIdentity()

    camera.lookAt(0, 0, 0)
    camera.focus(width, height)

    drawAxes()
    drawPoints()

    return pyglet.event.EVENT_HANDLED
Exemplo n.º 4
0
def on_draw():
  window.clear()

  logging.info("on_draw: %s" % str(camera))
  glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
  glLoadIdentity()

  camera.lookAt(0, 0, 0)
  camera.focus(width, height)
  
  drawAxes()
  drawPoints()

  return pyglet.event.EVENT_HANDLED