Skip to content

Incorrect fontGlyph struct in imgui.net #301

@pixtur

Description

@pixtur

I posted the following issue on the dear imgui repo: ocornut/imgui#5020

As ocornut points out...

The structure looks correct in cimgui.h: https://github.com/cimgui/cimgui/blob/master/cimgui.h#L1117

struct ImFontGlyph
{
    unsigned int Colored : 1;
    unsigned int Visible : 1;
    unsigned int Codepoint : 30;
    float AdvanceX;
    float X0, Y0, X1, Y1;
    float U0, V0, U1, V1;
};

But is wrong in imgui.net: https://github.com/mellinoe/ImGui.NET/blob/master/src/ImGui.NET/Generated/ImFontGlyph.gen.cs

        public uint Colored;
        public uint Visible;
        public uint Codepoint;

This is a problem with however imgui.net is generated.

Need work on imgui.net side: https://stackoverflow.com/questions/14464/bit-fields-in-c-sharp

I'll let you move this to imgui.net or push a PR/fix for it.

I'm not really sure to fix this in imgui.net so I'm not sure how to create a pull request.

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