private Nuklear.nk_image LoadImage(string path) { using (var stream = File.OpenRead(GetAssetPath(path))) { var texture = Texture2D.FromStream(GraphicsDevice, stream); var result = Nuklear.nk_image_id(_contextWrapper.CreateTexture(texture)); result.w = (ushort)texture.Width; result.h = (ushort)texture.Height; return(result); } }