QtOgre Application Framework - Now using Qt 4.5

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
stealth977
Gnoll
Posts: 638
Joined: Mon Dec 15, 2008 6:14 pm
Location: Istanbul, Turkey
x 42

Re: QtOgre Application Framework - Now using Qt 4.5

Post by stealth977 »

About the Threaded log issue, below code is from Ogitor:

Code: Select all

struct LogData
{
	int     mLevel;
	QString mMessage;
};

typedef std::vector<LogData> LogDataVector;

class LogBuffer
{
public:
	LogBuffer() {mData.clear();}
	~LogBuffer() {};
	void getBuffer(LogDataVector& buffer)
	{
		OGRE_LOCK_AUTO_MUTEX
        buffer = mData;
		mData.clear();
	};
	void append(int lvl, const Ogre::String& msg)
	{
		OGRE_LOCK_AUTO_MUTEX
		if(mOgitorMainWindow->getOgreWidget()->isSizing())
			return;

		int level = lvl;
		if(level != 3)
		{
			if((msg.find("WARNING") != -1) || (msg.find("Compiler error") != -1))
				level = 4;
		}
		LogData data;
		data.mLevel = level;
		data.mMessage = msg.c_str();
		mData.push_back(data);
	};
private:
	OGRE_AUTO_MUTEX
    LogDataVector mData;
};
so, in my loglistener, i call "append(...)" which adds the message to the buffer and in my update loop i call "getBuffer()" which returns the items added since last call which i use to display in the log window...

It solved our log issues when thread_support is on...

ismail,
Ismail TARIM
Ogitor - Ogre Scene Editor
WWW:http://www.ogitor.org
Repository: https://bitbucket.org/ogitor
dermont
Bugbear
Posts: 812
Joined: Thu Dec 09, 2004 2:51 am
x 42

Re: QtOgre Application Framework - Now using Qt 4.5

Post by dermont »

chca wrote:I tried to compile and start QtOgre Demo on my linux machine, but it crashes when starting (segfault).

OS: Ubuntu 9.04, 64-bit
Qt: 4.5.0 (ubuntu repo)
Ogre: 1.6.3 (../../ogre/configure --prefix=/srv/dev/ogre/dist --with-gui=gtk OIS_CFLAGS="-I/srv/dev/ogre/dist/include/ -I/srv/dev/ogre/dist/include/OIS" OIS_LIBS="-L/srv/dev/ogre/dist/lib/ -lOIS" CEGUI_CFLAGS="-I/srv/dev/ogre/dist/include -I/srv/dev/ogre/dist/include/CEGUI" CEGUI_LIBS="-L/srv/dev/ogre/dist/lib/" CFLAGS=-fPIC CXXFLAGS=-fPIC)

gdb Log:

Code: Select all

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run
Starting program: /home/cc/daten/Projekte/trainsim/ref/qt/QtOgrePreview/trunk/Demo/Demo 
[Thread debugging using libthread_db enabled]
[New Thread 0x7f3b8cf907e0 (LWP 30255)]
Couldn't resolve property: radialGradient6084
link XMLID_34_ hasn't been detected!
link XMLID_34_ hasn't been detected!
link XMLID_36_ hasn't been detected!
Couldn't resolve property: linearGradient3409
Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
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.
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
FreeImage version: 3.10.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
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
DDS 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.
Loading library /srv/dev/ogre/dist/lib/OGRE/RenderSystem_GL
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Loading library /srv/dev/ogre/dist/lib/OGRE/Plugin_ParticleFX
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
Loading library /srv/dev/ogre/dist/lib/OGRE/Plugin_BSPSceneManager
Installing plugin: BSP Scene Manager
Plugin successfully installed
Loading library /srv/dev/ogre/dist/lib/OGRE/Plugin_CgProgramManager
Installing plugin: Cg Program Manager
Plugin successfully installed
Loading library /srv/dev/ogre/dist/lib/OGRE/libPlugin_PCZSceneManager
Installing plugin: Portal Connected Zone Scene Manager
PCZone Factory Type 'ZoneType_Default' registered
Plugin successfully installed
Loading library /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeZone
Installing plugin: Octree Zone Factory
Plugin successfully installed
Loading library /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager
Installing plugin: Octree & Terrain Scene Manager
Plugin successfully installed
*-*-* OGRE Initialising
*-*-* Version 1.6.3 (Shoggoth)
Loading library /usr/local/lib/OGRE/RenderSystem_GL
CPU Identifier & Features
-------------------------
 *   CPU ID: GenuineIntel: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
 *      SSE: yes
 *     SSE2: yes
 *     SSE3: yes
 *      MMX: yes
 *   MMXEXT: yes
 *    3DNOW: no
 * 3DNOWEXT: no
 *     CMOV: yes
 *      TSC: yes
 *      FPU: yes
 *      PRO: yes
 *       HT: no
-------------------------
******************************
*** Starting GLX Subsystem ***
******************************
GLRenderSystem::_createRenderWindow "OgreWindow", 800x600 windowed  miscParams: FSAA=8 parentWindowHandle=11674416:0:73400358 
GLXWindow::create used FBConfigID = 161
GL_VERSION = 3.0.0 NVIDIA 185.18.29
GL_VENDOR = NVIDIA Corporation
GL_RENDERER = GeForce 8800 GT/PCI/SSE2
GL_EXTENSIONS = GL_ARB_color_buffer_float GL_ARB_depth_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_instanced GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_framebuffer_object GL_ARB_geometry_shader4 GL_ARB_imaging GL_ARB_map_buffer_range GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_transpose_matrix GL_ARB_vertex_array_object GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_bindable_uniform GL_EXT_depth_bounds_test GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_texture_swizzle GL_EXT_texture_shared_exponent GL_EXT_timer_query GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_buffer_float GL_NV_conditional_render GL_NV_depth_clamp GL_NV_explicit_multisample GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_geometry_shader4 GL_NV_gpu_program4 GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_coverage GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_parameter_buffer_object GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_transform_feedback GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_NV_vertex_buffer_unified_memory GL_NV_shader_buffer_load GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum 
Supported GLX extensions: GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync GLX_SGI_swap_control GLX_EXT_texture_from_pixmap GLX_ARB_create_context GLX_ARB_multisample GLX_NV_float_buffer GLX_ARB_fbconfig_float GLX_EXT_framebuffer_sRGB GLX_ARB_get_proc_address 
***************************
*** GL Renderer Started ***
***************************
Registering ResourceManager for type GpuProgram
GLSL support detected
GL: Using GL_EXT_framebuffer_object for rendering to textures (best)
FBO PF_UNKNOWN depth/stencil support: D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_L8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A4L4 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_BYTE_LA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R5G6B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B5G6R5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A1R5G5B5 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B8G8R8A8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A2R10G10B10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A2B10G10R10 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_X8R8G8B8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_X8B8G8R8 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_SHORT_RGBA depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R3G3B2 depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_R depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_R depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_GR depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_GR depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_SHORT_RGB depth/stencil support: D0S0 D16S0 D24S0 D32S0 Packed-D24S8 
[GL] : Valid FBO targets PF_UNKNOWN PF_L8 PF_A8 PF_A4L4 PF_BYTE_LA PF_R5G6B5 PF_B5G6R5 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_SHORT_RGBA PF_R3G3B2 PF_FLOAT16_R PF_FLOAT32_R PF_FLOAT16_GR PF_FLOAT32_GR PF_SHORT_RGB 
RenderSystem capabilities
-------------------------
RenderSystem Name: OpenGL Rendering Subsystem
GPU Vendor: nvidia
Device Name: GeForce 8800 GT/PCI/SSE2
Driver Version: 3.0.0.0
 * Fixed function pipeline: yes
 * Hardware generation of mipmaps: yes
 * Texture blending: yes
 * Anisotropic texture filtering: yes
 * Dot product texture operation: yes
 * Cube mapping: yes
 * Hardware stencil buffer: yes
   - Stencil depth: 8
   - Two sided stencil support: yes
   - Wrap stencil values: yes
 * Hardware vertex / index buffers: yes
 * Vertex programs: yes
 * Fragment programs: yes
 * Geometry programs: yes
 * Supported Shader Profiles: arbfp1 arbvp1 fp20 fp30 fp40 glsl gp4gp gpu_gp nvgp4 vp30 vp40
 * Texture Compression: yes
   - DXT: yes
   - VTC: yes
 * Scissor Rectangle: yes
 * Hardware Occlusion Query: yes
 * User clip planes: yes
 * 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: yes
 * Volume textures: yes
 * Multiple Render Targets: 8
   - With different bit depths: yes
 * Point Sprites: yes
 * Extended point parameters: yes
 * Max Point Size: 63.375
 * Vertex texture fetch: yes
   - Max vertex textures: 32
   - Vertex textures shared: yes
 * Render to Vertex Buffer : yes
 * GL 1.5 without VBO workaround: no
 * Frame Buffer objects: yes
 * Frame Buffer objects (ARB extension): no
 * Frame Buffer objects (ATI extension): no
 * PBuffer suppport: no
 * GL 1.5 without HW-occlusion workaround: no
Registering ResourceManager for type Texture
Using FSAA from GL_ARB_multisample extension.
ResourceBackgroundQueue - threading disabled
Particle Renderer Type 'billboard' registered
SceneManagerFactory for type 'BspSceneManager' registered.
Registering ResourceManager for type BspLevel
SceneManagerFactory for type 'PCZSceneManager' registered.
MovableObjectFactory for type 'PCZLight' registered.
PCZone Factory Type 'ZoneType_Octree' registered
PCZone Factory Type 'ZoneType_Terrain' registered
SceneManagerFactory for type 'OctreeSceneManager' registered.
SceneManagerFactory for type 'TerrainSceneManager' registered.
Added resource location './media/models' of type 'FileSystem' to resource group 'General'
Added resource location './media/textures' of type 'FileSystem' to resource group 'General'
Added resource location './media/materials' of type 'FileSystem' to resource group 'General'
Parsing scripts for resource group Autodetect
Finished parsing scripts for resource group Autodetect
Parsing scripts for resource group General
Parsing script Examples.program
GLSL compiling: Ogre/HardwareSkinningTwoWeightsGLSL
GLSL compiled : Ogre/HardwareSkinningTwoWeightsGLSL
Parsing script Jaiqua.material
GLSL compiling: Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL
GLSL compiled : Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL
Parsing script Robot.material
Finished parsing scripts for resource group General
Parsing scripts for resource group Internal
Finished parsing scripts for resource group Internal
Mesh: Loading jaiqua.mesh.
Skeleton: Loading jaiqua.skeleton
Texture: blue_jaiqua.jpg: Loading 1 faces(PF_R8G8B8,512x1024x1) with 10 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x1024x1.
Mesh: Loading robot.mesh.
Skeleton: Loading robot.skeleton
Texture: r2skin.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 9 generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f3b8cf907e0 (LWP 30255)]
0x00007f3b78430162 in Ogre::Octree::_ref ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeZone.so
Current language:  auto; currently asm
stack:

Code: Select all

(gdb) bt
#0  0x00007f3b78430162 in Ogre::Octree::_ref ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeZone.so
#1  0x00007f3b78430195 in Ogre::Octree::_ref ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeZone.so
#2  0x00007f3b781af630 in Ogre::Octree::_addNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#3  0x00007f3b781a224b in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#4  0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#5  0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#6  0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#7  0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#8  0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#9  0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#10 0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#11 0x00007f3b781a2236 in Ogre::OctreeSceneManager::_addOctreeNode ()
---Type <return> to continue, or q <return> to quit---
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#12 0x00007f3b781a2360 in Ogre::OctreeSceneManager::_updateOctreeNode ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#13 0x00007f3b781ac208 in Ogre::OctreeNode::_updateBounds ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#14 0x00007f3b8acb9a02 in Ogre::SceneNode::_update ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#15 0x00007f3b8ab94cbf in Ogre::Node::_update ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#16 0x00007f3b8acb99ec in Ogre::SceneNode::_update ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#17 0x00007f3b8ac8ea10 in Ogre::SceneManager::_updateSceneGraph ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#18 0x00007f3b781a1d0d in Ogre::OctreeSceneManager::_updateSceneGraph ()
   from /srv/dev/ogre/dist/lib/OGRE/Plugin_OctreeSceneManager.so
#19 0x00007f3b8ac930c6 in Ogre::SceneManager::_renderScene ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#20 0x00007f3b8aa349aa in Ogre::Camera::_renderScene ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#21 0x00007f3b8ad90aa1 in Ogre::Viewport::update ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#22 0x00007f3b8ac392b3 in Ogre::RenderTarget::updateImpl ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
---Type <return> to continue, or q <return> to quit---
#23 0x00007f3b8ac37d53 in Ogre::RenderTarget::update ()
   from /srv/dev/ogre/dist/lib/libOgreMain-1.6.3.so
#24 0x000000000042adaf in QtOgre::OgreWidget::paintEvent ()
#25 0x00007f3b8c3a26e6 in QWidget::event () from /usr/lib/libQtGui.so.4
#26 0x00007f3b8c35178d in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#27 0x00007f3b8c35997a in QApplication::notify () from /usr/lib/libQtGui.so.4
#28 0x00007f3b8b72275c in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#29 0x00007f3b8c3a99a5 in QWidgetPrivate::drawWidget ()
   from /usr/lib/libQtGui.so.4
#30 0x00007f3b8c54bb5c in QWidgetPrivate::repaint_sys ()
   from /usr/lib/libQtGui.so.4
#31 0x00007f3b8c3b23fe in ?? () from /usr/lib/libQtGui.so.4
#32 0x00007f3b8c3c1f51 in QApplication::x11ProcessEvent ()
   from /usr/lib/libQtGui.so.4
#33 0x00007f3b8c3ea464 in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007f3b8899e20a in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#35 0x00007f3b889a18e0 in ?? () from /usr/lib/libglib-2.0.so.0
#36 0x00007f3b889a1a7c in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#37 0x00007f3b8b74be6f in QEventDispatcherGlib::processEvents ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/libQtCore.so.4
#38 0x00007f3b8c3e9bef in ?? () from /usr/lib/libQtGui.so.4
#39 0x00007f3b8b721002 in QEventLoop::processEvents ()
   from /usr/lib/libQtCore.so.4
#40 0x00007f3b8b7213cd in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#41 0x00007f3b8b723694 in QCoreApplication::exec ()
   from /usr/lib/libQtCore.so.4
#42 0x000000000041cffd in QtOgre::Application::exec ()
#43 0x0000000000415e71 in main ()
Any idea?
You appear to be running the demo with a plugins.cfg, try disabling the PCZ plugins:

Code: Select all

#Plugin=libPlugin_PCZSceneManager.so
#Plugin=Plugin_OctreeZone.so
Also you are loading the RenderSystem_GL plugin from a different location than your local installation. You can either load from the cfg file by commenting out in Application.cpp:

Code: Select all

/*
#if defined(Q_WS_X11)
	try
	{
		mRoot->loadPlugin("/usr/local/lib/OGRE/RenderSystem_GL");
		//mRoot->loadPlugin("/usr/lib64/OGRE/RenderSystem_GL"); //Needed for Matt
	}
	catch(...)
	{
		qWarning("Failed to load OpenGL plugin");
	}
	#endif
*/
or remove the plugins.cfg file and manually update the render system path in the above code to:

Code: Select all

    mRoot->loadPlugin("/srv/dev/ogre/dist/lib/OGRE/RenderSystem_GL");
chca
Gnoblar
Posts: 2
Joined: Thu Aug 20, 2009 2:06 pm
Location: Germany

Re: QtOgre Application Framework - Now using Qt 4.5

Post by chca »

dermont wrote: Also you are loading the RenderSystem_GL plugin from a different location than your local installation. You can either load from the cfg file by commenting out in Application.cpp:

Code: Select all

/*
#if defined(Q_WS_X11)
	try
	{
		mRoot->loadPlugin("/usr/local/lib/OGRE/RenderSystem_GL");
		//mRoot->loadPlugin("/usr/lib64/OGRE/RenderSystem_GL"); //Needed for Matt
	}
	catch(...)
	{
		qWarning("Failed to load OpenGL plugin");
	}
	#endif
*/
or remove the plugins.cfg file and manually update the render system path in the above code to:

Code: Select all

    mRoot->loadPlugin("/srv/dev/ogre/dist/lib/OGRE/RenderSystem_GL");
The path "/usr/local/lib/OGRE/RenderSystem_GL" does not exist on my system, so the plugin must have been loaded from my installation directory.

Meanwhile, I have found the solution for this issue: There was a little error in my configure statement ("-lCEGUIBase" is missing) which caused compile and install to abort at the first example using CEGUI (I thought: who needs the examples ...). I assume that some of the libraries were not copied to my dist-directory by "make install" (there must be libraries that are processed by "make install" after the examples?!), causing mixed versions.
=> Next time I'll definately use pkg-config ;-)
dermont wrote: You appear to be running the demo with a plugins.cfg, try disabling the PCZ plugins:

Code: Select all

#Plugin=libPlugin_PCZSceneManager.so
#Plugin=Plugin_OctreeZone.so
I didn't try that as the problem is solved, but in an application I wrote (that does not use these plugins), it prevents ogre crashing on exit ... Thanks a lot.
User avatar
Moohasha
Gnoll
Posts: 672
Joined: Fri Dec 07, 2007 7:37 pm
x 8

Re: QtOgre Application Framework - Now using Qt 4.5

Post by Moohasha »

I ran across this in the OgreWidget constructor:

Code: Select all

QPalette palette = this->palette(); //FIXME - Doesn't compile unless we use 'this'?! Because we are in the constructor?
It doesn't compile without 'this' because you're creating a variable with the same name as the method you're trying to call :wink:. Change your variable name to 'pal' or something and it should work without 'this'.
Black holes are where God divided by 0
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by jacmoe »

It's C++, not Lisp. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Moohasha wrote:It doesn't compile without 'this' because you're creating a variable with the same name as the method you're trying to call :wink:. Change your variable name to 'pal' or something and it should work without 'this'.
Ah, right, now you mention it it's kinda obvious :oops:
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Hi all, I had some time this weekend to address some of the issues people have had with this framework. The latest changes include:
  • Proper handling of 'plugins.cfg' and 'resources.cfg' (now matches the way the ExampleApplication works).
  • A warning is displayed if a .cfg file is found which the framewhork doesn't handle (such as ogre.cfg).
  • Fixed the crash which occured if you pressed 'Cancel' from the settings dialog
  • Updated logging framework code to match existing coding standards.
  • It is now possible to disable auto-updating through Application::setAutoUpdateEnabled(). You can the call Application::update() from your own timer.
  • Update Linux install paths to be FHS compliant. Windows paths should be unchanged (thanks to milliams).
  • Work on build system (thanks to milliams).
  • Various other small tweaks
You can get the latest code through SVN. Be aware that there are some small interface changes, notabley in the Application constructor and Application::exec() method.
vectori
Gnoblar
Posts: 21
Joined: Tue Sep 15, 2009 12:11 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by vectori »

Hi !

I just installed newest OGRE and Qt in my Ubuntu 9.04 desktop.
I have never used OGRE before but I'm intrested in 3d engine which work with Qt.

I installed QtOgre also from svn and everything seems to be fine.
The Problem is when I'm trying to run Demo I got this output:

Code: Select all

Couldn't resolve property: radialGradient6084
link XMLID_34_ hasn't been detected!
link XMLID_34_ hasn't been detected!
link XMLID_36_ hasn't been detected!
Couldn't resolve property: linearGradient3409
Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
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.
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
FreeImage version: 3.10.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
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
DDS 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.
Loading library /usr/local/lib/RenderSystem_GL_d
terminate called after throwing an instance of 'Ogre::InternalErrorException'
  what():  OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library /usr/local/lib/RenderSystem_GL_d.  System Error: /usr/local/lib/RenderSystem_GL_d.so: cannot open shared object file: No such file or directory in DynLib::load at OgreDynLib.cpp (line 81)
Aborted
There is no RenderSystem_GL_d.so anywhere on my harddrive. So what do I need to do to get this working?
Thanks !
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

vectori wrote:There is no RenderSystem_GL_d.so anywhere on my harddrive. So what do I need to do to get this working?
Thanks !
The plugin loading system has recently been changed (as mentioned my PolyVox above). To get this to work, edit the plugins_d.cfg file and make the following changes:
  • Change PluginFolder to be equal to /usr/local/lib/OGRE (assuming that location exists)
  • Change Plugin=RenderSystem_GL_d to be Plugin=RenderSystem_GL
  • Delete (or comment-out) the Plugin=RenderSystem_Direct3D9_d line
This should allow the demo to run without problems. If not, then post any error messages here. I will be working on getting the plugin loading to work properly under Linux over the next week or so hopefully to avoid hacks like this.
vectori
Gnoblar
Posts: 21
Joined: Tue Sep 15, 2009 12:11 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by vectori »

I'm trying to make Demo project with qmake
but I'm getting this error:

Code: Select all

/usr/bin/rcc -name DemoResources resources/DemoResources.qrc -o qrc_DemoResources.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I. -I./include -I/usr/local/include/OGRE -I/usr/local/include/QtOgre -o qrc_DemoResources.o qrc_DemoResources.cpp
g++ -Wl,-O1 -o Demo ChooseMeshWidget.o DemoGameLogic.o main.o MainMenu.o moc_ChooseMeshWidget.o moc_MainMenu.o qrc_DemoResources.o    -L/usr/lib -lOgreMain -lQtOgre -lQtXml -lQtGui -lQtCore -lpthread
/usr/local/lib/libQtOgre.a(Application.cpp.o): In function `QtOgre::Application::initialiseOgre()':
Application.cpp:(.text+0x10a3): undefined reference to `Ogre::Root::initialise(bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/lib/libQtOgre.a(Application.cpp.o): In function `Ogre::NedAllocPolicy::allocateBytes(unsigned int, char const*, int, char const*)':
Application.cpp:(.text._ZN4Ogre14NedAllocPolicy13allocateBytesEjPKciS2_[Ogre::NedAllocPolicy::allocateBytes(unsigned int, char const*, int, char const*)]+0x22): undefined reference to `Ogre::NedAllocImpl::allocBytes(unsigned int, char const*, int, char const*)'
/usr/local/lib/libQtOgre.a(Application.cpp.o): In function `Ogre::NedAllocPolicy::deallocateBytes(void*)':
Application.cpp:(.text._ZN4Ogre14NedAllocPolicy15deallocateBytesEPv[Ogre::NedAllocPolicy::deallocateBytes(void*)]+0xd): undefined reference to `Ogre::NedAllocImpl::deallocBytes(void*)'
/usr/local/lib/libQtOgre.a(OgreWidget.cpp.o): In function `QtOgre::OgreWidget::paintEvent(QPaintEvent*)':
OgreWidget.cpp:(.text+0xe91): undefined reference to `Ogre::Root::_fireFrameRenderingQueued()'
collect2: ld returned 1 exit status
make: *** [Demo] Error 1

undefined reference to `Ogre::Root::initialise(bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
undefined reference to `Ogre::NedAllocImpl::allocBytes(unsigned int, char const*, int, char const*)'
undefined reference to `Ogre::NedAllocImpl::deallocBytes(void*)'
undefined reference to `Ogre::Root::_fireFrameRenderingQueued()'

should I modify the QtOgre source code before installing? or Am I just doing something in wrong way..
This is out of my skills..
vectori
Gnoblar
Posts: 21
Joined: Tue Sep 15, 2009 12:11 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by vectori »

milliams wrote:
vectori wrote:There is no RenderSystem_GL_d.so anywhere on my harddrive. So what do I need to do to get this working?
Thanks !
The plugin loading system has recently been changed (as mentioned my PolyVox above). To get this to work, edit the plugins_d.cfg file and make the following changes:
  • Change PluginFolder to be equal to /usr/local/lib/OGRE (assuming that location exists)
  • Change Plugin=RenderSystem_GL_d to be Plugin=RenderSystem_GL
  • Delete (or comment-out) the Plugin=RenderSystem_Direct3D9_d line
This should allow the demo to run without problems. If not, then post any error messages here. I will be working on getting the plugin loading to work properly under Linux over the next week or so hopefully to avoid hacks like this.
Thanks !
That solved the problem.

I'm still having the problem with qmake. It's quite important because I'm using it with my qt projects.
So please enlighten me if you have any clue !
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

I haven't used the qmake build myself yet but it looks like for some reason the Demo isn't linking against OgreMain correctly. I believe that you have OGRE installed in /usr/local whereas the project file assumes it's in /usr. To fix this, you should be able to just edit settings.pro and add a LIBS line inside the unix block so that it reads:

Code: Select all

unix {
    # You may need to change this include directory
    INCLUDEPATH += /usr/include/OGRE
    CONFIG += link_pkgconfig
    PKGCONFIG += OGRE
    LIBS += -L/usr/local/lib
}
or something similar so it can find the library.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

milliams wrote:The plugin loading system has recently been changed (as mentioned my PolyVox above). To get this to work, edit the plugins_d.cfg file and make the following changes:
  • Change PluginFolder to be equal to /usr/local/lib/OGRE (assuming that location exists)
Actually I thought this would be done automatically by the CMake script - I introduced plugins_d.dfg.in and passed it through CONFIGURE_FILE. Maybe it doesn't quite work right on Linux for some reason.
milliams wrote:
  • Change Plugin=RenderSystem_GL_d to be Plugin=RenderSystem_GL
@vectori - The files ending in '_d' are debug versions of the library. If you don't have 'Plugin=RenderSystem_GL_d.so' but you do have 'Plugin=RenderSystem_GL.so' then you should build a debug version of Ogre.
milliams wrote:
  • Delete (or comment-out) the Plugin=RenderSystem_Direct3D9_d line
Hmmm... actually I'm suprised it crashes. I thought Ogre would just return a null pointer to the render system (which I check for). I'll have to look at this.
vectori wrote:I'm still having the problem with qmake. It's quite important because I'm using it with my qt projects.
Actually, the main buld system of our QtOgre projerct is CMake. The QMake scripts were kindly provided by another user, but we don't maintain them so much so they can get out of date. But you don't have to use the same build system as us - you can use CMake to build QtOgre and then QMake to build your own projects which link against it.
vectori
Gnoblar
Posts: 21
Joined: Tue Sep 15, 2009 12:11 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by vectori »

milliams wrote:I haven't used the qmake build myself yet but it looks like for some reason the Demo isn't linking against OgreMain correctly. I believe that you have OGRE installed in /usr/local whereas the project file assumes it's in /usr. To fix this, you should be able to just edit settings.pro and add a LIBS line inside the unix block so that it reads:

Code: Select all

unix {
    # You may need to change this include directory
    INCLUDEPATH += /usr/include/OGRE
    CONFIG += link_pkgconfig
    PKGCONFIG += OGRE
    LIBS += -L/usr/local/lib
}
or something similar so it can find the library.
I tried this but the output is still the same..

Code: Select all

make -f Makefile.Release
make[1]: Entering directory `/tmp/QtOgreFramework/Demo'
g++ -Wl,-O1 -o Demo build/release/.obj/ChooseMeshWidget.o build/release/.obj/DemoGameLogic.o build/release/.obj/main.o build/release/.obj/MainMenu.o build/release/.obj/moc_ChooseMeshWidget.o build/release/.obj/moc_MainMenu.o build/release/.obj/qrc_DemoResources.o    -L/usr/lib -L/tmp/QtOgreFramework/Demo/lib -L/usr/local/lib -lQtOgre -lOgreMain -lQtXml -lQtGui -lQtCore -lpthread
/usr/local/lib/libQtOgre.a(Application.cpp.o): In function `QtOgre::Application::initialiseOgre()':
Application.cpp:(.text+0x10a3): undefined reference to `Ogre::Root::initialise(bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/lib/libQtOgre.a(Application.cpp.o): In function `Ogre::NedAllocPolicy::allocateBytes(unsigned int, char const*, int, char const*)':
Application.cpp:(.text._ZN4Ogre14NedAllocPolicy13allocateBytesEjPKciS2_[Ogre::NedAllocPolicy::allocateBytes(unsigned int, char const*, int, char const*)]+0x22): undefined reference to `Ogre::NedAllocImpl::allocBytes(unsigned int, char const*, int, char const*)'
/usr/local/lib/libQtOgre.a(Application.cpp.o): In function `Ogre::NedAllocPolicy::deallocateBytes(void*)':
Application.cpp:(.text._ZN4Ogre14NedAllocPolicy15deallocateBytesEPv[Ogre::NedAllocPolicy::deallocateBytes(void*)]+0xd): undefined reference to `Ogre::NedAllocImpl::deallocBytes(void*)'
/usr/local/lib/libQtOgre.a(OgreWidget.cpp.o): In function `QtOgre::OgreWidget::paintEvent(QPaintEvent*)':
OgreWidget.cpp:(.text+0xe91): undefined reference to `Ogre::Root::_fireFrameRenderingQueued()'
collect2: ld returned 1 exit status
make[1]: *** [Demo] Error 1
make[1]: Leaving directory `/tmp/QtOgreFramework/Demo'
make: *** [release] Error 2

User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

PolyVox wrote:
milliams wrote:The plugin loading system has recently been changed (as mentioned my PolyVox above). To get this to work, edit the plugins_d.cfg file and make the following changes:
  • Change PluginFolder to be equal to /usr/local/lib/OGRE (assuming that location exists)
Actually I thought this would be done automatically by the CMake script - I introduced plugins_d.dfg.in and passed it through CONFIGURE_FILE. Maybe it doesn't quite work right on Linux for some reason.
The problem occurs because PluginFolder is set to be equal to the Ogre library directory (e.g. /usr/lib) but OGRE stores it's plugins in a subdirectory (e.g. /usr/lib/OGRE) but I guess it only does that in Linux. It should be possible to add a check for that in CMakeLists.txt or even add a PLUGIN_DIR variable to FindOGRE.cmake.
PolyVox wrote:
milliams wrote:
  • Change Plugin=RenderSystem_GL_d to be Plugin=RenderSystem_GL
@vectori - The files ending in '_d' are debug versions of the library. If you don't have 'Plugin=RenderSystem_GL_d.so' but you do have 'Plugin=RenderSystem_GL.so' then you should build a debug version of Ogre.
In Linux, there's no such thing as debug libraries. You will always build in release mode but there is the possibility to have debug symbols even in release builds (in CMake this is the RelWithDebInfo configuration) and is is the way that most distributions will build their software. This debug info will often be stripped out by your distribution and placed in a separate package (called something like ogre-debuginfo). Thus, in Linux there's no need for a plugins_d.cfg.
PolyVox wrote:
milliams wrote:
  • Delete (or comment-out) the Plugin=RenderSystem_Direct3D9_d line
Hmmm... actually I'm suprised it crashes. I thought Ogre would just return a null pointer to the render system (which I check for). I'll have to look at this.
Yeah, I noticed this crash in Thermite before and was slightly surprised by it. I didn't have time to look into it though.
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

vectori wrote:
milliams wrote:I haven't used the qmake build myself yet but it looks like for some reason the Demo isn't linking against OgreMain correctly. I believe that you have OGRE installed in /usr/local whereas the project file assumes it's in /usr. To fix this, you should be able to just edit settings.pro and add a LIBS line inside the unix block so that it reads:

Code: Select all

unix {
    # You may need to change this include directory
    INCLUDEPATH += /usr/include/OGRE
    CONFIG += link_pkgconfig
    PKGCONFIG += OGRE
    LIBS += -L/usr/local/lib
}
or something similar so it can find the library.
I tried this but the output is still the same..
Can I just check exactly where your Ogre is installed. In which directory is OgreMain.so? Unless anyone else has an idea as to the reason for the linking error?
vectori
Gnoblar
Posts: 21
Joined: Tue Sep 15, 2009 12:11 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by vectori »

Can I just check exactly where your Ogre is installed. In which directory is OgreMain.so? Unless anyone else has an idea as to the reason for the linking error?
I don't find any OgreMain.so

but
libOgreMain.so
is in
/usr/local/lib

Is it any help?
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Yes, libOgreMain.so is the correct file. You need to tell it to link against that file. Try changing the LIBS line to:

Code: Select all

LIBS += -L/usr/local/lib -lOgreMain
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

PolyVox wrote:Yes, libOgreMain.so is the correct file. You need to tell it to link against that file. Try changing the LIBS line to:

Code: Select all

LIBS += -L/usr/local/lib -lOgreMain
I seem to remember seeing -lOgreMain in the compile error log vectori posted. I can't hurt to add it here as well just in case. If it makes no difference then try doing a clean build.
If that doesn't work the I can only assume you've got a messed up installation of Ogre with corrupt libraries or unmatching libraries/headers.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

You're right, that's interesting. Presumably GCC would complain if it didn't find the library (though I notice the path is correct)? Other than that I don't know - apart from trying CMake.
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

PolyVox wrote:You're right, that's interesting. Presumably GCC would complain if it didn't find the library (though I notice the path is correct)? Other than that I don't know - apart from trying CMake.
You're right, I've just checked and it does. I can't see that QMake is doing anything wrong here, it looks like the problem exists elsewhere.
vectori
Gnoblar
Posts: 21
Joined: Tue Sep 15, 2009 12:11 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by vectori »

Thanks guys !

I solved the problem.. ehem... It was actually all my fault !
I check for ogre from repos and I realized that I have ogre 1.4.9 installed on my machine too. It was in different location and after I got rid of it - I built Demo succesfully with qmake and it really worked..

So I guess I'm going spend some more time with QtOgre :)
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by PolyVox »

Great :-) Well if you do find any changes are needed to QMake then let us know and we can make them.
vectori
Gnoblar
Posts: 21
Joined: Tue Sep 15, 2009 12:11 pm

Re: QtOgre Application Framework - Now using Qt 4.5

Post by vectori »

PolyVox wrote:Great :-) Well if you do find any changes are needed to QMake then let us know and we can make them.
I got qmake work with one added line to Demo.pro

Code: Select all

INCLUDEPATH += ./include /usr/local/include/QtOgre
Only other modification was that plugins_d.cfg

Code: Select all

# Defines plugins to load

# Define plugin folder
PluginFolder=/usr/local/lib/OGRE

# Define plugins
Plugin=RenderSystem_GL
#Plugin=RenderSystem_Direct3D9_d
settings.pro wasn't changed at all !
User avatar
milliams
Gremlin
Posts: 172
Joined: Fri Feb 16, 2007 1:47 am
Location: Portsmouth, UK
Contact:

Re: QtOgre Application Framework - Now using Qt 4.5

Post by milliams »

I'm glad you got it working vectori. I/we will bear those changes in mind as Linux support continues. We particularly need to clear up the situation with plugins and debug libraries in Linux.
Post Reply