Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Render issue on 2019.3.0f6 w/ Built-In render pipeline #25

Description

@smoore2171

I've pulled this in and updated cimgui.dll to 1.78, which resolved the errors on startup, but it doesn't render anything with ImGui.ShowDemoWindow (the layout register works and it does hit this method in the OnLayout with the Unity Built-In Renderer.

If I try a simple window
ImGui.Begin("foo");
ImGui.TextUnformatted("barr");
ImGui.End();

I get the following null ref:

ArgumentNullException: Value cannot be null. Parameter name: value UnityEngine.MaterialPropertyBlock.SetTexture (System.Int32 nameID, UnityEngine.Texture value) (at <f38c71c86aa64e299d4cea9fb7c715e1>:0) ImGuiNET.Unity.ImGuiRendererMesh.CreateDrawCommands (UnityEngine.Rendering.CommandBuffer cmd, ImGuiNET.ImDrawDataPtr drawData, UnityEngine.Vector2 fbSize) (at D:/Downloads/dear-imgui-unity-master/dear-imgui-unity-master/ImGuiNET.Unity/Renderer/ImGuiRendererMesh.cs:160) ImGuiNET.Unity.ImGuiRendererMesh.RenderDrawLists (UnityEngine.Rendering.CommandBuffer cmd, ImGuiNET.ImDrawDataPtr drawData) (at D:/Downloads/dear-imgui-unity-master/dear-imgui-unity-master/ImGuiNET.Unity/Renderer/ImGuiRendererMesh.cs:76) ImGuiNET.Unity.DearImGui.Update () (at D:/Downloads/dear-imgui-unity-master/dear-imgui-unity-master/ImGuiNET.Unity/DearImGui.cs:157)

In ImGuiRendererMesh, _texManager.GetTexture((int)(prevTextureId = drawCmd.TextureId)) is returning null. The TextureId being sent in is some large value, but the texture manager only has the atlas texture registered to it with ID 1.

I notice it tries to create textures in this manager if GetTextureId is called, but this doesn't appear to be done for anything except ImGui.Image* calls.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions