Re: [Perldl] PDL image to SDL::Surface

2012-09-26 Thread Chris Marshall
] PDL image to SDL::Surface Hi Kartik- I don't have a working SDL module install that I could check things out on. Hi guys, Chris, 'cpan -fi SDL' should install SDL-2.54 on your SPP. (You need force because a couple of the SDL tests fail.) During the 'perl build.pl' stage of Alien::SDL

Re: PDL image to SDL::Surface

2012-09-26 Thread Chris Marshall
On Mon, Sep 24, 2012 at 12:46 PM, Chris Marshall devel.chm...@gmail.com wrote: Hi Kartik- I don't have a working SDL module install that I could check things out on. The posted gist seemed like a regression of using direct PDL manipulation to read and copy the image data to an SDL surface.

Re: PDL image to SDL::Surface

2012-09-24 Thread Tobias Leich
Hi Chris, The performance is poor of course. I tried to use the piddels pointer (-dataref or so) but it looks like it is not pointing to a usable memory area. It looks like there are more than 4 bytes per pixel, and libSDL can't handle that. The pdl.pl example is working, I see colored squares.

Re: PDL image to SDL::Surface

2012-09-24 Thread Chris Marshall
On Mon, Sep 24, 2012 at 10:41 AM, Tobias Leich em...@froggs.de wrote: Hi Chris, The performance is poor of course. I tried to use the piddle's pointer (-dataref or so) but it looks like it is not pointing to a usable memory area. $piddle-get_dataref returns a scalar reference to a perl PV

Re: PDL image to SDL::Surface

2012-09-24 Thread Tobias Leich
Am 24.09.2012 18:07, schrieb Chris Marshall: On Mon, Sep 24, 2012 at 10:41 AM, Tobias Leich em...@froggs.de wrote: Hi Chris, The performance is poor of course. I tried to use the piddle's pointer (-dataref or so) but it looks like it is not pointing to a usable memory area.

Re: PDL image to SDL::Surface

2012-09-24 Thread Chris Marshall
Looking back through the code to the original SDL_Perl I found version 2.0.5 which allows one to actually create an SDL surface from pixel data. More recent versions appear to copy the data and as far as I can tell, there is no way to directly create an SDL surface from external data. If that is

Re: PDL image to SDL::Surface

2012-09-24 Thread Kartik Thakore
Whats wrong with https://github.com/PerlGameDev/SDL_Manual/blob/master/code_listings/pdl.pl ? On Mon, Sep 24, 2012 at 12:36 PM, Chris Marshall devel.chm...@gmail.comwrote: Looking back through the code to the original SDL_Perl I found version 2.0.5 which allows one to actually create an SDL

Re: PDL image to SDL::Surface

2012-09-24 Thread Chris Marshall
On Mon, Sep 24, 2012 at 12:35 PM, Tobias Leich em...@froggs.de wrote: Am 24.09.2012 18:07, schrieb Chris Marshall: On Mon, Sep 24, 2012 at 10:41 AM, Tobias Leich em...@froggs.de wrote: Hi Chris, The performance is poor of course. I tried to use the piddle's pointer (-dataref or so) but it

Re: PDL image to SDL::Surface

2012-09-24 Thread Chris Marshall
Hi Kartik- I don't have a working SDL module install that I could check things out on. The posted gist seemed like a regression of using direct PDL manipulation to read and copy the image data to an SDL surface. The pdl.pl example seemed ok to me until I tried looking at the latest XS code

Re: [Perldl] PDL image to SDL::Surface

2012-09-24 Thread Sisyphus
- Original Message - From: Chris Marshall devel.chm...@gmail.com To: Kartik Thakore thakore.kar...@gmail.com Cc: Tobias Leich em...@froggs.de; sdl-devel sdl-devel@perl.org Sent: Tuesday, September 25, 2012 2:46 AM Subject: Re: [Perldl] PDL image to SDL::Surface Hi Kartik- I don't

Re: [Perldl] PDL image to SDL::Surface

2012-09-24 Thread Kartik Thakore
devel.chm...@gmail.com To: Kartik Thakore thakore.kar...@gmail.com Cc: Tobias Leich em...@froggs.de; sdl-devel sdl-devel@perl.org Sent: Tuesday, September 25, 2012 2:46 AM Subject: Re: [Perldl] PDL image to SDL::Surface Hi Kartik- I don't have a working SDL module install that I could

PDL image to SDL::Surface

2012-09-23 Thread Tobias Leich
Hi, Andrei asked some days ago how to load an image via PDL and but it in a Surface to use it in SDL. The example is here: https://gist.github.com/3772701 I'll put that in the examples folder too. Cheers, Tobias