473,326 Members | 2,095 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

about pyopengl

I am a chinese boy,my english is not good,so i don not know how to
tell you about my question,i hope you can understand what i say.
I like python, and now i using pyopengl to draw three-dimensional.
but how can i use mouse to control objects?such as selecting object.I
know a function( glSelectBuffer() ) can be used,In C language the
format is glSelectBuffer(size, buffer), but in python the format is
glSelectBuffer(size), how can i get the "buffer" pointer?
The following is one section function of my codes:
def ProcessSelection(x,y):
viewport=range(4)
glSelectBuffer(64)
viewport=glGetIntegerv(GL_VIEWPORT)
glMatrixMode(GL_PROJECTION)
glPushMatrix()
glRenderMode(GL_SELECT)
glLoadIdentity()
gluPickMatrix(x, viewport[3]-y, 2, 2, viewport)
gluPerspective(45.0, aspect, 0.1, 200.0)

DrawButton()
hits=glRenderMode(GL_RENDER)

glMatrixMode(GL_PROJECTION)
glPopMatrix()
glMatrixMode(GL_MODELVIEW)

If you know how to do ,can you mail to me?thank you!
my e-mail is xu***********@yahoo.com.cn

Oct 3 '05 #1
0 877

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jimmy Johns | last post by:
Hi, why hasn't there a version of pyOpenGL for python 2.3.x yet? Currently the binary installers for windows only work with python 2.2, and will give an when installing for python 2.3. I can't...
3
by: Steven Gutstein | last post by:
This is probably a fairly newbie type problem, but I'm trying to use PyOpenGL, and don't seem to have installed it correctly. I'm running Python 2.3 on a Windows NT machine. Whenever I go into...
0
by: Timo Finnilä | last post by:
Hi, I'm having some weird issues with Python 2.4 and PyOpenGL 2.0.2.01 (and also with older versions). When I call glutGetModifiers from event handler functions (set using glutMouseFunc,...
1
by: Kirill Kuvaldin | last post by:
Hello All! My program in python uses PyOpenGL and I need to convert it to a standalone windows executable file. Following to these instructions...
2
by: Erik Max Francis | last post by:
I was interesting in adding selection and hit testing to ZOE, and was looking at the PyOpenGL wrappers' handling of selection and picking. I see glSelectBuffer to specify the size of the buffer,...
5
by: Sébastien Ramage | last post by:
Bonjour à tous, Dans la folie j'ai installé le nouveau python, impatient de voir les nouveautés mais je pense que j'ai été un peu rapide car j'ai voulu utiliser pyOpenGL et là problème il...
0
by: sweetmelon | last post by:
(I'm a newbie in Python and pyOpenGL.) Environment: WinXP SP2 Python ver. 2.5 WingIDE easy_install is installed PIL, pyNum is installed Download PyOpenGL-3.0.0a5-py2.5.egg run: easy_install...
2
by: seb.haase | last post by:
Hi, I am distributing a package with a precompiled collection of modules and packages useful for Python based medical/biological/astronomical image analysis and algorithm development. (Codename:...
0
by: Colin J. Williams | last post by:
I have just installed PyOpenGL and get a series of warning messages: Best match: PyOpenGL 3.0.0b3 Downloading...
1
by: Clay Hobbs | last post by:
I need a tutorial for PyOpenGL (specifically, to be used with wxPython). I searched with Google and didn't find one. Does anybody know where one is? -- Ratfink
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.