Elias Naur
0397cbb599
ui/app: add basic webassembly/webgl support
...
It is still slow. And crashy: https://github.com/golang/go/issues/31980 .
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-11 13:17:57 +02:00
Elias Naur
f1c87417bd
ui/app: split extension string before matching
...
Avoids false matches for extensions whose names are substrings of
other extensions.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-11 13:17:57 +02:00
Elias Naur
c6863581e0
ui/app/internal/gl: add workaround for broken sRGB FBOs
...
Safari on macOS don't treat sRGB correctly.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-10 17:50:14 +02:00
Elias Naur
51482b6493
ui/app/internal/gpu: move sRGBA feature detection to context
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-10 17:50:06 +02:00
Elias Naur
fd9eb029c8
ui/app/internal/gpu: drop opaque texture optimization
...
It doesn't seem worth the trouble: images must be scanned for
alpha != 1 and GPUs don't like RGB formats. Use RGBA always.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 17:57:10 +02:00
Elias Naur
871ae34be5
ui/app/internal/gl: move single channel format detection to context
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 17:57:10 +02:00
Elias Naur
f5fa968038
ui/app/internal/gpu: implement OpenGL ES 2 float fbo fallbacks
...
Also applicable to WebGL.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 17:57:10 +02:00
Elias Naur
d118bd5a88
ui/app/internal/gpu: introduce caps and context
...
Enables graceful fallback to OpenGL ES 2 and WebGL.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 17:57:10 +02:00
Elias Naur
8df5feeeea
ui/app: make opengl objects structs
...
WebGL use opaque values for object handles, not integers. To ensure
portability, wrap handle types with a struct.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 17:57:10 +02:00
Elias Naur
2af0f63cfb
ui/app/internal/gl: parse WebGL versions
...
And drop a redundant error message while here.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 17:57:09 +02:00
Elias Naur
350dc19108
ui/app/internal/gl: invalidate the correct fbo in sRGB fallback
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-05-08 14:28:43 +02:00
Elias Naur
252e058766
all: serialize ops
...
Pros:
- Much less per-frame garbage
- Allow future preprocessing of ops while building it
- Much fewer interface calls and pointer chasing
- Allow future serialization of ops for remote rendering
Cons:
- Slightly clumsier API
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-27 22:19:34 +02:00
Elias Naur
e0d586893d
ui/app/internal/gpu: flush before drawing
...
And delete an unnecessary error check from Flush to make sure pending
draws are always finalized.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-25 10:01:58 +02:00
Elias Naur
48b6a73753
all: run goimports
...
gioui.org/ui was renamed from gioui.org/ui/ui before the release,
but the import order wasn't changed accordingly.
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-04-02 17:09:06 +02:00
Elias Naur
0f05231c35
all: initial import
...
Signed-off-by: Elias Naur <mail@eliasnaur.com >
2019-03-31 10:47:22 +02:00