Skip to content

Instantly share code, notes, and snippets.

@lithuak
Created July 29, 2016 14:09
Show Gist options
  • Save lithuak/c645b48f3cb89abd219f25436a68a940 to your computer and use it in GitHub Desktop.
Save lithuak/c645b48f3cb89abd219f25436a68a940 to your computer and use it in GitHub Desktop.
PyGame mini-main
# -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
def main():
pygame.init()
display = (800, 600)
pygame.display.set_mode(display, DOUBLEBUF|OPENGL)
while True:
event = pygame.event.wait()
if event.type in (pygame.KEYDOWN, pygame.QUIT):
pygame.quit()
break
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment