Also, modify the affine test to share the test
image with the glimage test.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/164400043
I have included the gl.LINEAR bugfix here as it changes the
images substantially.
Based on Nigel's excellent analysis in cl/160710043.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/168820043
"# version 100 core", as Ubuntu 14.04's OpenGLES doesn't like it:
"shader compile: 0:1(10): error: illegal text following version number"
LGTM=adg, crawshaw
R=crawshaw, bryanturley, adg
CC=golang-codereviews
https://golang.org/cl/163260043
It's not a big deal in this case, but we'll probably want to do the same
for the sprite/gl package.
LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/163990043
The 1/geom.Scale was simply an incorrect version of m.Inverse.
The texture scaling is to correct the fact that the pixels of
texture images were being conflated with the pxiels on the
screen. There is no inherent width/height implied by the pixel
dimensions of a texture.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/156340044
The purpose of this Dockerfile is to make it easier to hack on go.mobile.
'go get' is still desirable for preinstall necessary dependencies.
LGTM=crawshaw, adg
R=adg, crawshaw
CC=golang-codereviews
https://golang.org/cl/155480043
Drawing now supports defining both the source and destination
bounds, which is equivalent to clipping and scaling an image.
LGTM=nigeltao
R=nigeltao, crawshaw
CC=adg, golang-codereviews
https://golang.org/cl/144480043
Also rename some files:
types.go -> types_prod.go
typesdebug.go -> types_debug.go
(new file) types_common.go
In discussing https://golang.org/cl/144480043/ crawshaw said:
The third argument to glUniformMatrix* is "transpose." According to the
linked documentation, which is usually better:
"If transpose is GL_FALSE, each matrix is assumed to be supplied in
column major order. If transpose is GL_TRUE, each matrix is assumed to
be supplied in row major order."
However, the documentation for OpenGL ES 2 doesn't bother even telling
you, it just says that this parameter must always be set to GL_FALSE. So
it's not supported on most Android devices. (Sadly the older
documentation appears to have been discontinued.)
So yes, GL seems to default to column-major, and the older GLES2 I'm
targeting left the transpose argument in but doesn't support it. Hence
I'm not exposing it through this API.
LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/148690043
Also fix String methods' receivers to be T, not *T, so that
var m f32.Mat32
s := fmt.Sprintf("m=%v", m)
works.
LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/147490043
This lets you run really simple apps in a window on an OS X
machine. It's not an official target, but slightly more
productive than waiting for an apk install when working on
the sprite package.
LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/147910043
This Dockerfile provides a base environment for building
Go Android apps. It can build example/basic, and that's
where I stopped for today.
$ docker build -t mobile /path/to/go.mobile
$ docker run --rm mobile /bin/bash -c 'cd example/gopher && ./make.bash'
LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/151010043
This code is an import from my long-defunct graphics
library, code.google.com/p/graphics-go. It was
reviewed by nigeltao back in the day.
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/142520043