[GSoC 2013 - accepted] Ogre 2.0

Threads related to Google Summer of Code
Post Reply
User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by lunkhound » Tue Oct 08, 2013 2:53 am

Really excited for this project, especially now that the sample browser is working, so I took the code out for a spin.

Figured I'd share my results for those who are curious.
Built Ogre 2 from recent code in bitbucket at the time, which was this commit:
https://bitbucket.org/dark_sylinc/ogre2 ... e3ce7ea02f


From Cmake I disabled everything except for:

Code: Select all

Building components:
  + Overlay
Building plugins:
  + Cg program manager
  + Particle FX
Building rendersystems:
  + Direct3D 9
  + Direct3D 11
Building executables:
  + Samples
Building core features:
  + DDS image codec
  + FreeImage codec
  + ZIP archives

Build type:                      dynamic
Threading support:               none
Use double precision:            disabled
Allocator type:                  nedmalloc (pooling)
STL containers use allocator:    enabled
Strings use allocator:           disabled
Memory tracker (debug):          disabled
Memory tracker (release):        disabled
Use new script compilers:        
Use Boost:                       disabled
The D3D11 rendersystem didn't compile for me. Got it compiling but then it didn't run so I just stuck with D3D9 for now.
10 of the samples were able to compile successfully, and most of them ran:
  • Cel-shading - worked
    Facial animation - worked
    Grass - crashes
    Isosurf - render system does not support geometry programs
    Lighting - worked
    New Instancing - worked (except for VTF)
    Ocean - worked
    Particle Effects - worked
    Sphere Mapping - worked
    Transparency - worked
I decided to run a quick benchmark on my machine using the "New Instancing" sample to see how performance compares to Ogre 1.9.

My machine-
CPU: Xeon x3450 (Nehalem quad core, 2.67 Ghz)
GPU: Nvidia GTX 570

New Instancing sample, 100x100 instances, moving + animated (minus shadows), linear skinning

Code: Select all

                                       Ogre 2         Ogre 1.9       Ogre 1.9 (no scene nodes)
------------------------------------------------------------------------------------------------
VTF                                     N/A             8.8 fps         10.4 fps
HW basic (no animation)               255 fps          53.5 fps        258 fps
HW + VTF                               10.8 fps         9.4 fps         10.8 fps
HW + VTF-LUT (limited animation)      242 fps          54 fps          221 fps
no instancing                           7.2 fps         5.9 fps          -
I disabled shadows because they don't seem to be working quite right.
Pretty impressive improvements compared to 1.9 when using scene nodes. It looks like 2.0 using scene nodes is getting about the same performance as 1.9 without--the scene node performance penalty is pretty much gone. Awesome!
0 x

Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by Transporter » Sat Oct 19, 2013 11:38 pm

I tried to compile the code but there are a lot of errors:
  • OgreMain - OK
  • OgrePaging - Failed
  • Plugin_PCZSceneManager - ERROR
  • OgreRTShaderSystem - OK
  • OgreOverlay - OK
  • OgreTerrain - ERROR
  • OgreVolume - ERROR
  • RenderSystem_GL3Plus - ERROR
  • RenderSystem_GL - OK
  • RenderSystem_Direct3D9 - OK
  • RenderSystem_Direct3D11 - ERROR
  • Sample_TextureArray - OK
  • Sample_Tesselation - OK
  • Sample_Terrain - Failed
  • Sample_SphereMapping - OK
  • Sample_Smoke - OK
  • Sample_SkyPlane - OK
  • Sample_SkyDome - OK
  • Sample_SkyBox - OK
  • Sample_SkeletalAnimation - ERROR
  • Sample_Shadows - ERROR
  • Sample_ShaderSystemTexturedFog - ERROR
  • Sample_ShaderSystemMultiLight - ERROR
  • Sample_ShaderSystem - ERROR
  • Sample_SSAO - ERROR
  • Sample_ParticleGS - ERROR
  • Sample_ParticleFX - OK
  • Sample_PNTriangles - OK
  • Sample_Ocean - OK
  • Sample_NewInstancing - OK
  • Sample_MeshLod - OK
  • Sample_Lighting - OK
  • Sample_Isosurf - OK
  • Sample_TextureFX - OK
  • Sample_Grass - OK
  • Sample_Fresnel - ERROR
  • Sample_FacialAnimation - OK
  • Sample_EndlessWorld - OK
  • Sample_Transparency - OK
  • Sample_DualQuaternion - OK
  • Sample_Dot3Bump - OK
  • Sample_DeferredShading - OK
  • Sample_CubeMapping - ERROR
  • Sample_Compositor - ERROR
  • Sample_Character - ERROR
  • Sample_CelShading - OK
  • Sample_CameraTrack - ERROR
  • Sample_BezierPatch - OK
  • Sample_BSP - ERROR
  • Sample_VolumeCSG - ERROR
  • Plugin_ParticleFX - OK
  • Sample_VolumeTerrain - ERROR
  • Plugin_OctreeZone - ERROR
  • Plugin_OctreeSceneManager - ERROR
  • Plugin_CgProgramManager - OK
  • Plugin_BSPSceneManager - ERROR
  • Sample_VolumeTex - OK
  • Sample_Water - ERROR
  • Sample_Instancing - ERROR
  • Sample_DynTex - ERROR
  • OgreProperty - OK
  • OgreMeshUpgrader - OK
  • OgreXMLConverter - OK
  • SampleBrowser - OK
Attachments
buildlog.zip
(25.26 KiB) Downloaded 163 times
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Sun Oct 20, 2013 12:21 am

This is ok and to be expected.
Some demos and plugins haven't been ported yet (i.e. D3D11). There was quite a substantial work on D3D11 & GL3 by the other GSoC projects, so fixing them now is just pointless and looking for merge conflicts.

But most other compile errors come from either demos (which is fine for now) or deprecated plugins/components which are going away (i.e. Octree, BSP, Portal)
0 x

User avatar
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
Location: Germany
x 2

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by scrawl » Sun Oct 20, 2013 8:14 pm

Just took the gsoc repo for a spin. Doesn't build:
build.log.zip
(28.28 KiB) Downloaded 297 times
There's also an excessive amount of warnings, which you might want to look at, especially the ones in headers that pop up 3 or 4 times for each file they are included in...

Code: Select all

gcc --version
gcc (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3
0 x

User avatar
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
Location: Germany
x 2

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by scrawl » Sun Oct 20, 2013 9:30 pm

I finally got it to build. Here's everything I did:

Code: Select all

diff -r e2816b0c6a35 OgreMain/include/Compositor/OgreTextureDefinition.h
--- a/OgreMain/include/Compositor/OgreTextureDefinition.h	Sun Oct 20 14:12:18 2013 -0300
+++ b/OgreMain/include/Compositor/OgreTextureDefinition.h	Sun Oct 20 22:26:19 2013 +0200
@@ -122,8 +122,8 @@
 		*/
 		NameToChannelMap		mNameToChannelMap;
 
-		static uint32 encodeTexSource( size_t index, TextureSource textureSource );
-		static void decodeTexSource( uint32 encodedVal, size_t &outIdx, TextureSource &outTexSource );
+		uint32 encodeTexSource( size_t index, TextureSource textureSource ) const;
+		void decodeTexSource( uint32 encodedVal, size_t &outIdx, TextureSource &outTexSource ) const;
 
 	public:
 		TextureDefinitionBase( TextureSource defaultSource );
diff -r e2816b0c6a35 OgreMain/include/OgreInstancedEntity.inl
--- a/OgreMain/include/OgreInstancedEntity.inl	Sun Oct 20 14:12:18 2013 -0300
+++ b/OgreMain/include/OgreInstancedEntity.inl	Sun Oct 20 22:26:19 2013 +0200
@@ -29,7 +29,7 @@
 namespace Ogre
 {
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstancedEntity::writeSingleTransform3x4( float * RESTRICT_ALIAS xform ) const
+	void InstancedEntity::writeSingleTransform3x4( float * RESTRICT_ALIAS xform ) const
 	{
 #if defined( OGRE_USE_SIMD ) && OGRE_CPU == OGRE_CPU_X86
 		const Matrix4& mat = mParentNode->_getFullTransform();
@@ -49,7 +49,7 @@
 #endif
 	}
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstancedEntity::writeAnimatedTransform3x4( float * RESTRICT_ALIAS xform,
+	void InstancedEntity::writeAnimatedTransform3x4( float * RESTRICT_ALIAS xform,
 															Mesh::IndexMap::const_iterator itor,
 															Mesh::IndexMap::const_iterator end ) const
 	{
@@ -80,7 +80,7 @@
 		}
 	}
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstancedEntity::writeLutTransform3x4( float * RESTRICT_ALIAS xform,
+	void InstancedEntity::writeLutTransform3x4( float * RESTRICT_ALIAS xform,
 															Mesh::IndexMap::const_iterator itor,
 															Mesh::IndexMap::const_iterator end ) const
 	{
@@ -107,7 +107,7 @@
 		}
 	}
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstancedEntity::writeDualQuatTransform( float * RESTRICT_ALIAS xform,
+	void InstancedEntity::writeDualQuatTransform( float * RESTRICT_ALIAS xform,
 															Mesh::IndexMap::const_iterator itor,
 															Mesh::IndexMap::const_iterator end ) const
 	{
diff -r e2816b0c6a35 OgreMain/include/OgrePlatform.h
--- a/OgreMain/include/OgrePlatform.h	Sun Oct 20 14:12:18 2013 -0300
+++ b/OgreMain/include/OgrePlatform.h	Sun Oct 20 22:26:19 2013 +0200
@@ -95,7 +95,7 @@
 #       define FORCEINLINE __inline
 #   endif
 #elif !defined(ANDROID) && (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG)
-#   define FORCEINLINE __attribute__((always_inline))
+#   define FORCEINLINE __attribute__((always_inline)) inline
 #else
 #   define FORCEINLINE __inline
 #endif
diff -r e2816b0c6a35 OgreMain/src/Compositor/OgreTextureDefinition.cpp
--- a/OgreMain/src/Compositor/OgreTextureDefinition.cpp	Sun Oct 20 14:12:18 2013 -0300
+++ b/OgreMain/src/Compositor/OgreTextureDefinition.cpp	Sun Oct 20 22:26:19 2013 +0200
@@ -63,14 +63,14 @@
 		return numInputChannels;
 	}
 	//-----------------------------------------------------------------------------------
-	inline uint32 TextureDefinitionBase::encodeTexSource( size_t index, TextureSource textureSource )
+	uint32 TextureDefinitionBase::encodeTexSource( size_t index, TextureSource textureSource ) const
 	{
 		assert( index <= 0x3FFFFFFF && "Texture Source Index out of supported range" );
 		return (index & 0x3FFFFFFF)|(textureSource<<30);
 	}
 	//-----------------------------------------------------------------------------------
-	inline void TextureDefinitionBase::decodeTexSource( uint32 encodedVal, size_t &outIdx,
-														TextureSource &outTexSource )
+	void TextureDefinitionBase::decodeTexSource( uint32 encodedVal, size_t &outIdx,
+														TextureSource &outTexSource ) const
 	{
 		uint32 texSource = (encodedVal & 0xC0000000) >> 30;
 		assert( texSource < NUM_TEXTURES_SOURCES );
diff -r e2816b0c6a35 OgreMain/src/OgreInstanceBatchHW_VTF.cpp
--- a/OgreMain/src/OgreInstanceBatchHW_VTF.cpp	Sun Oct 20 14:12:18 2013 -0300
+++ b/OgreMain/src/OgreInstanceBatchHW_VTF.cpp	Sun Oct 20 22:26:19 2013 +0200
@@ -533,7 +533,7 @@
 		}*/
 	}
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstanceBatchHW_VTF::SendAllSingleTransformsToTexture::operator ()
+	void InstanceBatchHW_VTF::SendAllSingleTransformsToTexture::operator ()
 										( const MovableObject *movableObject )
 	{
 		assert( dynamic_cast<const InstancedEntity*>(movableObject) );
@@ -547,7 +547,7 @@
 		++mInstancesWritten;
 	}
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstanceBatchHW_VTF::SendAllAnimatedTransformsToTexture::operator ()
+	void InstanceBatchHW_VTF::SendAllAnimatedTransformsToTexture::operator ()
 										( const MovableObject *movableObject )
 	{
 		assert( dynamic_cast<const InstancedEntity*>(movableObject) );
@@ -561,7 +561,7 @@
 		++mInstancesWritten;
 	}
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstanceBatchHW_VTF::SendAllLUTToTexture::operator ()
+	void InstanceBatchHW_VTF::SendAllLUTToTexture::operator ()
 										( const MovableObject *movableObject )
 	{
 		assert( dynamic_cast<const InstancedEntity*>(movableObject) );
@@ -580,7 +580,7 @@
 		}
 	}
 	//-----------------------------------------------------------------------
-	FORCEINLINE void InstanceBatchHW_VTF::SendAllDualQuatTexture::operator ()
+	void InstanceBatchHW_VTF::SendAllDualQuatTexture::operator ()
 										( const MovableObject *movableObject )
 	{
 		assert( dynamic_cast<const InstancedEntity*>(movableObject) );
diff -r e2816b0c6a35 Samples/Browser/include/SampleBrowser.h
--- a/Samples/Browser/include/SampleBrowser.h	Sun Oct 20 14:12:18 2013 -0300
+++ b/Samples/Browser/include/SampleBrowser.h	Sun Oct 20 22:26:19 2013 +0200
@@ -1294,7 +1294,7 @@
 			Ogre::InstancingTheadedCullingMethod threadedCullingMethod = Ogre::INSTANCING_CULLING_SINGLETHREAD;
 #else
 			//getNumLogicalCores() may return 0 if couldn't detect
-			const size_t numThreads = std::max( 1, PlatformInformation::getNumLogicalCores() );
+			const size_t numThreads = std::max( static_cast<Ogre::uint32>(1), Ogre::PlatformInformation::getNumLogicalCores() );
 
 			Ogre::InstancingTheadedCullingMethod threadedCullingMethod = Ogre::INSTANCING_CULLING_SINGLETHREAD;
 
diff -r e2816b0c6a35 Samples/CMakeLists.txt
--- a/Samples/CMakeLists.txt	Sun Oct 20 14:12:18 2013 -0300
+++ b/Samples/CMakeLists.txt	Sun Oct 20 22:26:19 2013 +0200
@@ -131,14 +131,14 @@
   
 #  add_subdirectory(AtomicCounters)
   add_subdirectory(BezierPatch)
-  add_subdirectory(CameraTrack)
-  add_subdirectory(Character)
-  add_subdirectory(Compositor)
+  #add_subdirectory(CameraTrack)
+  #add_subdirectory(Character)
+  #add_subdirectory(Compositor)
   add_subdirectory(DualQuaternion)
-  add_subdirectory(DynTex)
+  #add_subdirectory(DynTex)
   add_subdirectory(FacialAnimation)
   add_subdirectory(Grass)
-  add_subdirectory(Instancing)
+  #add_subdirectory(Instancing)
   add_subdirectory(Lighting)
   add_subdirectory(MeshLod)
   add_subdirectory(NewInstancing)
@@ -150,8 +150,8 @@
 	add_subdirectory(ShaderSystemTexturedFog)
     add_subdirectory(ShaderSystemMultiLight)
   endif ()
-  add_subdirectory(Shadows)
-  add_subdirectory(SkeletalAnimation)
+  #add_subdirectory(Shadows)
+  #add_subdirectory(SkeletalAnimation)
   add_subdirectory(SkyBox)
   add_subdirectory(SkyDome)
   add_subdirectory(SkyPlane)
@@ -165,23 +165,23 @@
   add_subdirectory(TextureFX)
   add_subdirectory(TextureArray)
   add_subdirectory(Transparency)
-  add_subdirectory(VolumeTex)
+  #add_subdirectory(VolumeTex)
 if (OGRE_BUILD_COMPONENT_VOLUME)
   add_subdirectory(VolumeCSG)
   add_subdirectory(VolumeTerrain)
 endif ()
-  add_subdirectory(Water)
+  #add_subdirectory(Water)
 
 if (NOT OGRE_BUILD_RENDERSYSTEM_GLES OR OGRE_BUILD_RENDERSYSTEM_GLES2)
-  add_subdirectory(BSP)
+  #add_subdirectory(BSP)
   add_subdirectory(CelShading)
-  add_subdirectory(DeferredShading)
-  add_subdirectory(CubeMapping)
+  #add_subdirectory(DeferredShading)
+  #add_subdirectory(CubeMapping)
   add_subdirectory(Dot3Bump)
-  add_subdirectory(Fresnel)
+  #add_subdirectory(Fresnel)
   add_subdirectory(Isosurf)
-  add_subdirectory(ParticleGS)
-  add_subdirectory(SSAO)
+  #add_subdirectory(ParticleGS)
+  #add_subdirectory(SSAO)
 endif ()
 
 if (NOT (OGRE_BUILD_PLATFORM_WINRT OR OGRE_BUILD_PLATFORM_WINDOWS_PHONE))
Some of these are kinda hack-ish / not sure if the right way to do it so I did not create a pull request.

Unfortunately the sample browser won't run:

Code: Select all

scrawl-desktop:~/Dev/ogre2-gsoc$ gdb ./bin/SampleBrowser 
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser...done.
(gdb) run nograb
Starting program: /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser nograb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18-gdb.py", line 59, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named libstdcxx.v6.printers
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.
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
ArchiveFactory for archive type EmbeddedZip registered.
DDS codec registering
FreeImage version: 3.15.1
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,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,sti
Registering ResourceManager for type HighLevelGpuProgram
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 /home/scrawl/Dev/ogre2-gsoc/lib/RenderSystem_GL
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
*-*-* OGRE Initialising
*-*-* Version 2.0.0unstable (Tindalos)
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: AuthenticAMD: AMD Phenom(tm) II X4 955 Processor
 *   Number of logical cores (excluding hyperthreaded): 4
 *      SSE: yes
 *     SSE2: yes
 *     SSE3: yes
 *      MMX: yes
 *   MMXEXT: yes
 *    3DNOW: yes
 * 3DNOWEXT: yes
 *     CMOV: yes
 *      TSC: yes
 *      FPU: yes
 *      PRO: yes
 *       HT: no
-------------------------
******************************
*** Starting GLX Subsystem ***
******************************
Registering ResourceManager for type Texture
GLRenderSystem::_createRenderWindow "OGRE Sample Browser", 1680x1050 fullscreen  miscParams: FSAA=0 displayFrequency=50 Hz gamma=No vsync=No 
GLXWindow::create used FBConfigID = 261
GL_VERSION = 4.3.0 NVIDIA 319.32
GL_VENDOR = NVIDIA Corporation
GL_RENDERER = GeForce GTX 560 Ti/PCIe/SSE2
GL_EXTENSIONS = GL_AMD_multi_draw_indirect GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_blend_func_extended GL_ARB_clear_buffer_object GL_ARB_color_buffer_float GL_ARB_compatibility GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_compute_shader GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_draw_indirect GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counters GL_ARB_shader_bit_encoding GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shading_language_420pack GL_ARB_shading_language_include GL_ARB_shading_language_packing GL_ARB_shadow GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array 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_bindable_uniform 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_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_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object 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_shader_objects GL_EXT_separate_specular_color GL_EXT_shader_image_load_store 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_dxt1 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_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback2 GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_EXT_vertex_attrib_64bit GL_EXT_x11_sync_object GL_EXT_import_sync_object GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KHR_debug GL_KTX_buffer_region GL_NV_blend_square GL_NV_compute_program5 GL_NV_conditional_render GL_NV_copy_depth_to_color GL_NV_copy_image GL_NV_depth_buffer_float GL_NV_depth_clamp GL_NV_draw_texture GL_NV_ES1_1_compatibility 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_gpu_program4_1 GL_NV_gpu_program5 GL_NV_gpu_program5_mem_extended GL_NV_gpu_program_fp64 GL_NV_gpu_shader5 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_parameter_buffer_object2 GL_NV_path_rendering GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_shader_atomic_counters GL_NV_shader_atomic_float GL_NV_shader_buffer_load GL_NV_shader_storage_buffer_object GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_multisample GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_transform_feedback GL_NV_transform_feedback2 GL_NV_vdpau_interop GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_attrib_integer_64bit GL_NV_vertex_buffer_unified_memory 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_NVX_gpu_memory_info 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_swap_control GLX_EXT_swap_control_tear GLX_EXT_texture_from_pixmap GLX_EXT_buffer_age GLX_ARB_create_context GLX_ARB_create_context_profile GLX_EXT_create_context_es_profile GLX_EXT_create_context_es2_profile GLX_ARB_create_context_robustness GLX_ARB_multisample GLX_NV_float_buffer GLX_ARB_fbconfig_float GLX_EXT_framebuffer_sRGB GLX_NV_multisample_coverage 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: D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_L8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A4L4 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_BYTE_LA depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R5G6B5 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B5G6R5 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A4R4G4B4 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A1R5G5B5 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A8R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_B8G8R8A8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A2R10G10B10 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_A2B10G10R10 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_X8R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_X8B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_SHORT_RGBA depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_R3G3B2 depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_R depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_R depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT16_GR depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_FLOAT32_GR depth/stencil support: D0S0 D0S8 D16S0 D24S0 D32S0 Packed-D24S8 
FBO PF_SHORT_RGB depth/stencil support: D0S0 D0S8 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_A4R4G4B4 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 GTX 560 Ti/PCIe/SSE2
Driver Version: 4.3.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
 * Number of floating-point constants for vertex programs: 1024
 * Number of integer constants for vertex programs: 0
 * Number of boolean constants for vertex programs: 0
 * Fragment programs: yes
 * Number of floating-point constants for fragment programs: 512
 * Number of integer constants for fragment programs: 0
 * Number of boolean constants for fragment programs: 0
 * Geometry programs: yes
 * Number of floating-point constants for geometry programs: 2048
 * Number of integer constants for geometry programs: 0
 * Number of boolean constants for geometry programs: 0
 * Tesselation Hull programs: no
 * Number of floating-point constants for tesselation hull programs: 0
 * Number of integer constants for tesselation hull programs: 0
 * Number of boolean constants for tesselation hull programs: 0
 * Tesselation Domain programs: no
 * Number of floating-point constants for tesselation domain programs: 0
 * Number of integer constants for tesselation domain programs: 0
 * Number of boolean constants for tesselation domain programs: 0
 * Compute programs: no
 * Number of floating-point constants for compute programs: 0
 * Number of integer constants for compute programs: 0
 * Number of boolean constants for compute programs: 0
 * Supported Shader Profiles: arbfp1 arbvp1 fp20 fp30 fp40 glsl gp4fp gp4gp gp4vp gpu_fp gpu_gp gpu_vp nvgp4 vp30 vp40
 * Texture Compression: yes
   - DXT: yes
   - VTC: yes
   - PVRTC: no
   - BC4/BC5: no
   - BC6H/BC7: no
 * 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
 * 1d 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
 * Number of world matrices: 0
 * Number of texture units: 32
 * Stencil buffer depth: 8
 * Number of vertex blend matrices: 0
   - Max vertex textures: 32
   - Vertex textures shared: yes
 * Render to Vertex Buffer : yes
 * Hardware Atomic Counters: no
 * GL 1.5 without VBO workaround: no
 * Frame Buffer objects: yes
 * Frame Buffer objects (ARB extension): no
 * Frame Buffer objects (ATI extension): no
 * PBuffer support: yes
 * GL 1.5 without HW-occlusion workaround: no
 * Vertex Array Objects: no
 * Separate shader objects: no
DefaultWorkQueue('Root') initialising on thread 0x644630.
[New Thread 0x7fffec67a700 (LWP 20619)]
[New Thread 0x7fffebe79700 (LWP 20620)]
DefaultWorkQueue('Root')::WorkerFunc - thread 0x9bece0 starting.
DefaultWorkQueue('Root')::WorkerFunc - thread 0x9c2000 starting.
[New Thread 0x7fffeb678700 (LWP 20621)]
DefaultWorkQueue('Root')::WorkerFunc - thread 0x9c2300 starting.
[New Thread 0x7fffeae77700 (LWP 20622)]
DefaultWorkQueue('Root')::WorkerFunc - thread 0x9b9d40 starting.
Particle Renderer Type 'billboard' registered
Creating resource group Essential
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/thumbnails' of type 'FileSystem' to resource group 'Essential'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/SdkTrays.zip' of type 'Zip' to resource group 'Essential'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/profiler.zip' of type 'Zip' to resource group 'Essential'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media' of type 'FileSystem' to resource group 'General'
Creating resource group Popular
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/fonts' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/materials/programs' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/materials/scripts' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/materials/textures' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/materials/textures/nvidia' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/models' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/particle' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/DeferredShadingMedia' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/PCZAppMedia' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/RTShaderLib' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/RTShaderLib/materials' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/materials/scripts/SSAO' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/materials/textures/SSAO' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/volumeTerrain' of type 'FileSystem' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/cubemap.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/dragon.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/fresneldemo.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/ogretestmap.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/ogredance.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/Sinbad.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/packs/skybox.zip' of type 'Zip' to resource group 'Popular'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/volumeTerrain/volumeTerrainBig.zip' of type 'Zip' to resource group 'Popular'
Creating resource group Tests
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Tests/Media' of type 'FileSystem' to resource group 'Tests'
Added resource location '/home/scrawl/Dev/ogre2-gsoc/Samples/Media/materials/programs/GLSL' of type 'FileSystem' to resource group 'Popular'
Initialising resource group Essential
Parsing scripts for resource group Essential
Parsing script SdkTrays.material
Parsing script OgreProfiler.material
Parsing script SdkTrays.fontdef
Parsing script SdkTrays.overlay
Texture: sdk_cursor.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
Texture: sdk_tray.png: Loading 1 faces(PF_A8R8G8B8,64x64x1) with 6 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
Texture: sdk_button_up.png: Loading 1 faces(PF_A8R8G8B8,128x32x1) with 7 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x32x1.
Texture: sdk_text_box.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
Texture: sdk_mini_tray.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
Texture: sdk_track.png: Loading 1 faces(PF_A8R8G8B8,16x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,16x32x1.
Texture: sdk_handle.png: Loading 1 faces(PF_A8R8G8B8,16x16x1) with 4 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,16x16x1.
Texture: sdk_mini_text_box.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
Texture: sdk_label.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
Texture: sdk_separator.png: Loading 1 faces(PF_A8R8G8B8,64x16x1) with 6 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x16x1.
Texture: sdk_logo.png: Loading 1 faces(PF_A8R8G8B8,128x64x1) with 7 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x64x1.
Texture: sdk_shade.png: Loading 1 faces(PF_A8R8G8B8,64x48x1) with 6 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x48x1.
Texture: sdk_frame.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
Texture: sdk_mini_text_box_over.png: Loading 1 faces(PF_A8R8G8B8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x32x1.
Texture: sdk_pulse.png: Loading 1 faces(PF_R8G8B8,8x1x1) with 3 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,8x1x1.
Finished parsing scripts for resource group Essential
Creating resources for group Essential
All done
Texture: sdk_bands.png: Loading 1 faces(PF_A8R8G8B8,2x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,2x32x1.
[New Thread 0x7fffe9a02700 (LWP 20623)]
*** glibc detected *** /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser: munmap_chunk(): invalid pointer: 0x00007ffff7f29978 ***
[New Thread 0x7fffe9201700 (LWP 20624)]
*** glibc detected *** /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser: munmap_chunk(): invalid pointer: 0x00007ffff7f29978 ***
[New Thread 0x7fffe8a00700 (LWP 20625)]
*** glibc detected *** /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser: munmap_chunk(): invalid pointer: 0x00007ffff7f29978 ***
======= Backtrace: =========
======= Backtrace: =========
======= Backtrace: =========
/home/scrawl/Dev/ogre2-gsoc/lib/libOgreMain.so.2.0.0(+0x30b8fe)[0x7ffff79d38fe]
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7ffff64dcb96]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7ffff703ae9a]
[New Thread 0x7fffd3fff700 (LWP 20626)]
*** glibc detected *** /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser: munmap_chunk(): invalid pointer: 0x00007ffff7f29978 ***
/home/scrawl/Dev/ogre2-gsoc/lib/libOgreMain.so.2.0.0(+0x30b8fe)[0x7ffff79d38fe]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7ffff703ae9a]
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ffff6551ccd]
======= Memory map: ========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7ffff64dcb96]
/home/scrawl/Dev/ogre2-gsoc/lib/libOgreMain.so.2.0.0(+0x30b8fe)[0x7ffff79d38fe]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ffff6551ccd]
======= Memory map: ========
/home/scrawl/Dev/ogre2-gsoc/lib/libOgreMain.so.2.0.0(+0x30b8fe)[0x7ffff79d38fe]
00400000-0042f000 r-xp 00000000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
0062f000-00631000 r--p 0002f000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
00631000-00632000 rw-p 00031000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
00632000-00a8d000 rw-p 00000000 00:00 0                                  [heap]
40000000-4009d000 rw-p 00000000 00:00 0 
4009d000-4009f000 r-xs 00000000 08:02 2233343                            /tmp/glvR8z6R (deleted)
7fffd37ff000-7fffd3800000 ---p 00000000 00:00 0 
7fffd3800000-7fffd4000000 rw-p 00000000 00:00 0 
7fffd4000000-7fffd4021000 rw-p 00000000 00:00 0 
7fffd4021000-7fffd8000000 ---p 00000000 00:00 0 
7fffd8000000-7fffd8021000 rw-p 00000000 00:00 0 
7fffd8021000-7fffdc000000 ---p 00000000 00:00 0 
7fffdc000000-7fffdc021000 rw-p 00000000 00:00 0 
7fffdc021000-7fffe0000000 ---p 00000000 00:00 0 
7fffe0000000-7fffe0021000 rw-p 00000000 00:00 0 
7fffe002/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ffff6551ccd]
======= Memory map: ========
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7ffff703ae9a00400000-0042f000 r-xp 00000000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
0062f000-00631000 r--p 0002f000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
00631000-00632000 rw-p 00031000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
00632000-00a8d000 rw-p 00000000 00:00 0                                  [heap]
40000000-4009d000 rw-p 00000000 00:00 0 
4009d000-4009f000 r-xs 00000000 08:02 2233343                            /tmp/glvR8z6R (deleted)
7fffd37ff000-7fffd3800000 ---p 00000000 00:00 0 
7fffd3800000-7fffd4000000 rw-p 00000000 00:00 0 
7fffd4000000-7fffd4021000 rw-p 00000000 00:00 0 
7fffd4021000-7fffd8000000 ---p 00000000 00:00 0 
7fffd8000000-7fffd8021000 rw-p 00000000 00:00 0 
7fffd8021000-7fffdc000000 ---p 00000000 00:00 0 
7fffdc000000-7fffdc021000 rw-p 00000000 00:00 0 
7fffdc021000-7fffe0000000 ---p 00000000 00:00 0 
7fffe0000000-7fffe0021000 rw-p 00000000 00:00 0 
7fffe0021000-7fffe4000000 ---p 00000000 00:00 0 
7fffe4000000-7fffe4021000 rw-p 00000000 00:00 0 
7fffe4021000-7fffe8000000 ---p 00000000 00:00 0 
7fffe8200000-7fffe8201000 ---p 00000000 00:00 0 
7fffe8201000-7fffe8a01000 rw-p 00000000 00:00 0 
7fffe8a01000-7fffe8a02000 ---p 00000000 00:00 0 
7fffe8a02000-7fffe9202000 rw-p 00000000 00:00 0 
7fffe9202000-7fffe9203000 ---p 00000000 00:00 0 
7fffe9203000-7fffe9c03000 rw-p 00000000 00:00 0 
7fffe9c03000-7fffe9c08000 r-xp 00000000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9c08000-7fffe9e07000 ---p 00005000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9e07000-7fffe9e08000 r--p 00004000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9e08000-7fffe9e09000 rw-p 00005000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9e09000-7fffe9e12000 r-xp 00000000 08:02 272553                     /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7fffe9e12000-7fffea011000 ---p 00009000 08:02 272553                     /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7fffea011000-7fffea012000 r--p 00008000 08:02 272553                     /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7fffea012000-7fffea013000 rw-p 00009000 08:02 272553                     /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7fffea037000-7fffea477000 r--p 00000000 08:02 262271                     /usr/lib/locale/locale-archive
7fffea477000-7fffea677000 rw-s ca3e1000 00:05 7922                       /dev/nvidia0
7fffea677000-7fffea678000 ---p 00000000 00:00 0 
7fffea678000-7fffeae78000 rw-p 00000000 00:00 0 
7fffeae78000-7fffeae79000 ---p 00000000 00:00 0 
7fffeae79000-7fffeb679000 rw-p 00000000 00:00 0 
7fffeb679000-7fffeb67a000 ---p 00000000 00:00 0 
7fffeb67a000-7fffebe7a000 rw-p 00000000 00:00 0 
7fffebe7a000-7fffebe7b000 ---p 00000000 00:00 0 
7fffebe7b000-7fffec77c000 rw-p 00000000 00:00 0 
7fffec77c000-7fffec97c000 rw-s 066f8000 00:05 7922                       /dev/nvidia000400000-0042f000 r-xp 00000000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
0062f000-00631000 r--p 0002f000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
00631000-00632000 rw-p 00031000 08:04 44042606                           /home/scrawl/Dev/ogre2-gsoc/bin/SampleBrowser
00632000-00a8d000 rw-p 00000000 00:00 0                                  [heap]
40000000-4009d000 rw-p 00000000 00:00 0 
4009d000-4009f000 r-xs 00000000 08:02 2233343                            /tmp/glvR8z6R (deleted)
7fffd37ff000-7fffd3800000 ---p 00000000 00:00 0 
7fffd3800000-7fffd4000000 rw-p 00000000 00:00 0 
7fffd4000000-7fffd4021000 rw-p 00000000 00:00 0 
7fffd4021000-7fffd8000000 ---p 00000000 00:00 0 
7fffd8000000-7fffd8021000 rw-p 00000000 00:00 0 
7fffd8021000-7fffdc000000 ---p 00000000 00:00 0 
7fffdc000000-7fffdc021000 rw-p 00000000 00:00 0 
7fffdc021000-7fffe0000000 ---p 00000000 00:00 0 
7fffe0000000-7fffe0021000 rw-p 00000000 00:00 0 
7fffe0021000-7fffe4000000 ---p 00000000 00:00 0 
7fffe4000000-7fffe4021000 rw-p 00000000 00:00 0 
7fffe4021000-7fffe8000000 ---p 00000000 00:00 0 
7fffe8200000-7fffe8201000 ---p 00000000 00:00 0 
7fffe8201000-7fffe8a01000 rw-p 00000000 00:00 0 
7fffe8a01000-7fffe8a02000 ---p 00000000 00:00 0 
7fffe8a02000-7fffe9202000 rw-p 00000000 00:00 0 
7fffe9202000-7fffe9203000 ---p 00000000 00:00 0 
7fffe9203000-7fffe9c03000 rw-p 00000000 00:00 0 
7fffe9c03000-7fffe9c08000 r-xp 00000000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9c08000-7fffe9e07000 ---p 00005000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9e07000-7fffe9e08000 r--p 00004000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9e08000-7fffe9e09000 rw-p 00005000 08:02 272551                     /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7fffe9e09000-7fffe9e12000 r-xp 00000000 08:02 272553                     /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffd3fff700 (LWP 20626)]
0x00007ffff6494425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6494425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff6497b8b in __GI_abort () at abort.c:91
#2  0x00007ffff64d239e in __libc_message (do_abort=2, fmt=0x7ffff65dc008 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
#3  0x00007ffff64dcb96 in malloc_printerr (action=3, str=0x7ffff65dc0f8 "munmap_chunk(): invalid pointer", ptr=<optimized out>) at malloc.c:5018
#4  0x00007ffff79d38fe in Ogre::updateWorkerThread_internal (argName=0x7ffff7f29978) at /home/scrawl/Dev/ogre2-gsoc/OgreMain/src/OgreSceneManager.cpp:5172
#5  0x00007ffff703ae9a in start_thread (arg=0x7fffd3fff700) at pthread_create.c:308
#6  0x00007ffff6551ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()
(gdb) 
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Sun Oct 20, 2013 10:25 pm

Thanks! I don't recall GCC complaining about FORCE_INLINE; apparently it's failing to inline and thus error.
That's a performance critical section of code, hence should be analyzed with more care of why it's not inlining rather than stripping the keyword away.

As for the removal of "static" in "static uint32 encodeTexSource", could you explain why GCC was complaining?

Of course the most interesting part was the crash. I have compiled on Linux+GCC but haven't actually tried to run the SampleBrowser there.

Apparently it is crashing in updateWorkerThread_internal.
That functions is created by the macro THREAD_DECLARE( updateWorkerThread ):

Code: Select all

#define THREAD_DECLARE( threadFunction ) \
void* OGRE_THREAD_CALL_CONVENTION threadFunction##_internal( void *argName )\
{\
	unsigned long retVal = 0;\
	ThreadHandle *threadHandle( reinterpret_cast<ThreadHandle*>( argName ) );\
	try {\
		unsigned long retVal = threadFunction( threadHandle );\
	}\
	catch( ... )\
	{\
	}\
	delete threadHandle;\
}
Most likely argName is the invalid pointer or it doesn't cast to ThreadHandle.
I see a red flag warning in your Log "warning: ‘__cdecl__’ attribute ignored"; a quick Google revealed x64 in Linux doesn't have cdecl; but is one call convention to rule them all; so I still don't know if that's the reason it's failing.

If anyone figures why I'll give him or her a digital cookie.
0 x

User avatar
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
Location: Germany
x 2

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by scrawl » Sun Oct 20, 2013 10:42 pm

As for the removal of "static" in "static uint32 encodeTexSource", could you explain why GCC was complaining?
I had undefined references:
../../lib/libOgreMain.so.2.0.0: undefined reference to `Ogre::TextureDefinitionBase::encodeTexSource(unsigned long, Ogre::TextureDefinitionBase::TextureSource)'
../../lib/libOgreMain.so.2.0.0: undefined reference to `Ogre::TextureDefinitionBase::decodeTexSource(unsigned int, unsigned long&, Ogre::TextureDefinitionBase::TextureSource&)'

Removing the "inline" for these functions made it work. Removing 'static' wasn't required, it was just something I had tried out.
Of course the most interesting part was the crash. I have compiled on Linux+GCC but haven't actually tried to run the SampleBrowser there.

Apparently it is crashing in updateWorkerThread_internal.
That functions is created by the macro THREAD_DECLARE( updateWorkerThread ):
That's why I hate macro functions - it didn't even show the line its crashing on. Plus, I had to browse through several files to see what that code was actually doing.
Anyway, running it in valgrind told me:

Code: Select all

==27600== Invalid free() / delete / delete[] / realloc()
==27600==    at 0x4C2A4BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27600==    by 0x513D90D: Ogre::updateWorkerThread_internal(void*) (OgreSceneManager.cpp:5172)
==27600==    by 0x59C3E99: start_thread (pthread_create.c:308)
==27600==    by 0x64E2CCC: clone (clone.S:112)
==27600==  Address 0x40c6978 is not stack'd, malloc'd or (recently) free'd
So I guess it's the delete threadhandle; line.
Last edited by scrawl on Sun Oct 20, 2013 11:23 pm, edited 1 time in total.
0 x

User avatar
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
Location: Germany
x 2

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by scrawl » Sun Oct 20, 2013 11:23 pm

An update: forceinline works now, so long as you also add "inline" to force inlined functions. So I simply added "inline" to the FORCEINLINE macro.
Smaller patch:

Code: Select all

diff -r e2816b0c6a35 OgreMain/include/OgrePlatform.h
--- a/OgreMain/include/OgrePlatform.h	Sun Oct 20 14:12:18 2013 -0300
+++ b/OgreMain/include/OgrePlatform.h	Mon Oct 21 00:23:05 2013 +0200
@@ -95,7 +95,7 @@
 #       define FORCEINLINE __inline
 #   endif
 #elif !defined(ANDROID) && (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG)
-#   define FORCEINLINE __attribute__((always_inline))
+#   define FORCEINLINE __attribute__((always_inline)) inline
 #else
 #   define FORCEINLINE __inline
 #endif
diff -r e2816b0c6a35 OgreMain/src/Compositor/OgreTextureDefinition.cpp
--- a/OgreMain/src/Compositor/OgreTextureDefinition.cpp	Sun Oct 20 14:12:18 2013 -0300
+++ b/OgreMain/src/Compositor/OgreTextureDefinition.cpp	Mon Oct 21 00:23:05 2013 +0200
@@ -63,13 +63,13 @@
 		return numInputChannels;
 	}
 	//-----------------------------------------------------------------------------------
-	inline uint32 TextureDefinitionBase::encodeTexSource( size_t index, TextureSource textureSource )
+	uint32 TextureDefinitionBase::encodeTexSource( size_t index, TextureSource textureSource )
 	{
 		assert( index <= 0x3FFFFFFF && "Texture Source Index out of supported range" );
 		return (index & 0x3FFFFFFF)|(textureSource<<30);
 	}
 	//-----------------------------------------------------------------------------------
-	inline void TextureDefinitionBase::decodeTexSource( uint32 encodedVal, size_t &outIdx,
+	void TextureDefinitionBase::decodeTexSource( uint32 encodedVal, size_t &outIdx,
 														TextureSource &outTexSource )
 	{
 		uint32 texSource = (encodedVal & 0xC0000000) >> 30;
diff -r e2816b0c6a35 Samples/Browser/include/SampleBrowser.h
--- a/Samples/Browser/include/SampleBrowser.h	Sun Oct 20 14:12:18 2013 -0300
+++ b/Samples/Browser/include/SampleBrowser.h	Mon Oct 21 00:23:05 2013 +0200
@@ -1294,7 +1294,7 @@
 			Ogre::InstancingTheadedCullingMethod threadedCullingMethod = Ogre::INSTANCING_CULLING_SINGLETHREAD;
 #else
 			//getNumLogicalCores() may return 0 if couldn't detect
-			const size_t numThreads = std::max( 1, PlatformInformation::getNumLogicalCores() );
+			const size_t numThreads = std::max( static_cast<Ogre::uint32>(1), Ogre::PlatformInformation::getNumLogicalCores() );
 
 			Ogre::InstancingTheadedCullingMethod threadedCullingMethod = Ogre::INSTANCING_CULLING_SINGLETHREAD;
 
diff -r e2816b0c6a35 Samples/CMakeLists.txt
--- a/Samples/CMakeLists.txt	Sun Oct 20 14:12:18 2013 -0300
+++ b/Samples/CMakeLists.txt	Mon Oct 21 00:23:05 2013 +0200
@@ -131,14 +131,14 @@
   
 #  add_subdirectory(AtomicCounters)
   add_subdirectory(BezierPatch)
-  add_subdirectory(CameraTrack)
-  add_subdirectory(Character)
-  add_subdirectory(Compositor)
+  #add_subdirectory(CameraTrack)
+  #add_subdirectory(Character)
+  #add_subdirectory(Compositor)
   add_subdirectory(DualQuaternion)
-  add_subdirectory(DynTex)
+  #add_subdirectory(DynTex)
   add_subdirectory(FacialAnimation)
   add_subdirectory(Grass)
-  add_subdirectory(Instancing)
+  #add_subdirectory(Instancing)
   add_subdirectory(Lighting)
   add_subdirectory(MeshLod)
   add_subdirectory(NewInstancing)
@@ -150,8 +150,8 @@
 	add_subdirectory(ShaderSystemTexturedFog)
     add_subdirectory(ShaderSystemMultiLight)
   endif ()
-  add_subdirectory(Shadows)
-  add_subdirectory(SkeletalAnimation)
+  #add_subdirectory(Shadows)
+  #add_subdirectory(SkeletalAnimation)
   add_subdirectory(SkyBox)
   add_subdirectory(SkyDome)
   add_subdirectory(SkyPlane)
@@ -165,23 +165,23 @@
   add_subdirectory(TextureFX)
   add_subdirectory(TextureArray)
   add_subdirectory(Transparency)
-  add_subdirectory(VolumeTex)
+  #add_subdirectory(VolumeTex)
 if (OGRE_BUILD_COMPONENT_VOLUME)
   add_subdirectory(VolumeCSG)
   add_subdirectory(VolumeTerrain)
 endif ()
-  add_subdirectory(Water)
+  #add_subdirectory(Water)
 
 if (NOT OGRE_BUILD_RENDERSYSTEM_GLES OR OGRE_BUILD_RENDERSYSTEM_GLES2)
-  add_subdirectory(BSP)
+  #add_subdirectory(BSP)
   add_subdirectory(CelShading)
-  add_subdirectory(DeferredShading)
-  add_subdirectory(CubeMapping)
+  #add_subdirectory(DeferredShading)
+  #add_subdirectory(CubeMapping)
   add_subdirectory(Dot3Bump)
-  add_subdirectory(Fresnel)
+  #add_subdirectory(Fresnel)
   add_subdirectory(Isosurf)
-  add_subdirectory(ParticleGS)
-  add_subdirectory(SSAO)
+  #add_subdirectory(ParticleGS)
+  #add_subdirectory(SSAO)
 endif ()
 
 if (NOT (OGRE_BUILD_PLATFORM_WINRT OR OGRE_BUILD_PLATFORM_WINDOWS_PHONE))
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Mon Oct 21, 2013 4:35 am

Thanks for the feedback.

I ran the debugger on Linux and found the culprit of the crash. The wrong pointer was being sent to the thread.
I've successfully compiled and executed the SampleBrowser. Changes have already been pushed.
There was an assert when I ran the New Instancing demo which was going unnoticed. Unfortunately asserts in Linux result directly in a crash, unlike Windows which allows you to ignore and continue.

Build the Release build (not the RelWithDeb which is the CMake's default) to avoid asserts being included.

I ran "make -i" to force GNU make to continue despite compile errors so I didn't have to remove the broken Samples that don't compile yet.
0 x

User avatar
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
Location: Germany
x 2

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by scrawl » Mon Oct 21, 2013 9:16 pm

Much better. Indeed it runs now.

I still have to apply one change to get it to build:

Code: Select all

diff -r 190e3c9aa20d OgreMain/include/Compositor/OgreTextureDefinition.h
--- a/OgreMain/include/Compositor/OgreTextureDefinition.h	Mon Oct 21 00:24:23 2013 -0300
+++ b/OgreMain/include/Compositor/OgreTextureDefinition.h	Mon Oct 21 22:15:05 2013 +0200
@@ -122,8 +122,20 @@
 		*/
 		NameToChannelMap		mNameToChannelMap;
 
-		static uint32 encodeTexSource( size_t index, TextureSource textureSource );
-		static void decodeTexSource( uint32 encodedVal, size_t &outIdx, TextureSource &outTexSource );
+		static inline uint32 encodeTexSource( size_t index, TextureSource textureSource )
+		{
+			assert( index <= 0x3FFFFFFF && "Texture Source Index out of supported range" );
+			return (index & 0x3FFFFFFF)|(textureSource<<30);
+		}
+		
+		static inline void decodeTexSource( uint32 encodedVal, size_t &outIdx, TextureSource &outTexSource )
+		{
+			uint32 texSource = (encodedVal & 0xC0000000) >> 30;
+			assert( texSource < NUM_TEXTURES_SOURCES );
+
+			outIdx		 = encodedVal & 0x3FFFFFFF;
+			outTexSource = static_cast<TextureSource>( texSource );
+		}
 
 	public:
 		TextureDefinitionBase( TextureSource defaultSource );
diff -r 190e3c9aa20d OgreMain/src/Compositor/OgreTextureDefinition.cpp
--- a/OgreMain/src/Compositor/OgreTextureDefinition.cpp	Mon Oct 21 00:24:23 2013 -0300
+++ b/OgreMain/src/Compositor/OgreTextureDefinition.cpp	Mon Oct 21 22:15:05 2013 +0200
@@ -63,22 +63,6 @@
 		return numInputChannels;
 	}
 	//-----------------------------------------------------------------------------------
-	inline uint32 TextureDefinitionBase::encodeTexSource( size_t index, TextureSource textureSource )
-	{
-		assert( index <= 0x3FFFFFFF && "Texture Source Index out of supported range" );
-		return (index & 0x3FFFFFFF)|(textureSource<<30);
-	}
-	//-----------------------------------------------------------------------------------
-	inline void TextureDefinitionBase::decodeTexSource( uint32 encodedVal, size_t &outIdx,
-														TextureSource &outTexSource )
-	{
-		uint32 texSource = (encodedVal & 0xC0000000) >> 30;
-		assert( texSource < NUM_TEXTURES_SOURCES );
-
-		outIdx		 = encodedVal & 0x3FFFFFFF;
-		outTexSource = static_cast<TextureSource>( texSource );
-	}
-	//-----------------------------------------------------------------------------------
 	IdString TextureDefinitionBase::addTextureSourceName( const String &name, size_t index,
 															TextureSource textureSource )
 	{
diff -r 190e3c9aa20d Samples/CMakeLists.txt
--- a/Samples/CMakeLists.txt	Mon Oct 21 00:24:23 2013 -0300
+++ b/Samples/CMakeLists.txt	Mon Oct 21 22:15:05 2013 +0200
@@ -131,14 +131,14 @@
   
 #  add_subdirectory(AtomicCounters)
   add_subdirectory(BezierPatch)
-  add_subdirectory(CameraTrack)
-  add_subdirectory(Character)
-  add_subdirectory(Compositor)
+  #add_subdirectory(CameraTrack)
+  #add_subdirectory(Character)
+  #add_subdirectory(Compositor)
   add_subdirectory(DualQuaternion)
-  add_subdirectory(DynTex)
+  #add_subdirectory(DynTex)
   add_subdirectory(FacialAnimation)
   add_subdirectory(Grass)
-  add_subdirectory(Instancing)
+  #add_subdirectory(Instancing)
   add_subdirectory(Lighting)
   add_subdirectory(MeshLod)
   add_subdirectory(NewInstancing)
@@ -150,8 +150,8 @@
 	add_subdirectory(ShaderSystemTexturedFog)
     add_subdirectory(ShaderSystemMultiLight)
   endif ()
-  add_subdirectory(Shadows)
-  add_subdirectory(SkeletalAnimation)
+  #add_subdirectory(Shadows)
+  #add_subdirectory(SkeletalAnimation)
   add_subdirectory(SkyBox)
   add_subdirectory(SkyDome)
   add_subdirectory(SkyPlane)
@@ -165,23 +165,23 @@
   add_subdirectory(TextureFX)
   add_subdirectory(TextureArray)
   add_subdirectory(Transparency)
-  add_subdirectory(VolumeTex)
+  #add_subdirectory(VolumeTex)
 if (OGRE_BUILD_COMPONENT_VOLUME)
   add_subdirectory(VolumeCSG)
   add_subdirectory(VolumeTerrain)
 endif ()
-  add_subdirectory(Water)
+  #add_subdirectory(Water)
 
 if (NOT OGRE_BUILD_RENDERSYSTEM_GLES OR OGRE_BUILD_RENDERSYSTEM_GLES2)
-  add_subdirectory(BSP)
+  #add_subdirectory(BSP)
   add_subdirectory(CelShading)
-  add_subdirectory(DeferredShading)
-  add_subdirectory(CubeMapping)
+  #add_subdirectory(DeferredShading)
+  #add_subdirectory(CubeMapping)
   add_subdirectory(Dot3Bump)
-  add_subdirectory(Fresnel)
+  #add_subdirectory(Fresnel)
   add_subdirectory(Isosurf)
-  add_subdirectory(ParticleGS)
-  add_subdirectory(SSAO)
+  #add_subdirectory(ParticleGS)
+  #add_subdirectory(SSAO)
 endif ()
 
 if (NOT (OGRE_BUILD_PLATFORM_WINRT OR OGRE_BUILD_PLATFORM_WINDOWS_PHONE))
You get link errors if you use inlined functions defined in a .cpp from another .cpp, therefore I moved the definition to the header. (See C++ FAQ Lite)
I ran "make -i" to force GNU make to continue despite compile errors so I didn't have to remove the broken Samples that don't compile yet.
Good to know. But tbh I still prefer disabling them in cmake, just so the build log is cleaner.

Any comment on the warnings I originally posted? Some of them look pretty serious (eg missing virtual destructors)
Here's the updated warning log in any case
build.log.zip
(48.68 KiB) Downloaded 291 times
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Tue Oct 22, 2013 12:40 am

scrawl wrote: You get link errors if you use inlined functions defined in a .cpp from another .cpp, therefore I moved the definition to the header. (See C++ FAQ Lite)
Yeah, the intention (at least how it works in MSVC) is that the function works as a function across different cpp units while it is inlined inside the same cpp unit. Will have to revisit that.

Any comment on the warnings I originally posted? Some of them look pretty serious (eg missing virtual destructors)
Most of them are harmless but annoying (variable X shadowing a previous declaration). The virtual destructor thingy is not broken because it refers to a class that has not inherited classes nor is deleted as a base (i.e. "delete base"; which won't call the derived's destructor unless it's virtual).
However I agree dangerous it's dangerous to keep it laying without the virtual destructor since we can't predict what future contributions will do with that class.
0 x

PhilipLB
Google Summer of Code Student
Google Summer of Code Student
Posts: 550
Joined: Thu Jun 04, 2009 5:07 pm
Location: Berlin

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by PhilipLB » Tue Oct 22, 2013 9:38 am

Assuming I want to fix the Volume Component for Ogre 2.0, how would that work?
- Is everything needed in place and just needs to be ported?
- Do I fork your repo or do I wait for the big merge into the Ogre repo?
0 x
Google Summer of Code 2012 Student
Topic: "Volume Rendering with LOD aimed at terrain"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Mattan Furst


Volume GFX, accepting donations.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Tue Oct 22, 2013 2:17 pm

PhilipLB wrote:Assuming I want to fix the Volume Component for Ogre 2.0, how would that work?
- Is everything needed in place and just needs to be ported?
Unless I'm forgetting or missed something important, yes.
PhilipLB wrote: - Do I fork your repo or do I wait for the big merge into the Ogre repo?
Fork. Although if you had access to the main repo, you should still have access to my fork. Work on there directly, it's ok.
0 x

User avatar
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
Location: Germany
x 2

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by scrawl » Tue Oct 22, 2013 2:51 pm

1) I just had a closer look at the new compositor system.
What first struck me as odd is that ShadowTextureDefinition contains parameters for various specific camera setups:

Code: Select all

		//Foccused params (+ LispSM + PSSM)
		bool				aggressiveFocusRegion;
		//LispSM params (+ PSSM)
		Real				optimalAdjustFactor;
		Degree				lightDirThreshold;
		//PSSM params
		Real				pssmLambda;
		Real				splitPadding;
		size_t				numSplits;
This seems to be used for "sharing" setups when the params are the same. Can you explain why this is needed?
I would much rather have these parameters only in the shadow camera setup classes. What if you create a new technique and need a new parameter? You can create custom camera setups, but you can't extend ShadowTextureDefinition.
I'm also wondering if we're approaching shadows from the wrong angle here. What if shadow nodes were regular nodes, just with a special camera setup?
I.e. adding a "camera_setup" variable to render_scene passes, which in this case would be a specific ShadowCameraSetup.
Caster materials can be resolved by using a material scheme, no issue there.
If this is possible, it would be pretty neat - with custom camera setups, you could render all kinds of stuff with the compositor system, eg reflection or refraction textures. Currently doing this requires you to manually create render textures, create cameras, create render target listeners to sync them with the scene camera, etc... not fun.

2) This is not an urgent issue, but I think that Ogre 1.x -> 2.x should keep the same difficulty curve. Currently there's a few things the user is responsible for that weren't the case in 1.x. Of course they are required if you want the best experience. I'm just saying there should be reasonable defaults that "just work".
- createBasicWorkspaceDef
It looks to me that EVERY Ogre application (no matter how simple it is), needs to execute this in order to actually render something?

Code: Select all

			Ogre::CompositorManager2 *compositorManager = mRoot->getCompositorManager2();
			if( !compositorManager->hasWorkspaceDefinition( "SampleBrowserWorkspace" ) )
			{
				compositorManager->createBasicWorkspaceDef( "SampleBrowserWorkspace",
															Ogre::ColourValue( 0.6f, 0.0f, 0.6f ),
															Ogre::IdString() );
			}
			compositorManager->addWorkspace( sm, mWindow, cam,
											"SampleBrowserWorkspace", true );
Any reason this has to be done manually rather than just being the default?

- add default arguments to Root::createSceneManager (numWorkerThreads and threadedCullingMethod). Also, these new parameters aren't documented in the function comment and it's not clear whether you should use numWorkerThreads=0 or 1 if you have 1 CPU.

3) A few style issues I came across randomly:
- Const members are NOT macros (thank god), so don't use all caps for their names (eg Mathlib::INFINITEA -> Mathlib::msInfinity)
- We're using C++, so let's use C++ headers (stdio.h -> cstdio, assert.h -> cassert, etc, you get the idea)
- Missing member variable prefixes, eg in ShadowTextureDefinition

Finally, is there any reason CompositorManager2 isn't renamed to CompositorManager yet?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Tue Oct 22, 2013 7:11 pm

scrawl wrote:1) I just had a closer look at the new compositor system.
What first struck me as odd is that ShadowTextureDefinition contains parameters for various specific camera setups:

Code: Select all

		//Foccused params (+ LispSM + PSSM)
		bool				aggressiveFocusRegion;
		//LispSM params (+ PSSM)
		Real				optimalAdjustFactor;
		Degree				lightDirThreshold;
		//PSSM params
		Real				pssmLambda;
		Real				splitPadding;
		size_t				numSplits;
This seems to be used for "sharing" setups when the params are the same. Can you explain why this is needed?
This is to avoid coding complexity. There are usually about 8 shadow texture definitions or less needed PER APPLICATION. Dealing with multi-inheritance "just because LispSMShadowMapping camera doesn't need pssmLambda" is overkill for just a couple of bytes and increased coding complexity.
scrawl wrote: What if you create a new technique and need a new parameter? You can create custom camera setups, but you can't extend ShadowTextureDefinition.
Shadow mapping has been a very stable technique in years. I doubt you would really need to extend it with parameters not already present in ShadowTextureDefinition. And if you do, modify ShadowTextureDefinition's code; like any other middleware with access full source code access will tell you to do.
scrawl wrote: What if shadow nodes were regular nodes, just with a special camera setup?
I.e. adding a "camera_setup" variable to render_scene passes, which in this case would be a specific ShadowCameraSetup.
Caster materials can be resolved by using a material scheme, no issue there.
That's more or less how it is and how it works. Read the manual.
Shall I note that I tried really hard to make shadow nodes just be regular nodes. But this ended up being impossible. On the big picture shadow passes look like a regular render passes, but the Devil is in the details.
The problem is all the data dependencies that the camera setups have from respect other previous passes (and even the next passes). Plus the need for extra information like light index they refer to, split index, UV atlas, different FSAA rules.
Note however, because Nodes derive from Shadow Nodes, they can be used as Nodes by other nodes.
scrawl wrote: with custom camera setups, you could render all kinds of stuff with the compositor system, eg reflection or refraction textures. Currently doing this requires you to manually create render textures, create cameras, create render target listeners to sync them with the scene camera, etc... not fun.
This is already possible with the new compositor with no effort. I just haven't got the time to make a sample showing how easy is to do refraction and reflection effects now (among other effects).
scrawl wrote:I'm just saying there should be reasonable defaults that "just work".
- createBasicWorkspaceDef
It looks to me that EVERY Ogre application (no matter how simple it is), needs to execute this in order to actually render something?

Code: Select all

			Ogre::CompositorManager2 *compositorManager = mRoot->getCompositorManager2();
			if( !compositorManager->hasWorkspaceDefinition( "SampleBrowserWorkspace" ) )
			{
				compositorManager->createBasicWorkspaceDef( "SampleBrowserWorkspace",
															Ogre::ColourValue( 0.6f, 0.0f, 0.6f ),
															Ogre::IdString() );
			}
			compositorManager->addWorkspace( sm, mWindow, cam,
											"SampleBrowserWorkspace", true );
Any reason this has to be done manually rather than just being the default?
Read the manual. 99% of the time you will want to use your own compositor script.

But for something that just works out of the box and get you out of the rush, this helper function will create something that "just works" (but no shadows). I too wanted to create a default workspace definition that could be used.
The main problem was that a default had no way to customize the clear colour (background) unless you look for the workspace definition (which is harder), and also extending the workspace with your custom shadow node was harder.
scrawl wrote: - add default arguments to Root::createSceneManager (numWorkerThreads and threadedCullingMethod). Also, these new parameters aren't documented in the function comment and it's not clear whether you should use numWorkerThreads=0 or 1 if you have 1 CPU.
Noted, fixed, and pushed!
scrawl wrote: 3) A few style issues I came across randomly:
- Const members are NOT macros (thank god), so don't use all caps for their names (eg Mathlib::INFINITEA -> Mathlib::msInfinity)
If you see the consistency, const members were already in ALL CAPS. Examples: UNIT_X; UNIT_Y; UNIT_Z; UNIT_SCALE; ZERO; IDENTITY
scrawl wrote: - We're using C++, so let's use C++ headers (stdio.h -> cstdio, assert.h -> cassert, etc, you get the idea)
I'll let the other team members give a matter on this one.
scrawl wrote: - Missing member variable prefixes, eg in ShadowTextureDefinition
ShadowTextureDefinition is a struct and intended to be treated POD-like; not a class.
scrawl wrote:Finally, is there any reason CompositorManager2 isn't renamed to CompositorManager yet?
Lazyness. And the fact that I still don't know how old users will react with thousands of errors saying "function X is not a member of class CompositorManager" rather than just "CompositorManager unknown. Not declared or referenced in this scope"
The new CompositorManager is just too different from the old one.
0 x

Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by Transporter » Tue Oct 22, 2013 7:33 pm

dark_sylinc wrote:
scrawl wrote:Finally, is there any reason CompositorManager2 isn't renamed to CompositorManager yet?
Lazyness. And the fact that I still don't know how old users will react with thousands of errors saying "function X is not a member of class CompositorManager" rather than just "CompositorManager unknown. Not declared or referenced in this scope"
The new CompositorManager is just too different from the old one.
Don't worry about that. Ogre 2.0 is just too different from 1.x so you can replace the old CompositorManager. :wink:
0 x

User avatar
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
Location: Germany
x 2

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by scrawl » Tue Oct 22, 2013 8:30 pm

You forgot to add the documentation to the second variant of createSceneManager (SceneTypeMask).
Shall I note that I tried really hard to make shadow nodes just be regular nodes. But this ended up being impossible.
Fair enough.
This is to avoid coding complexity. There are usually about 8 shadow texture definitions or less needed PER APPLICATION. Dealing with multi-inheritance "just because LispSMShadowMapping camera doesn't need pssmLambda" is overkill for just a couple of bytes and increased coding complexity.
Doesn't really answer my question. I'll try to word it more clearly:
- Why are these parameters duplicated (both in ShadowTextureDefinition and the various ShadowCameraSetup classes)? eg LiSPSMShadowCameraSetup::getCameraLightDirectionThreshold vs ShadowTextureDefinition::lightDirThreshold

- Why do I need to "share" camera setups? Why would 2 shadow nodes have the exact same setup? Is this for some fancy shadow technique I'm not aware of?
Shadow mapping has been a very stable technique in years. I doubt you would really need to extend it with parameters not already present in ShadowTextureDefinition. And if you do, modify ShadowTextureDefinition's code; like any other middleware with access full source code access will tell you to do.
Shadow mapping itself, sure. But for camera setups there's no one perfect way to do it and there's already a variety of different techniques (LISPSM, PSSM, PlaneOptimal...), so I don't think we should assume that new ones won't be developed. The old system of simply plugging in a custom ShadowCameraSetup was pretty good imo. And it was being used as well: http://www.ogre3d.org/forums/viewtopic.php?f=11&t=71142
I realize that with the improvements already made to shadow mapping in 2.0, most users will be happy with the default algorithms, but don't see any reason to take away freedom here.
And I don't think that "just modify upstream code" is an adequate answer here. It's awful having to maintain a private copy of something as big as Ogre.
Having to modify upstream code usually indicates a design flaw.
This is already possible with the new compositor with no effort. I just haven't got the time to make a sample showing how easy is to do refraction and reflection effects now (among other effects).
Oh, nice!
Transporter wrote:
dark_sylinc wrote:
scrawl wrote:Finally, is there any reason CompositorManager2 isn't renamed to CompositorManager yet?
Lazyness. And the fact that I still don't know how old users will react with thousands of errors saying "function X is not a member of class CompositorManager" rather than just "CompositorManager unknown. Not declared or referenced in this scope"
The new CompositorManager is just too different from the old one.
Don't worry about that. Ogre 2.0 is just too different from 1.x so you can replace the old CompositorManager. :wink:
Agreed.
The main problem was that a default had no way to customize the clear colour (background) unless you look for the workspace definition (which is harder), and also extending the workspace with your custom shadow node was harder.
Hm, maybe pull the clear colour from somewhere else. A separate function to set it wouldn't hurt in any case. I noticed that Viewport's background color has been removed.
0 x

Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by Transporter » Tue Oct 22, 2013 10:06 pm

Finally I was able to build your code. I've updated the TutorialFramework to work with the new code. Maybe it's not the best initialisation order, but I'm not an expert of OGRE 2.0.
TutorialFramework.zip
TutorialFramework - updated for OGRE 2.0
(6.63 KiB) Downloaded 145 times
You did a good Job! :D I also have a few comments:

Code: Select all

mRoot->initialiseCompositor()
Why not initializing it by Ogre itself like LogManager etc.? Also it would be nice to have an option to set up the CompositorManager2 with a default workspace for a normal output.

I was confused about adding a light:
OgreLight.h 54 wrote:Lights are created by using the SceneManager::createLight method. They can subsequently be
added to a SceneNode if required to allow them to move relative to a node in the scene. A light attached
to a SceneNode is assumed to have a base position of (0,0,0) and a direction of (0,0,1) before modification
by the SceneNode's own orientation. If not attached to a SceneNode,
the light's position and direction is as set using setPosition and setDirection.
Where are the functions setPosition and setDirection for lights without a scene node? I can't find them.

Are you shure that the frame statistics are correct?
TutorialFramework.png
Tutorial Framework
TutorialFramework.png (121.08 KiB) Viewed 5358 times
As you can see, I have between 4898 and 10593 fps. This should be an avarage frame rate of 0.4?

Maybe you could add an example how to setup an OGRE2 application to your porting Manual.
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Tue Oct 22, 2013 11:32 pm

scrawl wrote:You forgot to add the documentation to the second variant of createSceneManager (SceneTypeMask).
Ooops. Damn overloads.
scrawl wrote:Doesn't really answer my question. I'll try to word it more clearly:
- Why are these parameters duplicated (both in ShadowTextureDefinition and the various ShadowCameraSetup classes)? eg LiSPSMShadowCameraSetup::getCameraLightDirectionThreshold vs ShadowTextureDefinition::lightDirThreshold
Aahh, I see what you mean. Yeah I noticed that too*
The thing is we use the "Definition" pattern (I don't remember the real name). You're looking at the definition parameters. The ShadowCameraSetups don't get created until the Compositor nodes are instantiated; but we still to know what paremeters they will have.
Because the shadow camera setups were developed long ago, they end up duplicating those variables. If you look at the more recent classes, the definitions are actually being used i.e. CompositorPassScene accesses definition parameters from CompositorPassSceneDef through the member mDefinition.
Besides sharing, the most important reason is actually knowing those values beforehand (i.e. when parsing the compositor scripts)

*I'm referring to me as if I haven't written the code because sometimes, I feel like it's my subconscious typing :D
scrawl wrote: - Why do I need to "share" camera setups? Why would 2 shadow nodes have the exact same setup? Is this for some fancy shadow technique I'm not aware of?
Ok you're mixing stuff. I see where the confusion happens.
Camera setups will be shared across the same shadow node, but never across different shadow nodes. They're out of scope.
They are shared just to save a few bytes in ram (there was another reason but I can't remember now, anyway this is trivial). A couple revisions earlier they didn't even share the setups.

Then there is Shadow Node sharing; which is something completely different. If you have two render_scene passes, and you want to reuse the data from the older pass, you use the same shadow node.
You can also override its contents, in case you won't be using them again (the more shadow nodes you have, the more VRAM you'll need).

But if you want to have each render_scene pass each with its own shadow setups, you'll need two different shadow nodes; which may or may not contain the same settings; but they won't share their camera setups even if they contain the same settings.
A reason to have two shadow nodes with the same parameters is not crazy though: Suppose we have passes A which renders opaque geometry, B which renders environment mapped data, and C which composites A & B and renders the transparent objects.
A & B need shadows, but are independent of each other.
And C is a composite that depends on both A & B but also wants to use the shadow node's data from A.

You'll 2 shadow nodes: one for A & C, and another for B. You can just use one shadow node; but if you do so, the contents will be forced to be recalculated when doing C (because they were overwritten).
Hm, maybe pull the clear colour from somewhere else. A separate function to set it wouldn't hurt in any case. I noticed that Viewport's background color has been removed.
Yes, a couple of utility functions are needed. As more feedback is retrieved, it will be easier to see how this should be done.
The thing is it works for "very basic setups"; but for more complex setups there is hardly a notion of a unique background color. Assuming all RTs have the same background color is a very dangerous assumption.
Transporter wrote:

Code: Select all

mRoot->initialiseCompositor()
Why not initializing it by Ogre itself like LogManager etc.? Also it would be nice to have an option to set up the CompositorManager2 with a default workspace for a normal output.
Initially it was done that way automatically, but it was a PITA because at some point the system depended on the RenderSystem, and D3D9 was complaining that the context wasn't yet created (a RenderWindow hasn't been created).
Then I moved into Root::initialise but it failed to work if creating manual RenderWindows (autoCreateWindow = false). In the end it was just easier to manually call it after the user knows when the first RenderWindow had been created.

If you see an easier way to solve this, I'm all ears. Take in mind it looks troublesome now, but once you've written the initialization routine you won't be worrying about it again.
Where are the functions setPosition and setDirection for lights without a scene node? I can't find them.
Ohh, looks like the Doxygen doc needs an update. All MovableObjects need a SceneNode now (it's in section ... oh wait I may have forgotten to document it! Sorry :oops:; I'm sure I wrote it somewhere).

Creating a camera will automatically create a SceneNode for you since this is the most common behavior (having SceneNode-less cameras). But for lights, it was 50/50 so it was a hard choice.
Light::setPosition is missing, which should redirect to the SceneNode. This was a bit intentional so I could spot which Lights used nodes when porting.
Are you shure that the frame statistics are correct?
As you can see, I have between 4898 and 10593 fps. This should be an avarage frame rate of 0.4?
Ooops, the average frame rate is in milliseconds. 1000 / 0.4 = 2500 fps.
Maybe you could add an example how to setup an OGRE2 application to your porting Manual.
Good idea.
Last edited by dark_sylinc on Wed Oct 23, 2013 12:07 am, edited 2 times in total.
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Wed Oct 23, 2013 12:02 am

Updated the manual (2013-10-22) to explain the changes made to Camera and Light and the reasoning behind it. Section 2.5 is new.

Also pushed the doxygen changes.
0 x

Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by Transporter » Wed Oct 23, 2013 2:35 pm

The CPU core detection is not working correct. It says that I have 16 cores in my Laptop. :D I really like to have 16 cores but they are only 4. :mrgreen:
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Wed Oct 23, 2013 3:13 pm

Transporter wrote:The CPU core detection is not working correct. It says that I have 16 cores in my Laptop. :D I really like to have 16 cores but they are only 4. :mrgreen:
Could you post a CPU-Z screenshot so I know your exact CPU?

Also if you could debug what's happening that would be awesome :wink: :wink:
0 x

PhilipLB
Google Summer of Code Student
Google Summer of Code Student
Posts: 550
Joined: Thu Jun 04, 2009 5:07 pm
Location: Berlin

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by PhilipLB » Wed Oct 23, 2013 11:24 pm

Could this be usefull?
Pre SSE 4.1 floor/ceil/round functions (+modulo bonus):
http://dss.stephanierct.com/DevBlog/?p=8
0 x
Google Summer of Code 2012 Student
Topic: "Volume Rendering with LOD aimed at terrain"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Mattan Furst


Volume GFX, accepting donations.

Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by Transporter » Thu Oct 24, 2013 8:57 am

dark_sylinc wrote:
Transporter wrote:The CPU core detection is not working correct. It says that I have 16 cores in my Laptop. :D I really like to have 16 cores but they are only 4. :mrgreen:
Could you post a CPU-Z screenshot so I know your exact CPU?

Also if you could debug what's happening that would be awesome :wink: :wink:
cpuz.png
cpuz.png (35.48 KiB) Viewed 5217 times
I've found the error:

Code: Select all

	static uint32 _detectNumLogicalCores(void)
	{
		uint numLogicalCores = 0;

        // Supports CPUID instruction ?
        if (_isSupportCpuid())
        {
			CpuidResult result;

            // Has standard feature ?
            if (_performCpuid(0, result))
            {
				// Check standard feature
                _performCpuid(1, result);

				numLogicalCores = (result._ebx >> 16) & 0xff;

                // Check vendor strings
                if (memcmp(&result._ebx, "GenuineIntel", 12) == 0)
                {
					_performCpuid(4, result);
					numLogicalCores = ((result._eax >> 26) & 0x3f) + 1; // EAX[31:26] + 1
                }
                else if (memcmp(&result._ebx, "AuthenticAMD", 12) == 0)
                {
					//Number of CPU cores - 1
					_performCpuid( 0x80000008, result );
					numLogicalCores = (result._ecx & 0xff) + 1; // EAX[7:0] + 1
                }
            }
		}

		return numLogicalCores;
	}
The part Check vendor strings is not correct, because the vendor string is part of array index 0 (see MSDN) but you have overwritten the result of 0 with the result of 1, so the Memory compare for GenuineIntel always failed. This shoud fix it:

Code: Select all

	static uint32 _detectNumLogicalCores(void)
	{
		uint numLogicalCores = 0;

		// Supports CPUID instruction ?
		if (_isSupportCpuid())
		{
			CpuidResult result;

			// Has standard feature ?
			if (_performCpuid(0, result))
			{
				// Check vendor strings
				if (memcmp(&result._ebx, "GenuineIntel", 12) == 0)
				{
					_performCpuid(4, result);
					numLogicalCores = ((result._eax >> 26) & 0x3f) + 1; // EAX[31:26] + 1
				}
				else if (memcmp(&result._ebx, "AuthenticAMD", 12) == 0)
				{
					//Number of CPU cores - 1
					_performCpuid( 0x80000008, result );
					numLogicalCores = (result._ecx & 0xff) + 1; // EAX[7:0] + 1
				}
				else
				{
					// Check standard feature
					_performCpuid(1, result);
					numLogicalCores = (result._ebx >> 16) & 0xff;
				}
			}
		}

		return numLogicalCores;
	}
Is it also not helpful in case of errors to return 1 instead of a 0? Then one CPU core is guaranteed automatically and does not lead to errors if you forget to check the value. You could also skip the max function in the application

Code: Select all

const size_t numThreads = std::max<size_t>( 1, Ogre::PlatformInformation::getNumLogicalCores() );
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

Re: [GSoC 2013 - accepted] Ogre 2.0

Post by dark_sylinc » Thu Oct 24, 2013 2:25 pm

Thanks for looking into the bug!
Transporter wrote: Is it also not helpful in case of errors to return 1 instead of a 0? Then one CPU core is guaranteed automatically and does not lead to errors if you forget to check the value. You could also skip the max function in the application
Good question.
I thought returning 0 is a good way to tell "we have no idea". If we return 1, the user might assume there is actually just 1 core. And the function is documented.
On the other hand, if the user forgot that it could return 0... crashes hard to reproduce could happen (though in the next commit SceneManager clamps always to 1 just in case); though Ogre.log would indicate that number of cores is 0.
0 x

Post Reply