ImGui.NET icon indicating copy to clipboard operation
ImGui.NET copied to clipboard

New to ImGUI. How can I switch rendering engines?

Open wolfieboy09 opened this issue 4 months ago • 2 comments

Hi! I started C# recently to learn, and I wanted to make something with ImGui.

I'm using ClickableTransparentOverlay because that's the only thing working right now. I it works (mostly) it just gets cut off at halfway on my screen. Image

Anyways, I have the following code:

using ImGuiNET;
using ClickableTransparentOverlay;

namespace  ImGUISandbox;

class ImGUISandbox
{
    class Program : Overlay
    {
        protected override void Render()
        {
            ImGui.Begin("The Window");
            ImGui.Text("Some Text Here");
            ImGui.End();
        }
    }

    public static void Main(string[] args)
    {
        Program program = new Program();
        program.Start().Wait();
    }
}

I do have these packages installed:

Image

How can I change to using Veldrid instead? I want it to act as a normal window. Using NET 9.0 as well Any help is greatly appreciated

wolfieboy09 avatar Sep 14 '25 18:09 wolfieboy09

Hi,

I'm actually new to this, too, and wasn't originally planning to reply, but I noticed the sample project had references to Veldrid. You may want to start there?

https://github.com/ImGuiNET/ImGui.NET/blob/master/src/ImGui.NET.SampleProgram/ImGuiController.cs

The comments suggest this is an implementation for Veldrid.

Sorry, I couldn't be more help.

QuinnCG avatar Sep 19 '25 04:09 QuinnCG

@wolfieboy09 Sorry to keep you waiting so long on this issue. If you want to continue to use ClickableTransparentOverlay, the solution is to pass your screen size when you inherit from Overlay.

Using your example, and my screen size of 2560x1440 this looks like this:

using ImGuiNET;
using ClickableTransparentOverlay;

namespace  ImGUISandbox;

class ImGUISandbox
{
    class Program : Overlay(2560,1440)
    {
        protected override void Render()
        {
            ImGui.Begin("The Window");
            ImGui.Text("Some Text Here");
            ImGui.End();
        }
    }

    public static void Main(string[] args)
    {
        Program program = new Program();
        program.Start().Wait();
    }
}

I have not delved into the internals of Overlay, but it seems to either incorrectly get the screen size by default, or it defaults to something like 1920x1080, which is a lower resolution than my current screen.

Hope this helps.

ChiefReifer avatar Dec 13 '25 22:12 ChiefReifer