application fails to start - no RenderSystem in startRendering

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
brightprogrammer
Gnoblar
Posts: 1
Joined: Thu Jun 10, 2021 4:20 pm

application fails to start - no RenderSystem in startRendering

Post by brightprogrammer »

Ogre Application fails to start because of some runtime assertion exception

Here is the output when I start ogre3d application

Code: Select all

./GameOne
GameOne
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 type 'FileSystem' registered
ArchiveFactory for type 'Zip' registered
ArchiveFactory for type 'EmbeddedZip' registered
DDS codec registering
ETC codec registering
ASTC codec registering
Registering ResourceManager for type GpuProgram
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.
Loading library /usr/local/lib/OGRE/RenderSystem_GL.so.13.0.0
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/local/lib/OGRE/RenderSystem_GL3Plus.so.13.0.0
Installing plugin: GL 3+ RenderSystem
OpenGL 3+ Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/local/lib/OGRE/RenderSystem_GLES2.so.13.0.0
Installing plugin: OpenGL ES 2.0 RenderSystem
OpenGL ES 2.x Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_ParticleFX.so.13.0.0
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
Particle Affector Type 'TextureAnimator' registered
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_BSPSceneManager.so.13.0.0
Installing plugin: BSP Scene Manager
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_CgProgramManager.so.13.0.0
Installing plugin: Cg Program Manager
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_GLSLangProgramManager.so.13.0.0
Installing plugin: GLSLang Program Manager
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Codec_STBI.so.13.0.0
stb_image - v2.23 - public domain image loader
Supported formats: jpeg,jpg,png,bmp,psd,tga,gif,pic,ppm,pgm,hdr
Loading library /usr/local/lib/OGRE/Plugin_PCZSceneManager.so.13.0.0
Installing plugin: Portal Connected Zone Scene Manager
PCZone Factory Type 'ZoneType_Default' registered
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_OctreeZone.so.13.0.0
Installing plugin: Octree Zone Factory
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_OctreeSceneManager.so.13.0.0
Installing plugin: Octree Scene Manager
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_DotScene.so.13.0.0
Installing plugin: DotScene Loader
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Codec_Assimp.so.13.0.0
Assimp - 5.0.0 - Open-Asset-Importer
Supported formats: 3d 3ds 3mf ac ac3d acc amf ase ask assbin b3d blend bvh cob csm dae dxf enff fbx glb gltf hmp ifc ifczip irr irrmesh lwo lws lxo md2 md3 md5anim md5camera md5mesh mdl mot ms3d ndo nff obj off ogex pk3 ply pmx prj q3o q3s scn sib smd stl stp ter uc vta x x3d x3db xgl xml zae zgl

*-*-* OGRE Initialising
*-*-* Version 13.0.0 (Tsathoggua)
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font

RUNTIME ERROR : RuntimeAssertionException: mActiveRenderer failed. no RenderSystem in startRendering at /home/brightprogrammer/Projects/GameProjects/ogre/OgreMain/src/OgreRoot.cpp (line 838)
and my application source code is this :

Code: Select all

#include <Ogre.h>
#include <OgreApplicationContext.h>
#include <OgreEntity.h>
#include <OgreInput.h>
#include <OgreSceneManager.h>
#include <OgreShaderGenerator.h>
#include <OgreRenderSystem.h>
#include <exception>
#include <iostream>

using namespace Ogre;
using namespace OgreBites;

class GameApp : public ApplicationContext, public InputListener{
public:
    GameApp(const char* appName);
    void setup();
    bool keyPressed(const KeyboardEvent& event);
};

/// constructor
GameApp::GameApp(const char* appName) : ApplicationContext(appName){}

/// setup
void GameApp::setup(){
    // create application context and input listener
    ApplicationContext::setup();
    addInputListener(this);
    
    // get root and create scene manager
    Root* root = getRoot();
    SceneManager *sceneMgr = root->createSceneManager();
    
    // get root scene node
    SceneNode* rootSceneNode = sceneMgr->getRootSceneNode();

    // get the runtime shader system and add scene manager for it to handle
    // shader generator is a singleton
    RTShader::ShaderGenerator *shaderGenerator = RTShader::ShaderGenerator::getSingletonPtr();
    shaderGenerator->addSceneManager(sceneMgr);

    // create a new light
    Light* light = sceneMgr->createLight("MainLight");
    // creating objects this way automatically handles creation and destrucion of created object
    SceneNode* lightNode = rootSceneNode->createChildSceneNode();
    // attach light to scene node
    lightNode->attachObject(light);
    lightNode->setPosition(20, 80, 50);

    // create a camera
    Camera *camera = sceneMgr->createCamera("MainCamera");
    camera->setNearClipDistance(5);
    camera->setAutoAspectRatio(true);
    SceneNode *cameraNode = rootSceneNode->createChildSceneNode();
    cameraNode->attachObject(camera);
    cameraNode->setPosition(0, 0, 140);

    // add viewport
    getRenderWindow()->addViewport(camera);

    Entity* car = sceneMgr->createEntity("Audi Car");
    SceneNode* carNode = rootSceneNode->createChildSceneNode(Vector3(84, 48, 0));
    carNode->attachObject(car);
}

bool GameApp::keyPressed(const KeyboardEvent &event){

}

int main(){
    std::cout << "GameOne" << std::endl;
    try{
        GameApp game("GameOne");
        game.initApp();
        game.getRoot()->startRendering();
        game.closeApp();
    }catch(std::exception& e){
        std::cerr << "RUNTIME ERROR : " << e.what() << "\n";
        return 1;
    }

    return 0;
}
and this is my CMakeLists.txt :

Code: Select all

cmake_minimum_required(VERSION 3.0.0)
project(GameOne VERSION 0.1.0)

# specify which version and components you need
find_package(OGRE REQUIRED COMPONENTS Bites RTShaderSystem)
 
# copy resource.cfg next to our binaries where OGRE looks for it
file(COPY ${OGRE_CONFIG_DIR}/resources.cfg DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${OGRE_CONFIG_DIR}/plugins.cfg DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

# make main game executable
add_executable(GameOne main.cpp)
target_link_libraries(GameOne OgreBites OgreRTShaderSystem)
When I start my application, It opens in some foreign language.

Image

Program crashes when I click on left button (in bottom right corner of window) and the window is not resizable

I can provide further information if needed, Thanks in advance
paroj
OGRE Team Member
OGRE Team Member
Posts: 1465
Joined: Sun Mar 30, 2014 2:51 pm
x 662
Contact:

Re: application fails to start - no RenderSystem in startRendering

Post by paroj »

no idea why the font is garbled for you - this is how it should look like:

Image

However, you can also change the settings via the config file in:
https://ogrecave.github.io/ogre/api/lat ... otoc_md295
Post Reply