Transfer between renderer

Hi All,

renderer1 = SDL_CreateRenderer(awindow, -1, SDL_RENDERER_ACCELERATED);
renderer2 = SDL_CreateSoftwareRenderer(asurface);

I modify pixels in renderer2 than I want to draw renderer2 to
renderer1 (window). I use SDL_RenderCopy but never paint. How to fix
it?
regards

Unfortunately, SDL does not support it at this point. Instead, you can use
SDL_RenderSetTarget() etc. Or you can create a SDL_Surface and then do
SDL_CreateTextureFromSurface etc.On Tue, Sep 4, 2012 at 8:33 AM, wahono sri wrote:

Hi All,

renderer1 = SDL_CreateRenderer(awindow, -1, SDL_RENDERER_ACCELERATED);
renderer2 = SDL_CreateSoftwareRenderer(asurface);

I modify pixels in renderer2 than I want to draw renderer2 to
renderer1 (window). I use SDL_RenderCopy but never paint. How to fix
it?
regards


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

Try making asurface a surface representing a streaming texture in renderer1.On Mon, Sep 3, 2012 at 8:03 PM, wahono sri wrote:

Hi All,

renderer1 = SDL_CreateRenderer(awindow, -1, SDL_RENDERER_ACCELERATED);
renderer2 = SDL_CreateSoftwareRenderer(asurface);

I modify pixels in renderer2 than I want to draw renderer2 to
renderer1 (window). I use SDL_RenderCopy but never paint. How to fix
it?
regards


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thank for all your reply.

I still learn the concept of SDL 2, AFAIK, only SDL_Surface is drawing
layer which independent from a SDL_Renderer?
Or SDL_Texture could be replacement of SDL_Surface for hardware
acceleration? If yes, it contrast with multiple windows that supported
by SDL 2, because SDL_Texture creation should depend on a
SDL_Renderer, than how to transfer SDL_Texture between windows?

IMO, SDL_Texture creation should be independent from a SDL_Renderer,
so that all drawing object are hardware accelerated.

My purpose is create some forms in my app with a SDL_Renderer in every
form, and create some independent bitmap, and this bitmap in free to
be paint in some form. My confusing is for bitmap, should I use
SDL_Renderer (SDL_RenderSoftware) of use SDL_Texture?

Thanks