Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 790853 Details for
Bug 845801
dev-python/pygame_sdl2: needs upgrade to Python 3.10 (PythonCompatUpdate)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
example.py
example.py (text/x-python), 1.12 KB, created by
MW
on 2022-07-10 13:39:52 UTC
(
hide
)
Description:
example.py
Filename:
MIME Type:
Creator:
MW
Created:
2022-07-10 13:39:52 UTC
Size:
1.12 KB
patch
obsolete
>#!/usr/bin/env python ># -*- coding: utf-8 -*- > >import pygame_sdl2 as pygame >pygame.import_as_pygame() >from pygame.locals import * > >from OpenGL.GL import * >from OpenGL.GLU import * > >verticies = ( > (1, -1, -1), > (1, 1, -1), > (-1, 1, -1), > (-1, -1, -1), > (1, -1, 1), > (1, 1, 1), > (-1, -1, 1), > (-1, 1, 1) > ) > >edges = ( > (0,1), > (0,3), > (0,4), > (2,1), > (2,3), > (2,7), > (6,3), > (6,4), > (6,7), > (5,1), > (5,4), > (5,7) > ) > > >def Cube(): > glBegin(GL_LINES) > for edge in edges: > for vertex in edge: > glVertex3fv(verticies[vertex]) > glEnd() > > >def main(): > pygame.init() > display = (800,600) > pygame.display.set_mode(display, DOUBLEBUF|OPENGL) > > gluPerspective(45, (display[0]/display[1]), 0.1, 50.0) > > glTranslatef(0.0,0.0, -5) > > while True: > for event in pygame.event.get(): > if event.type == pygame.QUIT: > pygame.quit() > quit() > > glRotatef(1, 3, 1, 1) > glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) > Cube() > pygame.display.flip() > pygame.time.wait(10) > > >main() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 845801
: 790853