protected override void LoadContent() { // Texture loading example // First, load the texture as a Texture2D (can also be done using the XNA/FNA content pipeline) _xnaTexture = Texture2D.FromStream(GraphicsDevice, GenerateImage(300, 150)); // Then, bind it to an ImGui-friendly pointer, that we can use during regular ImGui.** calls (see below) _imGuiTexture = _imGuiRenderer.BindTexture(_xnaTexture); base.LoadContent(); }
protected override void LoadContent() { // Texture loading example // First, load the texture as a Texture2D (can also be done using the XNA/FNA content pipeline) _xnaTexture = CreateTexture(GraphicsDevice, width, height, pixel => { var red = (pixel % 100) / 2; return(new Color(red, 1, 1)); }); // Then, bind it to an ImGui-friendly pointer, that we can use during regular ImGui.** calls (see below) _imGuiTexture = _imGuiRenderer.BindTexture(_xnaTexture); base.LoadContent(); }