WxWidgets: Difference between revisions
Created page with " ==Getting Started== ===Git submodule setup=== [https://docs.wxwidgets.org/trunk/overview_cmake.html#cmake_subdir https://docs.wxwidgets.org/trunk/overview_cmake.html#cmake_subdir] * Clone wxwidgets to the `extern` folder * Add the following to your cmakelists: <syntaxhighlight lang="cmake"> add_subdirectory(extern/wxWidgets EXCLUDE_FROM_ALL) #... target_link_libraries(my_app wx::net wx::core wx::base) </syntaxhighlight>" |
No edit summary |
||
Line 11: | Line 11: | ||
target_link_libraries(my_app wx::net wx::core wx::base) | target_link_libraries(my_app wx::net wx::core wx::base) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==SDL2 Integration== | |||
You can make an SDL window out of a wxPanel: | |||
<pre> | |||
SDL_CreateWindowFrom((void*)panel->GetHandle()) | |||
</pre> | |||
Then [https://wiki.wxwidgets.org/Making_a_render_loop create a render loop] |
Revision as of 03:37, 17 June 2022
Getting Started
Git submodule setup
https://docs.wxwidgets.org/trunk/overview_cmake.html#cmake_subdir
- Clone wxwidgets to the `extern` folder
- Add the following to your cmakelists:
add_subdirectory(extern/wxWidgets EXCLUDE_FROM_ALL)
#...
target_link_libraries(my_app wx::net wx::core wx::base)
SDL2 Integration
You can make an SDL window out of a wxPanel:
SDL_CreateWindowFrom((void*)panel->GetHandle())
Then create a render loop