renderer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 8 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(target *ebiten.Image, drawData imgui.DrawData, txcache TextureCache, dfilter ebiten.Filter)

Render the ImGui drawData into the target *ebiten.Image

func RenderMasked added in v0.0.4

func RenderMasked(target *ebiten.Image, mask *ebiten.Image, drawData imgui.DrawData, txcache TextureCache, dfilter ebiten.Filter)

RenderMasked renders the ImGui drawData into the target *ebiten.Image with ebiten.CompositeModeCopy for masking

Types

type GetCursorFn

type GetCursorFn func() (x, y float32)

type Manager

type Manager struct {
	Filter ebiten.Filter
	Cache  TextureCache

	GetCursor          GetCursorFn
	SyncInputsFn       func()
	SyncCursor         bool
	SyncInputs         bool
	ControlCursorShape bool

	ClipMask bool
	// contains filtered or unexported fields
}

func New

func New(fontAtlas *imgui.FontAtlas) *Manager

func NewWithContext

func NewWithContext(ctx *imgui.Context) *Manager

func (*Manager) BeginFrame

func (m *Manager) BeginFrame()

func (*Manager) Draw added in v0.3.0

func (m *Manager) Draw(screen *ebiten.Image)

func (*Manager) EndFrame

func (m *Manager) EndFrame()

func (*Manager) SetDisplaySize added in v0.3.0

func (m *Manager) SetDisplaySize(width, height float32)

func (*Manager) SetText

func (m *Manager) SetText(text string)

SetText implements imgui clipboard

func (*Manager) Text

func (m *Manager) Text() (string, error)

Text implements imgui clipboard

func (*Manager) Update

func (m *Manager) Update(delta float32)

type TextureCache added in v0.1.0

type TextureCache interface {
	FontAtlasTextureID() imgui.TextureID
	SetFontAtlasTextureID(id imgui.TextureID)
	GetTexture(id imgui.TextureID) *ebiten.Image
	SetTexture(id imgui.TextureID, img *ebiten.Image)
	RemoveTexture(id imgui.TextureID)
	ResetFontAtlasCache(filter ebiten.Filter)
}

func NewCache added in v0.1.0

func NewCache() TextureCache

Jump to

Keyboard shortcuts

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