Skip to content

ImGUI image load helpers #899

@KingRikkie

Description

@KingRikkie

I am struggling to find any example on how to load an image from file with Silk.NET. Using Veldrid this is as simple as:

var img = new ImageSharpTexture("image.png");
var dimg = img.CreateDeviceTexture(_gd, _gd.ResourceFactory);
ImgPtr = _controller.GetOrCreateImGuiBinding(_gd.ResourceFactory, dimg); // this returns the ptr to pass to ImGUI.Image()
[. . .]
ImGUI.Image(ImgPtr, new Vector2(300, 300));

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