Show / Hide Table of Contents

# Interface IRenderer

Abstraction for a simple renderer that can be used with ImGui

##### Inherited Members

System.IDisposable.Dispose()

###### Namespace: ImGuiScene

###### Assembly: ImGuiScene.dll

##### Syntax

    public interface IRenderer : IDisposable

### Properties

| Improve this Doc View Source

#### ClearColor

The color to use when clearing the window.

##### Declaration

    Vector4 ClearColor { get; set; }

##### Property Value

Type | Description
--- | ---
System.Numerics.Vector4 |

| Improve this Doc View Source

#### Debuggable

Whether this renderer was created with debuggable state.

##### Declaration

    bool Debuggable { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Type

The type (API/version) of this renderer.

##### Declaration

    RendererFactory.RendererBackend Type { get; }

##### Property Value

Type | Description
--- | ---
RendererFactory.RendererBackend |

| Improve this Doc View Source

#### Vsync

Whether or not the renderer should sync presentation to the monitor's refresh rate.

##### Declaration

    bool Vsync { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

### Methods

| Improve this Doc View Source

#### AttachToWindow(SimpleSDLWindow)

Attach this renderer to the specified window to begin rendering into it.

##### Declaration

    void AttachToWindow(SimpleSDLWindow sdlWindow)

##### Parameters

Type | Name | Description
--- | --- | ---
SimpleSDLWindow | sdlWindow | The SimpleSDLWindow in which to render.

##### Remarks

It is necessary for the renderer to call sdlWindow.Show() at some point during this method.

| Improve this Doc View Source

#### Clear()

Clear the window.

##### Declaration

    void Clear()

| Improve this Doc View Source

#### CreateTexture(Void*, Int32, Int32, Int32)

Helper method to create and upload a gpu texture from raw image data.

##### Declaration

    TextureWrap CreateTexture(void *pixelData, int width, int height, int bytesPerPixel)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Void* | pixelData | A pointer to the raw pixel data
System.Int32 | width | The width of the image
System.Int32 | height | The height of the image
System.Int32 | bytesPerPixel | The bytes per pixel of the image, used for stride calculations

##### Returns

Type | Description
--- | ---
TextureWrap | The created texture resource for the image, null on failure.

##### Remarks

The resource created by this method is not managed, and it is up to calling code to invoke Dispose() when done

| Improve this Doc View Source

#### ImGui_Init()

##### Declaration

    void ImGui_Init()

| Improve this Doc View Source

#### ImGui_NewFrame()

##### Declaration

    void ImGui_NewFrame()

| Improve this Doc View Source

#### ImGui_RenderDrawData(ImDrawDataPtr)

##### Declaration

    void ImGui_RenderDrawData(ImDrawDataPtr drawData)

##### Parameters

Type | Name | Description
--- | --- | ---
ImDrawDataPtr | drawData |

| Improve this Doc View Source

#### ImGui_Shutdown()

##### Declaration

    void ImGui_Shutdown()

| Improve this Doc View Source

#### Present()

Finalize any rendering and swap it to the screen.

##### Declaration

    void Present()