You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I am working with software that uses quite old version of TCOD (1.5.0).
In that version render method of ITCODSDLRenderer had screen option, that as I gess, would allow to put something on the screen while rendering.
void render(void *sdlSurface, void*sdlScreen);
The code did some processing and finally copied tile to the screen.
While initial porting I commented out all SDL-related code that does not work. But now I am trying to get graphical tiles back.
Do you have any idea, how I can port this code? May be there is some global variable simiular to screen, or something... Where I can get it in modern TCOD API?
The text was updated successfully, but these errors were encountered:
The old methods make inefficient copies of the screen across the RAM/VRAM boundaries. Libtcod's new methods keep everything in VRAM while also letting you render as many consoles you want to anywhere on the screen while letting you use SDL's renderer like normal.
Look at TCOD_sdl2_atlas_new, TCOD_sdl2_render_texture, and TCOD_sdl2_render_texture_setup documented in this header. I talk about these more in issue #18. How you access the SDL renderer depends on how modernized your program is, but you can get it from a libtcod context or from libtcod's old internals:
TCOD_context_get_sdl_renderer to get it from a context. TCOD_sys_get_sdl_renderer to get it from the internals.
Or get it from SDL itself. You don't need a context at all to use this method for console rendering.
Hi!
I am working with software that uses quite old version of TCOD (1.5.0).
In that version
render
method ofITCODSDLRenderer
hadscreen
option, that as I gess, would allow to put something on the screen while rendering.The code did some processing and finally copied tile to the screen.
https://gitlab.com/dhyannataraj/goblin-camp/-/blob/master/game/src/tileRenderer/sdl/SDLTilesetRenderer.cpp#L178
While initial porting I commented out all SDL-related code that does not work. But now I am trying to get graphical tiles back.
Do you have any idea, how I can port this code? May be there is some global variable simiular to
screen
, or something... Where I can get it in modern TCOD API?The text was updated successfully, but these errors were encountered: