renderers

package
v0.0.0-...-3c4337b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package renderers implement the drawing code for specific rendering APIs. The renderers in here are dependent on the context the platform provides and process the drawing commands from imgui by driving the rendering API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenGL2

type OpenGL2 struct {
	// contains filtered or unexported fields
}

OpenGL2 implements a renderer based on github.com/go-gl/gl (v2.1).

func NewOpenGL2

func NewOpenGL2(io imgui.IO) (*OpenGL2, error)

NewOpenGL2 attempts to initialize a renderer. An OpenGL context has to be established before calling this function.

func (*OpenGL2) Dispose

func (renderer *OpenGL2) Dispose()

Dispose cleans up the resources.

func (*OpenGL2) PreRender

func (renderer *OpenGL2) PreRender(clearColor [3]float32)

PreRender clears the framebuffer.

func (*OpenGL2) Render

func (renderer *OpenGL2) Render(displaySize [2]float32, framebufferSize [2]float32, drawData imgui.DrawData)

Render translates the ImGui draw data to OpenGL3 commands.

type OpenGL3

type OpenGL3 struct {
	// contains filtered or unexported fields
}

OpenGL3 implements a renderer based on github.com/go-gl/gl (v3.2-core).

func NewOpenGL3

func NewOpenGL3(io imgui.IO) (*OpenGL3, error)

NewOpenGL3 attempts to initialize a renderer. An OpenGL context has to be established before calling this function.

func (*OpenGL3) Dispose

func (renderer *OpenGL3) Dispose()

Dispose cleans up the resources.

func (*OpenGL3) PreRender

func (renderer *OpenGL3) PreRender(clearColor [3]float32)

PreRender clears the framebuffer.

func (*OpenGL3) Render

func (renderer *OpenGL3) Render(displaySize [2]float32, framebufferSize [2]float32, drawData imgui.DrawData)

Render translates the ImGui draw data to OpenGL3 commands.

Directories

Path Synopsis
gl
v2.1/gl
Package gl implements Go bindings to OpenGL.
Package gl implements Go bindings to OpenGL.
v3.2-core/gl
Package gl implements Go bindings to OpenGL.
Package gl implements Go bindings to OpenGL.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL