-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
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
nk_begin no window #5
Comments
I'm afraid I don't understand what you mean with "precompiler" (there is nothing like that in this repository). Do you use any bindings or do you download You can find examples under |
Please try first some of the |
Just refactored to follow the simple demos example, which attaches to an existing Win32 window but only does so through the buggy nuklear_gdi.h in |
Hm, I'd say, that most of them create a window. Or am I missing something? What do you actually mean by "writing your own library"? Everything is already written - you just need to initialize it based on your app needs (which you do even in high-level frameworks like Qt). If anything is missing, please tell us and propose solution - we'd like to improve Nuklear and its ecosystem.
Well, that highly depends on your needs. Apparently there are thousands of developers (see stars of the old Nuklear repo), who do require full control over the main loop, event dispatch etc. and not a fixed solution with all decisions made up front to match mainstream (which is when it comes to UI pretty low quality in terms of final user experience as well as development time of mid and more complex UIs).
If you found any bugs, please make a PR or at least write them down into a separate issue to have them tracked. See also these open GDI+ PRs: vurtun/nuklear#940 , vurtun/nuklear#796 . |
They all create a window but require a lot of work to do so including introducing dependencies on GLFW, DirectX or Win32. |
There is nothing stupid in your questions - it's an important feedback. Let's try to get to some action items.
There is such a small example in
Definitely. I'm all for it. So far there were no such PRs and from other UIs there seem to be absolutely no consensus how such a "compound" API should look like. PRs are welcome.
This is something we shall discuss more in detail. I'm not aware of that - in the simpliest case, you won't use any backend at all and compile Nuklear application fine. But you won't get any other output then list of instructions (there are just a few - e.g. "draw cornered rectangle", "draw poly line", "draw text", "draw arc", etc.). You can use it to draw to anything (to SVG, to any bitmap, to Web canvas, to GDI surface, to DirectX surface, you name it). And if you provided Nuklear with some input events (e.g. a mouse click) by calling the corresponding Nuklear function, the list of instructions will reflect upon that automatically. That's it, nothing else. So, where did you get the impression, that you need dependencies on GLFW, DirectX or Win32? I'd like to fix those places which are this misleading. |
Does using fonts in nuklear require one of these libraries? (glfw, sdl, gdi, win32, ...) |
@samadadi no, no such libs are required (it uses by default stb_truetype internally, but that can be changed if it doesn't suit your needs). |
I tried to write a simple nuklear gui example. It compiles and runs in background but there is no window to be show. here is the stackoverflow link. stackoverflow |
Looks like you forget to create window )) You should take a look to exampes. It use target specific renderer wrapper, which handle window dispatching and input. In other words you should handle input and window dispatching/drawing routine yourself. You can find existent code for some common subsystems inside 'demo' directory. |
I thought nuklear has its own renderer for window creation and redering the window (using |
To be clear here, Nuklear has it's own windows for which no external dependency is needed. But judging based on your stackoverflow link, you're not trying to render the Nuklear windows into a raw framebuffer, but rather you're expecting Nuklear "magically" (i.e. without any other dependency) draw OS-level windows (which are OS-specific and thus require dependency on OS-specific libraries providing the windowing functionality - e.g. on Linux it's X11 or Wayland, on Windows it's winapi, on macOS it's Quartz, on Android ...). |
What dumblob said. You'll need a platform renderer. See one of the examples in the /demo/ folders. |
The definitions commented at the start have been added within the pre-compiler settings
Am I mistaken in that the above is the minimum required code to create a window? Since it doesn't work :( Are there minimalized examples for simple things like this?
The text was updated successfully, but these errors were encountered: