I gonna finish my beginner course in the next couple of months and I will look for some kind of GUI for c++ so thanks for this video I’m sure I will come back here :) God blessed you. Happy Easter :)
Brilliant. Got everything running. Would love to see all the ImGUI stuff you are willing to put out. A vid on how one would: add and run linters, use Conan with this project to pull in wanted libraries, add network messaging between two Walnut applications, integrate run time dll loading to a Walnut application.
I'm currently writing a program with imgui and implot. I'll be following this! Loading images is something I'm interested in for custom buttons. *and also storing fonts in the binary.
ImGui::IsItemClicked() After drawing the item You’ll probably run into a few issues messing around with fonts too much, but you can easily load one from memory
Hi Cherno! Fantastic video, exactly what i was looking for. I'm really learning a lot from all your videos, especially the C++ series. If you would make a follow up walnut video to show how to port a walnut application to mac that would be really awesome. Keep up the good work!
Excellent, thank you! Maybe this is out on a limb but I'd be interested to see a similar example using VS Code, CMake and MinGW-w64 tools instead of Visual Studio. That way a cross-platform application could be developed with a cross-platform toolset.
Thank you so much! Was trying to render image using Vulkan and ImGUI! so many steps. So thank you very much on this. They should add the basic implementations for all backends in there example code. The Idea of Layers is great. so different parts of application can create a layer, and draw, and it will be taken care of drawing, in one main loop. Thanks. please continue sharing ImGui stuff and walnut.
For ui, I use something called gempyre it's basically shows up a web browser but instead of using javascript you use c++ for the backend. I really like the idea. It is MIT BTW.
Cool stuff as usual Cherno. I wouldn't mind seeing a video on theme customizations because I wasn't sure whether that is an imgui thing or you were thinking something else. :)
A great video will be on how you create this build environment, and the differences between the debug and dist builds. And also, why did you choose to have the core and dependencies as different projects. Thanks for the great content.
Yan, I would love to know how to autosize(autoscale) windows. Currently they stay fixed and its so annoying. Also how to implement a landscape/portrait view
Thanks ! I was looking for a good GUI (Graphic User Interface) library for my project as a replacement for "Electron" [ which I use to create a nice looking window ]
When I run walnut (4:03) it gives me an error saying it can't find this path: C:\Users\brayd\Desktop\Projects\Walnut Projects\Walnut\bin\Debug-windows-x86_64\WalnutApp\WalnutApp.exe So I go there, and there is only a log file called WalnutApp.log. Please help. Thanks, STEAM not STEM
I see that there are PushLayers, but I don't see any PopLayers? How is pushing and popping supposed to work or what is the intended flow when making a GUI app?
The Image class is good, but what if I want to render video? then each time calling SetData() consumes cpu and time uploading new image to GPU, is there a way to map and update image continuasly, so if original image pointer for exmpale a cv::Mat is changed, then the walnut image is mapped to the memory and no reuploding is done? so it will be faster? is this possible?
I'm getting an error when running the WalnutApp for the first time - I have Vulkan installed into a non-default location and added "%(VULKAN_SDK)\Include" to the C/C++ > General > Additional Include Directories but it's still saying that it cannot open source file "vulkan/vulkan.h" after doing that :(
Cool! Thanks for your job! A have started to follow your videos few days ago, because of ImGUI :-) For sure, I will give a try to the Walnut, I am pretty new to "gaming C++". Anyway, do you know Poco framework? Do you thing, is possible to use ImGUI/Walnut as UI layer fot this framework? I would like to implement some calculations out of the main loop (data analysys, networking) and flush the results to a graph. Tips are appreciated :-)
Hi , Cherno.. What do you thing about rust language for use in graphics , and it will be interesting that with yours skills , one project open source like autocad , for drawing, no one made something similar with opengl or directx or vulkan..
Hello cherno. I’m curious when do you plan to add distribution to hazel 2D to export games? I tried to code my own solution but it doesn’t work at all. They don’t teach this stuff at school😞
@@darer13 hey bro sorry for late reply 😅 I did not receive notification about your comment. Did you figure it out? Would you like to add me on discord?
Can we sign the executable that is produced by dist ? It's something I never did and am really curious about :p I always get warnings when I launch an executable I made on a different computer.
Is there any benefit to the layer stack being set up the way it is here (using shared pointers) vs how it's set up in Hazel (raw pointers)? Would Hazel benefit from the shared_ptr approach at all?
Hey, I'm trying to learn the Win32 library, I was wondering if anyone can tell me how to find out what every macro / function does and where to look. This applies to every library too I suppose so if you know that would be a great great help.
A series on this would be great. It can be an independent series which does everything from scratch including styling. In The end, it can plug into the OpenGL and Game Engine series.
Hey man, loving Walnut. How do i style it though? I am having issues setting styles - keeps giving me erros when i try to use `ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 5);` - love to kow how to get this up and running with custom styles.
Ok, something is not clear to me. Why create a smart pointer of an image instead of just an Image on the stack Why I keep seeing people using (smart) pointers instead of the normal objects?
@@theEndermanMGS True, but you can still create it as a stack based object as part of a wrapper class type in a function (main) or before an event loop that's run until the end of the program or you could also create it as a static object (not a good idea if mulitiple threads need to access it unless it's declared as const or if it's well protected by some kind of thread synchronization primitive with adequate level of granularity taken into consideration) in a function (main) or even as a global object and when you need to pass it around to other functions, methods you pass it by & or const&. Allocating objects on the heap can become costly especially if you need to do it many times in a loop (event loop), because your program has to make an operating system level API call to reserve the necessary amount of memory and then construct the object in place and return a pointer to it. Still as you said if your Image object is huge and you don't need to construct a new one, deconstruct the old one many times in a loop, then using make_unique(...) is a reasonable thing to do.
@@ilieschamkar6767 It's not so much about the size of the stack (though it's almost always waaaaay smaller than the available heap), and more that the size is fixed and unchangeable and meant for tracking program execution, not so much dynamic resources. Use too much stack and it's over, no possible way to recover the program, but use too much heap and recovery is still possible.
I'm new to ImGUI and vulkan but your work on walnut looks very useful. However, when I follow your video, first it does not compile because I don't have Vulkan. So I downloaded vulkan sdk. Re-ran your setup script. Now it builds but does not run because it can't find the vulkan dll. installed the vulkan runtime. Now it crashes/aborts with: [vulkan] Error: VkResult = -9. Can you or someone point me to a beginners guide for vulkan and imgui? Any plans to have Walnut work with directx? Thanks for the video, looking forward to more on this.
Dude. Imgui is really, nice to use. But it's pretty ugly and not very customizable (In terms of design). Is there any fix for this? Or I'm stuck with writing my own UI components with OpenGL?
@@SnakeEngine I'm not asking what Engine to use.... I'm well aware of unity. I'm asking the creator of Hazel, not @SnakeEngine, the status of his game engine... ... people on the internet these days... geesh...
hazel definitely wont be available for public since there are people who paid for it. is it production ready? well kind of depends what kind of game you want. will there be free version of hazel? well there is hazel 2d but, eh...
Hi, and thanks for your videos, Can you make a video that explains the difference between Cuda, Optix and Sfml and SDL if you can use them with OpenGL or Vulkan or are just other things... I'm a bit confused about this libraries, thanks
I definitely want to see a video explaining how to customize dear imgui theme!
Here you go. Call this during your init of imgui. change the colors to whatever you want.
void setDefaultTheme() {
// Colors
ImVec4 blackSemi = ImVec4(0.00f, 0.00f, 0.00f, 0.94f);
ImVec4 black = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
ImVec4 red = ImVec4(0.23f, 0.16f, 0.16f, 1.00f);
ImVec4 beige = ImVec4(0.78f, 0.62f, 0.51f, 1.00f);
ImVec4 darkGrey = ImVec4(0.24f, 0.24f, 0.24f, 1.00f);
ImVec4 greenGrey = ImVec4(0.148f, 0.168f, 0.153f, 1.00f);
ImVec4 white = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
ImVec4 darkerGrey = ImVec4(0.03f, 0.03f, 0.03f, 1.00f);
ImVec4 grey = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
ImVec4 green = ImVec4(0.21f, 0.27f, 0.27f, 1.00f);
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text] = beige;
colors[ImGuiCol_TextDisabled] = white;
colors[ImGuiCol_WindowBg] = black;
colors[ImGuiCol_ChildBg] = black;
colors[ImGuiCol_PopupBg] = black;
colors[ImGuiCol_Border] = beige;
colors[ImGuiCol_BorderShadow] = black;
colors[ImGuiCol_FrameBg] = red;
colors[ImGuiCol_FrameBgHovered] = darkerGrey;
colors[ImGuiCol_FrameBgActive] = black;
colors[ImGuiCol_TitleBg] = black;
colors[ImGuiCol_TitleBgActive] = black;
colors[ImGuiCol_TitleBgCollapsed] = black;
colors[ImGuiCol_MenuBarBg] = red;
colors[ImGuiCol_ScrollbarBg] = black;
colors[ImGuiCol_ScrollbarGrab] = red;
colors[ImGuiCol_ScrollbarGrabHovered] = darkerGrey;
colors[ImGuiCol_ScrollbarGrabActive] = grey;
colors[ImGuiCol_CheckMark] = beige;
colors[ImGuiCol_SliderGrab] = beige;
colors[ImGuiCol_SliderGrabActive] = beige;
colors[ImGuiCol_Button] = red;
colors[ImGuiCol_ButtonHovered] = darkerGrey;
colors[ImGuiCol_ButtonActive] = red;
colors[ImGuiCol_Header] = red;
colors[ImGuiCol_HeaderHovered] = darkerGrey;
colors[ImGuiCol_HeaderActive] = black;
colors[ImGuiCol_Separator] = beige;
colors[ImGuiCol_SeparatorHovered] = darkerGrey;
colors[ImGuiCol_SeparatorActive] = beige;
colors[ImGuiCol_ResizeGrip] = black;
colors[ImGuiCol_ResizeGripHovered] = darkerGrey;
colors[ImGuiCol_ResizeGripActive] = black;
colors[ImGuiCol_Tab] = red;
colors[ImGuiCol_TabHovered] = darkerGrey;
colors[ImGuiCol_TabActive] = darkerGrey;
colors[ImGuiCol_TabUnfocused] = black;
colors[ImGuiCol_TabUnfocusedActive] = black;
colors[ImGuiCol_PlotLines] = beige;
colors[ImGuiCol_PlotLinesHovered] = darkerGrey;
colors[ImGuiCol_PlotHistogram] = beige;
colors[ImGuiCol_PlotHistogramHovered] = darkerGrey;
colors[ImGuiCol_TextSelectedBg] = black;
colors[ImGuiCol_DragDropTarget] = beige;
colors[ImGuiCol_NavHighlight] = black;
colors[ImGuiCol_NavWindowingHighlight] = black;
colors[ImGuiCol_NavWindowingDimBg] = black;
colors[ImGuiCol_ModalWindowDimBg] = black;
// IO
ImGuiIO& io = ImGui::GetIO();
io.FontGlobalScale = 1.6f;
}
In the demo you can go Tools->Style Editor and play around with the values for an idea of their different effects.
@@justinpakarno4346 you can also export the style to clipboard and paste it into your source
@@xvsvqc9663 why paste.. write an import from clipboard function, easy enough
I literally watched that video yesterday because I wanted to do some GUI. And now this comes in at the perfect time. Thank you
I gonna finish my beginner course in the next couple of months and I will look for some kind of GUI for c++ so thanks for this video I’m sure I will come back here :)
God blessed you. Happy Easter :)
A _beginner_ course takes _months?_
You need your money back. And your time.
YES! more ImGui please.
been with cherno since 2017..man he hasn't changed a bit much love sir
Brilliant. Got everything running. Would love to see all the ImGUI stuff you are willing to put out. A vid on how one would: add and run linters, use Conan with this project to pull in wanted libraries, add network messaging between two Walnut applications, integrate run time dll loading to a Walnut application.
I'm currently writing a program with imgui and implot. I'll be following this! Loading images is something I'm interested in for custom buttons.
*and also storing fonts in the binary.
ImGui::IsItemClicked() After drawing the item
You’ll probably run into a few issues messing around with fonts too much, but you can easily load one from memory
Wow. I was so waiting for this video
Walnut looks great can't wait to see how it grows
Hi Cherno! Fantastic video, exactly what i was looking for. I'm really learning a lot from all your videos, especially the C++ series.
If you would make a follow up walnut video to show how to port a walnut application to mac that would be really awesome. Keep up the good work!
This has been a very useful topic, Thank you for doing this Cherno ^_^
that "start ." in cmd trick is sweet
Would love to see more videos on Walnut!
I would love to see more of this and theming would be awesome!
Excellent, thank you!
Maybe this is out on a limb but I'd be interested to see a similar example using VS Code, CMake and MinGW-w64 tools instead of Visual Studio. That way a cross-platform application could be developed with a cross-platform toolset.
i love the c++ series
thank you 🌹
Thank you so much!
Was trying to render image using Vulkan and ImGUI! so many steps. So thank you very much on this.
They should add the basic implementations for all backends in there example code.
The Idea of Layers is great. so different parts of application can create a layer, and draw, and it will be taken care of drawing, in one main loop.
Thanks. please continue sharing ImGui stuff and walnut.
It would be nice if you could show how to use walnut as a visualizer. To push lines, pointclouds and triangles meshes to display.
+1
Good work! I like seeing it.
quite useful this framework
You recommended ImGui, installed it from Victor's tutorial. Also ImGui is really good except with OpenGL use a lot of GPU on old machines
this man is nuts
For ui, I use something called gempyre it's basically shows up a web browser but instead of using javascript you use c++ for the backend. I really like the idea. It is MIT BTW.
Cool stuff as usual Cherno. I wouldn't mind seeing a video on theme customizations because I wasn't sure whether that is an imgui thing or you were thinking something else. :)
I would love to see more videos per your commenting request.
Thanks for doing this! finally a GUI tutorial from the best of the best C++ youtuber!
A great video will be on how you create this build environment, and the differences between the debug and dist builds.
And also, why did you choose to have the core and dependencies as different projects.
Thanks for the great content.
why are you creating the Walnut::Application with new and deleting it via delete instead of using smart pointers?
Great vid! Nice haircut m8
thank you for always making good contents.. real educational..
Yan, I would love to know how to autosize(autoscale) windows. Currently they stay fixed and its so annoying.
Also how to implement a landscape/portrait view
I am watching this at the 8 month point since this video's release. Is title bar editing available with Walnut yet or is that still in development?
Thanks !
I was looking for a good GUI (Graphic User Interface) library for my project as a replacement for "Electron"
[ which I use to create a nice looking window ]
This looks like exactly what I need for a few projects. Will there be support for Linux and MacOS
When I run walnut (4:03) it gives me an error saying it can't find this path: C:\Users\brayd\Desktop\Projects\Walnut Projects\Walnut\bin\Debug-windows-x86_64\WalnutApp\WalnutApp.exe
So I go there, and there is only a log file called WalnutApp.log.
Please help.
Thanks,
STEAM not STEM
I'd love to see video(s) about changing the imgui theme!
I see that there are PushLayers, but I don't see any PopLayers? How is pushing and popping supposed to work or what is the intended flow when making a GUI app?
Why not use Qt for GUIs? You can do basically anything you want with Qt and it's automatically cross-platform.
The Image class is good, but what if I want to render video?
then each time calling SetData() consumes cpu and time uploading new image to GPU, is there a way to map and update image continuasly, so if original image pointer for exmpale a cv::Mat is changed, then the walnut image is mapped to the memory and no reuploding is done? so it will be faster? is this possible?
I would love a video on customising dear imgui themes
I'm getting an error when running the WalnutApp for the first time - I have Vulkan installed into a non-default location and added "%(VULKAN_SDK)\Include" to the C/C++ > General > Additional Include Directories but it's still saying that it cannot open source file "vulkan/vulkan.h" after doing that :(
Try $ instead of %. Assuming you checked that environment variable actually exists.
(edit) or %VULKAN_SDK%
do you have vulkan installed ?
I had issues with Vulkan. Wasnt installed. I installed it and then i had to restart my computer, but it worked then
@@DFPercush I verified that this was using the correct path, I used the "Macros" section to check.
@@darer13 I have the SDK installed, do I need to install something else in addition? Tried restarting my PC but still having the same issue.
This looks really nice. The only thing bothering me is the "new" you need to create the Application instance.
Do you reckon it's possible to make a c# wrapper for walnut?
What Visual Studio Theme is that?
Cool! Thanks for your job! A have started to follow your videos few days ago, because of ImGUI :-) For sure, I will give a try to the Walnut, I am pretty new to "gaming C++". Anyway, do you know Poco framework? Do you thing, is possible to use ImGUI/Walnut as UI layer fot this framework? I would like to implement some calculations out of the main loop (data analysys, networking) and flush the results to a graph. Tips are appreciated :-)
Great video. Would love to see a video on how you manage to make resizable Windows windows with 0 borders and a custom titlebar
Why do you use the QT?
Still waiting for Cherno to name one of his projects Deeznuts
Hi , Cherno.. What do you thing about rust language for use in graphics , and it will be interesting that with yours skills , one project open source like autocad , for drawing, no one made something similar with opengl or directx or vulkan..
Hello cherno. I’m curious when do you plan to add distribution to hazel 2D to export games? I tried to code my own solution but it doesn’t work at all. They don’t teach this stuff at school😞
yo. i dont know much but maybe we can work on it together?
@@darer13 hey bro sorry for late reply 😅 I did not receive notification about your comment. Did you figure it out? Would you like to add me on discord?
video suggestion: intro to shaders, metal shader and overall how to incorporate shaders in different platforms. THANKS !!
show us a detailed video how to make a custom style for ImGui, this would be nice since it is not very well documented
What is your opinion of U++?
A big showstopper for me is the inability to make it look like a native app.
Can we sign the executable that is produced by dist ? It's something I never did and am really curious about :p
I always get warnings when I launch an executable I made on a different computer.
Is there a devlog coming for the ludum dare game?
but, how can you set this up on linux?
Is there any benefit to the layer stack being set up the way it is here (using shared pointers) vs how it's set up in Hazel (raw pointers)? Would Hazel benefit from the shared_ptr approach at all?
Hey, I'm trying to learn the Win32 library, I was wondering if anyone can tell me how to find out what every macro / function does and where to look. This applies to every library too I suppose so if you know that would be a great great help.
How to add Vulkan to sm64port:
When?
Hi, what do you think about clion ide?
I am interested in seeing more about customization.
A series on this would be great. It can be an independent series which does everything from scratch including styling. In The end, it can plug into the OpenGL and Game Engine series.
It will be really cool to make the project with CMake build system and show on camera, how to write CMakeLists...
He said he hates cmake
I like the font you use in visual studio, will you please share it here? 😊
This video gave me the idea to create a wrapper around Win32. (I kid you not I'm not crazy). It is not finished, I don't have any repo (yet).
Would love a follow up!
Dear cherno!
how can we make an adjustable scrollbar in imgui?
How to setup this for Visual Studio CODE?
is there any c++ gui app tutorials for beginners?
why not just use visual studio internal tools to make ui?
Hey man, loving Walnut. How do i style it though? I am having issues setting styles - keeps giving me erros when i try to use `ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 5);` - love to kow how to get this up and running with custom styles.
just an FYI - i figured it out :)
Hey can you do a video on what type of editor should a beginner use for c++, ide or normal text editor?
Visual Studio is free and that is what Cherno is using here.
aah , I wish we get a macOS build soon
Thanks for the video! I wonder what you (or other viewers) would advise to make a text editor. What kind of framework for example?
Hey man do you know something like wxWidgets but lighter and without that 2gb of dlls. ?
Is there any way to add unit tests for Immediate Mode GUI? thank you for your video!
I love your videos. But Qt is the best framework for c++ gui😁
yo cherno, how to add a window icon for apps for windows 10?
and how to auto dock the window to the dock space and auto hide the tab bar? :D
Pleaaaaaaase make more videos on tutorials for making GUI. i have a big final project and i have to make a GUI and i want to use walnut for it ;-;
Where did the name Walnut come from?
Well...hazel(hazelnut), most of the code is inspired by hazel, It's all nuts.
Hazelnut is the engine editor. Maybe this was the inspiration for "Walnut" name
Ok, something is not clear to me.
Why create a smart pointer of an image instead of just an Image on the stack
Why I keep seeing people using (smart) pointers instead of the normal objects?
It avoids expensive copy operations without introducing the possibility leaving a dangling reference after the resource goes out of scope.
@@theEndermanMGS True, but you can still create it as a stack based object as part of a wrapper class type in a function (main) or before an event loop that's run until the end of the program or you could also create it as a static object (not a good idea if mulitiple threads need to access it unless it's declared as const or if it's well protected by some kind of thread synchronization primitive with adequate level of granularity taken into consideration) in a function (main) or even as a global object and when you need to pass it around to other functions, methods you pass it by & or const&. Allocating objects on the heap can become costly especially if you need to do it many times in a loop (event loop), because your program has to make an operating system level API call to reserve the necessary amount of memory and then construct the object in place and return a pointer to it. Still as you said if your Image object is huge and you don't need to construct a new one, deconstruct the old one many times in a loop, then using make_unique(...) is a reasonable thing to do.
A full-sized image could blow the stack. Image data almost certainly belongs on the heap.
@@CalebKlomparens what are the sizes for the stack and the heap in c++?
I tried to google it and the results were confusing :/
@@ilieschamkar6767 It's not so much about the size of the stack (though it's almost always waaaaay smaller than the available heap), and more that the size is fixed and unchangeable and meant for tracking program execution, not so much dynamic resources. Use too much stack and it's over, no possible way to recover the program, but use too much heap and recovery is still possible.
Please teach us how to make a framework like walnut
Why not qt? What are the advantages?
I'm new to ImGUI and vulkan but your work on walnut looks very useful. However, when I follow your video, first it does not compile because I don't have Vulkan. So I downloaded vulkan sdk. Re-ran your setup script. Now it builds but does not run because it can't find the vulkan dll. installed the vulkan runtime. Now it crashes/aborts with: [vulkan] Error: VkResult = -9.
Can you or someone point me to a beginners guide for vulkan and imgui?
Any plans to have Walnut work with directx?
Thanks for the video, looking forward to more on this.
Hi, I love the initiative. Do you know if there is a way to use it with Rust lang ?
You would need to call the C/C++ call from rust. im not sure how compatible the two are.
Dude. Imgui is really, nice to use. But it's pretty ugly and not very customizable (In terms of design). Is there any fix for this? Or I'm stuck with writing my own UI components with OpenGL?
I am allergic to nuts; can I still use the project? /namingtirade
Is the Game Engine series dead?
Im not used to cherno with really short hair,
Is hazel ready for production and available to the public?
if you are serious about game dev you should use something battletested as unity and not engines in their infancy.
@@SnakeEngine That doesn't really answer my question...
@@hidemat5141 It does. Use Unity, not Hazel for now.
@@SnakeEngine I'm not asking what Engine to use.... I'm well aware of unity. I'm asking the creator of Hazel, not @SnakeEngine, the status of his game engine...
... people on the internet these days... geesh...
hazel definitely wont be available for public since there are people who paid for it. is it production ready? well kind of depends what kind of game you want. will there be free version of hazel? well there is hazel 2d but, eh...
someone knowns what IDE is using Master Cherno?
I have question
How GUI works? I mean how
nice. is it crossplatform ?
not yet.
Is this like to make idk some app like idk. anything? Maybe 2d games, this walnut? Open gl?
Mr.Cherno what visual studio theme and color scheme
are you using?
Visual Assist
this looks pretty useful if you are gonna work on it a bit more. I'd like to see how to remove the dockspace in a future video once that's possible
vulkan 😳
Yellowstone 😱
Error setupVulkan err=-9 abort() has called
Hi, and thanks for your videos, Can you make a video that explains the difference between Cuda, Optix and Sfml and SDL if you can use them with OpenGL or Vulkan or are just other things... I'm a bit confused about this libraries, thanks