Skip to content

Feature request: slang-gfx backend #8089

Closed

Description

@Hyiker

Version/Branch of Dear ImGui:

1.91.1

Back-ends:

slang

Compiler, OS:

None

Full config/build information:

No response

Details:

Motivation

I'm writing a personal project with imgui and slang-gfx, and I hope there could be official support for slang-gfx backend. In short, slang is a brand new shading language resembling HLSL, but has richer language features and can be compiled to mainstream backends like dxil, spir-v etc. . slang-gfx is the abstraction library of graphics APIs, supporting cross-platform backends.

An official implementation of slang backend could be helpful for slang and imgui users.

Details of implementation

I've implemented my personal slang backend(haven't decoupled from my project framework, but it should be easy to do so). If this proposal could be taken, I'd be glad to make a PR writing the implementation.

Concerns

The only concern I have is slang is still under fast iteration development, which exact version we use in this implementation should be decided.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

Activity

  1. ocornut commented on Oct 22, 2024

    @ocornut
    Owner

    Hello, thanks for your interest and links.

    Until a technology is widespread/common enough and stable I would not want to take on hosting an official backend.

    I would however encourage you to extract yours into one, following our conventions (eg: imgui_impl_slang.cpp filenames, same function names etc). We will link to it from the list of backends in wiki. If ever Slang becomes more popular and you want it we can later consider merging it into the main repository.

  2. Hyiker commented on Oct 23, 2024

    @Hyiker
    Author

    Hello, thanks for your interest and links.

    Until a technology is widespread/common enough and stable I would not want to take on hosting an official backend.

    I would however encourage you to extract yours into one, following our conventions (eg: imgui_impl_slang.cpp filenames, same function names etc). We will link to it from the list of backends in wiki. If ever Slang becomes more popular and you want it we can later consider merging it into the main repository.

    Sounds reasonable, I may deliver my impl after some minor modifications to it.

  3. ocornut commented on Oct 23, 2024

    @ocornut
    Owner

    Thank you. I'll close this now. If you end up sharing something please post here as people are likely to stumble here.

    In the meanwhile I'm adding a link to this thread from https://github.com/ocornut/imgui/wiki/Bindings#frameworkengine-backends

  4. fangjunzhou commented on Apr 3, 2026

    @fangjunzhou

    slang-gfx is deprecated. I'm currently maintaining this repo for my own projects: https://github.com/fangjunzhou/imgui.slang

    Slang team is planning to add a imgui draw data pointer in the future.

    Related threads in slangpy repo: shader-slang/slangpy#600, shader-slang/slangpy#858

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions