Skip to main content

Class SimpleOGL3

A simple wrapper for a minimal OpenGL 3.2 renderer. Consumers of this class will need to implement all actual pipeline and render logic externally.

Assembly: ImGuiScene.dll
View Source
Declaration
public class SimpleOGL3 : IRenderer, IDisposable

Implements:
ImGuiScene.IRenderer, System.IDisposable

Properties

ContextMajorVersion

View Source
Declaration
public int ContextMajorVersion { get; }

ContextMinorVersion

View Source
Declaration
public int ContextMinorVersion { get; }

Type

The type (API/version) of this renderer

View Source
Declaration
public RendererFactory.RendererBackend Type { get; }

ClearColor

The clear color used by ImGuiScene.SimpleOGL3.Clear()

View Source
Declaration
public Vector4 ClearColor { get; set; }

Vsync

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

View Source
Declaration
public bool Vsync { get; set; }

Debuggable

Whether this renderer was created with debuggable state.

View Source
Declaration
public bool Debuggable { get; }

Methods

AttachToWindow(SimpleSDLWindow)

Initialize OpenGL for the specified window.

View Source
Declaration
public void AttachToWindow(SimpleSDLWindow sdlWindow)
Parameters
TypeNameDescription
ImGuiScene.SimpleSDLWindowsdlWindowThe SimpleSDLWindow to render into

Clear()

Clear the render view.

View Source
Declaration
public void Clear()

Present()

Swap the render buffer to the screen.

View Source
Declaration
public void Present()

CreateTexture(void*, int, int, int)

View Source
Declaration
public TextureWrap CreateTexture(void* pixelData, int width, int height, int bytesPerPixel)
Returns

ImGuiScene.TextureWrap

Parameters
TypeName
System.Void*pixelData
System.Int32width
System.Int32height
System.Int32bytesPerPixel

ImGui_Init()

View Source
Declaration
public void ImGui_Init()

ImGui_Shutdown()

View Source
Declaration
public void ImGui_Shutdown()

ImGui_NewFrame()

View Source
Declaration
public void ImGui_NewFrame()

ImGui_RenderDrawData(ImDrawDataPtr)

View Source
Declaration
public void ImGui_RenderDrawData(ImDrawDataPtr drawData)
Parameters
TypeName
ImGuiNET.ImDrawDataPtrdrawData

Dispose(bool)

View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeName
System.Booleandisposing

~SimpleOGL3()

View Source
Declaration
protected ~SimpleOGL3()

Dispose()

View Source
Declaration
public void Dispose()

Implements