Interface IRenderer
Abstraction for a simple renderer that can be used with ImGui
Assembly: ImGuiScene.dll
View Source
Declaration
public interface IRenderer : IDisposable
Properties
Type
The type (API/version) of this renderer.
View Source
Declaration
RendererFactory.RendererBackend Type { get; }
ClearColor
The color to use when clearing the window.
View Source
Declaration
Vector4 ClearColor { get; set; }
Vsync
Whether or not the renderer should sync presentation to the monitor's refresh rate.
View Source
Declaration
bool Vsync { get; set; }
Debuggable
Whether this renderer was created with debuggable state.
View Source
Declaration
bool Debuggable { get; }
Methods
AttachToWindow(SimpleSDLWindow)
Attach this renderer to the specified window to begin rendering into it.
View Source
Declaration
void AttachToWindow(SimpleSDLWindow sdlWindow)
Parameters
Type | Name | Description |
---|---|---|
ImGuiScene.SimpleSDLWindow | sdlWindow | The ImGuiScene.SimpleSDLWindow in which to render. |
Clear()
Clear the window.
View Source
Declaration
void Clear()
Present()
Finalize any rendering and swap it to the screen.
View Source
Declaration
void Present()
CreateTexture(void*, int, int, int)
Helper method to create and upload a gpu texture from raw image data.
View Source
Declaration
TextureWrap CreateTexture(void* pixelData, int width, int height, int bytesPerPixel)
Returns
ImGuiScene.TextureWrap: The created texture resource for the image, null on failure.
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 |
ImGui_Init()
View Source
Declaration
void ImGui_Init()
ImGui_Shutdown()
View Source
Declaration
void ImGui_Shutdown()
ImGui_NewFrame()
View Source
Declaration
void ImGui_NewFrame()
ImGui_RenderDrawData(ImDrawDataPtr)
View Source
Declaration
void ImGui_RenderDrawData(ImDrawDataPtr drawData)
Parameters
Type | Name |
---|---|
ImGuiNET.ImDrawDataPtr | drawData |