1

I'm calling glTextureStorage2D to generate a framebuffer in my engine. I'm using Google's Angle on windows and using libglfw3-dev & libgles2-mesa-dev on ubuntu running on the same machine.

Creating 8bit RGBA textures is fine on both platforms but higher bit depth formats such as GL_RGBA32F, GL_RGBA16F, GL_RGBA16F, GL_RGB10_A2, GL_RGBA16I & GL_R11F_G11F_B10F silently fail on Ubuntu and on inspection (using RenderDoc), appear to be defaulting back to a standard RGBA texture.

I'm interested in both ascertaining if, on any given platform, a texture format is available and also, why the set of libraries I'm using don't seem to support these formats when the machine is clearly capable of supporting them. I'm aware that 'glGetInternalformativ' exists on more up to date gl implementations but that's unlikely to be available on the lower spec machines that I'd like to test on.

I tried installing 'libgles3-mesa-dev' but that doesn't exist and besides, the headers for gles3 are all there and everything runs, just silently fails to create the texture formats I'm after. Any hints as to why this seems to be the case would be appreciated.

Luther
  • 1,786
  • 3
  • 21
  • 38
  • 2
    All image formats are "available", in the sense that an implementation is not given the opportunity to just not work. You will get a functioning texture. The required image formats (which may be different for GL ES from desktop GL) are required to provide exactly what the format says. But that's pretty much it; there's no way to know anything more. – Nicol Bolas Mar 31 '20 at 23:01
  • Thanks Nicol. I think I may have found a way to determine if the texture is in the requested format: 'glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &actual_format);' And then check that against the value used for glTextureStorage2D. – Luther Apr 01 '20 at 08:17

0 Answers0