Skip to content

Mobile (Android) support #56

@duysqubix

Description

@duysqubix

Hi,

there will be any mobile (Android at least) support?

I tryed to execute "gomobile install github.com/my/awesome/game" with the code similar to the one below :

...
func main() {
	app.Main(func(a app.App) {
		for e := range a.Events() {
			switch e := a.Filter(e).(type) {
			case lifecycle.Event:
                            ...
			case size.Event:
                            ...
			case paint.Event:
				pixelgl.Run(myGame.Run) // Where myGame.Run executes the pixelgl game and draws stuff with "window, err := pixelgl.NewWindow(cfg)" object
			case touch.Event:
                            ...
			}
		}
	})
}
...

This generates the following error:

`
gomobile: go build -buildmode=c-shared -o /var/folders/sv/v711qrdx14vbpq03112_llx40000gn/T/gomobile-work-227749453/lib/armeabi-v7a/libmobile.so github.com/my/awesome/game/src/game/mobile failed: exit status 2
# github.com/my/awesome/game/vendor/github.com/go-gl/glfw/v3.2/glfw
In file included from vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:
In file included from ./glfw/src/context.c:28:
In file included from ./glfw/src/internal.h:169:
./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
# github.com/my/awesome/game/vendor/github.com/go-gl/gl/v3.3-core/gl
vendor/github.com/go-gl/gl/v3.3-core/gl/procaddr.go:52:11: fatal error: 'GL/glx.h' file not found
#include <GL/glx.h>
^~~~~~~~~~
1 error generated.

`
At this moment I guess I need xquarz in order to avoid this problem.

Anyhow, I'd like to know what I need to do in order to run my game on android (or iOS).

Original issue: faiface/pixel#179

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions