Thanks mason,

Can you make these feature requests as issues on 
http://github.com/PerlGameDev/SDL2

On Fri, Aug 9, 2013 at 2:25 PM, Mason James <m...@kohaaloha.com> wrote:

> hi sdl-devel
> i am planning/researching about adding a small amount of SDL2_Perl code into 
> my existing SDL_Perl app, for a framerate increase
> i have one long-standingly slow bit of code in my app, that i would like to 
> replace with SDL2 code
> my slow code is a SDL::GFX::Rotozoom::surface() call. but SDL2 has 'hardware 
> accelerated' stretching/scaling/zooming [1], yay!
> i checked the SDL2 version of ./SDL2_rotozoom.c, and it is still using the 
> current slow software method (no changes) 
> but the good news is… there seems to be a preferred method to achieve this 
> fast hardware scaling in SDL2
> SDL2's SDL_RenderCopyEx() function [2] will scale a texture using a fast HW 
> method, (but...i have not benchmarked my theory yet)
> my plan is to attempt to add some missing SDL2 functionality to SDL2_Perl.
> then swap my slow SDL::GFX::Rotozoom::surface() call, with the faster SDL2 
> equivalent
> so basically, i need to implement the 'test/testrendercopyex.c' demo [3], in 
> SDL2_Perl, 
> and add access to these missing SDL2 functions in SDL2_Perl...
> SDL_LoadBMP(),
> SDL_CreateTextureFromSurface(),
> SDL_FreeSurface() 
> SDL_RenderGetViewport()
> SDL_CreateTexture()
> SDL_SetRenderTarget()
> SDL_RenderCopy()
> SDL_RenderCopyEx(),
> SDL_QueryTexture()
> fyi: the testrendercopyex.c demo is nice and simple, it...
> - loads a .bmp file to a surface
> - converts the surface to a HW texture
> - then randomly moves, rotates and scales that texture around the window, in 
> a loop
> i believe this demo is using the new hardware-accelerated scaling on a 
> 'texture' in SDL2
> [1] http://wiki.libsdl.org/moin.fcg/Introduction
> [2] http://wiki.libsdl.org/moin.fcg/SDL_RenderCopyEx
> [3] http://hg.libsdl.org/SDL/file/90ff13467550/test/testrendercopyex.c
> any comments or suggestions, folks?
> cheers, Mason

Reply via email to