Can't see any entities on Android with Ogre 2.0

Problems building or running the engine, queries about how to use features etc.
Post Reply
bbm
Gnoblar
Posts: 2
Joined: Mon Jul 11, 2016 8:19 pm
x 1

Can't see any entities on Android with Ogre 2.0

Post by bbm »

The only thing I can do is change the background color, I tried to follow the sample code closely, even did the RTShader listeners and don't thing it's needed. Once everything is initialized this line

Code: Select all

Entity *entity = mSceneManager->createEntity("cube.mesh");
GLenum error = glGetError();
error becomes 1282 GL_INVALID_OPERATION. And after the first render loop I also get the same error from glGetError()

Here is the full log.

Code: Select all

I/OGRE: Creating resource group General
I/OGRE: Creating resource group Internal
I/OGRE: Creating resource group Autodetect
I/OGRE: SceneManagerFactory for type 'DefaultSceneManager' registered.
I/OGRE: Registering ResourceManager for type Material
I/OGRE: Registering ResourceManager for type Mesh
I/OGRE: Registering ResourceManager for type OldSkeleton
I/OGRE: MovableObjectFactory for type 'ParticleSystem' registered.
I/OGRE: ArchiveFactory for archive type FileSystem registered.
I/OGRE: ArchiveFactory for archive type Zip registered.
I/OGRE: ArchiveFactory for archive type EmbeddedZip registered.
I/OGRE: DDS codec registering
I/OGRE: FreeImage version: 3.15.3
I/OGRE: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
I/OGRE: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic
I/OGRE: PVRTC codec registering
I/OGRE: ETC codec registering
I/OGRE: Registering ResourceManager for type HighLevelGpuProgram
I/OGRE: MovableObjectFactory for type 'Entity' registered.
I/OGRE: MovableObjectFactory for type 'Light' registered.
I/OGRE: MovableObjectFactory for type 'BillboardSet' registered.
I/OGRE: MovableObjectFactory for type 'ManualObject' registered.
I/OGRE: MovableObjectFactory for type 'BillboardChain' registered.
I/OGRE: MovableObjectFactory for type 'RibbonTrail' registered.
E/OGRE: OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in ConfigFile::load at /path/to/ogre/OgreMain/src/OgreConfigFile.cpp (line 88)
I/OGRE: plugins.cfg not found, automatic plugin loading disabled.
I/OGRE: *-*-* OGRE Initialising
I/OGRE: *-*-* Version 2.0.0unstable (Tindalos)
I/OGRE: Installing plugin: OpenGL ES 2.0 RenderSystem
I/OGRE: OpenGL ES 2.x Rendering Subsystem created.
I/OGRE: Plugin successfully installed
I/OGRE: Installing plugin: ParticleFX
I/OGRE: Particle Emitter Type 'Point' registered
I/OGRE: Particle Emitter Type 'Box' registered
I/OGRE: Particle Emitter Type 'Ellipsoid' registered
I/OGRE: Particle Emitter Type 'Cylinder' registered
I/OGRE: Particle Emitter Type 'Ring' registered
I/OGRE: Particle Emitter Type 'HollowEllipsoid' registered
I/OGRE: Particle Affector Type 'LinearForce' registered
I/OGRE: Particle Affector Type 'ColourFader' registered
I/OGRE: Particle Affector Type 'ColourFader2' registered
I/OGRE: Particle Affector Type 'ColourImage' registered
I/OGRE: Particle Affector Type 'ColourInterpolator' registered
I/OGRE: Particle Affector Type 'Scaler' registered
I/OGRE: Particle Affector Type 'Rotator' registered
I/OGRE: Particle Affector Type 'DirectionRandomiser' registered
I/OGRE: Particle Affector Type 'DeflectorPlane' registered
I/OGRE: Plugin successfully installed
I/OGRE: OverlayElementFactory for type Panel registered.
I/OGRE: OverlayElementFactory for type BorderPanel registered.
I/OGRE: OverlayElementFactory for type TextArea registered.
I/OGRE: Registering ResourceManager for type Font
D/myapp: There are 1 rendersystems
D/myapp: renderSystem[0].name = OpenGL ES 2.x Rendering Subsystem
I/OGRE: CPU Identifier & Features
I/OGRE: -------------------------
I/OGRE:  *   CPU ID: ARMv7
I/OGRE:  *   Logical cores: 4
I/OGRE:  *     NEON: yes
I/OGRE: -------------------------
I/OGRE: Registering ResourceManager for type Texture
I/OGRE: ArchiveFactory for archive type APKFileSystem registered.
I/OGRE: ArchiveFactory for archive type APKZip registered.
I/OGRE: GLES2RenderSystem::_createRenderWindow "OgreWindow", 0x0 windowed  miscParams: externalWindowHandle=1232505960 
I/OGRE: GL_VERSION = OpenGL ES 3.0 V@66.0 AU@04.04.02.048.018 (CL@)
I/OGRE: GL_VENDOR = Qualcomm
I/OGRE: GL_RENDERER = Adreno (TM) 305
I/OGRE: GL_EXTENSIONS = GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_
I/OGRE: EXT:GL_AMD_compressed_ATC_texture
I/OGRE: EXT:GL_AMD_performance_monitor
I/OGRE: EXT:GL_AMD_program_binary_Z400
I/OGRE: EXT:GL_EXT_debug_label
I/OGRE: EXT:GL_EXT_debug_marker
I/OGRE: EXT:GL_EXT_discard_framebuffer
I/OGRE: EXT:GL_EXT_robustness
I/OGRE: EXT:GL_EXT_texture_format_BGRA8888
I/OGRE: EXT:GL_EXT_texture_type_2_10_10_10_REV
I/OGRE: EXT:GL_NV_fence
I/OGRE: EXT:GL_OES_compressed_ETC1_RGB8_texture
I/OGRE: EXT:GL_OES_depth_texture
I/OGRE: EXT:GL_OES_depth24
I/OGRE: EXT:GL_OES_EGL_image
I/OGRE: EXT:GL_OES_EGL_image_external
I/OGRE: EXT:GL_OES_element_index_uint
I/OGRE: EXT:GL_OES_fbo_render_mipmap
I/OGRE: EXT:GL_OES_fragment_precision_high
I/OGRE: EXT:GL_OES_get_program_binary
I/OGRE: EXT:GL_OES_packed_depth_stencil
I/OGRE: EXT:GL_OES_depth_texture_cube_map
I/OGRE: EXT:GL_OES_rgb8_rgba8
I/OGRE: EXT:GL_OES_standard_derivatives
I/OGRE: EXT:GL_OES_texture_3D
I/OGRE: EXT:GL_OES_texture_float
I/OGRE: EXT:GL_OES_texture_half_float
I/OGRE: EXT:GL_OES_texture_half_float_linear
I/OGRE: EXT:GL_OES_texture_npot
I/OGRE: EXT:GL_OES_vertex_half_float
I/OGRE: EXT:GL_OES_vertex_type_10_10_10_2
I/OGRE: EXT:GL_OES_vertex_array_object
I/OGRE: EXT:GL_QCOM_alpha_test
I/OGRE: EXT:GL_QCOM_binning_control
I/OGRE: EXT:GL_QCOM_driver_control
I/OGRE: EXT:GL_QCOM_perfmon_global_mode
I/OGRE: EXT:GL_QCOM_extended_get
I/OGRE: EXT:GL_QCOM_extended_get2
I/OGRE: EXT:GL_QCOM_tiled_rendering
I/OGRE: EXT:GL_QCOM_writeonly_rendering
I/OGRE: EXT:GL_EXT_sRGB
I/OGRE: EXT:GL_EXT_sRGB_write_control
I/OGRE: EXT:GL_EXT_texture_sRGB_decode
I/OGRE: EXT:GL_EXT_texture_filter_anisotropic
I/OGRE: EXT:GL_EXT_multisampled_render_to_texture
I/OGRE: EXT:GL_EXT_color_buffer_float
I/OGRE: EXT:GL_EXT_color_buffer_half_float
I/OGRE: EXT:GL_EXT_disjoint_timer_query
I/OGRE: **************************************
I/OGRE: *** OpenGL ES 2.x Renderer Started ***
I/OGRE: **************************************
I/OGRE: GLSL ES support detected
I/OGRE: Registering ResourceManager for type GpuProgram
I/OGRE: GL ES 2: Using FBOs for rendering to textures
W/Adreno-ES20: <core_glRenderbufferStorage:654>: GL_INVALID_ENUM
I/OGRE: FBO PF_R5G6B5 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_B5G6R5 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_A4R4G4B4 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_A1R5G5B5 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_A8R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_A8B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_B8G8R8A8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_X8R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_SHORT_RGBA depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_FLOAT32_R depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_FLOAT32_GR depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_R8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: FBO PF_RG8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 Packed-D24S8 
I/OGRE: [GLES2] : Valid FBO targets PF_R5G6B5 PF_B5G6R5 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_A8B8G8R8 PF_B8G8R8A8 PF_X8R8G8B8 PF_SHORT_RGBA PF_FLOAT32_R PF_FLOAT32_GR PF_R8 PF_RG8 
I/OGRE: RenderSystem capabilities
I/OGRE: -------------------------
I/OGRE: RenderSystem Name: OpenGL ES 2.x Rendering Subsystem
I/OGRE: GPU Vendor: qualcomm
I/OGRE: Device Name: Adreno (TM) 305
I/OGRE: Driver Version: 0.0.0.0
I/OGRE:  * Fixed function pipeline: no
I/OGRE:  * Hardware generation of mipmaps: yes
I/OGRE:  * Texture blending: yes
I/OGRE:  * Anisotropic texture filtering: yes
I/OGRE:  * Dot product texture operation: yes
I/OGRE:  * Cube mapping: yes
I/OGRE:  * Hardware stencil buffer: no
I/OGRE:  * Hardware vertex / index buffers: yes
I/OGRE:  * 32-bit index buffers: yes
I/OGRE:  * Vertex programs: yes
I/OGRE:  * Number of floating-point constants for vertex programs: 256
I/OGRE:  * Number of integer constants for vertex programs: 256
I/OGRE:  * Number of boolean constants for vertex programs: 256
I/OGRE:  * Fragment programs: yes
I/OGRE:  * Number of floating-point constants for fragment programs: 224
I/OGRE:  * Number of integer constants for fragment programs: 224
I/OGRE:  * Number of boolean constants for fragment programs: 224
I/OGRE:  * Geometry programs: no
I/OGRE:  * Number of floating-point constants for geometry programs: 0
I/OGRE:  * Number of integer constants for geometry programs: 0
I/OGRE:  * Number of boolean constants for geometry programs: 0
I/OGRE:  * Tessellation Hull programs: no
I/OGRE:  * Number of floating-point constants for tessellation hull programs: 0
I/OGRE:  * Number of integer constants for tessellation hull programs: 0
I/OGRE:  * Number of boolean constants for tessellation hull programs: 0
I/OGRE:  * Tessellation Domain programs: no
I/OGRE:  * Number of floating-point constants for tessellation domain programs: 0
I/OGRE:  * Number of integer constants for tessellation domain programs: 0
I/OGRE:  * Number of boolean constants for tessellation domain programs: 0
I/OGRE:  * Compute programs: no
I/OGRE:  * Number of floating-point constants for compute programs: 0
I/OGRE:  * Number of integer constants for compute programs: 0
I/OGRE:  * Number of boolean constants for compute programs: 0
I/OGRE:  * Supported Shader Profiles: glsles
I/OGRE:  * Texture Compression: yes
I/OGRE:    - DXT: no
I/OGRE:    - VTC: no
I/OGRE:    - PVRTC: no
I/OGRE:    - ATC: yes
I/OGRE:    - ETC1: yes
I/OGRE:    - ETC2: no
I/OGRE:    - BC4/BC5: no
I/OGRE:    - BC6H/BC7: no
I/OGRE:  * Scissor Rectangle: yes
I/OGRE:  * Hardware Occlusion Query: no
I/OGRE:  * User clip planes: no
I/OGRE:  * VET_UBYTE4 vertex element type: yes
I/OGRE:  * Infinite far plane projection: yes
I/OGRE:  * Hardware render-to-texture: yes
I/OGRE:  * Floating point textures: yes
I/OGRE:  * Non-power-of-two textures: no (limited)
I/OGRE:  * 1d textures: yes
I/OGRE:  * Volume textures: no
I/OGRE:  * Multiple Render Targets: 1
I/OGRE:    - With different bit depths: no
I/OGRE:  * Point Sprites: yes
I/OGRE:  * Extended point parameters: yes
I/OGRE:  * Max Point Size: 0
I/OGRE:  * Vertex texture fetch: no
I/OGRE:  * Number of world matrices: 0
I/OGRE:  * Number of texture units: 16
I/OGRE:  * Stencil buffer depth: 0
I/OGRE:  * Number of vertex blend matrices: 0
I/OGRE:  * Render to Vertex Buffer : no
I/OGRE:  * Hardware Atomic Counters: no
I/OGRE:  * GL 1.5 without VBO workaround: no
I/OGRE:  * Frame Buffer objects: yes
I/OGRE:  * Frame Buffer objects (ARB extension): no
I/OGRE:  * Frame Buffer objects (ATI extension): no
I/OGRE:  * PBuffer support: no
I/OGRE:  * GL 1.5 without HW-occlusion workaround: no
I/OGRE:  * Vertex Array Objects: no
I/OGRE:  * Separate shader objects: no
I/OGRE: DefaultWorkQueue('Root') initialising on thread main.
W/Adreno-ES20: <core_glLabelObjectEXT:2501>: GL_INVALID_OPERATION
I/OGRE: Particle Renderer Type 'billboard' registered
E/myapp: OpenGL Error 1282 GL_INVALID_OPERATION
I/OGRE: Creating resource group ShaderGeneratorResourceGroup
I/OGRE: Added resource location '/data/data/com.myapp.appy/cache/myapp_cache/OgreRTShader/' of type 'FileSystem' to resource group 'ShaderGeneratorResourceGroup'
I/OGRE: Added resource location 'myapp' of type 'APKFileSystem' to resource group 'General'
I/OGRE: Creating resource group Essential
I/OGRE: Added resource location 'myapp/thumbnails' of type 'APKFileSystem' to resource group 'Essential'
I/OGRE: Added resource location 'myapp/packs/SdkTrays.zip' of type 'APKZip' to resource group 'Essential'
I/OGRE: Added resource location 'myapp/' of type 'APKFileSystem' to resource group 'General'
I/OGRE: Creating resource group Popular
I/OGRE: Added resource location 'myapp/fonts' of type 'APKFileSystem' to resource group 'Popular'
I/OGRE: Added resource location 'myapp/materials/programs' of type 'APKFileSystem' to resource group 'Popular'
I/OGRE: Added resource location 'myapp/materials/programs/GLSLES' of type 'APKFileSystem' to resource group 'Popular'
I/OGRE: Added resource location 'myapp/materials/scripts' of type 'APKFileSystem' to resource group 'Popular'
I/OGRE: Added resource location 'myapp/materials/textures' of type 'APKFileSystem' to resource group 'Popular'
I/OGRE: Added resource location 'myapp/materials/textures/nvidia' of type 'APKFileSystem' to resource group 'Popular'
I/OGRE: Added resource location 'myapp/models' of type 'APKFileSystem' to resource group 'Popular'
I/OGRE: Added resource location 'myapp/particle' of type 'APKFileSystem' to resource group 'Popular'
..........................

Removed lots of logs


..................
// I'm adding random cubes. As you can see first cube produces GL_INVALID_OPERATION
// cubes are added in random location, I add 100 of them.
D/myapp: Adding cube
I/OGRE: Mesh: Loading cube.mesh.
W/Adreno-ES20: <core_glLabelObjectEXT:2501>: GL_INVALID_OPERATION
E/OGRE: WARNING: cube.mesh is an older format ([MeshSerializer_v1.8]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.
E/myapp: OpenGL Error 1282 GL_INVALID_OPERATION
D/myapp: Adding cube
D/myapp: Adding cube
D/myapp: Adding cube
D/myapp: Adding cube
D/myapp: Adding cube
...
I've been looking into this for a more than a day I don't understand why I don't see anything.

Here is part of my initialization code

Code: Select all

GLenum error;
// render window must be created first before the scenemanager. Or else it segfaults on
// gOgreRoot->createSceneManager call.
Ogre::NameValuePairList opt;
opt["externalWindowHandle"] = Ogre::StringConverter::toString(reinterpret_cast<size_t>(nativeWindow));
mRenderWindow = std::shared_ptr<Ogre::RenderWindow>(Ogre::Root::getSingleton().createRenderWindow("OgreWindow", 0, 0, false, &opt),
    [](Ogre::RenderWindow *window){
        Ogre::RenderSystem *renderSystem = gOgreRoot->getRenderSystem();
        renderSystem->destroyRenderWindow(window->getName());
    }
);
assert(mRenderWindow->isActive());
mRenderWindow->windowMovedOrResized();
error = glGetError();
if(error != GL_NO_ERROR){
    dError("OpenGL Error %d %s", error, openGlErrorString(error));
}
mSceneManager = std::shared_ptr<Ogre::SceneManager>(gOgreRoot->createSceneManager(Ogre::ST_GENERIC, 1, Ogre::INSTANCING_CULLING_SINGLETHREAD),
    [](Ogre::SceneManager *manager){
        gOgreRoot->destroySceneManager(manager);
    }
);
assert(mRenderWindow->isActive());
mRenderWindow->windowMovedOrResized();

bool carryOn = initializeShaderGenerator(mSceneManager.get());
assert(carryOn);


mCamera = std::shared_ptr<Ogre::Camera>(mSceneManager->createCamera("Camera"),
    [this] (Ogre::Camera *camera) {
        mSceneManager->destroyCamera(camera);
    });
mCamera->detachFromParent();
mCameraNode = mSceneManager->getRootSceneNode()->createChildSceneNode();
mCameraNode->attachObject(mCamera.get());
// everything in meters
mCamera->setNearClipDistance(0.1);
mCamera->setFarClipDistance(100.0);
error = glGetError();
if(error != GL_NO_ERROR){
    dError("OpenGL Error %d %s", error, openGlErrorString(error));
}
if(mCompositorManager == NULL) {
    mCompositorManager = std::shared_ptr<Ogre::CompositorManager2>(gOgreRoot->getCompositorManager2(),
        [](Ogre::CompositorManager2 *manager){
            manager->removeAllWorkspaces();
            manager->removeAllWorkspaceDefinitions();
            manager->removeAllNodeDefinitions();
            manager->removeAllShadowNodeDefinitions();
        }
    );
    if( !mCompositorManager->hasWorkspaceDefinition( "SampleBrowserWorkspace" ) ) {
        mCompositorManager->createBasicWorkspaceDef( "SampleBrowserWorkspace",
                                                     Ogre::ColourValue( 1.0f, 0.5f, 0.0f ),
                                                     Ogre::IdString() );
    }
    mCompositorManager->addWorkspace(mSceneManager.get(), mRenderWindow.get(), mCamera.get(),
                                      "SampleBrowserWorkspace", true );
}
error = glGetError();
if(error != GL_NO_ERROR){
    dError("OpenGL Error %d %s", error, openGlErrorString(error));
}
mCreated = true;

ResourceGroupManager::getSingleton().addResourceLocation("ogrebundle", "APKFileSystem", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, false);
//ResourceGroupManager::getSingleton().addResourceLocation("ogrebundle/materials/scripts", "APKFileSystem", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, false);
setupResources();
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
DataStreamPtr stream = ResourceGroupManager::getSingleton().openResource("materials/scripts/Bloom.material");
assert(!stream.isNull());

/*
Viewport* vp = mRenderWindow->addViewport();
// vp->setBackgroundColour(ColourValue(0,0,0));


// Alter the camera aspect ratio to match the viewport
mCamera->setAspectRatio(
        Real(vp->getActualWidth()) / Real(vp->getActualHeight()));
*/
mSceneManager->setAmbientLight(ColourValue());
mCamera->setPosition(0, 0, -20);
mCamera->lookAt(0, 0, 0);
error = glGetError();
if(error != GL_NO_ERROR){
    dError("OpenGL Error %d %s", error, openGlErrorString(error));
}
for(int i = 0; i < 100; ++i){
    debugLog("Adding cube");
    error = glGetError();
    if(error != GL_NO_ERROR){
        dError("OpenGL Error %d %s", error, openGlErrorString(error));
    }
    std::ostringstream stream;
    stream << "DebugCube_" << i;
    /*
    createDebugCube(stream.str())->setPosition((rand() % 100) - 50,
                                               (rand() % 100) - 50,
                                               (rand() % 100) - 50);
    */
    SceneNode *node = mSceneManager->getRootSceneNode()->createChildSceneNode();
    error = glGetError();
    if(error != GL_NO_ERROR){
        dError("OpenGL Error %d %s", error, openGlErrorString(error));
    }
    Entity *entity = mSceneManager->createEntity("cube.mesh");
    error = glGetError();
    if(error != GL_NO_ERROR){
        dError("OpenGL Error %d %s", error, openGlErrorString(error));
    }
    node->attachObject(entity);
    error = glGetError();
    if(error != GL_NO_ERROR){
        dError("OpenGL Error %d %s", error, openGlErrorString(error));
    }
    node->setPosition((rand() % 100) - 50,
                      (rand() % 100) - 50,
                      (rand() % 100) - 50);

    error = glGetError();
    if(error != GL_NO_ERROR){
        dError("OpenGL Error %d %s", error, openGlErrorString(error));
    }
}
Thank you.
Post Reply