[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] display driver
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've been using OPENGL | DOUBLEBUF as flags to set_mode, but on my last
browse of the SDL source, I seem to recall DOUBLEBUF as having no
effect, since SDL assumes OpenGL would be double buffered anyway.
Also, the HW* commands are only relevant for non-OpenGL usage.
Here's what the Vision Egg does (slightly modified):
import OpenGL.GL as gl
gl_vendor = gl.glGetString(gl.GL_VENDOR)
gl_renderer = gl.glGetString(gl.GL_RENDERER)
if gl_renderer == "GDI Generic" and gl_vendor == "Microsoft
Corporation":
print "Software rendering -- expect slow frame rates"
On Thursday, Aug 21, 2003, at 13:59 Australia/Adelaide, David Mallwitz
wrote:
What is the correct way to get hardware acceleration with Pygame +
PyOpenGL? The snippet below seems to indicate that I've got software
rendering with the DirectX driver, and my CPU usage hits 80% with just
a simple rotating wireframe teapot so I'm inclined to agree. This is
on a Win2K system with an Nvidia card and recent drivers.
>>> import pygame
>>> from pygame.locals import *
>>> pygame.init()
(6, 0)
>>> pygame.display.set_mode((1024,768), OPENGL|DOUBLEBUF)
<Surface(1024x768x32 SW)>
>>> pygame.display.get_driver()
'directx'
I've read Pete's DisplayModes tutorial and the NewbieGuide and run
through the online docs, but ended up with no definitive answers.
HWSURFACE, HWPALETTE, FULLSCREEN, HW_ACCEL - what is the magic
incantation?
Dave
-----BEGIN PGP SIGNATURE-----
iD8DBQE/RFbn1xWcCSPVbpgRAiZLAJ96EXOSDf/+OSUU8t+MMie1Ba+mowCgqo/r
r1MzI2ExnNfZR3e1JYwm6FM=
=sN9v
-----END PGP SIGNATURE-----