[SDL] Displaying SDL content in an existing Window...
slouken at devolution.com
Fri Jul 27 00:38:01 PDT 2001
> But of course it would be nice if SDL had the MakeSubSurface and
> FreeSubSurface functions - then the "hack" could be maintained
> along with SDL ;)
You can actually already do this with the SDL_CreateRGBSurfaceFrom()
function. Just pass in the correct base address (precalculated from
the x/y address) and give the pitch for the original data.
SDL will not free the pixels data from a surface allocated this way,
and it should work as a normal surface in all other respects.
-Sam Lantinga, Lead Programmer, Loki Software, Inc.
More information about the SDL