07-18-2018, 01:56 AM
I'll update the docs, but for this one I just wanted to check, because it's code;
On this page: http://tilengine.org/doc/page_render.html it gives TLN_SetRenderTarget a void pointer;
void* framebuffer = malloc (pitch * vres);
TLN_SetRenderTarget (framebuffer, pitch);
But this causes a compilation error, because it actually wants a uint8_t pointer. It compiles if you cast it;
TLN_SetRenderTarget ((uint8_t*)framebuffer, pitch);
Is that correct?
------------------------------
Also I was thinking, even though the external rendering is meant to be quite flexible, for this page it'd be good to have a bare minimum example of how to actually link the Tilengine output to an SDL_Texture, since that seems to be the recommended usage?
Happy to add it... just trying to work out how to do it
Trying to piece something together from the example, and what's in Tilengine\Window.c...
On this page: http://tilengine.org/doc/page_render.html it gives TLN_SetRenderTarget a void pointer;
void* framebuffer = malloc (pitch * vres);
TLN_SetRenderTarget (framebuffer, pitch);
But this causes a compilation error, because it actually wants a uint8_t pointer. It compiles if you cast it;
TLN_SetRenderTarget ((uint8_t*)framebuffer, pitch);
Is that correct?
------------------------------
Also I was thinking, even though the external rendering is meant to be quite flexible, for this page it'd be good to have a bare minimum example of how to actually link the Tilengine output to an SDL_Texture, since that seems to be the recommended usage?
Happy to add it... just trying to work out how to do it
