pyopengl-users Mailing List for PyOpenGL (Page 60)
Brought to you by:
mcfletch
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(81) |
Oct
(41) |
Nov
(55) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(34) |
Feb
(3) |
Mar
(16) |
Apr
(5) |
May
(10) |
Jun
(13) |
Jul
(24) |
Aug
(14) |
Sep
(14) |
Oct
(9) |
Nov
(10) |
Dec
(16) |
2003 |
Jan
(25) |
Feb
(59) |
Mar
(9) |
Apr
(21) |
May
(54) |
Jun
(4) |
Jul
(16) |
Aug
(19) |
Sep
(19) |
Oct
(15) |
Nov
(13) |
Dec
(22) |
2004 |
Jan
(19) |
Feb
(8) |
Mar
(20) |
Apr
(16) |
May
(13) |
Jun
(18) |
Jul
(18) |
Aug
(14) |
Sep
(24) |
Oct
(47) |
Nov
(20) |
Dec
(10) |
2005 |
Jan
(23) |
Feb
(31) |
Mar
(11) |
Apr
(29) |
May
(18) |
Jun
(7) |
Jul
(11) |
Aug
(12) |
Sep
(8) |
Oct
(4) |
Nov
(11) |
Dec
(7) |
2006 |
Jan
(7) |
Feb
(8) |
Mar
(15) |
Apr
(3) |
May
(8) |
Jun
(25) |
Jul
(19) |
Aug
(3) |
Sep
(17) |
Oct
(27) |
Nov
(24) |
Dec
(9) |
2007 |
Jan
(6) |
Feb
(43) |
Mar
(33) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(8) |
Sep
(11) |
Oct
(22) |
Nov
(15) |
Dec
(18) |
2008 |
Jan
(14) |
Feb
(6) |
Mar
(6) |
Apr
(37) |
May
(13) |
Jun
(17) |
Jul
(22) |
Aug
(16) |
Sep
(14) |
Oct
(16) |
Nov
(29) |
Dec
(13) |
2009 |
Jan
(7) |
Feb
(25) |
Mar
(38) |
Apr
(57) |
May
(12) |
Jun
(32) |
Jul
(32) |
Aug
(35) |
Sep
(10) |
Oct
(28) |
Nov
(16) |
Dec
(49) |
2010 |
Jan
(57) |
Feb
(37) |
Mar
(22) |
Apr
(15) |
May
(45) |
Jun
(25) |
Jul
(32) |
Aug
(7) |
Sep
(13) |
Oct
(2) |
Nov
(11) |
Dec
(28) |
2011 |
Jan
(35) |
Feb
(39) |
Mar
|
Apr
(25) |
May
(32) |
Jun
(17) |
Jul
(29) |
Aug
(10) |
Sep
(26) |
Oct
(9) |
Nov
(28) |
Dec
(4) |
2012 |
Jan
(24) |
Feb
(47) |
Mar
(4) |
Apr
(8) |
May
(9) |
Jun
(6) |
Jul
(4) |
Aug
(1) |
Sep
(4) |
Oct
(28) |
Nov
(2) |
Dec
(2) |
2013 |
Jan
(11) |
Feb
(3) |
Mar
(4) |
Apr
(38) |
May
(15) |
Jun
(11) |
Jul
(15) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(3) |
Dec
(14) |
2014 |
Jan
(24) |
Feb
(31) |
Mar
(28) |
Apr
(16) |
May
(7) |
Jun
(6) |
Jul
(1) |
Aug
(10) |
Sep
(10) |
Oct
(2) |
Nov
|
Dec
|
2015 |
Jan
(6) |
Feb
(5) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
(19) |
Dec
|
2016 |
Jan
(6) |
Feb
(1) |
Mar
(7) |
Apr
|
May
(6) |
Jun
|
Jul
(3) |
Aug
(7) |
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
2018 |
Jan
(9) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: iRobot i. <iro...@ho...> - 2008-07-27 03:48:13
|
I try to install PyOpenGL-3.0.0b4 by typing 'python setup.py install'it's running and display its processing status.But when it display 'Extracting PyOpenGL-3.0.0b4-py2.5.egg to g:\python25\lib\site-packages', it said one file in the sub-directory \OpenGL\arrays\vbo-junk.py' has error at line 2. And display <<<<<<< vbo.py ^SyntaxError: invalid syntaxAnd then it ends up.I ignore it but I found that I can't use PyOpenGL (running the tutorial file 3 provided by PyODE).I try to look at the vbo_junk.py and found that there are many unknown command like '<<<<<<< vbo' and '>>>>>>> 1.5' at various part inside the file.I don't know what is the problem here. Can anyone help?I have install python2.5 and the latest version of ez_setup.I fail with both the command 'easy_install PyOpenGL' and 'python setup.py install', end up with the same screen.I have try in the WinXp and Win98 platform and end up with the same result. _________________________________________________________________ Messenger, our Windows Live Messenger. http://get.live.com/wl/all |
From: Greg E. <gre...@ca...> - 2008-07-23 00:33:31
|
Gary Herron wrote: > All the transformations are recorded by OpenGL in a 4x4 matrix. > You can recover that matrix like this: > > buff = (ctypes.c_double*16)() > pyglet.gl.glGetDoublev(stack, buff) However, reading back the OpenGL matrix as part of your rendering process isn't really a good thing to do, since it requires waiting for any pipelined OpenGL commands that you've sent to complete. This can slow things down considerably. If you're doing this a lot, it may be better to keep track of the transformations yourself. -- Greg |
From: Black <py...@bl...> - 2008-07-22 19:18:30
|
When you use build a display list using GL_COMPILE, the various state variables aren't affected, the commands themselves are just being stored. Since glGet is one of the commands that isn't stored, it gets executed immediately and you have the problem you are seeing. You can try GL_COMPILE_AND_EXECUTE. I tend not to use it as it doesn't work on the system that I use, but it might work for you. Since it is executing the OpenGL commands as they are stored, glGet should get the correct result. The bigger question to ask is what you are using the information for? The glGet won't be stored, so the effect will be the same as keeping track of it yourself. However, if you are trying to get changing behavior out of your display list based on conditions outside of it, display lists are probably not the right answer anyway... On Jul 22, 2008, at 1:12 PM, Prashant Saxena wrote: > Thanks, > > Yes, I am doing this inside the glNewList(GL_COMPILE). > Is there any way to solve the problem or do I calculate manually? > > > ----- Original Message ---- > From: Black <py...@bl...> > To: pyo...@li... > Sent: Tuesday, July 22, 2008 10:24:27 PM > Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack > > Two quick things to check: > a) Is the MODELVIEW matrix the current matrix (i.e., the one being > affected by the glTranslates)? > If not, well, it should be > b) Are you doing this while constructing a display list with > glNewList(GL_COMPILE)? > If so, the matrix isn't being updated and this won't work > > On Jul 22, 2008, at 12:32 PM, Prashant Saxena wrote: > > > I am sorry but I didn't get any success with your code. I tried > this: > > > > glPushMatrix() > > glTranslate(5,0,0) > > glTranslate(10,0,0) > > glTranslate(5,0,0) > > # To get total increment of x axis(which is 5+10+5=20) > > modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) > > print modelview > > glPopMatrix() > > > > but I am getting this: > > [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], > > [0.0, 0.0, 0.0, 1.0]] > > Which does,'t solve my problem. > > > > ----- Original Message ---- > > From: Prashant Saxena <ani...@ya...> > > To: Gary Herron <gh...@is...> > > Sent: Tuesday, July 22, 2008 9:59:38 PM > > Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack > > > > I am sorry but I didn't get any success with your code. I tried > this: > > > > glPushMatrix() > > glTranslate(5,0,0) > > glTranslate(10,0,0) > > glTranslate(5,0,0) > > # To get total increment of x axis(which is 5+10+5=20) > > modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) > > print modelview > > glPopMatrix() > > > > but I am getting this: > > [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], > > [0.0, 0.0, 0.0, 1.0]] > > Which does,'t solve my problem. > > > > > > ----- Original Message ---- > > From: Gary Herron <gh...@is...> > > Cc: pyo...@li... > > Sent: Tuesday, July 22, 2008 8:48:24 PM > > Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack > > > > Shantytown Saxena wrote: > > > > > > glPushMatrix() > > > glTranslate(5,0,0) > > > glTranslate(10,0,0) > > > glTranslate(5,0,0) > > > # How do I get here total increment of x axis(which is 5+10+5=20) > > > before I Pop up. > > > glPopMatrix() > > > > All the transformations are recorded by OpenGL in a 4x4 matrix. > > You can recover that matrix like this: > > > > buff = (ctypes.c_double*16)() > > pyglet.gl.glGetDoublev(stack, buff) > > > > If you started with the identity and did no other transformations > > you'll > > find the 20 in that 4x4 array. > > > > In either the [0,3] or [3,0] element. (I've forgotten which way > > Opengl > > stores the array now.) > > > > Gary Herron > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > > Build the coolest Linux based applications with Moblin SDK & win > > great prizes > > > Grand prize is a trip for two to an Open Source event anywhere in > > the world > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > PyOpenGL Homepage > > > http://pyopengl.sourceforge.net > > > _______________________________________________ > > > PyOpenGL-Users mailing list > > > PyO...@li... > > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win > > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > PyOpenGL Homepage > > http://pyopengl.sourceforge.net > > _______________________________________________ > > PyOpenGL-Users mailing list > > PyO...@li... > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win > > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > > PyOpenGL Homepage > > http://pyopengl.sourceforge.net > > _______________________________________________ > > PyOpenGL-Users mailing list > > PyO...@li... > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > |
From: Gary H. <gh...@is...> - 2008-07-22 18:14:52
|
Prashant Saxena wrote: > I am sorry but I didn't get any success with your code. I tried this: > > glPushMatrix() > glTranslate(5,0,0) > glTranslate(10,0,0) > glTranslate(5,0,0) > # To get total increment of x axis(which is 5+10+5=20) > modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) > print modelview > glPopMatrix() My mistake. The glGetDouble/glGetFloat call is the right thing here, but I was confusing my Python-to-OpenGL libraries. Your syntax is correct for PyOpenGL. (Mine was for a library called Pyglet.) > > but I am getting this: > [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], > [0.0, 0.0, 0.0, 1.0]] > Which does,'t solve my problem. There are several matrix stacks maintained by OpenGL. Which one are you using when you issue the glPushMatrix-glTranslate-glPopMatrix calls? Probably not the GL_MODELVIEW_MATRIX since that's still the identity when you get it back. You need to choose your matrix first: glMatrixMode(GL_MODELVIEW) # Specify which matrix then do your matrix ops ... = glGetFloatv( GL_MODELVIEW_MATRIX ) # Retrieve the matrix back Gary Herron > > ----- Original Message ---- > From: Prashant Saxena <ani...@ya...> > To: Gary Herron <gh...@is...> > Sent: Tuesday, July 22, 2008 9:59:38 PM > Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack > > I am sorry but I didn't get any success with your code. I tried this: > > glPushMatrix() > glTranslate(5,0,0) > glTranslate(10,0,0) > glTranslate(5,0,0) > # To get total increment of x axis(which is 5+10+5=20) > modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) > print modelview > glPopMatrix() > > but I am getting this: > [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], > [0.0, 0.0, 0.0, 1.0]] > Which does,'t solve my problem. > > > ----- Original Message ---- > From: Gary Herron <gh...@is...> > Cc: pyo...@li... > Sent: Tuesday, July 22, 2008 8:48:24 PM > Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack > > Shantytown Saxena wrote: > > > > glPushMatrix() > > glTranslate(5,0,0) > > glTranslate(10,0,0) > > glTranslate(5,0,0) > > # How do I get here total increment of x axis(which is 5+10+5=20) > > before I Pop up. > > glPopMatrix() > > All the transformations are recorded by OpenGL in a 4x4 matrix. > You can recover that matrix like this: > > buff = (ctypes.c_double*16)() > pyglet.gl <http://pyglet.gl.gl>.glGetDoublev(stack, buff) > > If you started with the identity and did no other transformations you'll > find the 20 in that 4x4 array. > > In either the [0,3] or [3,0] element. (I've forgotten which way Opengl > stores the array now.) > > Gary Herron > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > PyOpenGL Homepage > > http://pyopengl.sourceforge.net > > _______________________________________________ > > PyOpenGL-Users mailing list > > PyO...@li... > <mailto:PyO...@li...> > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > <mailto:PyO...@li...> > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |
From: Black <py...@bl...> - 2008-07-22 16:54:23
|
Two quick things to check: a) Is the MODELVIEW matrix the current matrix (i.e., the one being affected by the glTranslates)? If not, well, it should be b) Are you doing this while constructing a display list with glNewList(GL_COMPILE)? If so, the matrix isn't being updated and this won't work On Jul 22, 2008, at 12:32 PM, Prashant Saxena wrote: > I am sorry but I didn't get any success with your code. I tried this: > > glPushMatrix() > glTranslate(5,0,0) > glTranslate(10,0,0) > glTranslate(5,0,0) > # To get total increment of x axis(which is 5+10+5=20) > modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) > print modelview > glPopMatrix() > > but I am getting this: > [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], > [0.0, 0.0, 0.0, 1.0]] > Which does,'t solve my problem. > > ----- Original Message ---- > From: Prashant Saxena <ani...@ya...> > To: Gary Herron <gh...@is...> > Sent: Tuesday, July 22, 2008 9:59:38 PM > Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack > > I am sorry but I didn't get any success with your code. I tried this: > > glPushMatrix() > glTranslate(5,0,0) > glTranslate(10,0,0) > glTranslate(5,0,0) > # To get total increment of x axis(which is 5+10+5=20) > modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) > print modelview > glPopMatrix() > > but I am getting this: > [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], > [0.0, 0.0, 0.0, 1.0]] > Which does,'t solve my problem. > > > ----- Original Message ---- > From: Gary Herron <gh...@is...> > Cc: pyo...@li... > Sent: Tuesday, July 22, 2008 8:48:24 PM > Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack > > Shantytown Saxena wrote: > > > > glPushMatrix() > > glTranslate(5,0,0) > > glTranslate(10,0,0) > > glTranslate(5,0,0) > > # How do I get here total increment of x axis(which is 5+10+5=20) > > before I Pop up. > > glPopMatrix() > > All the transformations are recorded by OpenGL in a 4x4 matrix. > You can recover that matrix like this: > > buff = (ctypes.c_double*16)() > pyglet.gl.glGetDoublev(stack, buff) > > If you started with the identity and did no other transformations > you'll > find the 20 in that 4x4 array. > > In either the [0,3] or [3,0] element. (I've forgotten which way > Opengl > stores the array now.) > > Gary Herron > > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > PyOpenGL Homepage > > http://pyopengl.sourceforge.net > > _______________________________________________ > > PyOpenGL-Users mailing list > > PyO...@li... > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Prashant S. <ani...@ya...> - 2008-07-22 16:32:22
|
I am sorry but I didn't get any success with your code. I tried this: glPushMatrix() glTranslate(5,0,0) glTranslate(10,0,0) glTranslate(5,0,0) # To get total increment of x axis(which is 5+10+5=20) modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) print modelview glPopMatrix() but I am getting this: [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]] Which does,'t solve my problem. ----- Original Message ---- From: Prashant Saxena <ani...@ya...> To: Gary Herron <gh...@is...> Sent: Tuesday, July 22, 2008 9:59:38 PM Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack I am sorry but I didn't get any success with your code. I tried this: glPushMatrix() glTranslate(5,0,0) glTranslate(10,0,0) glTranslate(5,0,0) # To get total increment of x axis(which is 5+10+5=20) modelview = glGetFloatv( GL_MODELVIEW_MATRIX ) print modelview glPopMatrix() but I am getting this: [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]] Which does,'t solve my problem. ----- Original Message ---- From: Gary Herron <gh...@is...> Cc: pyo...@li... Sent: Tuesday, July 22, 2008 8:48:24 PM Subject: Re: [PyOpenGL-Users] get Translation inside matrix stack Shantytown Saxena wrote: > > glPushMatrix() > glTranslate(5,0,0) > glTranslate(10,0,0) > glTranslate(5,0,0) > # How do I get here total increment of x axis(which is 5+10+5=20) > before I Pop up. > glPopMatrix() All the transformations are recorded by OpenGL in a 4x4 matrix. You can recover that matrix like this: buff = (ctypes.c_double*16)() pyglet.gl.glGetDoublev(stack, buff) If you started with the identity and did no other transformations you'll find the 20 in that 4x4 array. In either the [0,3] or [3,0] element. (I've forgotten which way Opengl stores the array now.) Gary Herron > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net _______________________________________________ PyOpenGL-Users mailing list PyO...@li... https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Gary H. <gh...@is...> - 2008-07-22 15:18:24
|
Shantytown Saxena wrote: > > glPushMatrix() > glTranslate(5,0,0) > glTranslate(10,0,0) > glTranslate(5,0,0) > # How do I get here total increment of x axis(which is 5+10+5=20) > before I Pop up. > glPopMatrix() All the transformations are recorded by OpenGL in a 4x4 matrix. You can recover that matrix like this: buff = (ctypes.c_double*16)() pyglet.gl.glGetDoublev(stack, buff) If you started with the identity and did no other transformations you'll find the 20 in that 4x4 array. In either the [0,3] or [3,0] element. (I've forgotten which way Opengl stores the array now.) Gary Herron > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |
From: Prashant S. <ani...@ya...> - 2008-07-22 10:16:03
|
glPushMatrix() glTranslate(5,0,0) glTranslate(10,0,0) glTranslate(5,0,0) # How do I get here total increment of x axis(which is 5+10+5=20) before I Pop up. glPopMatrix() |
From: Greg E. <gre...@ca...> - 2008-07-19 02:30:18
|
Mike C. Fletcher wrote: > As a note: display lists tend to be very slow on modern hardware > (compared to array-based geometry). They'll be faster than doing > per-vertex rendering in Python, but you will likely want to use > array-based operations rather than display lists if you want reasonable > performance. Maybe, maybe not. Speed of executing Python code may still be the bottleneck in a Python-driven game, so one display list call could be faster than several Python calls to set up and execute a series of array-based operations. As always, you should measure rather than making assumptions where optimisation is concerned. -- Greg |
From: Greg E. <gre...@ca...> - 2008-07-19 02:01:34
|
Prashant Saxena wrote: > I did this to test > whether I can include some > condition based drawing between 'glNewList' & 'glEndList'. These > condition are based on some global variables. It seems 'List' > instruction behaves like > hard coded. Am I right here? Yes. A display list records a sequence of OpenGL calls and the parameter values they had at the time of those calls, and that's all. There is no way of performing conditional branching within a display list. If you want different sequences of operations each time, you will need to record a separate display list for each possible sequence, or break the sequence up into several display lists that you can mix and match to get the effect you want. -- Greg |
From: Mike C. F. <mcf...@vr...> - 2008-07-18 13:45:49
|
Prashant Saxena wrote: > While doing couple of experiments with 'List' system I have got couple > of doubts: > > glNewList(...,GL_COMPILE) > glNewList.... > print 'just for the test' > glEndList() > > When I initialize the list, the print statement executes. Later > calling this list doesn't print the 'print' statement. I did this to > test whether I can include some > condition based drawing between 'glNewList' & 'glEndList'. These > condition are based on some global variables. It seems 'List' > instruction behaves like > hard coded. Am I right here? Display lists work by copying all of the *GL* commands you execute, including the data they execute across to the card's internal memory (or the GL's internal memory if your card doesn't have enough RAM). As a result they cannot access your local (main memory) data. The display list does not include any *Python* calls at all, only the GL-level calls. As a note: display lists tend to be very slow on modern hardware (compared to array-based geometry). They'll be faster than doing per-vertex rendering in Python, but you will likely want to use array-based operations rather than display lists if you want reasonable performance. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Prashant S. <ani...@ya...> - 2008-07-18 09:29:32
|
While doing couple of experiments with 'List' system I have got couple of doubts: glNewList(...,GL_COMPILE) glNewList.... print 'just for the test' glEndList() When I initialize the list, the print statement executes. Later calling this list doesn't print the 'print' statement. I did this to test whether I can include some condition based drawing between 'glNewList' & 'glEndList'. These condition are based on some global variables. It seems 'List' instruction behaves like hard coded. Am I right here? |
From: duncan d. <dun...@gm...> - 2008-07-15 12:10:47
|
Hi. I downloaded the new version of PyQGLViewer for windows (the egg file) and get this error when I try to run an example ------------- $ python multiView.py questo pythone gira in utf-8 Traceback (most recent call last): File "multiView.py", line 57, in <module> main() File "multiView.py", line 47, in main side = Viewer(scene,0,vSplit1) File "multiView.py", line 15, in __init__ QGLViewer.__init__(self, parent,shareWidget) TypeError: argument 1 of QGLViewer() has an invalid type ------------ with the other examples I get: --------- $ python simpleViewer.py questo pythone gira in utf-8 TypeError: init() takes exactly 1 argument (2 given) TypeError: draw() takes exactly 1 argument (2 given) TypeError: draw() takes exactly 1 argument (2 given) Traceback (most recent call last): File "simpleViewer.py", line 34, in closeEvent if helpwidget.isVisible() : AttributeError: 'NoneType' object has no attribute 'isVisible' ---------- This is the configuration of the system: Qt 4.4.0 PyQt 4.4.2 Python 2.5 libQGLViewer 2.2.6-3 (with you patch to build PyQGLViewer) And another question: if I want to rebuild the 0.4 version of PyQglViewer against the 2.3.0 version of libQGLViewer, the patch to apply is the same ? So I try to build from source, but then I get this error: ------ Setup the qglviewer package build. sip invokation: 'c:\\Programmi\\python25\\sip. exe -I c:\\Programmi\\Python25\\sip\\PyQt4 -b ./tmp/QGLViewer.sbf -c ./tmp -x VendorID -t WS_WIN -x PyQt_NoPrintRangeBug -t Qt_4_4_0 -g -x SIP_FRIEND_EQUAL_SUPPORT -t QGLViewer_2_2_6 src/sip/QGLViewerModule.sip' sip: QFileIconProvider is undefined SIP failed to generate the C++ code. ----- with the same setup under window XP The libQGLViewer work well, since I can run the example. Any idea ? thank bye Gianluca |
From: Black <py...@bl...> - 2008-07-11 16:36:43
|
As a side note, this probably has little to do with PyOpenGL and you might get more responses form a list more dedicated to OpenGL debugging.... That said, it is not clear what you mean by "not looking as smooth as it has to" and you don't include anything about what the texture looks like, where it came from or how you are using it, so it is hard to know what you are doing "wrong". It is slightly suspicious to me that you are using an RGBA texture for fonts, but maybe that is just me. The one generic piece of advice I can give you about choppy looking texture mapped fonts is that I found that on some systems I had problems if the quads I was mapping the texture to weren't pixel aligned to the display (i.e., placed in such a way that the vertices of the quad didn't correspond to actual pixels). On Jul 11, 2008, at 12:14 PM, Prashant Saxena wrote: > Hi, > > I am using texture mapped polygon technique to display strings on > canvas. The texture is in 'tiff' format with alpha channel. Problem > is that the font > is not looking as smooth as it has to. > > This is my 'init' function: > def InitGL(self): > self.size = self.GetClientSize() > glEnable(GL_BLEND) > glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) > glEnable(GL_TEXTURE_2D) > glEnable(GL_LINE_SMOOTH) > glHint(GL_LINE_SMOOTH_HINT, GL_NICEST) > glClearColor(0.5, 0.5, 0.5, 0.0) > glDisable(GL_DEPTH_TEST) > glShadeModel(GL_SMOOTH) > glMatrixMode(GL_PROJECTION) > glLoadIdentity() > glOrtho( 0.0, self.size.width, self.size.height, 0.0, -1.0, > 1.0 ) > glMatrixMode(GL_MODELVIEW) > > This is my font texture file loader: > > textureSurface = Image.open(textureFile) > textureData = textureSurface.convert( "RGBA").tostring() > width, height = textureSurface.size[0], textureSurface.size[1] > > #Bind it to a texture > textureId = glGenTextures(1) > fontTexture[0] = textureId > > glBindTexture(GL_TEXTURE_2D, textureId) > > glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, > GL_RGBA, GL_UNSIGNED_BYTE, textureData ) > > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now athttp://www.sourceforge.net/community/cca08_______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Prashant S. <ani...@ya...> - 2008-07-11 16:14:37
|
Hi, I am using texture mapped polygon technique to display strings on canvas. The texture is in 'tiff' format with alpha channel. Problem is that the font is not looking as smooth as it has to. This is my 'init' function: def InitGL(self): self.size = self.GetClientSize() glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glEnable(GL_TEXTURE_2D) glEnable(GL_LINE_SMOOTH) glHint(GL_LINE_SMOOTH_HINT, GL_NICEST) glClearColor(0.5, 0.5, 0.5, 0.0) glDisable(GL_DEPTH_TEST) glShadeModel(GL_SMOOTH) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho( 0.0, self.size.width, self.size.height, 0.0, -1.0, 1.0 ) glMatrixMode(GL_MODELVIEW) This is my font texture file loader: textureSurface = Image.open(textureFile) textureData = textureSurface.convert( "RGBA").tostring() width, height = textureSurface.size[0], textureSurface.size[1] #Bind it to a texture textureId = glGenTextures(1) fontTexture[0] = textureId glBindTexture(GL_TEXTURE_2D, textureId) glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData ) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) |
From: Dirk R. <di...@li...> - 2008-07-08 14:28:33
|
Prashant Saxena wrote: > Hi, > > How can I draw 'Rounded Rectangle' and a circle. I don't want want to use > textures as size varies at run time. This is for an orthographic application. It depends on how many you have. For performance nothing beats textures. I would still use them. They scale well and automatically if you create the mipmaps yourself, and I'd use them only for the corners of the rectangle to take care of aspect ratio changes. Just my $.02 Dirk |
From: Mike C. F. <mcf...@vr...> - 2008-07-08 11:49:03
|
Prashant Saxena wrote: > Hi, > > How can I draw 'Rounded Rectangle' and a circle. I don't want want to > use textures as size varies at run time. This is for an orthographic > application. You would normally tessellate the corners or the circle according to the screen-size of the shape (that is, more points if the shape is larger). sin/cos from numpy will work fine on numpy aranges to produce the circular sections at whatever resolution you need. If you want to get really fancy, you could use evaluators or even NURBS, but that's probably way too complex and not worth the work unless you really have higher-order curves to render as well. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Mike C. F. <mcf...@vr...> - 2008-07-08 11:44:37
|
Prashant Saxena wrote: > Hi, > > How to implement 'zoom' when designing an orthographic view base > application. I would prefer if there is a way where we can move camera > in/out on screen axis to perform zoom. It's similar to commercial 3D > application like Maya or 3ds max where you an move the orthographic > camera. > > I have tried using 'glScale' but it doesn't meet my requirements. > 'glOrtho' doesn't support camera position. Do I have to go for > 'glPerspective' ? Haven't done much ortho work, but the theory is this: glScale( ) glTranslate( ) With the negative position of the camera before you start drawing your scene. The glPerspective/glOrtho stuff is configuring the internals of your camera. The model-view matrix is where you should configure your viewing-position. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Prashant S. <ani...@ya...> - 2008-07-08 05:03:29
|
Hi, How can I draw 'Rounded Rectangle' and a circle. I don't want want to use textures as size varies at run time. This is for an orthographic application. Thanks |
From: Prashant S. <ani...@ya...> - 2008-07-08 05:00:27
|
Hi, How to implement 'zoom' when designing an orthographic view base application. I would prefer if there is a way where we can move camera in/out on screen axis to perform zoom. It's similar to commercial 3D application like Maya or 3ds max where you an move the orthographic camera. I have tried using 'glScale' but it doesn't meet my requirements. 'glOrtho' doesn't support camera position. Do I have to go for 'glPerspective' ? |
From: Mike C. F. <mcf...@vr...> - 2008-06-27 11:42:43
|
Jérôme NAYLIES wrote: > Hi > > When I use easy_install, the installation try to connect to the Internet or > this action is not possible from my Sun Solaris machine. > > So, I Can't use this option ! > > Jerome > If you download the distribution (source) file to your local machine you should be able to run this from the directory where you saved the file: easy_install -f . --no-deps PyOpenGL which *should* only search the local directory. IIRC you can also explicitly spell out the whole name of the file. I will be on IRC on freenode #pyopengl in an hour or so and can try to walk you through it then if you like. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Mike C. F. <mcf...@vr...> - 2008-06-27 03:28:46
|
Jérôme NAYLIES wrote: > > Hi all > > I’m new on this list so I’m sorry if my question was misplaced ! > > I apologize for my poor English, I’m french. > > I want to install PyOpenGL-3.0.0b3 on a Sun Solaris without Internet > Access with Python 2.4 > > ctypes was previously correctly intalled but setuptools seem’s not to > see it. So, PyOpenGL try to connect to the Internet to download and > install ctypes but it can’t. > > Hows can I install do ? > I'm guessing (don't have time to test tonight) that the ways you could make this work would be: * add a --no-deps flag to the easy_install PyOpenGL call, this *should* prevent dependency negotiation * use easy_install ctypes to re-install the ctypes package so that easy_install considers the package installed and thus available The long-term solution is probably to fix easy_install/setuptools so that there's a reasonable way to write a test to say "if this code succeeds, this dependency is satisfied" or the like. Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Jérôme N. <jer...@so...> - 2008-06-25 09:28:39
|
Hi all Im new on this list so Im sorry if my question was misplaced ! I apologize for my poor English, Im french. I want to install PyOpenGL-3.0.0b3 on a Sun Solaris without Internet Access with Python 2.4 ctypes was previously correctly intalled but setuptools seems not to see it. So, PyOpenGL try to connect to the Internet to download and install ctypes but it cant. Hows can I install do ? Thanks Jérôme. |
From: Mike C. F. <mcf...@vr...> - 2008-06-22 05:23:56
|
Hi all, Have been looking into providing some Vertex Buffer Object wrappers. There's a quick summary on my blog: http://blog.vrplumber.com/index.php?/archives/2151-OpenGL-Vertex-Buffer-Objects-VBO.html which is basically asking for input on the API people feel they need for using VBOs from PyOpenGL. The current attempt tries to make the VBO look like just another data-storage format. At the moment it probably only works with Numpy arrays, but the idea is to try to generalize it to work with all of the data-formats we support. It will also need to be coded to work with non-ARB-extension versions of the VBO interfaces. Current CVS has the OpenGL/array/vbo module for those who want to play with it. There's a very minimal test case in the OpenGL/tests/tests.py module. Anyway, tossing it out for discussion. I'm not really looking for a very-high-level API that requires many objects and inter-object protocols to try to hide the existence of VBOs (that really belongs in client code), just something that makes it easy to use the feature explicitly. If people have thoughts about reasonable Framebuffer object APIs too, let me know. Take care, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: altern <al...@gm...> - 2008-06-19 09:22:35
|
hi jason i am interested myself on performance of pyopengl within wxpython. do you have some example of the new version that uses display lists you could share? thanks. enrike Jason Hayes(e)k dio: > > > Ignore my previous post. I just learned about display lists and I no > longer have any performance problems. In fact, I can now easily render > over 120,000 points. > > > > -Jason > > > > *From:* Jason Hayes > *Sent:* Monday, June 02, 2008 3:57 PM > *To:* 'pyo...@li...' > *Subject:* Rendering performance under wxPython > > > > Hi, I am pretty new to using PyOpenGL (and OpenGL in general) and had a > rendering performance question. I am embedding an opengl canvas into a > wx.Frame. On my canvas, I am simply rendering ~10,000 points and the > performance is chugging. I’m trying to determine if the limiting factor > is wxPython or PyOpenGL? I doubt that OpenGL really has a problem with > this many points, but maybe I’m doing something wrong. Attached is a > text file of the code. > > > > Any feedback is appreciated. Thanks. > > > > _________________________________ > > Jason Hayes > > Technical Art Director > > THQ / Volition > > > > "Whenever I'm about to do something, I think > > "would an *idiot* do that?" and if they would, > > I do /not/ do that thing." > > > > - Dwight Schrute > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |