GithubHelp home page GithubHelp logo

DX11 support about horus_ui HOT 6 OPEN

tekgoblin avatar tekgoblin commented on July 18, 2024
DX11 support

from horus_ui.

Comments (6)

nekitu avatar nekitu commented on July 18, 2024 1

I have added a SdlWindowProxy struct where SDL_Window* is kept, and acts like a Window handle. You can add any data in the proxy struct, also check the sdl2_input_provider.cpp for the "DX11" string, it has some comments where to add the DX11 swapchain code for init and delete for each newly created window. I presume you have to create the DX11 windows manually. Btw, out of curiosity, why don't you use dear-imgui ? :)

from horus_ui.

nekitu avatar nekitu commented on July 18, 2024

The library was meant for GL, because I use only that for my projects, Vulkan and DX11+ are a bit more involved to set up, but I will make the necessary changes so the lib and SDL2 provider will enable usage of any graphics backend. Thanks. Btw there is a function that disables undocking to outside native windows, will allow only main window docking: HORUS_API void setAllowUndockingToNewWindow(bool allow); I will probably put it in the context settings as a bool.

from horus_ui.

tekgoblin avatar tekgoblin commented on July 18, 2024

That's fine, I don't want to push anything onto it you don't want / need.. I can always keep a branch locally for that. About imgui: I just don't like imgui period. The api for this matches more of my thoughts more, so like attracts like in that case. With DX11 you just need to be able to get the windows os level info to create a swapchain on a window. Much like in gl when you create a context on the window. Difference is GL doesn't technically require a program owned windows to init. I saw the setAllowUndockingToNewWindow earlier before running out lol. Thanks.

from horus_ui.

nekitu avatar nekitu commented on July 18, 2024

setAllowUndockingToNewWindow was deleted. Now you can do: hui::getContextSettings().allowUndockingToNewWindow = false; when you don't want to allow undocking.
Ideally the inner panes would be also native child windows, but SDL2 doesn't really support child windows and I think neither SFML. That would help a bit with speed, for example you can update a viewport at a greater fps than the UI, but its a lot of work to basically create a cross platform windowing system for it, and I don't really want to extend SDL2's core code for that... If you check Unity3D they have that, child windows for all panes. I will try to work on it as much as I can, it is an old dream of mine for a proper professional looking cross platform UI system for tool making. Dear-imgui I didnt liked because it has limited theming support, it looks like what it is, a debug UI, plus it feels a bit too bloated in some areas, so I decided to make my own imgui lib. There is a lot of cleaning, documenting. bugs and features to come, so bare that in mind when integrating/extending :).

from horus_ui.

tekgoblin avatar tekgoblin commented on July 18, 2024

Well I have an opengl retained mode ui I wrote a while ago I was going to fallback on, but wanted to give this a try. That's where I added timing info and it's not bad actually, in it's current state. If you're going to go on the deep dive for native window support beneath it all check out final_game_tech. Just one avenue that could help shortcut if you like. I personally just didn't want to have to dust off my old ui and update it. I would just make one widget/pane type for the native window besides a default panel because that's all that's really needed and keeps the memory lower and used where it would only need to be used.

from horus_ui.

nekitu avatar nekitu commented on July 18, 2024

Your remake utility lib is not taking into account that for gcc the linked libraries need to be in a certain order for the static linking of libs. "A library which calls an external function defined in another library should appear before the library containing the function.", you may want to look into that, also it has a problem when creating the /bin folder and copy to it the final exes. Just checkout and verify it in Ubuntu.

from horus_ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.