Operating System / Platform: Arch Linux / Emscripten
RenderSystem: OpenGLES2
Browser: Firefox 66.0.5
Detailled description
The following assertion is failing when running the Emscripten Sample page:
Assertion failed: (sizeof(_pixelFormats)/sizeof(GLPixelFormatDescription) == PF_COUNT) && ("Did you add a new format?"), at: /home/jeremiah/projects/ogre/RenderSystems/GLES2/src/OgreGLES2PixelFormat.cpp,283,getGLOriginFormat
It seems that when the PF_DEPTH32 enum value was added, the OgreGLES2PixelFormat.cpp _pixelFormatsSized and _pixelFormat static globals were not updated to support this pixel format. I would submit a PR with an appropriate fix, but unfortunately I am not familiar enough with the code base to correctly fix the problem.
As a quick hack around, I've just aliased PF_DEPTH32 to PF_DEPTH and moved it below PF_COUNT in the OgreMain/include/OgrePixelFormat.h PixelFormat enum, and also deleted the PF_DEPTH32 array entry in OgreMain/src/OgrePixelFormatDescriptions.h.
Build commands
emconfigure cmake -DCMAKE_BUILD_TYPE=Debug ../
emmake make -j32
Ogre.log
Creating resource group General
Creating resource group OgreInternal
Creating resource group OgreAutodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
ArchiveFactory for archive type EmbeddedZip registered.
DDS codec registering
PVRTC codec registering
ETC codec registering
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
*-*-* OGRE Initialising
*-*-* Version 1.12.0 (Rhagorthua)
Installing plugin: OpenGL ES 2.0 RenderSystem
OpenGL ES 2.x Rendering Subsystem created.
Plugin successfully installed
Installing plugin: Octree Scene Manager
Plugin successfully installed
Installing plugin: ParticleFX
Particle Emitter Type 'Point' registered
Particle Emitter Type 'Box' registered
Particle Emitter Type 'Ellipsoid' registered
Particle Emitter Type 'Cylinder' registered
Particle Emitter Type 'Ring' registered
Particle Emitter Type 'HollowEllipsoid' registered
Particle Affector Type 'LinearForce' registered
Particle Affector Type 'ColourFader' registered
Particle Affector Type 'ColourFader2' registered
Particle Affector Type 'ColourImage' registered
Particle Affector Type 'ColourInterpolator' registered
Particle Affector Type 'Scaler' registered
Particle Affector Type 'Rotator' registered
Particle Affector Type 'DirectionRandomiser' registered
Particle Affector Type 'DeflectorPlane' registered
Plugin successfully installed
Installing plugin: STB Image Codec
stb_image - v2.19 - public domain JPEG/PNG reader
Supported formats: jpeg,jpg,png,bmp,psd,tga,gif,pic,ppm,pgm,hdr
Plugin successfully installed
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
CPU Identifier & Features
-------------------------
* CPU ID: Unknown
-------------------------
******************************
*** Starting EGL Subsystem ***
******************************
EGL_VERSION = 1.4 Emscripten EGL
EGL_EXTENSIONS =
Registering ResourceManager for type Texture
GLES2RenderSystem::_createRenderWindow "OGRE Emscripten Sample", 800x600 windowed miscParams: FSAA=0 currentGLContext=true displayFrequency=N/A gamma=No vsync=Yes
GL_VERSION = 2.0.0.0
GL_VENDOR = Mozilla
GL_RENDERER = Mozilla
GL_EXTENSIONS = GL_ANGLE_instanced_arrays GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_texture_compression_bptc GL_EXT_texture_compression_rgtc GL_EXT_frag_depth GL_EXT_sRGB GL_EXT_shader_texture_lod GL_EXT_texture_filter_anisotropic GL_OES_element_index_uint GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_etc WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context
**************************************
*** OpenGL ES 2.x Renderer Started ***
**************************************
Shading language version: OpenGL ES GLSL ES 1.00 (WebGL GLSL ES 1.0)
Registering ResourceManager for type GpuProgram
GL ES 2: Using FBOs for rendering to textures
[GLES2] : detectFBOFormats is disabled on this platform (due performance reasons)
[GLES2] : Valid FBO targets PF_A8B8G8R8
RenderSystem capabilities
-------------------------
RenderSystem Name: OpenGL ES 2.x Rendering Subsystem
GPU Vendor: mozilla
Device Name: Mozilla
Driver Version: 2.0.0.0
* Fixed function pipeline: no
* Anisotropic texture filtering: yes
* Hardware stencil buffer: no
* 32-bit index buffers: yes
* Vertex programs: yes
* Number of floating-point constants for vertex programs: 1024
* Number of integer constants for vertex programs: 1024
* Number of boolean constants for vertex programs: 1024
* Fragment programs: yes
* Number of floating-point constants for fragment programs: 1024
* Number of integer constants for fragment programs: 1024
* Number of boolean constants for fragment programs: 1024
* Geometry programs: no
* Number of floating-point constants for geometry programs: 24421
* Number of integer constants for geometry programs: 27750
* Number of boolean constants for geometry programs: 24943
* Tessellation Hull programs: no
* Number of floating-point constants for tessellation hull programs: 30821
* Number of integer constants for tessellation hull programs: 30068
* Number of boolean constants for tessellation hull programs: 25970
* Tessellation Domain programs: no
* Number of floating-point constants for tessellation domain programs: 26719
* Number of integer constants for tessellation domain programs: 27745
* Number of boolean constants for tessellation domain programs: 24422
* Compute programs: no
* Number of floating-point constants for compute programs: 27750
* Number of integer constants for compute programs: 24943
* Number of boolean constants for compute programs: 8308
* Supported Shader Profiles: glsles
* Texture Compression: yes
- DXT: yes
- VTC: no
- PVRTC: no
- ATC: no
- ETC1: no
- ETC2: no
- BC4/BC5: no
- BC6H/BC7: no
- ASTC: no
- Mipmaps for compressed formats: no
* Hardware Occlusion Query: no
* User clip planes: no
* VET_UBYTE4 vertex element type: yes
* Infinite far plane projection: yes
* Hardware render-to-texture: yes
* Floating point textures: yes
* Non-power-of-two textures: no
* 1d textures: no
* Volume textures: no
* Multiple Render Targets: 1
- With different bit depths: no
* Point Sprites: yes
* Wide Lines: yes
* Hardware Gamma: no
* Extended point parameters: yes
* Max Point Size: 0
* Vertex texture fetch: no
* Number of texture units: 16
* Number of vertex attributes: 16
* Stencil buffer depth: 0
* Number of vertex blend matrices: 0
* Render to Vertex Buffer : no
* Hardware Atomic Counters: no
* PBuffer support: no
* Vertex Array Objects: yes
* Separate shader objects: no
* GLSL SSO redeclare interface block: no
* Debugging/ profiling events: no
* Map buffer storage: no
DefaultWorkQueue('Root') initialising on thread main.
Particle Renderer Type 'billboard' registered
SceneManagerFactory for type 'OctreeSceneManager' registered.
Creating resource group Essential
Added resource location '/SdkTrays.zip' of type 'Zip' to resource group 'Essential'
Added resource location '' of type 'FileSystem' to resource group 'General'
Added resource location '/Sinbad.zip' of type 'Zip' to resource group 'General'
Added resource location '/RTShaderLib/materials' of type 'FileSystem' to resource group 'OgreInternal'
Added resource location '/RTShaderLib/GLSL' of type 'FileSystem' to resource group 'OgreInternal'
Added resource location '/ShadowVolume' of type 'FileSystem' to resource group 'OgreInternal'
Added resource location '/materials/programs/GLSL' of type 'FileSystem' to resource group 'General'
Added resource location '/materials/programs/GLSLES' of type 'FileSystem' to resource group 'General'
Parsing scripts for resource group Essential
Parsing script SdkTrays.material
Parsing script SdkTrays.fontdef
Parsing script SdkTrays.overlay
Assertion failed: (sizeof(_pixelFormats)/sizeof(GLPixelFormatDescription) == PF_COUNT) && ("Did you add a new format?"), at: /home/jeremiah/projects/ogre/RenderSystems/GLES2/src/OgreGLES2PixelFormat.cpp,283,getGLOriginFormat
System Information
Detailled description
The following assertion is failing when running the Emscripten Sample page:
It seems that when the PF_DEPTH32 enum value was added, the OgreGLES2PixelFormat.cpp _pixelFormatsSized and _pixelFormat static globals were not updated to support this pixel format. I would submit a PR with an appropriate fix, but unfortunately I am not familiar enough with the code base to correctly fix the problem.
As a quick hack around, I've just aliased PF_DEPTH32 to PF_DEPTH and moved it below PF_COUNT in the OgreMain/include/OgrePixelFormat.h PixelFormat enum, and also deleted the PF_DEPTH32 array entry in OgreMain/src/OgrePixelFormatDescriptions.h.
Build commands
emconfigure cmake -DCMAKE_BUILD_TYPE=Debug ../ emmake make -j32
Ogre.log