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: need API to retrieve error from GetAttribLocation() #21457

Open
udhos opened this issue Aug 15, 2017 · 0 comments
Open

x/mobile/gl: need API to retrieve error from GetAttribLocation() #21457

udhos opened this issue Aug 15, 2017 · 0 comments
Labels
mobile Android, iOS, and x/mobile
Milestone

Comments

@udhos
Copy link

udhos commented Aug 15, 2017

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

$ go version
go version go1.9rc2 linux/amd64

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

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/esmarques/go"
GORACE=""
GOROOT="/usr/local/go1.9rc2.linux-amd64"
GOTOOLDIR="/usr/local/go1.9rc2.linux-amd64/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build080353435=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

Need API to retrieve error from GetAttribLocation().

What did you expect to see?

GetAttribLocation() returns -1 on error:
https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glGetAttribLocation.xhtml
I would expect to be able to detect the -1 using the API in https://godoc.org/golang.org/x/mobile/gl

What did you see instead?

GetAttribLocation() currently returns result as Attrib.Value (uint) which can't deliver the error -1.
https://godoc.org/golang.org/x/mobile/gl#Attrib

@gopherbot gopherbot added this to the Unreleased milestone Aug 15, 2017
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

2 participants