Code Monkey home page Code Monkey logo

Comments (3)

GamingMinds-DanielC avatar GamingMinds-DanielC commented on July 17, 2024

That is not something that can be solved in a general way. Inside of your main viewport you can basically render however you want, but when dragged into a new viewport, a new platform window gets created. Your ImGui window will still be transparent, but it will be transparently rendered on top of whatever is in the back buffer of your platform window (cleared to red in your case). Same as with you main viewport which happens to have a solid background color as well.

You might be able to achieve some transparency on your own if you create transparent platform windows, you can override ImGui::GetPlatformIO().Platform_CreateWindow with your own version for that.

from imgui.

fsfuzhu avatar fsfuzhu commented on July 17, 2024

That is not something that can be solved in a general way. Inside of your main viewport you can basically render however you want, but when dragged into a new viewport, a new platform window gets created. Your ImGui window will still be transparent, but it will be transparently rendered on top of whatever is in the back buffer of your platform window (cleared to red in your case). Same as with you main viewport which happens to have a solid background color as well.

You might be able to achieve some transparency on your own if you create transparent platform windows, you can override ImGui::GetPlatformIO().Platform_CreateWindow with your own version for that.

Sure, thx bro. And could u give me a example for invoking this function? idk how to invoke this, sry

from imgui.

GamingMinds-DanielC avatar GamingMinds-DanielC commented on July 17, 2024

It's not a function you invoke yourself, it is a hook for a function that gets called by the library when needed. You just need to replace it with your own version right after initializing the ImGui context. Since you are using DX11, I'm guessing you are using Win32 as a backend as well, so after your call to ImGui_ImplWin32_Init. You have sources for the backends, take a look at ImGui_ImplWin32_CreateWindow (that one is the default for that platform hook) as a reference and build your own based on that.

from imgui.

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.