Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/gl Doesn't compile on Windows #23451

200sc opened this issue Jan 15, 2018 · 1 comment


None yet
3 participants
Copy link

commented Jan 15, 2018

What version of Go are you using (go version)?

go1.9.2 windows/amd64

Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?


What did you do?

I tried to use a package that imported x/mobile/gl.

What did you expect to see?

I expected x/mobile/gl to compile on Windows

What did you see instead?

Two errors, both in work_windows.go

  1. at 132:
case glfnBindVertexArray:
    syscall.Syscall(glBindVertexArray.Addr(), 1, c.args.a0, 0)

Is invalid, as syscall.Syscall requires five arguments.

  1. at 186:
case glfnDeleteVertexArray:
    syscall.Syscall(glDeleteVertexArrays.Addr(), 2, 1, uintptr(unsafe.Pointer(&c.args.a0)), 0)

Is invalid, as glDeleteVertexArrays is not defined.

The literal errors from the command line follow:

..\..\..\..\..\\x\mobile\gl\work_windows.go:132:18: not enough arguments in call to syscall.Syscall
        have (uintptr, number, uintptr, number)
        want (uintptr, uintptr, uintptr, uintptr, uintptr)
..\..\..\..\..\\x\mobile\gl\work_windows.go:186:19: undefined: glDeleteVertexArrays

On my local machine, I resolved this by adding another 0 to the syscall.Syscall and by adding glDeleteVertexArrays = libGLESv2.NewProc("glDeleteVertexArrays") at line 461, but I am not knowingly using these functions so I do not know that that is the appropriate fix.

@gopherbot gopherbot added this to the Unreleased milestone Jan 15, 2018

@gopherbot gopherbot added the mobile label Jan 15, 2018


This comment has been minimized.

Copy link

commented Jan 16, 2018

Change mentions this issue: gl: fix typos in multiple places

@titanous titanous added the NeedsFix label Jan 16, 2018

@golang golang locked and limited conversation to collaborators Jan 17, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.