[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Collision Detection with Pygame/OpenGL Surfaces
- To: "pygame-users@xxxxxxxx" <pygame-users@xxxxxxxx>
- Subject: [pygame] Collision Detection with Pygame/OpenGL Surfaces
- From: "Ian Mallett" <geometrian@xxxxxxxxx>
- Date: Thu, 2 Aug 2007 11:25:53 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 02 Aug 2007 14:26:01 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=MB0iWcE/VYn+WNoXr2UpdbXxswTQ2CZ5lRcAINnNLTgodai1Np87P1gJIAvn83znfqmGY2JZc6HPE48WmvRgDbnJLhAEu8d2BmA919MVIGgGn8DZkLFJ5H32vr1aDY+WvCBEVxTpCkJLsNIL3SrFlPNFY3O5D4w3ozYJthxRVzY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=rxNathbbI4NW3Etp5DaAuaS0yIMSq527E0H3Ttf3QxxfTfBancjQnkFX4fhn7HEQGdXwKHVdt2F41KA3fA9lLDU/rzIuMEGCdf5/yIlgBPkcAay/2BfH6OOHjI5GxbQkGafMl+COXi3yUoZJwbXVQTZuKgFxNU8nnEfauLqp58g=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi,
I'm making a program for visualizing molecules. Each atom will be selected by the mouse. Since I know the color of each atom, my idea for detecting if a mouse is over one is as follows:
1: get the color of the pixel the mouse is over
2: if the color is __ select the atom with that color.
The problem is, pygame has issues with OpenGL surfaces and the call to Surface.get_at() declares I can't call an OpenGL surface. Is there any way to get around this?
Thanks,
Ian