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
Can you select a videodriver for SDL by exporting SDL_VIDEODRIVER either fbcon or x11 may fix this. If not then your SDL were not compiled with X11 libs. Install those. On Mon, Sep 24, 2012 at 6:36 PM, Sisyphus sisyph...@optusnet.com.au wrote: - Original Message - From: Chris Marshall