engo icon indicating copy to clipboard operation
engo copied to clipboard

Question: Can you draw upon a transparent window/canvas?

Open nikole-dunixi opened this issue 3 years ago • 1 comments

Hello, I was wondering if there was an equivalent to the ebiten example that draws on a transparent window giving the effect of drawing upon the desktop? The relevant relevant code they have is in their mascot example:

$ go run -tags=example github.com/hajimehoshi/ebiten/v2/examples/mascot@latest

I tried setting my canvas background color but this doesn't seem to be enough, because the background still shows up as black.

common.SetBackground(color.Transparent)

Is there a way to manage the window's settings/configuration to do the same thing? Is there a way to signal this to the glfw library underneath?

nikole-dunixi avatar Apr 18 '22 16:04 nikole-dunixi

Hello,

You can access the underlying window with engo.Window, and should be able to use the glfw package as you normally would. However, if you want to compile using a different backend, such as SDL, web, Android, etc. then you'll need to use those respective packages instead of glfw

Hope this helps!

Noofbiz avatar Aug 19 '22 19:08 Noofbiz