Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Improve the SDL2 Surface RAWFB Demo

Open BieHDC opened this issue 5 years ago • 2 comments

Hello Friends, i have made some improvements to the SDL2 Surface RAWFB Demo. Please review the changes and tell me other improvements i should/could make.

Makefile:

  • Set c-std to c99

main.c:

  • Remove translate_sdl_key and sdl_button_to_nk, replaced by nk_sdl_handle_event in sdl2surface_rawfb.h
  • Add support for the further examples (style, calc, overview, node editor)
  • The new main has been copied over from sdl2_opengl2 to match the other examples
  • Added more errors checks for SDL2 returns
  • Added support for resizing the window
  • Other General Cleanups

sdl2surface_rawfb.h:

  • Added nk_sdlsurface_update to support window resizing
  • Moved nk_sdlsurface_init to a more correct place
  • Only warn on NK_COMMAND_ARC/K_COMMAND_ARC_FILLED instead of asserting
  • Add nk_sdl_handle_event (imported from sdl2_opengl2)
  • Some indention fixes

Thanks to everyone else who has been working on this awesome project!

BieHDC avatar Jan 16 '21 21:01 BieHDC

Ok, i downgraded it to a draft, because i spent some more time in it and there are a few more things to fix. Please stand by.

BieHDC avatar Jan 21 '21 18:01 BieHDC

Fixed the merge conflict. Ready to merge.

BieHDC avatar Oct 25 '21 21:10 BieHDC