nmageimgui

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const DefaultImguiShader = `` /* 1050-byte string literal not displayed */

Variables

This section is empty.

Functions

func SdlScancodeToImGuiKey added in v0.17.0

func SdlScancodeToImGuiKey(scancode sdl.Scancode) imgui.Key

Types

type ImguiInfo

type ImguiInfo struct {
	ImCtx imgui.Context

	Mat        *materials.Material
	VaoID      uint32
	VboID      uint32
	IndexBufID uint32
	// This is a pointer so we can send a stable pointer to C code
	TexID *uint32
}

func NewImGui added in v0.17.0

func NewImGui(shaderPath string) ImguiInfo

NewImGui setups imgui using the passed shader. If the path is empty a default nMage shader is used

func (*ImguiInfo) AddFontTTF added in v0.0.7

func (i *ImguiInfo) AddFontTTF(fontPath string, fontSize float32, fontConfig *imgui.FontConfig, glyphRanges *imgui.GlyphRange) imgui.Font

func (*ImguiInfo) FrameStart

func (i *ImguiInfo) FrameStart(winWidth, winHeight float32)

func (*ImguiInfo) Render

func (i *ImguiInfo) Render(winWidth, winHeight float32, fbWidth, fbHeight int32)

Jump to

Keyboard shortcuts

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