pyopengl-users Mailing List for PyOpenGL (Page 80)
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: altern <al...@gm...> - 2005-06-28 07:32:57
|
hi all The latest version of Mirra is already available from: http://www.ixi-software.net/content/body_software_mirra.html This is a short description: Mirra is a 2D OpenGL graphics Python framework. Mirra allows for the creation of 2D interfaces, games or applications. Mirra focuses on interaction in a way like Macromedia Director or Flash do. Mirra can send and receive OpenSoundControl messages via the OSC module. Mirra works now under the following window toolkits : WxPython, Pygame(SDL) and GLUT. We have added support for Pygame and wxPython, optimise rendering, and extended the functionality of the built-in classes as well as fixed few bugs. We added more examples and documentation as well. I guess the code is far from beautiful :) but it does work and we have achieved all the points we actually set in the first moment when we started developing it. There a big 'To do' list and we hope it will continue growing and getting better and nicer. any type of feedback and contributions are more than welcome. thanks -- altern |
From: altern <al...@gm...> - 2005-06-27 21:31:34
|
hi i was wondering how could i render a etst with few lines. this is the way i render the text. The usual def text(s,x,y,z): glRasterPos3f(x,y,z) for char in s: glutBitmapCharacter(GLUT_BITMAP_8_BY_13, ord(char)) I tried to pass \n\ in the string to mark the carriage return but i guess this doesnt work with opengl. any tips? thanks! -- altern |
From: Rick M. <rm...@sa...> - 2005-06-20 16:19:15
|
Thanks to help given by Mike and others on this list, I've develop and released a little program that uses Python, OpenGL, and wxwidgets to do simple molecular visualization. The program is called Vimes, and is available at http://vimes.sf.net I would like to separate the widgets from the OpenGL window. Currently, I use wx.glcanvas.GLCanvas() to put an OpenGL window inside of a wx widget. However, for portability and flexibility, I'd like to separate the two, and have a separate OpenGL window and a separate set of wx widgets. The problem is that I don't know how to handle the event loops. I assume that the wx event loop is handling everything for me right now, and I don't know how to work with two separate event loops. Do I spawn a separate process for the viewer? If so, how do I talk to it? Has anyone done anything along these lines? If so, I'd be grateful for pointers. Rick Rick Muller - rm...@sa... - http://www.cs.sandia.gov/~rmuller Computational Materials Methods Sandia National Laboratories PO Box 5800, M/S 1110 Albuquerque, NM 87185-1110 |
From: Matt B. <ma...@rt...> - 2005-06-08 08:45:26
|
Howdy folks, I've been looking at the NeHe7 tutorial included with OpenGLcontext, trying to get normals working. I'm not worrying about the math for now, just copying & pasting some code from NeHe7 into my script. Here's my OpenGL-relevant code: # the following lines are called at startup screen = pygame.display.set_mode((x_res,y_res), OPENGL|DOUBLEBUF|FULLSCREEN) glMatrixMode(GL_PROJECTION) glEnable(GL_DEPTH_TEST) gluPerspective(45.0,x_res/y_res,0.1,100.0) glRotatef(15, 1, 0, 0) glLightfv(GL_LIGHT0, GL_AMBIENT, (0.2, .2, .2, 1.0)); glLightfv(GL_LIGHT0, GL_DIFFUSE, (.8,.8,.8)); glLightfv(GL_LIGHT0, GL_POSITION, (-2,0,3,1)); glLightModelfv(GL_LIGHT_MODEL_AMBIENT, (0.5, 0.1, 0.7, 1.0)) glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_NORMALIZE) # everything after this gets called every frame glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) x = 1 y = 1 z = -1 glRotatef(1, 1, 1, 0) # I then define some quads with normals, like this one (copied from the tutorial): glBegin(GL_QUADS); glNormal3f(0.0, 0.0, 1.0) glTexCoord2f(0.0, 0.0); glVertex3f(-1.0, -1.0, 1.0); glTexCoord2f(1.0, 0.0); glVertex3f( 1.0, -1.0, 1.0); glTexCoord2f(1.0, 1.0); glVertex3f( 1.0, 1.0, 1.0); glTexCoord2f(0.0, 1.0); glVertex3f(-1.0, 1.0, 1.0); # etc........ glEnd() pygame.display.flip() That's it. Note I did change the code that enables lighting, slightly. I tried it the way the tutorial said, didn't work, so I tried changing it a bit to remove the redundancy of setting up GL_LIGHT1 and disabling GL_LIGHT1 (any particular reason this is done?). Is there a "gotcha" with this lighting setup somewhere, or something dumb I'm doing? Everything looks fine compared to the tutorial, but my quads continue to have no shading whatsoever. FWIW, I do have textures on these quads. Is it possible for texture parameters to cause problems with lighting? I've scoured the net, read the OpenGL docs, and examined the NeHe7 tutorial carefully, no progress at all. -Matt Bailey |
From: Andrew W. <a_w...@MI...> - 2005-06-03 16:21:49
|
Hello, Could Someone point me to an example of using glConvolutionFilter2D to convolve an arbitrary kernel with an image? Thanks Andrew |
From: James E. <mil...@cl...> - 2005-06-02 00:55:58
|
I'm getting the following error while compiling PyOpenGL-2.0.2.01 on Fedora Core 3. Compile proceeds normally until reaching the _GLUT extension. building '_GLUT' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DGLX_PLATFORM -DNUMERIC -I/usr/include -I/usr/local/include -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/python2.3/Numeric -I/usr/include/python2.3 -c src/interface/_GLUT.c -o build/temp.linux-i686-2.3/src/interface/_GLUT.o In file included from src/interface/_GLUT.0014.inc:2439, from src/interface/_GLUT.c:10: /usr/include/GL/freeglut_ext.h:69: error: conflicting types for 'glutMouseWheelFunc' src/interface/_GLUT.0014.inc:2411: error: previous implicit declaration of 'glutMouseWheelFunc' was here /usr/include/GL/freeglut_ext.h:70: error: conflicting types for 'glutCloseFunc' src/interface/_GLUT.0014.inc:2420: error: previous implicit declaration of 'glutCloseFunc' was here /usr/include/GL/freeglut_ext.h:73: error: conflicting types for 'glutMenuDestroyFunc' src/interface/_GLUT.0014.inc:2429: error: previous implicit declaration of 'glutMenuDestroyFunc' was here error: command 'gcc' failed with exit status 1 Fedora Core 3 python-2.3.4-13.1 freeglut-2.2.0-14 Running build_w to rebuild the SWIG bindings has no effect. Thanks for any help you can offer, james evans |
From: Mike C. F. <mcf...@ro...> - 2005-05-23 03:34:29
|
Ridwan Sami wrote: >on mandrakelinux 10.1, after meeting dependencies and symlinking >/usr/X11 to /usr/X11R6, i did > >$ python setup.py install > >and got > >Togl to be built: Togl-1.6 >running install >error: invalid Python installation: unable to open >/usr/lib/python2.3/config/Makefile (No such file or directory) > >when i looked in /usr/lib/python2.3/, the config folder didn't exist. >python was installed with mandrakelinux 10.1. should it be there? how >do i fix this? > > There's likely a 'python-dev' or 'python-devel' package for your system. Some systems leave out the critical files needed for building Python extensions. Weird idea IMO. HTH, Mike ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Ridwan S. <rus...@ya...> - 2005-05-21 17:08:37
|
on mandrakelinux 10.1, after meeting dependencies and symlinking /usr/X11 to /usr/X11R6, i did $ python setup.py install and got Togl to be built: Togl-1.6 running install error: invalid Python installation: unable to open /usr/lib/python2.3/config/Makefile (No such file or directory) when i looked in /usr/lib/python2.3/, the config folder didn't exist. python was installed with mandrakelinux 10.1. should it be there? how do i fix this? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Andrew S. <str...@as...> - 2005-05-20 17:43:11
|
There's a Python wrapper for lib3ds as part of the Vision Egg: http://visionegg.org I don't think it's complete, but it's a start. I'd be happy to incorporate patches/improvements/whatever. Cheers! Andrew Simon Wittber wrote: > Hi Chaps, > > I'm building a simple game, and need some way to get models from my > designer team mate and display them in OpenGL, preferably using a > display list. > > I've looked at a bunch of libraries from vrplumber.com, but none of > the 3ds loader modules seem to work with the latest > Numeric/Python/PyOpenGL combination. > > What do people on this list generally use for loading and displaying models? > > Sw. > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_idt12&alloc_id344&op=click > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Dave P. <de...@bu...> - 2005-05-18 15:59:18
|
If you can export to OBJ, I have a basic loader/renderer that I wrote as an example for my students. OBJ isn't the best format for optimized rendering, of course, but it's simple and many programs can export it. The code is available at http://resumbrae.com/ub/dms423_f04/20/OBJFile.py http://resumbrae.com/ub/dms423_f04/20/Texture2D.py On Wed, 18 May 2005, Simon Wittber wrote: > Hi Chaps, > > I'm building a simple game, and need some way to get models from my > designer team mate and display them in OpenGL, preferably using a > display list. > > I've looked at a bunch of libraries from vrplumber.com, but none of > the 3ds loader modules seem to work with the latest > Numeric/Python/PyOpenGL combination. > > What do people on this list generally use for loading and displaying models? > > Sw. -- Dave Pape Assistant Professor http://resumbrae.com/ Media Study, University at Buffalo |
From: Simon W. <sim...@gm...> - 2005-05-18 13:51:33
|
Hi Chaps, I'm building a simple game, and need some way to get models from my designer team mate and display them in OpenGL, preferably using a display list. I've looked at a bunch of libraries from vrplumber.com, but none of the 3ds loader modules seem to work with the latest Numeric/Python/PyOpenGL combination. What do people on this list generally use for loading and displaying models= ? Sw. |
From: Matt B. <ma...@rt...> - 2005-05-18 08:49:24
|
Ben Jefferys wrote: <snip> > > I've never had this before so not sure why! The comments suggest that > they should be in Python's Makefile. Perhaps the python installed on > your system doesn't have a makefile, or indeed sources. You might want > to download the latest version of Python as sources, compile+install, > and maybe it will work then? > > Ben. I'm using the Python included with Slackware 9.1. I think I will go ahead and dump this package and compile from scratch, this isn't the first time distro-supplied packages have been trouble. Thanks for the reply. -Matt Bailey |
From: Ben J. <ben...@im...> - 2005-05-18 07:48:39
|
Matt Bailey wrote: > File "/usr/lib/python2.3/distutils/sysconfig.py", line 159, in >customize_compiler > cpp = cc + " -E" # not always >TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > >Any ideas? > > From the lines above this line, looks like you haven't got any C compiler specified in your configuration files: (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext) = \ get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO') I've never had this before so not sure why! The comments suggest that they should be in Python's Makefile. Perhaps the python installed on your system doesn't have a makefile, or indeed sources. You might want to download the latest version of Python as sources, compile+install, and maybe it will work then? Ben. |
From: Matt B. <ma...@rt...> - 2005-05-18 07:13:42
|
Howdy all, Trying to get pyopengl 2.0.1.09 to build on Linux 2.4.22, Slackware 9.1, with Python 2.3.1. I get the following error when running "setup.py install": File "/usr/lib/python2.3/distutils/sysconfig.py", line 159, in customize_compiler cpp = cc + " -E" # not always TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' Any ideas? -Matt Bailey |
From: altern <en...@al...> - 2005-05-16 17:15:46
|
hi all We just released the version 0.2 of Mirra the 2D openGL framework we are creating. It can be downloaded from www.ixi-software.net/content/body_software_mirra.html It is at the moent based on GLUT but we plan to have it working soon for Pygame and WxPython. any suggestions and feedback are welcome. -- enrike |
From: Franz S. <Fra...@am...> - 2005-05-12 15:03:32
|
Hello, I have posted some time ago a=20 into the support request tracker, but=20 did not get any answer. Is there someone so kind to take a look into it? the gear demo: http://mitglied.lycos.de/drpython/ClipBoard-2.jpg=20 and all other demos are messed up (with the display) I have: WinXp,=20 glut-3.7.6-bin.zip (117 KB)=20 PyOpenGL-2.0.2.01.py2.4-numpy23.exe --=20 Franz Steinh=E4usler |
From: Andrew S. <str...@as...> - 2005-05-09 15:26:02
|
read about "polygon offset", e.g. http://www.opengl.org/resources/faq/technical/polygonoffset.htm On May 9, 2005, at 3:40 AM, altern wrote: > hi > > i am doing 2D with opengl, i have this flickering when a textured > shape is drawn on same z position as another shape (textured or not). > This doesnt happen with normal shapes. > I thought that the one being drawn the last would go on top and no > flickering should happen. > > maybe i am skiping some setting related to texture drawing? > > thanks > > -- > enrike > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great > events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: altern <en...@al...> - 2005-05-09 11:00:47
|
hi i am doing 2D with opengl, i have this flickering when a textured shape is drawn on same z position as another shape (textured or not). This doesnt happen with normal shapes. I thought that the one being drawn the last would go on top and no flickering should happen. maybe i am skiping some setting related to texture drawing? thanks -- enrike |
From: <lax...@ya...> - 2005-05-07 00:42:53
|
I want to place a light at a certain position, namely (0, 1, -6). I tried doing it this way: glLightfv(GL_LIGHT0, GL_POSITION, [0, 1, -6]) and also this way: glLightfv(GL_LIGHT0, GL_POSITION, [0, 1, -6, 0]) and I did not get the result I wanted (the light wasn't where it was supposed to be). Oh, this reminds me of another thing - what is that 4th value for with all the glLight calls? In three dimensions one has three coordinates. After some fiddling, I ended up with code like this: lightpos = [0, 1, -6] glLightfv(GL_LIGHT0, GL_POSITION, lightpos) This code produced the desired results. Considering I changed nothing except the fact that I put the same exact list in a variable before calling the function, I am very confused as to why the 2nd version worked and not the first. Can anyone help me out? - Claudiu Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html |
From: Rich D. <dr...@in...> - 2005-05-02 22:55:50
|
On Thu, 17 Mar 2005, stephan) wrote: > Hi Rich, > As I understand it there are generally 3 approaches to this: > []mesa off screen rendering > []glReadPixels > []pbuffers > > glReadPixels seems to be the simplest and has the advantage of being > hardware accelarated but is also restricted to whatever max resolution > the opengl implemntation supports. This calls for tiled rendering as it > is described here: > http://www.mesa3d.org/brianp/TR.html > > I did not have time yet to translate this code to python...should be > fairly easy though. It comes down to calling glViewport for each tile > and then patching the parts together with PIL. > > If you go for the challenge (on a rainy sunday afternoon with a > delicious cup of darjeeling maybe) please be so kind and post the code > on this list. After considerable experimentation, I did finally get up to 4096x4096 screen dumps with ReadPixels() to work, though I'm not quite sure about some aspects of it--perhaps you could help me understand why this works. Code fragment is at the end of the message. What has me confused is why the viewport is constructed 'left' (negative) of the origin. This is what the example program showed at the URL in the comment in the code above (though that code seemed to have some other bugs which I can't recall at the moment), and building the viewports negative was the only way I could get things to work. Any ideas on why things work that way? For a Linux Journal article that was just published, I generated an image of a neural network model using PyOpenGL and some of the above code, of about 2K pixels by 3K pixels that I hoped would take up the entire cover of the magazine (with text overlaid) . . . however they ended up shrinking my image to about 1 inch by 2 inches for the cover of the June issue and placed it next to a picture of a computer sitting on top of a penguin :/ You can see the image (if you squint) at http://www.linuxjournal.com. Rich http://www.interstice.com/drewes -- code follows -- -- download brainlab.tgz from homepage and look at netplot.py for full code -- vw=self.w*self.nvpx; vh=self.h*self.nvpy # cycle through each viewport and take a snapshot bigimage=Image.new('RGB', (vw, vh)) px=0 cx=0 # I don't understand why the viewport coordinates are specified all negative of 0, per example # at http://astronomy.swin.edu.au/~pbourke/opengl/windowdump/ for vpx in range(0, self.nvpx): cy=-(self.nvpy-1)*self.h py=0 for vpy in range(0, self.nvpy): print "vpx, vpy", vpx, vpy, "cx, cy", cx, cy glMatrixMode(GL_PROJECTION) glLoadIdentity() glViewport(cx, cy, vw, vh) gluPerspective(120.0, float(self.w)/float(self.h), self.near, self.far) glMatrixMode(GL_MODELVIEW) # we actually have to force a redraw *now* so we can't just post a redisplay self.on_display() # now save this viewport data = glReadPixels(0, 0, self.w, self.h, GL_RGB, GL_UNSIGNED_BYTE) image = Image.fromstring("RGB", (self.w, self.h), data) image = image.transpose(Image.FLIP_TOP_BOTTOM) oo=(px, py) print "pasting viewport section to", oo bigimage.paste(image, oo) py+=self.h cy+=self.h cx-=self.w px+=self.w # restore default viewport glMatrixMode(GL_PROJECTION) glLoadIdentity() sx,sy=self.ScreenCenter() glViewport(sx, sy, w*self.nvpx, h*self.nvpy) gluPerspective(120.0, float(self.w)/float(self.h), self.near, self.far) glMatrixMode(GL_MODELVIEW) glutPostRedisplay() bigimage.save('snap.png', 'PNG') |
From: <pos...@sl...> - 2005-05-02 19:47:11
|
Definately possible. One thing that took me a while was to get the image imported in the right (RGBA) format. I have these snippets: glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) textureSurface = pygame.Surface(destination_dim, pygame.SRCALPHA, 32) textureSurface.fill((0,0,0,0)) textureSurface.blit( sourceSurface, (x_offset,y_offset), (frame_min_x, frame_min_y, sprite_width, sprite_height) ) textureData = pygame.image.tostring(textureSurface, "RGBA", 1) glBindTexture(GL_TEXTURE_2D, textures[i]) glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, textureSurface.get_width(), textureSurface.get_height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, textureData ); glEnable( GL_BLEND ) glEnable( GL_ALPHA_TEST ) glAlphaFunc( GL_GREATER, 0.1 ) glEnable(GL_TEXTURE_2D) glBindTexture( GL_TEXTURE_2D, texture ) Hope that helps. glAlphaFunc is key. -austin > Is per pixel alpha transparency on textures possible? > > I've investigated glBlend and glTexEnvfv, but neither come up with the > results i expected. > > What do other people do to achieve this? > > Sw. > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |
From: Simon W. <sim...@gm...> - 2005-05-02 14:18:32
|
Is per pixel alpha transparency on textures possible? I've investigated glBlend and glTexEnvfv, but neither come up with the results i expected. What do other people do to achieve this? Sw. |
From: SourceForge.net <no...@so...> - 2005-04-18 09:33:48
|
Feature Requests item #1176162, was opened at 2005-04-04 01:24 Message generated for change (Comment added) made by the_real_nimby You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355988&aid=1176162&group_id=5988 Category: GL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: glShaderSourceARB Initial Comment: Hello, I would like to experiment with vertex-shader programs, but I couldn't find a way to use glShaderSourceARB. It seems to want a pointer to a set of string pointers, but I can't seem to find a way to make one. Could you please make a functional version of this? a glShaderSourceARB2(object_id, string) would be nice. ---------------------------------------------------------------------- Comment By: Jonathan Thambidurai (the_real_nimby) Date: 2005-04-18 05:33 Message: Logged In: YES user_id=1261427 I don't see how to attach a patch here. If you would like to enlighten me, or would just like the patch, mailto j o n t h a m b i at c o m c a s t DOT n e t ---------------------------------------------------------------------- Comment By: Jonathan Thambidurai (the_real_nimby) Date: 2005-04-18 05:31 Message: Logged In: YES user_id=1261427 Here is a patch that fixes it. I am not a pyOpenGL dev nor do I have any idea how the attached code works. I copied (and slightly modified) it from some online FAQ. It fixes this problem and allows GLSL in PyOpenGL. You must run 'python setup.py build_w' first (after applying the patch), and then build as usual. ---------------------------------------------------------------------- Comment By: Take Vos (take-vos) Date: 2005-04-04 01:26 Message: Logged In: YES user_id=1252309 Oh, yes, I'm Take Vos, seems that I wan't logged in. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355988&aid=1176162&group_id=5988 |
From: SourceForge.net <no...@so...> - 2005-04-18 09:31:52
|
Feature Requests item #1176162, was opened at 2005-04-04 01:24 Message generated for change (Comment added) made by the_real_nimby You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355988&aid=1176162&group_id=5988 Category: GL Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: glShaderSourceARB Initial Comment: Hello, I would like to experiment with vertex-shader programs, but I couldn't find a way to use glShaderSourceARB. It seems to want a pointer to a set of string pointers, but I can't seem to find a way to make one. Could you please make a functional version of this? a glShaderSourceARB2(object_id, string) would be nice. ---------------------------------------------------------------------- Comment By: Jonathan Thambidurai (the_real_nimby) Date: 2005-04-18 05:31 Message: Logged In: YES user_id=1261427 Here is a patch that fixes it. I am not a pyOpenGL dev nor do I have any idea how the attached code works. I copied (and slightly modified) it from some online FAQ. It fixes this problem and allows GLSL in PyOpenGL. You must run 'python setup.py build_w' first (after applying the patch), and then build as usual. ---------------------------------------------------------------------- Comment By: Take Vos (take-vos) Date: 2005-04-04 01:26 Message: Logged In: YES user_id=1252309 Oh, yes, I'm Take Vos, seems that I wan't logged in. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355988&aid=1176162&group_id=5988 |
From: Artem B. <ar...@v2...> - 2005-04-09 08:18:11
|
Artem Baguinski wrote: > hi > > i've discovered OpenGLContext the day before yesterday (as well as > numpy) and decided to give the thing a try and wrote a simple particle > system (it's just a bunch of particles moving in random directions with > random speed). > > if i "overload" my particle system with too many particles i get weird > trackball navigation behaviour - it seems it remembers all the mouse > events and then plays them back as it gets a chance (which may be > several seconds after i've dragged the mouse). > > i understand that i've wired my particles updation to the wrong place, > but i wonder what would the correct place be? I was thinking - could the reason be that events from timer have higher priority then events from the windowing system? then timer constantly causes the particle system to recalculate itself not leaving any time to check for mouse events. hmm... but then mouse wouldn't ever have any chance. I'm puzzled. I guess time for me to read the sources of events related part of OpenGLContext, thanks for splitting it into separate directory ;-) |