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 wrote: > > - Original Message - From: "Chris Marshall" < > devel.chm...@gmail

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

2012-09-24 Thread Sisyphus
- Original Message - From: "Chris Marshall" To: "Kartik Thakore" Cc: "Tobias Leich" ; "sdl-devel" 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 check things out on. Hi

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 where

Re: PDL image to SDL::Surface

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

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 wrote: > 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 da

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 Tobias Leich
Am 24.09.2012 18:07, schrieb Chris Marshall: > On Mon, Sep 24, 2012 at 10:41 AM, Tobias Leich 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_da

Re: PDL image to SDL::Surface

2012-09-24 Thread Chris Marshall
On Mon, Sep 24, 2012 at 10:41 AM, Tobias Leich 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 whose str

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
I took a look at the gist and it looks reasonable (I can't run it because I don't have the SDL module and lib installed on my system), however... I would expect the performance to be *very* poor since the image data is essentially being converted from packed byte data to a perl list and then poked