Re: [Pdl-porters] Interfacing SDL Surface with a piddle

2010-06-28 Thread Chris Marshall

On 6/27/2010 12:18 PM, Kartik Thakore wrote:



This is a good idea. How do I make a piddle of bytes 4 * $width * $height ?

At least you would have all the surface and piddle data
in the same spot which seems to be your difficulty here


This might be easier indeed, thanks.


  PDL $width = 640;

  PDL $height = 480;

  PDL $piddle = zeroes(byte,4,$width,$height);

  PDL ?vars
  PDL variables in package main::

  Name Type   Dimension   Flow  State  Mem
  
  $piddleByte D [4,640,480]  P1.17Mb


[kthakore/SDL_perl] ae82cb: Added other modules needed

2010-06-28 Thread noreply
Branch: refs/heads/master
Home:   http://github.com/kthakore/SDL_perl

Commit: ae82cbb9886ea6e889a835962621d8cac7c6c35f

http://github.com/kthakore/SDL_perl/commit/ae82cbb9886ea6e889a835962621d8cac7c6c35f
Author: Kartik Thakore thakore.kar...@gmail.com
Date:   2010-06-27 (Sun, 27 Jun 2010)

Changed paths:
  M lib/pods/SDL/Cookbook/PDL.pod

Log Message:
---
Added other modules needed




[kthakore/SDL_perl] 9c48d6: Updated cookbook docs on using PDL

2010-06-28 Thread noreply
Branch: refs/heads/master
Home:   http://github.com/kthakore/SDL_perl

Commit: 9c48d6b186650909f5249424a0cc080b0f868c6b

http://github.com/kthakore/SDL_perl/commit/9c48d6b186650909f5249424a0cc080b0f868c6b
Author: Kartik Thakore thakore.kar...@gmail.com
Date:   2010-06-27 (Sun, 27 Jun 2010)

Changed paths:
  M examples/cookbook/pdl.pl

Log Message:
---
Updated cookbook docs on using PDL


Commit: fd1212cf8b5b63139ca9afee6bc0b46b534eb4f2

http://github.com/kthakore/SDL_perl/commit/fd1212cf8b5b63139ca9afee6bc0b46b534eb4f2
Author: Kartik Thakore thakore.kar...@gmail.com
Date:   2010-06-27 (Sun, 27 Jun 2010)

Changed paths:
  M CHANGELOG

Log Message:
---
Updated CHANGELOG




[kthakore/SDL_perl] 4d4d37: fixed new_form uninit problem

2010-06-28 Thread noreply
Branch: refs/heads/master
Home:   http://github.com/kthakore/SDL_perl

Commit: 4d4d37ae2f0064cf2212fa0fcb72ee86ed2d8628

http://github.com/kthakore/SDL_perl/commit/4d4d37ae2f0064cf2212fa0fcb72ee86ed2d8628
Author: Kartik Thakore thakore.kar...@gmail.com
Date:   2010-06-27 (Sun, 27 Jun 2010)

Changed paths:
  M src/Core/objects/Surface.xs
  M t/core_surface.t

Log Message:
---
fixed new_form uninit problem




Re: [Pdl-porters] Interfacing SDL Surface with a piddle

2010-06-28 Thread Chris Marshall

On 6/27/2010 10:59 AM, Kartik Thakore wrote:


Hi

Ok I looked at get_dataref. But I still don't understand why the
surface-pixels is swaped out when a piddle is written. Both of the
Devel::Peek for the get_dataref and surface-get_pixels is the exact same.


get_dataref is a perl reference to the data section of
the piddle.  The surface-pixels is just a pointer to
the pixel data.  I see no copying of data in the code so
it doesn't seem like they should be the same.

I notice on the page you reference for the XS stuff that
there is a surface_new_from routine.  Have you tried
creating a piddle of data the size and structure of the
surface and then creating the desired surface from that?

At least you would have all the surface and piddle data
in the same spot which seems to be your difficulty here.

--Chris


On Sun, Jun 27, 2010 at 1:32 AM, Chris Marshall c...@alum.mit.edu
mailto:c...@alum.mit.edu wrote:

On 6/26/2010 10:49 PM, Kartik Thakore wrote:

Right but where is the piddle xs code?


It is in Basic/Core in the PDL  directory.
The piddle data is in the string of the perl scalar.
That way it gets the advantage of the perl memory
allocation/freeing...

--Chris

On Sat, Jun 26, 2010 at 10:35 PM, Chris Marshall
c...@alum.mit.edu mailto:c...@alum.mit.edu
mailto:c...@alum.mit.edu mailto:c...@alum.mit.edu wrote:

On 6/26/2010 10:10 PM, Kartik Thakore wrote:

What SV_type is getdata_ref using? where can I find that?


You can get a copy of the PDL source from CPAN
and that should explain things.

--Chris





No virus found in this incoming message.
Checked by AVG - www.avg.com http://www.avg.com
Version: 9.0.830 / Virus Database: 271.1.1/2964 - Release Date:
06/26/10 02:35:00






No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.830 / Virus Database: 271.1.1/2966 - Release Date: 06/27/10 
02:35:00





FrozenBubble

2010-06-28 Thread Kartik Thakore

Hi Folks,

We have finished all of the tickets that GC pointed out for differences
between the new FB and the old one. It is located here:

http://github.com/kthakore/frozen-bubble

Please not that you will required the SDL 2.5 RC, andd SDLx-TTF from
github here:

http://github.com/kthakore/SDL_perl

http://github.com/kthakore/SDLx-TTF

Please give it a review and let us know.

Regards,
Kartik Thakore

On 2010-06-26, at 10:44 AM, Kartik Thakore thakore.kar...@gmail.com  
wrote:



HI Guillaume,

I have close some more tickets.

http://sdlperl.ath.cx/projects/SDLPerl/ticket/141
http://sdlperl.ath.cx/projects/SDLPerl/ticket/143
http://sdlperl.ath.cx/projects/SDLPerl/ticket/152
http://sdlperl.ath.cx/projects/SDLPerl/ticket/156
http://sdlperl.ath.cx/projects/SDLPerl/ticket/157
http://sdlperl.ath.cx/projects/SDLPerl/ticket/158
http://sdlperl.ath.cx/projects/SDLPerl/ticket/159

Please also look at this one

http://sdlperl.ath.cx/projects/SDLPerl/ticket/146

if 0 is deprecated and should not be used. But I have reverted back.


Thanks