rajveermalviya / gamen Goto Github PK
View Code? Open in Web Editor NEWCross-platform GUI window creation & management library in Go
License: Apache License 2.0
Cross-platform GUI window creation & management library in Go
License: Apache License 2.0
At the hello wirkd example, where shall I save the main.so library generated from the GO code, so that the android app can load it?
Basically, I adapted this example code: https://github.com/bbredesen/go-vk-samples/blob/main/01_single_triangle/app.go - to use gamen instead.
First frame polls and renders nicely, but the 2nd run of the for-loop dies at if !d.Poll()
with this:
github.com/rajveermalviya/gamen/internal/wayland._Cfunc_wl_display_dispatch_pending(0x1386060)
_cgo_gotypes.go:504 +0x47 fp=0xc000191e08 sp=0xc000191de0 pc=0x4a6a87
github.com/rajveermalviya/gamen/internal/wayland.(*Display).pollAndDispatchEvents.func10(0xc000191e78?)
/home/kristian/go/pkg/mod/github.com/rajveermalviya/[email protected]/internal/wayland/display.go:452 +0x3d fp=0xc000191e40 sp=0xc000191e08 pc=0x4ab71d
github.com/rajveermalviya/gamen/internal/wayland.(*Display).pollAndDispatchEvents(0xc0000e6000, 0x1?)
/home/kristian/go/pkg/mod/github.com/rajveermalviya/[email protected]/internal/wayland/display.go:452 +0x1c8 fp=0xc000191ea8 sp=0xc000191e40 pc=0x4ab688
github.com/rajveermalviya/gamen/internal/wayland.(*Display).Wait(0x520450?)
/home/kristian/go/pkg/mod/github.com/rajveermalviya/[email protected]/internal/wayland/display.go:232 +0x37 fp=0xc000191ec8 sp=0xc000191ea8 pc=0x4a9a97
Let me know if further info is needed.
Update: Xcb seems to work, this is just with Wayland.
@rajveermalviya Hi,
As recommended by the Go language, if a struct with methods satisfies an interface, you should indicate that in your code.
So the code is like this.
package win32
import (
"github.com/rajveermalviya/gamen"
)
var _ gamen.Window = (*Window)(nil)
type Window struct {
}
Currently, important interfaces such as Display and Window are defined in the display package.
However, the display package must define an important function called display.NewDisplay(). You will then refer to the concrete implementation (e.g. win32.NewDisplay()).
Therefore, if an interface is defined within the display package, the display package cannot be referenced from environment-dependent packages (e.g. win32). This is because cross-package references occur.
To prevent this problem, separate display.NewDisplay() and interface definition packages. Simply add the gamen package and define the interface there.
expose an interface to allow custom csd implementation.
also provide a default implementation which will be the fallback.
see https://docs.rs/smithay-client-toolkit/latest/smithay_client_toolkit/window/trait.Frame.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.