Skip to content
Discussion options

You must be logged in to vote

Hi! My solution ended up being not using the canvas, but just a context as a composite.

composite.BeginGPUFrame()
		composite.Clear()
		composite.DrawGPUTextureBase(scene.ggView, 0, 0, width, height)

		composite.SetRGBA(0, 0, 0, 0.38)
		composite.DrawRoundedRectangle(hudX, hudY, hudWidth, hudHeight, 8)
		if err = composite.Fill(); err != nil {
			log.Errorf("fill HUD panel: %v", err)
		}

		composite.SetRGBA(1, 1, 1, 0.14)
		composite.SetLineWidth(2)
		composite.DrawRoundedRectangle(hudX, hudY, hudWidth, hudHeight, 8)
		if err = composite.Stroke(); err != nil {
			log.Errorf("stroke HUD panel: %v", err)
		}

		composite.SetFont(face)

		// Main text.
		composite.SetRGB(1, 1, 1)
		composite.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@z46-dev
Comment options

Answer selected by z46-dev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants