|
Ran
|
Jobs
1
|
Files
325
|
Run time
32s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/mosra/magnum/commit/<a class=hub.com/mosra/magnum/commit/230a4175be9d04ab1a746efd52b4bb6e1070b103">230a4175b<a href="https://github.com/mosra/magnum/commit/230a4175be9d04ab1a746efd52b4bb6e1070b103">">Fix the ability to create sRGB textures on ES2/WebGL1. Since </a><a class="double-link" href="https://github.com/mosra/magnum/commit/<a class="double-link" href="https://github.com/mosra/magnum/commit/98a676ef653fc956b375712bc7765e622a6dd2e9">98a676ef6</a>">98a676ef6</a><a href="https://github.com/mosra/magnum/commit/230a4175be9d04ab1a746efd52b4bb6e1070b103">, on ES2 and WebGL1 the Texture::setStorage() emulation passes the pixel format to both <format> and <internalFormat> of glTexImage() APIs. On desktop the go-to way to create a sRGB texture is by passing GL_SRGB to <internalFormat> and GL_RGB to <format>, but here GL_RGB was passed to both and thus the information about sRGB was lost. With the new PixelFormat::SRGB and PixelFormat::SRGBAlpha enums that are present only on ES2/WebGL1 this case is fixed -- sRGB texture format will get translated to sRGB pixel format and that used for both <format> and <internalFormat>. Another case is when EXT_texture_storage is available -- passing unsized GL_SRGB_EXT or GL_SRGB_ALPHA_EXT to glTexStorageEXT() is an error and there's apparently no mention of this in any extension, making it impossible to create sRGB textures using EXT_texture_storage. I bit the bullet and tried passing the (numerical value of) GL_SRGB8 and GL_SRGB8_ALPHA8 to it. At least on my NV it worked, so I enabled these two in TextureFormat for ES2. No EXT_texture_storage is on WebGL1, so they are only on ES2. These two sized TextureFormat::SRGB8 and TextureFormat::SRGB8Alpha8 formats are translated to GL_SRGB and GL_SRGB_ALPHA and so using them unconditionally for all platforms (except WebGL1) "just works".
5720 of 7376 relevant lines covered (77.55%)
437605.61 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 961.1 (TARGET=desktop) | 0 |
77.55 |
Travis Job 961.1 |