• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mosra / magnum / 961
45%
master: 20%

Build:
Build:
LAST BUILD BRANCH: culling-math
DEFAULT BRANCH: master
Ran 21 Aug 2017 06:40PM UTC
Jobs 1
Files 325
Run time 32s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
961

push

travis-ci

mosra
<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">&quot;&gt;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 &lt;format&gt;
and &lt;internalFormat&gt; of glTexImage() APIs. On desktop the go-to way to
create a sRGB texture is by passing GL_SRGB to &lt;internalFormat&gt; and
GL_RGB to &lt;format&gt;, 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
&lt;format&gt; and &lt;internalFormat&gt;.

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&#39;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

Jobs
ID Job ID Ran Files Coverage
1 961.1 (TARGET=desktop) 21 Aug 2017 06:40PM UTC 0
77.55
Travis Job 961.1
Source Files on build 961
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #961
  • 230a4175 on github
  • Prev Build on next (#958)
  • Next Build on next (#963)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc