Re: Displaying (numpy) arrays in pyglet

2007-12-14 Thread Andrew Straw
Alex Holkner wrote: > On 12/5/07, Tony <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I just started using pyglet after upgrading to Leopard OS X (before I >> was using pygame). I'm trying to display (or animate) the values of a >> numpy array (2D), but I haven't been able to figure out how. >>

Re: Displaying (numpy) arrays in pyglet

2007-12-14 Thread Andrew Straw
I gather you're implying that I can use a string view of the numpy array's buffer interface... OK, I'll give that a try and write up an example if I succeed. Alex Holkner wrote: > On 12/15/07, Andrew Straw <[EMAIL PROTECTED]> wrote: >> Alex Holkner wrote: >>

Re: Displaying (numpy) arrays in pyglet

2007-12-21 Thread Andrew Straw
Andrew Straw wrote: > I gather you're implying that I can use a string view of the numpy > array's buffer interface... OK, I'll give that a try and write up an > example if I succeed. I succeeded in displaying numpy arrays without copying the data (via a slightly differ

discussion of numpy support

2007-12-21 Thread Andrew Straw
(I'm moving this thread from http://code.google.com/p/pyglet/issues/detail?id=202 to email, which I find more conducive to conversation.) Alex Holkner wrote > I doesn't implement the ImageData interface, despite subclassing it (the > format, pitch and data properties won't work as documented)

Re: discussion of numpy support

2007-12-22 Thread Andrew Straw
et -- otherwise I'll stop working on it and include it in my own project -- it already works more than sufficiently for my purposes. -Andrew Andrew Straw wrote: > (I'm moving this thread from > http://code.google.com/p/pyglet/issues/detail?id=202 to email, which I > find mo

Re: discussion of numpy support

2007-12-22 Thread Andrew Straw
our goings on. :) -Andrew Alex Holkner wrote: > On 12/23/07, Andrew Straw <[EMAIL PROTECTED]> wrote: >> I'm attaching a new version. The biggest change is that this version >> doesn't import numpy. (Given the "no dependencies" of pyglet, I figured >> th

Re: setting gamma

2007-12-29 Thread Andrew Straw
Alex Holkner wrote: > On 12/29/07, Martin Spacek <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Is it possible to set the display, screen, and/or window gamma in >> pyglet? I'm looking for something similar to pygame.display.set_gamma >> and pygame.display.set_gamma_ramp. Here are their docstrings:

Re: wxWidgets with a Pyglet canvas ?

2008-01-03 Thread Andrew Straw
http://code.astraw.com/projects/motmot/wiki/wxglvideo Jed wrote: > Hey all , i've been looking into using pyglet inside a wxwidget app > ( just a sample right now ) > i was wondering if anyone had as stupid simple sample of this already > working ? > > cheers > - Jed > > > > --~--~-~

Re: setting gamma

2008-01-07 Thread Andrew Straw
Martin Spacek wrote: > Not sure if/how you want to incorporate this into pyglet. This is only > the win32 call, linux and osx would have to be figured out too. If Alex makes the decision to add this to pyglet, I'm happy to work on the linux and osx versions, for what it's worth. -Andrew --~--

Re: setting gamma

2008-01-07 Thread Andrew Straw
Alex Holkner wrote: > On 1/7/08, Martin Spacek <[EMAIL PROTECTED]> wrote: > > >> Not sure if/how you want to incorporate this into pyglet. This is only >> the win32 call, linux and osx would have to be figured out too. Maybe a >> pyglet.window.Window.set_gamma(r, g, b) method, where you provide

Re: GLU Tesselator

2008-01-14 Thread Andrew Straw
The scipy scikits delaunay module may also be interesting to you. Not a lot in the way of documentation, but I've been using it for a couple years now with few troubles: http://scipy.org/scipy/scikits/browser/trunk/delaunay/scikits/delaunay jimknopf wrote: > Hi, > > I am currently playing with P

Re: GLU Tesselator

2008-01-14 Thread Andrew Straw
Robert Kern wrote: > Andrew Straw wrote: > >> The scipy scikits delaunay module may also be interesting to you. Not a >> lot in the way of documentation, but I've been using it for a couple >> years now with few troubles: >> >> http://scipy.org/sci

Re: Suggestions for joystick input?

2008-01-22 Thread Andrew Straw
One could write a libhid-based driver which would theoretically work in Windows, Mac OS X, and linux. However, HID devices are claimed by the Mac OS X kernel, making this idea more difficult on the Mac as far as I know: http://lists.alioth.debian.org/pipermail/libhid-discuss/2007-April/000124.html

Re: numpy and pyglet...still having some issues

2008-01-31 Thread Andrew Straw
Alex Holkner wrote: > On Jan 31, 2008 7:33 AM, bblais <[EMAIL PROTECTED]> wrote: > >> a.shape = (imdata.width, imdata.height, 4) >> > > You're assuming the pitch of the image is width*4, which is not > necessarily the case. Either give numpy the correct pitch (not sure > how/if this c

broken egg for pyglet

2008-02-08 Thread Andrew Straw
In a fresh virtualenv ( http://pypi.python.org/pypi/virtualenv ) installation, using Python 2.5 on Ubuntu Gutsy amd64, I do the following in an attempt to install pyglet: "easy_install pyglet" Now, the following is emitted: Searching for pyglet Reading http://pypi.python.org/simple/pyglet/ Read

Re: broken egg for pyglet

2008-02-11 Thread Andrew Straw
Alex Holkner wrote: > On Feb 11, 2008 5:20 PM, Alex Holkner <[EMAIL PROTECTED]> wrote: > >> On Feb 11, 2008 4:07 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: >> >> >>> The file error-extract.txt (attached) contains a short extract (the bit >&

Re: broken egg for pyglet

2008-02-10 Thread Andrew Straw
Alex Holkner wrote: > On 2/9/08, Andrew Straw <[EMAIL PROTECTED]> wrote: >> In a fresh virtualenv ( http://pypi.python.org/pypi/virtualenv ) >> installation, using Python 2.5 on Ubuntu Gutsy amd64, I do the following >> in an attempt to install pyglet: >> >&g

Re: Problem changing values inside of an image

2008-02-21 Thread Andrew Straw
You're welcome to bend pygarrayimage to your purposes: http://code.astraw.com/projects/motmot/wiki/pygarrayimage Perhaps if others find it useful it will eventually get incorporated into pyglet itself. -Andrew Seanzo wrote: > Well, I don't really know what code to show since I don't know how to

Re: Problem changing values inside of an image

2008-02-23 Thread Andrew Straw
Hi Peter, Thanks for the report. I believe I fixed this now. (r501 in the repository) -Andrew Peter Wang wrote: > On Thu, Feb 21, 2008 at 12:48 PM, Andrew Straw <[EMAIL PROTECTED]> wrote: > >> You're welcome to bend pygarrayimage to your purposes: >> http://co

Re: 0-255 vs 0-1

2008-03-27 Thread Andrew Straw
Alex Holkner wrote: > The graphics module, like OpenGL, allows colors to be set with any > data type (0-1, 0-255, 0-65536, etc, ..). Internally, all current > video drivers use the 0-255 range. Note that one can render floating point values to an off-screen framebuffer (FBO). This can be useful

Re: XInput support on X windows (e.g. 3Dconnection Space Navigator)

2008-03-30 Thread Andrew Straw
I have gone ahead and made a separate package out of this: http://code.astraw.com/projects/motmot/wiki/pygxinput Andrew Straw wrote: > Hi pyglet-eers, > > The attached patch adds xinput support for pyglet (X windows only). It > allows one to manipulate 3D scenes with, fo

Re: Displaying live video -- should I use textures, glDrawPixels, sprites, or other?

2008-04-11 Thread Andrew Straw
Hi Zach, This is more-or-less what I designed pygarrayimage and wxglvideo for, and it uses Pyglet to display the live image data as textures. That was (and I guess still is) the fastest way to get image data to the video card. Anyhow, the core pyglet/numpy array bridge is pygarrayimage, which

Re: Displaying live video -- should I use textures, glDrawPixels, sprites, or other?

2008-04-11 Thread Andrew Straw
Also, thinking about it for another 2 seconds, the opengl texture functions allow brightness/gain type stuff as well. That's also a lot simpler than a shader -- I might look into this route -- it's a low-energy path from my current code base. For example, I think this works for contrast: glBlend

Re: Displaying live video -- should I use textures, glDrawPixels, sprites, or other?

2008-04-11 Thread Andrew Straw
Ahh, I believe I fixed that in http://code.astraw.com/projects/motmot/changeset/501 . Anyhow I have made a new release with this change available at http://pypi.python.org/pypi/pygarrayimage . I believe this works with transposed C arrays (that was my test case) -- please let me know if it doesn'

Re: Discussion on pseudo-fluids-with-pyglet-and-pymunk

2008-04-16 Thread Andrew Straw
This is a pretty cool pseudo-fluids demo: http://mail.python.org/pipermail/python-list/2005-February/309093.html rollbak wrote: > Hi, did you have some example code to share, i'm using pymunk+pyglet > and i 'm having lots of performance problems when i have to draw a lot > of circles (i use raw

Re: recipe: Pyglet in a background thread

2008-04-28 Thread Andrew Straw
Thanks Zach, this looks useful, though I haven't had time to try it or examine it in any detail. One note -- IPython has collected a number of such solutions for wx, GTK, and so on, and I'd be willing to bet they'd include a solution for interactive work with IPython and pyglet. (IIRC, these are

Re: matploblib communication problem, graphics question

2008-05-24 Thread Andrew Straw
wolf wrote: > < lots snipped > > look, i spent several hours to get my a simple question across the > fence for the matplotlib people, and i still can't see it---that's > basically a gated community. not good. Yes, they have specifically chosen a highly obscure open-source hosting website. Virtua

Re: Distributing pyglet applications

2008-06-11 Thread Andrew Straw
Luke Miller wrote: > I would love some way to package up the game onto a CD iso (I'm > running linux so I'm sure the tools are all there) > It's pretty easy to re-master an Ubuntu LiveCD: https://help.ubuntu.com/community/LiveCDCustomization > 2008/6/12 KwangYul Seo <[EMAIL PROTECTED]>: > >>

Re: Color shifting

2008-09-16 Thread Andrew Straw
Alex Holkner wrote: > On 9/17/08, pdpi <[EMAIL PROTECTED]> wrote: >> Hello everybody, >> >> I have a question, and though I've been programming for a while, I'm >> quite new to games in general and pyglet in particular, so assuming >> generic programming knowledge is ok, pyglet specifics isn't

Re: AVBin and patent issues

2009-03-21 Thread Andrew Straw
gaustwick wrote: > To simplify matters, I have written an ogg wrapper that hooks into > pyglet's audio subsystem, so if you're worried about patents, you can > use that instead. You can get it from my blog: > http://blog.gregs.me.uk/index.php?/archives/8-PygOggWrapper-an-Ogg-Vorbis-wrapper-for-Pyg

Re: Odd display timing behavior?

2009-03-24 Thread Andrew Straw
Hi Mike, I'm not sure if this explains what you're concerned about, but Sol Simpson did some pretty exhaustive testing of the timing of video display, and I wrote this up in my article on the Vision Egg. This has nothing to do with the Vision Egg per se, however, and Sol found results with pu

Re: Odd display timing behavior?

2009-03-24 Thread Andrew Straw
Mike Lawrence wrote: > Just got a reply from a colleague (John Christie) citing Sol's work as > well: > > "What your finding is what would be predicted. Sol discovered this > same problem some time ago in OpenGL based software in general. What > happens is that the double buffer is asynchronous

Re: Odd display timing behavior?

2009-03-25 Thread Andrew Straw
Mike Lawrence wrote: > After a few more discussions with colleagues, I'm comfortable > concluding from the above code and comments that the best way to > ensure accurate timing is to: > > 1) double flip at the beginning of the trial to ensure timing is > synced to the display > > 2) ensure all d

Re: How to capture image from MacBook Pro internal camera?

2009-04-30 Thread Andrew Straw
Andrew Stromnov wrote: > I'd tried several techniques, but can't get image from iSight. > Hi Andrew, You can check the "process_data_callback" code in libcamiface [1], which does the right callbacks. Note that not only is this is written in C, it also uses Carbon, which is deprecated by Apple.

Re: problem with headless operation (saving files)

2009-05-12 Thread Andrew Straw
If you ssh in with '-X', you're actually rendering OpenGL on your local computer. You should use '-x' if you want to test the EC2 instance. You may also be interested in Xvfb. sevenseeker wrote: > another update... > when SSH'ing into the box with '-X' AND using libgl1-mesa-swx11 (as > opposed to

Re: Snow Leopard?

2009-09-09 Thread Andrew Straw
Tristam MacDonald wrote: > On Wed, Sep 9, 2009 at 1:59 PM, Nathan > wrote: > > > On Wed, Sep 9, 2009 at 11:58 AM, Nathan > wrote: > > Looks like I get to have fun manually getting and installing modules > > for the 32