Symptom
Under RenderSystem_NULL, parsing any .material or .program script aborts:
Assertion failed: (msSingleton), function getSingleton,
file OgreGpuProgramManager.cpp, line 52
The script compiler reaches GpuProgramManager::getSingleton() while translating a vertex_program/fragment_program declaration, and there is no instance.
Cause
NULLRenderSystem::_createRenderWindow creates the managers a render system owns:
mHardwareBufferManager = new v1::DefaultHardwareBufferManager();
mVaoManager = OGRE_NEW NULLVaoManager();
mTextureGpuManager = OGRE_NEW NULLTextureGpuManager( mVaoManager, this );
but no GpuProgramManager. Metal and Vulkan create theirs in initialiseFromRenderSystemCapabilities:
mShaderManager = OGRE_NEW MetalGpuProgramManager( &mDevice ); // OgreMetalRenderSystem.mm
mShaderManager = OGRE_NEW VulkanGpuProgramManager( mDevice ); // OgreVulkanRenderSystem.cpp
RenderSystems/NULL/ contains no reference to GpuProgramManager at all, so msSingleton stays null for the whole process lifetime.
Why this is being raised rather than patched
It reads as a design question, not an omission with one obvious answer, and any of these could be what you intend:
- A
NULLGpuProgramManager that accepts every declaration and produces inert programs — scripts parse, nothing is compiled, and a headless run behaves like the real ones for everything above the shader tier.
- An honest refusal — a clear exception ("the NULL render system has no GPU program manager") instead of an assert, so the caller learns what happened.
- Out of scope by design — the NULL RS deliberately serves Hlms-only content, and low-level material scripts are simply not part of what it supports. That is a legitimate position; it would just be worth saying so, because today the answer arrives as an assert inside OgreMain.
Happy to send a PR for whichever of these you prefer.
Encountered while making the Ogre-Next backend of orkige run window-less and GPU-less for CI; the media that triggered it was the AtmosphereNpr sky's own .material/.program pair, which the engine now skips registering when it boots deviceless. (Related, from the same exercise: #587 and #588.)
Symptom
Under
RenderSystem_NULL, parsing any.materialor.programscript aborts:The script compiler reaches
GpuProgramManager::getSingleton()while translating avertex_program/fragment_programdeclaration, and there is no instance.Cause
NULLRenderSystem::_createRenderWindowcreates the managers a render system owns:but no
GpuProgramManager. Metal and Vulkan create theirs ininitialiseFromRenderSystemCapabilities:RenderSystems/NULL/contains no reference toGpuProgramManagerat all, somsSingletonstays null for the whole process lifetime.Why this is being raised rather than patched
It reads as a design question, not an omission with one obvious answer, and any of these could be what you intend:
NULLGpuProgramManagerthat accepts every declaration and produces inert programs — scripts parse, nothing is compiled, and a headless run behaves like the real ones for everything above the shader tier.Happy to send a PR for whichever of these you prefer.
Encountered while making the Ogre-Next backend of orkige run window-less and GPU-less for CI; the media that triggered it was the AtmosphereNpr sky's own
.material/.programpair, which the engine now skips registering when it boots deviceless. (Related, from the same exercise: #587 and #588.)