Commit Graph

8 Commits

Author SHA1 Message Date
David Crawshaw 068a51c195 gl: batch calls onto a dedicated context thread
All GL function calls fill out a C.struct_fnargs and drop it on the
work queue. The Start function drains the work queue and hands
over a batch of calls to C.process which runs them. This allows
multiple GL calls to be executed in a single cgo call.

A GL call is marked as blocking if it returns a value, or if it
takes a Go pointer. In this case the call will not return until
C.process sends a value on the retvalue channel.

Change-Id: I4c76b2a8ad55f57b0c98d200d0fb708d4634e042
Reviewed-on: https://go-review.googlesource.com/10452
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-06-01 15:35:03 +00:00
David Crawshaw d2634ce9c5 gl: darwin/arm64 support
Conflicts with cl/10396. I'll submit this first and update the it.

Change-Id: Ibc873b3fe896ecd2415a42676614807788a8d1c6
Reviewed-on: https://go-review.googlesource.com/10399
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-05-28 18:21:31 +00:00
David Crawshaw 25e80f6a77 gl: build on darwin/arm
Change-Id: I9962d49a4e620fb734bc218ebfa558336ade8e06
Reviewed-on: https://go-review.googlesource.com/5200
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-02-19 15:56:40 +00:00
Hyang-Ah Hana Kim a8fcf739b9 mobile: limit app/font/gl packages to linux/darwin.
They don't make sense for other platforms yet.

See golang/go#9603

Change-Id: I2ed269a00b1e1961aadf0a47fc95bbe3cd230113
Reviewed-on: https://go-review.googlesource.com/2902
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-01-15 20:16:28 +00:00
Hana (Hyang-Ah) Kim daf6d8060b gl: use go generate to generate gldebug.go by invoking gendebug.go
Change-Id: I7d682d153da5b200f9dd5cea8d09d76935daa18c
Reviewed-on: https://go-review.googlesource.com/1225
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2014-12-09 17:31:03 +00:00
David Crawshaw 5875cc8cf7 x/mobile/go: remove GLES2 headers
LGTM=nigeltao
R=rsc, nigeltao
CC=golang-codereviews
https://golang.org/cl/174590043
2014-12-05 10:14:12 -05:00
David Crawshaw b1ea4eba37 go.mobile/gl: f32 utilities and extra debugging
Split constants out into their own file. Hide the
values in named types in a struct, so that when
using the gldebug tag we can attach extra
information (such as the name of a uniform and
attribute).

LGTM=nigeltao
R=golang-codereviews, bryanturley, nigeltao
CC=davidday, golang-codereviews
https://golang.org/cl/137630043
2014-09-17 18:07:50 -04:00
David Crawshaw 3bd69d3fcc go.mobile/gl: tracing debug mode
Compiling a binary with "-tags gldebug" will add log
tracing to each GL function call. This is the best I
can offer in lieu of of real error handling.

A colleague has accused me of Aspect-oriented
programming. The wikipedia article on the topic lost
me in the first paragraph, so just for the record,
this was inspired by the way the cover tool rewrites
source code.

LGTM=sameer
R=golang-codereviews, sameer
CC=golang-codereviews
https://golang.org/cl/128640043
2014-08-26 10:03:00 -04:00