Commit Graph

9 Commits

Author SHA1 Message Date
Dmitri Shuralyov eaba00bca5 gl: use better spec-defined func names, fix bug, increase consistency
Change func names and parameter order to more closely follow OpenGL
ES/WebGL spec.
    BufferData(target, usage, src) -> BufferData(target, src, usage)
    GenBuffer -> CreateBuffer
    GenFramebuffer -> CreateFramebuffer
    GenRenderbuffer -> CreateRenderbuffer
    GenTexture -> CreateTexture
Fix issue where glBoolean helper was returning inverted result.
Make Attrib.String() logic consistent with others (print value, not
struct).
Make internal code of GetUniformLocation the same as GetAttribLocation
and BindAttribLocation for consistency.
Resolves golang/go#10218.

Change-Id: Ib33dfff7c22c4d178b2e6b8d228f80f3c17308a8
Reviewed-on: https://go-review.googlesource.com/8000
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-03-25 21:38:11 +00:00
Hyang-Ah Hana Kim 90d6854261 mobile: add extra build tags.
missing ones from https://go-review.googlesource.com/#/c/2902/

Change-Id: If42f9e53bdd7be468315ad746ba35d397a874ee6
Reviewed-on: https://go-review.googlesource.com/2965
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-01-20 15:15:48 +00:00
Andrew Gerrand 9470e0ba58 go.mobile: use golang.org/x/... import paths
LGTM=bradfitz, rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/162710043
2014-11-10 08:55:57 +11:00
Nigel Tao 970a0a0162 go.mobile/gl/glutil: let Image.Draw draw non-axis-aligned quads.
LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/160710043
2014-10-31 14:32:34 +11:00
David Crawshaw 0ac70a3835 go.mobile/gl/glutil, go.mobile/app/debug: create glimage with pixel size
LGTM=nigeltao
R=nigeltao
CC=golang-codereviews
https://golang.org/cl/165940043
2014-10-30 19:43:51 -04:00
David Crawshaw 897e5be307 go.mobile/gl/glutil: use correct image bounds in translation
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
2014-10-30 17:26:23 -04:00
Nigel Tao 2457abfa93 go.mobile/f32: add a f32.Bytes function.
LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/166720044
2014-10-29 09:19:38 +11:00
Nigel Tao 3aced57cb0 go.mobile/gl/glutil: use a triangle strip instead of two triangles.
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
2014-10-28 10:55:58 +11:00
David Crawshaw 8a5f40b7b3 go.mobile: move glimage to glutil package and export
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
2014-10-12 17:58:22 -07:00