Re: PDL and SDL

[email protected] (Kartik Thakore)
Newsgroups perl.sdl.devel
Message-ID <[email protected]>
>

> Hi,
>
> Love your work PDL btw. I was actually trying out PDL today. Anywho  
> SDL_Rect is a simple struct  with 4 ints. If you are looking to draw  
> data straight to SDL for Display purposes. You are looking for  
> SDL_Surface. If you are using Video memory SDL_Overlay.  
> Unfortunately the current code on CPAN is not prepare to meet your  
> demands. However we have already implemented access to both these  
> structs and their attributes in our redesign branch. Please join us  
> on #sdl irc.perl.org . You can grab the code here http:://github.com/ 
> kthakore/SDL_Perl
>
> You need the redesign branch.
>
> Kartik Thakore
>
> On 5-Nov-09, at 9:30 AM, David Mertens <[email protected]> wrote:
>
>> Hey folks -
>>
>> I'm working on creating a simulation/animation for my research.  I  
>> mostly
>> use PDL for my computational stuff.  I was reading through your  
>> docs and it
>> occurred to me that it would be really handy if there was some way to
>> convert between a Rectangle and a piddle.  I assume that a  
>> rectangle object
>> is stored in memory as an array packed into a scalar, or something  
>> like
>> that.  PDL has powerful element selection capabilities and can make  
>> writing
>> hand-rolled C code a cinch.  Perhaps we could work together to  
>> create a
>> couple of functions that look like:
>>
>> my ($red_piddle, $green_piddle, $blue_piddle, $alpha_piddle) =
>> sdl_rect_to_pdl($rectangle);
>> # do something with the values in the different channels.
>> $rectangle = pdl_to_rect($red_piddle, $green_piddle, $blue_piddle,
>> $alpha_piddle);
>>
>> This could be very powerful.  What do you think?
>>
> I like it.
>> Thanks!
>> David
> Thanks for saving me the effort of seeking you out to use SDL.
>
> Kartik Thakore
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.