raylib-cimgui-go-starterkit

command module
v0.0.0-...-5a6eaf9 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 6 Imported by: 0

README

raylib-cimgui-go-starterkit

Minimal starterkit for https://github.com/gen2brain/raylib-go/ and https://github.com/AllenDang/cimgui-go .

Preview

Integrate Existing project

Copy pkg/raylib_imgui/main.go. minimal usage:

func main() {
	// ..

	// NOTE: load imgui context
	rlig.Load()
	defer rlig.Unload()
	imgui.StyleColorsDark()

	// ..

	for !rl.WindowShouldClose() {
		// NOTE: update imgui input
		rlig.Update()

		// NOTE: create new framebuffer, need to start add imgui widget
		imgui.NewFrame()

		imgui.ShowDemoWindow()

		rl.BeginDrawing()
		rl.ClearBackground(
			rl.NewColor(
				0,
				0,
				0,
				0xFF,
			),
		)
		// NOTE: render imgui, need to call inside drawing scope
		rlig.Render()
		rl.EndDrawing()
	}
}
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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