i am having trouble with the following:
I need to render a texture on top of another texture and then render that main texture. For example I have the blue rectangle texture, and I want to draw red rectangles on top of this blue rect. However i want them to restrict the render only on this rectangle. Like the following image:
I read something about texture blit between them or something like that but im not sure if this is posible.
My code looks like this:
SDL_RenderCopy(ren,bluetexture,NULL,dBLUErect);
SDL_RenderCopy(ren,redtexture,NULL,dREDrect);
SDL_RenderPresent(ren);
Any one knows about how to do this in SDL 2.0? thats what Im using by the way.
SDL_Renderer
with theSDL_RENDERER_TARGETTEXTURE
flag to support render targets. Also, never try to use aSDL_Texture
that was created from aSDL_Surface
using theSDL_CreateTextureFromSurface
function. It just won't work. – Suppuration