File: basic1.py

package info (click to toggle)
rabbyt 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 1,376 kB
  • ctags: 2,374
  • sloc: python: 1,908; ansic: 264; makefile: 45
file content (16 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import rabbyt
import pygame

# This is pretty much the bare minimum.

pygame.init()
pygame.display.set_mode((640, 480), pygame.OPENGL | pygame.DOUBLEBUF)
rabbyt.set_viewport((640, 480))
rabbyt.set_default_attribs()

while not pygame.event.get(pygame.QUIT):
    # Clear the screen to white.  (Colors in rabbyt are the same as in OpenGL,
    # from 0.0 to 1.0.)
    rabbyt.clear((1.0,1.0,1.0))

    pygame.display.flip()