We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shouldn't be hard, just a few patches to nuklear_sdl_gl3.h
Here's my working solution using CMake:
file(READ ${NUKLEAR_PREFIX_INCLUDE}/nuklear_sdl_gl3.h SDL_FILE_CONTENTS) string(REPLACE "SDL2" "SDL3" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_GetTicks64" "SDL_GetTicks" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_GL_GetDrawableSize" "SDL_GetWindowSizeInPixels" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_TRUE" "true" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_FALSE" "false" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_KEYUP" "SDL_EVENT_KEY_UP" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_KEYDOWN" "SDL_EVENT_KEY_DOWN" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_MOUSEBUTTONUP" "SDL_EVENT_MOUSE_BUTTON_UP" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_MOUSEBUTTONDOWN" "SDL_EVENT_MOUSE_BUTTON_DOWN" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_MOUSEMOTION" "SDL_EVENT_MOUSE_MOTION" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_MOUSEWHEEL" "SDL_EVENT_MOUSE_WHEEL" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_TEXTINPUT" "SDL_EVENT_TEXT_INPUT" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDLK_b" "SDLK_B" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDLK_c" "SDLK_C" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDLK_e" "SDLK_E" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDLK_r" "SDLK_R" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDLK_v" "SDLK_V" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDLK_x" "SDLK_X" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDLK_z" "SDLK_Z" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "const Uint8* state = SDL_GetKeyboardState(0);" "const _Bool* state = SDL_GetKeyboardState(0);" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "SDL_SetRelativeMouseMode(" "SDL_SetWindowRelativeMouseMode(sdl.win, " SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") string(REPLACE "switch(evt->key.keysym.sym)" "switch(evt->key.key)" SDL_FILE_CONTENTS "${SDL_FILE_CONTENTS}") file(WRITE ${NUKLEAR_PREFIX_INCLUDE}/nuklear_sdl_gl3.h "${SDL_FILE_CONTENTS}")
Also, please, add the extern "C" wrap to nuklear_sdl_gl3.h
extern "C"
nuklear_sdl_gl3.h
The text was updated successfully, but these errors were encountered:
Would love for either SDL_GPU or SDL_renderer implementation so it would work across different graphics platforms.
Two attempts that I know of...
sdl3
Sorry, something went wrong.
Oh, should have searched for PRs - I have checked issues only. Anyway, this patch may be useful for anyone trying to use SDL3 before official support.
Still worth to keep the issue open. Good to have a tracking thread, thanks 👍
No branches or pull requests
Shouldn't be hard, just a few patches to nuklear_sdl_gl3.h
Here's my working solution using CMake:
Also, please, add the
extern "C"
wrap tonuklear_sdl_gl3.h
The text was updated successfully, but these errors were encountered: