Vladimír Vondruš
0f7e1e8fad
Deprecate ResourceManager::instance().
...
If I would have done this a year ago, I could have it removed by now.
Well. Gotta look forward to 2020, then.
7 years ago
Vladimír Vondruš
110f8a37b9
doc: avoid horizontal scrollbars in Shaders code snippets.
7 years ago
Vladimír Vondruš
9e03dd077a
GL: fix test asserts with the recently-deprecated nullptr ImageView.
7 years ago
Vladimír Vondruš
5be3f3ca7e
Platform: if you call Sdl2Application::tickEvent(), it gets disabled.
7 years ago
Vladimír Vondruš
89d4a754d5
Platform: add MouseMoveEvent::relativePosition() to Glfw and Emscripten.
...
These toolkits don't support it, but I got really annoyed and so the
apps are emulating it.
7 years ago
Vladimír Vondruš
d54e8c1844
Platform: minor cleanup.
7 years ago
Vladimír Vondruš
31f5ca4546
Platform: check and return a reference from Screen::application().
...
Giving out a pointer implied excessive error checking in user code.
There's a new hasApplication() accessor that can be used to check for
application presence, moreover the ScreenedApplication is now
convertible to a pointer to provide backward compatiblity. This
conversion is marked as deprecated and will be removed in a future
release.
7 years ago
Vladimír Vondruš
ad22f463fb
Platform: add {Sdl2,Glfw,Emscripten}Application::setWindowTitle().
...
On Emscripten as well, however I'm keeping the Configuration::setTitle()
a no-op because the title is usually set by the HTML markup already and
so dynamic code implicitly changing it to something else doesn't make
much sense.
7 years ago
Vladimír Vondruš
67bdc1bbd4
GL: make the ApiTrace viewport workaround no longer silent.
7 years ago
Vladimír Vondruš
f22a626bc1
GL: these functions aren't available on ES.
...
Discovered when trying to call bindFragDataLocation() on ES.
7 years ago
Vladimír Vondruš
cd5f5e7ff9
Shaders: add ColorOutput constant to all shaders for consistency.
7 years ago
Vladimír Vondruš
b030fa9ad6
Shaders: huh, why this isn't done here?
7 years ago
Vladimír Vondruš
c78d6d9adc
Shaders: doc++
7 years ago
Vladimír Vondruš
1696ffb177
Shaders: destruct test scaffolding in reverse order.
7 years ago
Vladimír Vondruš
87ac8a8cd2
Shaders: support object ID output in Flat and Phong.
7 years ago
Vladimír Vondruš
fd67e42df1
Shaders: don't test for ES3 at runtime.
...
This only generates code that will be never executed. Tested with Flat
and Phong, the other shaders don't have rendering tests yet but since
the change is the same, I assume it will work there as well.
7 years ago
Vladimír Vondruš
b3a455fdaa
Shaders: adapt Flat / Phong to more test results.
7 years ago
Vladimír Vondruš
d932ca3d78
Shaders: whoops, a leftover after pruning depth test from the tests.
7 years ago
Vladimír Vondruš
e6ba699b6f
GL: make this doc section easier to find.
7 years ago
Vladimír Vondruš
c9d26a0628
doc: it doesn't make sense to use indexed outputs for this.
7 years ago
Vladimír Vondruš
2cfe5199b4
Shaders: make Phong uniform location calculations more parametrized.
7 years ago
Vladimír Vondruš
000833f86b
Shaders: these cheats for getting code coverage are not needed anymore.
...
The testing is *real* now.
7 years ago
Vladimír Vondruš
c60ef6039f
Shaders: test Phong normal texture multi-bind as well.
7 years ago
Vladimír Vondruš
fd6bf54769
Shaders: no, these are not expected to fail on macOS.
7 years ago
Vladimír Vondruš
6a5a5496f5
Shaders: properly test all constructor combinations of Flat.
7 years ago
Vladimír Vondruš
8d22aaa28f
GL: improve docs for RenderbufferFormat, list alternatives.
...
I'm spending way too much time looking for alternatives here, so this
helps me.
7 years ago
Vladimír Vondruš
e6d6d181a9
Shaders: inflate fuzzy thresholds for FlatGLTest.
...
Tested on SwiftShader, WebGL 1 and 2.
7 years ago
Vladimír Vondruš
1246c53c97
Shaders: inflate fuzzy thresholds for PhongGLTest, add some XFAILs.
...
Tested on WebGL 1 and 2, SwiftShader ES2 and ES3 and ARM Mali ES2 and
ES3 now, all pass. SwiftShader has a bit different output for zero
shininess, but that's a corner case so I'm not going to investigate
further, just adding the expected wrong output to check against as well.
7 years ago
Vladimír Vondruš
08f6615048
Shaders: make alpha mask = 1.0 do what's expected.
...
Yay tests!
7 years ago
Vladimír Vondruš
c98b65b82f
Shaders: fix setup of the tangent attribute on ES2.
...
Yay tests!
7 years ago
Vladimír Vondruš
91f1e1ccb5
Shaders: fix an assertion in Phong::bindTextures().
...
Caught by the tests!
7 years ago
Vladimír Vondruš
8276405ce3
Shaders: rendering tests for Flat shader.
7 years ago
Vladimír Vondruš
87764900a4
Shaders: rendering tests for Phong shader.
7 years ago
Vladimír Vondruš
8ef975616f
Primitives: textured circle primitive.
7 years ago
Vladimír Vondruš
8c439a2b66
Primitives: use container comparison for circle test.
...
For some reason this was the only primitive where it wasn't done yet.
7 years ago
Vladimír Vondruš
8f94a7717f
Primitives: constify.
7 years ago
Vladimír Vondruš
3967116dee
Primitives: use Math::sincos() where appropriate.
7 years ago
Vladimír Vondruš
6c434c7b21
Primitives: remove cruft deprecated in 2018.04.
7 years ago
Vladimír Vondruš
9def7ba7f6
Math: add a long double pi for sincos tests.
...
I hope nobody needs the others, haha.
7 years ago
Vladimír Vondruš
efe2f14284
Math: improve precision of double constants by one more digit.
...
And add comments to make sure we are not too imprecise.
7 years ago
Vladimír Vondruš
13b4bf8461
Math: use __builtin_sincos for sincos() on GCC.
...
Makes this thing faster on Debug. But I'm not sure whether it's due to
less function calls or this intrinsic being actually faster, heh.
Probably a combination of both.
7 years ago
Vladimír Vondruš
e9286421a1
Platform: improve the UX of windowless Emscripten apps.
...
* Wrap the text like in a console because nobody wants to read
kilometers-long horizontal lines with a horizontal scrollbar
* Make the output fill at least the space given to it but let it expand
beyond because a vertical scrollbar in an area of this size is
useless as well.
7 years ago
Vladimír Vondruš
f84a91ea06
DebugTools: improve CompareImage failure message.
...
The comparison is <=, so if it passes, it's not "below".
7 years ago
Vladimír Vondruš
5ebd8394e8
DebugTools: doc++
...
The note was totally useles and additionally I made a few brainfarts
here and there.
7 years ago
Vladimír Vondruš
a0232e8506
DebugTools: CompareImage can now compare against pixel views.
...
This is getting too good.
7 years ago
Vladimír Vondruš
0ba050f15e
Don't blow up in ImageView::pixels() if the image has empty data.
7 years ago
Vladimír Vondruš
069c81b9cb
Deprecate passing nullptr to images.
...
Causes too much pain. Ugh.
7 years ago
Vladimír Vondruš
c6737e1958
DebugTools: PIMPL all CompareImage's state.
...
The distinction didn't make sense and we had to include more than
necessary. It's great how easy those refactorings are with the 100% code
coverage.
7 years ago
Vladimír Vondruš
f4fd8a0648
DebugTools: rewrite CompareImage guts to use StridedArrayView.
...
Yay. Much simpler code.
7 years ago
Vladimír Vondruš
d0a02a2429
GL: allow reading of zero-size images.
...
It's useless, but not disallowed -- it shouldn't assert on that.
7 years ago