[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] pygame error unable to reset window for OpenGL context
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] pygame error unable to reset window for OpenGL context
- From: "Ian Mallett" <geometrian@xxxxxxxxx>
- Date: Sat, 31 May 2008 17:37:53 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 31 May 2008 20:37:58 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=xVurBeZID6RJRsP9+nxhNZf13frQZXgU8tyRqGKx/WQ=; b=M/GZQrgxKpgHPSddR7lxwsh1echZKLownJmS2gsvcnwolpeXS1UPK5IpYHn5ZKGtLq2PhtzeQzhuhcy3CThc+J67ishM4FwhnHDONbvbcGNQ+uGwAWSuNxYDyvQzAEC607b5JuVQI7vPA6fdQyVw/dSsfRDjKe8H64KCamS7brY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=DrJ8nKd1aU1lgKi3R9B8oX1GSQx/4p5C+E+PrrjCCKanbkgXiQrC1aBM554KN+AFZuBnNW4qXLju4cglwLPu1iT5LtS1h5IIEZPU/zSm3mMEn2oVMSs6HgFiPNUJPEUtNMNvwYV9TaHzYWtT5/gMdCcO6cU5GoicfcLCImbaRhQ=
- In-reply-to: <482A7A47.4010906@xxxxxxxxx>
- References: <482A7A47.4010906@xxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
There are sometimes difficulties changing a window set up for using pygame into one used for PyOpenGL, or vice-versa. The error you're getting implies this sort of error--are you accidentally using the wrong window? PyOpenGL might just not like being in a subprocess, or being quit in a subprocess.
>>> import pygame
>>> from pygame.locals import *
>>> from OpenGL.GL import *
>>> pygame.init()
(6, 0)
>>> pygame.display.set_mode((100,100),OPENGL|DOUBLEBUF)
<Surface(100x100x32 SW)>
>>> pygame.display.quit()
>>> pygame.display.set_mode((100,100),OPENGL|DOUBLEBUF)
<Surface(100x100x32 SW)>
>>> pygame.display.quit()
As this shows, it is perfectly possible to build an OpenGL window several times, but subprocesses might put a different spin on it.
Ian