Mogre 1.8 Development

BrainScan

21-02-2014 01:05:45

Mogre 1.8 is now available in the official Mogre repository! It is already quite stable - at least as stable as 1.7. I am already using it in all of my commercial projects with no problems. However, some of the brand new 1.8 functionality is still untested at this time.

Notes:
  1. The Terrain and Paging components are removed for the time being to get a working version out. Let me know if you need them since its a low priority for me currently.[/*:m]
  2. The code is based on the Ogre 1.8.1 release: https://bitbucket.org/sinbad/ogre/commits/tag/v1-8-1[/*:m]
  3. The new patch file is mogre-1.8.1-clrobject.patch located in the Ogre Patches directory. This is the patch file that must be used for Ogre and Mogre to build correctly.[/*:m]
  4. Ogre 1.8 change log and porting notes can be found here: http://www.ogre3d.org/tikiwiki/tiki-ind ... yatisNotes[/*:m]
  5. The new DepthBuffer sharing doesn't seem to be in the changelog, but it could cause strange behavior when using RTT and Compositors until you set the DepthBufferPool properly.[/*:m]
  6. The new InstanceManager functionality has been wrapped but is untested. If you give it a try, please report back if it is working properly.[/*:m]
  7. Intellisense is now supported and built automatically when Mogre is built! Copy the Mogre.xml file along with the dll and pdb files to get Intellisense support in Visual Studio.[/*:m][/list:u]
    MogreBuilder Config:
    Setting the following lines in the MogreBuilder config file should build the new version. Please report any issues.

    // Mogre
    MogreBranch = @"Mogre18";

    // Ogre
    OgreBranch = @"v1-8-1";

    // patches
    ClrPatchFile = @"Main\Ogre Patches\mogre-1.8.1-clrobject.patch";

    Todo:
    1. What updates (if any) have to be made to MogreBuilder to use 1.8? Can someone experienced with MogreBuilder please have a look at it? No changes, use the above config lines.[/*:m]
    2. SDK? Anyone want to volunteer to update?[/*:m]
    3. Intellisense[/*:m]
    4. Documentation? Wiki updates?[/*:m]
    5. Components (Terrain, Paging, etc.) - How to handle components in a way that doesn't cause a dependency if they aren't being used?[/*:m]
    6. Static linking of Ogre into Mogre - Simplifies dependency management. Attempts have been unsuccessful in the past. Any downsides?[/*:m]
    7. Addon compatibility?[/*:m][/list:u]

se5a

21-02-2014 05:43:04

if we're lucky, mogrebuilder will be fine with just a change pointing to the mogre and ogre repositorys.
trying it now.

Edit:
seems to have problems with the ogre patch, there's the last bunch of lines from MogreBuilder:

patching file OgreMain\include\OgreZip.h
Hunk #1 succeeded at 55 (offset 1 line).
patching file OgreMain\src\OgreException.cpp
patching file OgreMain\src\WIN32\OgreConfigDialog.cpp
patching file OgreMain\src\WIN32\OgreErrorDialog.cpp
patching file RenderSystems\Direct3D9\src\OgreD3D9Plugin.cpp
patching file RenderSystems\GL\src\OgreWin32GLSupport.cpp
patching file RenderSystems\GL\src\OgreWin32Window.cpp
patching file RenderSystems\GLES\src\EGL\WIN32\OgreWin32EGLWindow.cpp
Ogre patch failed

Exception stack trace for debugging:
--------------------------------------------------------------------------
at Mogre.Builder.Tasks.PatchOgreCode.Run() in f:\Users\se5a\Documents\Projects-Code\mogre-mogrebuilder-ef23a3b06b82\S
ource\Tasks\PatchOgreCode.cs:line 34
at Mogre.Builder.TaskManager.RunNow() in f:\Users\se5a\Documents\Projects-Code\mogre-mogrebuilder-ef23a3b06b82\Source
\Managers\TaskManager.cs:line 143
at Mogre.Builder.TaskManager.Run() in f:\Users\se5a\Documents\Projects-Code\mogre-mogrebuilder-ef23a3b06b82\Source\Ma
nagers\TaskManager.cs:line 116--------------------------------------------------------------------------


mogrebuilder cfg patches line:

// patches
ClrPatchFile = @"Main\Ogre Patches\mogre-1.8.1-clrobject.patch";


I didn't follow the white rabbit further down the hole than that.

BrainScan

21-02-2014 06:56:09

Any chance I could get a little more of the output? The error in the patch file must be listed before the beginning of the output you posted. The patching part should start with something like:
patching file CMakeLists.txt
patching file OgreMain\CMakeLists.txt

se5a

21-02-2014 07:12:40

ah, has it seen a seen the failure halfway through and stopped at the end of the patching?


Patching Ogre source tree
patching file CMakeLists.txt
patching file OgreMain\CMakeLists.txt
patching file OgreMain\include\OgreAnimable.h
Hunk #1 succeeded at 69 (offset 1 line).
patching file OgreMain\include\OgreAnimation.h
Hunk #1 succeeded at 87 (offset 1 line).
patching file OgreMain\include\OgreAnimationState.h
Hunk #1 succeeded at 50 (offset 1 line).
Hunk #2 succeeded at 196 (offset 1 line).
patching file OgreMain\include\OgreAnimationTrack.h
Hunk #1 succeeded at 49 (offset 1 line).
Hunk #2 succeeded at 122 (offset 1 line).
Hunk #3 succeeded at 269 (offset 1 line).
Hunk #4 succeeded at 332 (offset 1 line).
Hunk #5 succeeded at 488 (offset 1 line).
patching file OgreMain\include\OgreArchive.h
Hunk #1 succeeded at 85 (offset 1 line).
patching file OgreMain\include\OgreBillboard.h
Hunk #1 succeeded at 66 (offset 1 line).
patching file OgreMain\include\OgreBillboardChain.h
patching file OgreMain\include\OgreBillboardParticleRenderer.h
patching file OgreMain\include\OgreBillboardSet.h
Hunk #1 succeeded at 109 (offset 1 line).
Hunk #2 succeeded at 861 (offset 1 line).
patching file OgreMain\include\OgreBone.h
patching file OgreMain\include\OgreBorderPanelOverlayElement.h
patching file OgreMain\include\OgreCamera.h
Hunk #1 succeeded at 86 (offset 1 line).
patching file OgreMain\include\OgreCodec.h
patching file OgreMain\include\OgreCommon.h
Hunk #1 succeeded at 408 (offset 2 lines).
Hunk #2 succeeded at 520 (offset 2 lines).
patching file OgreMain\include\OgreCompositionPass.h
patching file OgreMain\include\OgreCompositionTargetPass.h
patching file OgreMain\include\OgreCompositionTechnique.h
patching file OgreMain\include\OgreCompositor.h
patching file OgreMain\include\OgreCompositorChain.h
patching file OgreMain\include\OgreCompositorInstance.h
patching file OgreMain\include\OgreConfig.h
patching file OgreMain\include\OgreCustomCompositionPass.h
patching file OgreMain\include\OgreDefaultHardwareBufferManager.h
patching file OgreMain\include\OgreDepthBuffer.h
patching file OgreMain\include\OgreDistanceLodStrategy.h
patching file OgreMain\include\OgreEdgeListBuilder.h
patching file OgreMain\include\OgreEntity.h
Hunk #1 succeeded at 81 (offset 1 line).
Hunk #2 succeeded at 850 (offset 1 line).
patching file OgreMain\include\OgreException.h
patching file OgreMain\include\OgreExternalTextureSource.h
patching file OgreMain\include\OgreFileSystem.h
Hunk #1 succeeded at 47 (offset 1 line).
patching file OgreMain\include\OgreFont.h
patching file OgreMain\include\OgreFrustum.h
Hunk #1 succeeded at 84 (offset 1 line).
patching file OgreMain\include\OgreGpuProgram.h
Hunk #1 succeeded at 69 (offset 1 line).
patching file OgreMain\include\OgreGpuProgramParams.h
Hunk #1 succeeded at 395 (offset 1 line).
Hunk #2 succeeded at 512 (offset 1 line).
Hunk #3 succeeded at 599 (offset 1 line).
patching file OgreMain\include\OgreHardwareBuffer.h
patching file OgreMain\include\OgreHardwareBufferManager.h
Hunk #1 succeeded at 107 (offset 1 line).
Hunk #2 succeeded at 388 (offset 1 line).
patching file OgreMain\include\OgreHardwareIndexBuffer.h
patching file OgreMain\include\OgreHardwareOcclusionQuery.h
patching file OgreMain\include\OgreHardwarePixelBuffer.h
Hunk #1 succeeded at 52 (offset 1 line).
patching file OgreMain\include\OgreHardwareVertexBuffer.h
Hunk #1 succeeded at 47 (offset 1 line).
Hunk #2 succeeded at 318 (offset 1 line).
Hunk #3 succeeded at 504 (offset 1 line).
patching file OgreMain\include\OgreHeaderSuffix.h
Hunk #1 FAILED at 23.
Hunk #2 FAILED at 39.
2 out of 2 hunks FAILED -- saving rejects to file OgreMain\include\OgreHeaderSuffix.h.rej
patching file OgreMain\include\OgreHighLevelGpuProgram.h
patching file OgreMain\include\OgreImage.h
patching file OgreMain\include\OgreImageCodec.h
patching file OgreMain\include\OgreInstanceBatch.h
patching file OgreMain\include\OgreInstanceBatchHW.h
patching file OgreMain\include\OgreInstanceBatchHW_VTF.h
patching file OgreMain\include\OgreInstanceBatchShader.h
patching file OgreMain\include\OgreInstanceBatchVTF.h
patching file OgreMain\include\OgreInstancedEntity.h
Hunk #2 succeeded at 279 (offset 4 lines).
patching file OgreMain\include\OgreInstancedGeometry.h
patching file OgreMain\include\OgreInstanceManager.h
patching file OgreMain\include\OgreKeyFrame.h
Hunk #1 succeeded at 53 (offset 1 line).
Hunk #2 succeeded at 81 (offset 1 line).
Hunk #3 succeeded at 106 (offset 1 line).
Hunk #4 succeeded at 159 (offset 1 line).
Hunk #5 succeeded at 191 (offset 1 line).
patching file OgreMain\include\OgreLight.h
Hunk #1 succeeded at 73 (offset 1 line).
Hunk #2 succeeded at 581 (offset 1 line).
patching file OgreMain\include\OgreLodListener.h
patching file OgreMain\include\OgreLodStrategy.h
patching file OgreMain\include\OgreLog.h
Hunk #1 succeeded at 101 (offset 1 line).
Hunk #2 succeeded at 202 (offset 1 line).
patching file OgreMain\include\OgreManualObject.h
patching file OgreMain\include\OgreMaterial.h
Hunk #1 succeeded at 88 (offset 1 line).
patching file OgreMain\include\OgreMesh.h
Hunk #1 succeeded at 91 (offset 1 line).
patching file OgreMain\include\OgreMeshSerializer.h
patching file OgreMain\include\OgreMovableObject.h
Hunk #1 succeeded at 60 (offset 1 line).
Hunk #2 succeeded at 577 (offset 1 line).
patching file OgreMain\include\OgreMovablePlane.h
Hunk #1 succeeded at 53 (offset 1 line).
patching file OgreMain\include\OgreNode.h
Hunk #1 succeeded at 60 (offset 1 line).
patching file OgreMain\include\OgreOverlay.h
patching file OgreMain\include\OgreOverlayContainer.h
patching file OgreMain\include\OgreOverlayElement.h
patching file OgreMain\include\OgreOverlayElementFactory.h
patching file OgreMain\include\OgrePanelOverlayElement.h
patching file OgreMain\include\OgreParticle.h
Hunk #1 succeeded at 60 (offset 1 line).
patching file OgreMain\include\OgreParticleAffector.h
Hunk #1 succeeded at 61 (offset 1 line).
patching file OgreMain\include\OgreParticleAffectorFactory.h
Hunk #1 succeeded at 52 (offset 1 line).
patching file OgreMain\include\OgreParticleEmitter.h
Hunk #1 succeeded at 69 (offset 1 line).
patching file OgreMain\include\OgreParticleEmitterFactory.h
Hunk #1 succeeded at 53 (offset 1 line).
patching file OgreMain\include\OgreParticleSystem.h
Hunk #1 succeeded at 67 (offset 1 line).
patching file OgreMain\include\OgreParticleSystemManager.h
Hunk #1 succeeded at 386 (offset 1 line).
patching file OgreMain\include\OgreParticleSystemRenderer.h
patching file OgreMain\include\OgrePass.h
patching file OgreMain\include\OgrePatchMesh.h
patching file OgreMain\include\OgrePatchSurface.h
patching file OgreMain\include\OgrePixelCountLodStrategy.h
patching file OgreMain\include\OgrePlaneBoundedVolume.h
Hunk #1 succeeded at 49 (offset 1 line).
patching file OgreMain\include\OgrePose.h
Hunk #1 succeeded at 52 (offset 1 line).
patching file OgreMain\include\OgrePrerequisites.h
patching file OgreMain\include\OgreProgressiveMesh.h
Hunk #1 succeeded at 106 (offset 1 line).
patching file OgreMain\include\OgreRectangle2D.h
patching file OgreMain\include\OgreRenderOperation.h
patching file OgreMain\include\OgreRenderQueue.h
patching file OgreMain\include\OgreRenderQueueInvocation.h
patching file OgreMain\include\OgreRenderQueueSortingGrouping.h
patching file OgreMain\include\OgreRenderSystem.h
patching file OgreMain\include\OgreRenderSystemCapabilities.h
patching file OgreMain\include\OgreRenderTarget.h
patching file OgreMain\include\OgreRenderTexture.h
patching file OgreMain\include\OgreRenderToVertexBuffer.h
patching file OgreMain\include\OgreRenderWindow.h
patching file OgreMain\include\OgreResource.h
Hunk #1 succeeded at 75 (offset 1 line).
patching file OgreMain\include\OgreResourceBackgroundQueue.h
patching file OgreMain\include\OgreRibbonTrail.h
patching file OgreMain\include\OgreRotationalSpline.h
Hunk #1 succeeded at 58 (offset 1 line).
patching file OgreMain\include\OgreSceneManager.h
patching file OgreMain\include\OgreSceneManagerEnumerator.h
patching file OgreMain\include\OgreSceneNode.h
Hunk #1 succeeded at 58 (offset 1 line).
patching file OgreMain\include\OgreSceneQuery.h
Hunk #1 succeeded at 71 (offset 1 line).
Hunk #2 succeeded at 225 (offset 1 line).
Hunk #3 succeeded at 274 (offset 1 line).
Hunk #4 succeeded at 294 (offset 1 line).
Hunk #5 succeeded at 314 (offset 1 line).
Hunk #6 succeeded at 389 (offset 1 line).
Hunk #7 succeeded at 529 (offset 1 line).
patching file OgreMain\include\OgreSerializer.h
Hunk #1 succeeded at 47 (offset 1 line).
patching file OgreMain\include\OgreShadowCameraSetup.h
patching file OgreMain\include\OgreShadowCameraSetupFocused.h
Hunk #1 succeeded at 57 (offset 1 line).
patching file OgreMain\include\OgreShadowCameraSetupLiSPSM.h
patching file OgreMain\include\OgreShadowCameraSetupPlaneOptimal.h
patching file OgreMain\include\OgreShadowCaster.h
Hunk #1 succeeded at 50 (offset 1 line).
Hunk #2 succeeded at 117 (offset 1 line).
patching file OgreMain\include\OgreSimpleRenderable.h
Hunk #1 succeeded at 49 (offset 1 line).
patching file OgreMain\include\OgreSimpleSpline.h
Hunk #1 succeeded at 57 (offset 1 line).
patching file OgreMain\include\OgreSkeleton.h
Hunk #1 succeeded at 86 (offset 1 line).
patching file OgreMain\include\OgreSkeletonInstance.h
patching file OgreMain\include\OgreSkeletonSerializer.h
patching file OgreMain\include\OgreStaticGeometry.h
patching file OgreMain\include\OgreStreamSerialiser.h
patching file OgreMain\include\OgreSubEntity.h
Hunk #1 succeeded at 60 (offset 1 line).
patching file OgreMain\include\OgreSubMesh.h
Hunk #1 succeeded at 61 (offset 1 line).
Hunk #2 succeeded at 135 (offset 1 line).
patching file OgreMain\include\OgreTagPoint.h
patching file OgreMain\include\OgreTechnique.h
patching file OgreMain\include\OgreTextAreaOverlayElement.h
patching file OgreMain\include\OgreTexture.h
Hunk #1 succeeded at 104 (offset 1 line).
patching file OgreMain\include\OgreTextureUnitState.h
Hunk #1 succeeded at 63 (offset 1 line).
Hunk #2 succeeded at 1230 (offset 1 line).
patching file OgreMain\include\OgreUnifiedHighLevelGpuProgram.h
patching file OgreMain\include\OgreUserObjectBindings.h
Hunk #1 succeeded at 46 (offset 1 line).
patching file OgreMain\include\OgreVertexIndexData.h
Hunk #1 succeeded at 48 (offset 1 line).
Hunk #2 succeeded at 244 (offset 1 line).
patching file OgreMain\include\OgreViewport.h
patching file OgreMain\include\OgreWireBoundingBox.h
patching file OgreMain\include\OgreWorkQueue.h
patching file OgreMain\include\OgreZip.h
Hunk #1 succeeded at 55 (offset 1 line).
patching file OgreMain\src\OgreException.cpp
patching file OgreMain\src\WIN32\OgreConfigDialog.cpp
patching file OgreMain\src\WIN32\OgreErrorDialog.cpp
patching file RenderSystems\Direct3D9\src\OgreD3D9Plugin.cpp
patching file RenderSystems\GL\src\OgreWin32GLSupport.cpp
patching file RenderSystems\GL\src\OgreWin32Window.cpp
patching file RenderSystems\GLES\src\EGL\WIN32\OgreWin32EGLWindow.cpp
Ogre patch failed


The relevent bit seems to be

patching file OgreMain\include\OgreHeaderSuffix.h
Hunk #1 FAILED at 23.
Hunk #2 FAILED at 39.
2 out of 2 hunks FAILED -- saving rejects to file OgreMain\include\OgreHeaderSuffix.h.rej

BrainScan

21-02-2014 07:20:34

Yeah, that looks like the culprit. It looks like somehow, MogreBuilder is pointed at the wrong version of the source. What did you use for the ogre source repository?

se5a

21-02-2014 07:22:35


OgreRepository = @"https://bitbucket.org/sinbad/ogre/";
OgreBranch = @"v1-8";

BrainScan

21-02-2014 07:30:45

Can you try setting it to v1-8-1 as below?

OgreRepository = @"https://bitbucket.org/sinbad/ogre/";;
OgreBranch = @"v1-8-1";

There's been additional changes on the 1-8 branch since the last stable release 1-8-1. Since I built the patch against 1-8-1 one of those changes must break the patch. I chose to work against 1-8-1 since no official 1-8-2 was ever released. So, I'm not sure how stable the additional changes on the 1-8 branch are.

se5a

21-02-2014 07:52:57

I don't see that branch in that repository?

BrainScan

21-02-2014 07:58:00

Its a tag technically, but mercurial should know how to deal with it. I'm not exactly sure how MogreBuilder is using Hg to pull that branch that is specified, but most of the Hg commands can take a branch, a tag, or even a changeset hash. I'm hoping that MogreBuilder isn't doing anything strange to prevent that. Otherwise, I might have to poke around in the code, but I'd rather it just work... :wink:

se5a

21-02-2014 08:04:41

ah right. yeah I still have no clue what I'm doing half the time when it comes to revision control of any type. yeah it looks like it's handling it. and apears to have even finished patching. it's now checking out the source code of ogre dependancys.

BrainScan

21-02-2014 08:12:32

Excellent! Here's hoping the rest works! If it does, would you be willing to post your mogre builder config file so I can add it to the first post and give everyone a head start without them having to read through the whole thread?

se5a

21-02-2014 08:20:44

it's gotten stuck at Builidng manifest for zziplib....... (or maybe a watched code never compiles/ I'm being impatiant?)
I expect it might run into problems after this bit anyway due to the terrain and paging not being in. mogrebuilder may need tweeking for that.
here's where it is currently

...
Building Ogre without linking back to Mogre

OGRE (OgreMain:Rebuild;OgrePaging:Rebuild;OgreRTShaderSystem:Rebuild;OgreTerrain:Rebuild;Plugin_BSPSceneManager:Rebuild;
Plugin_CgProgramManager:Rebuild;Plugin_OctreeSceneManager:Rebuild;Plugin_OctreeZone:Rebuild;Plugin_ParticleFX:Rebuild;Pl
ugin_PCZSceneManager:Rebuild;RenderSystem_Direct3D9:Rebuild;RenderSystem_GL:Rebuild)....
Rebuilding OgreMain.vcxproj.
Rebuilding FreeImage...........................................
Rebuilding freetype..........................................
Rebuilding zlib..........................................
Rebuilding zziplib...........................................
Rebuilding OgreMain..................
Building manifest for FreeImage
Building manifest for freetype
Building manifest for zlib
Building manifest for zziplib.............



Here's the cfg file:


// build
BuildConfiguration = "Release";

// CLR
ClrDirectory = @"Main\Ogre\";
ClrConfigHeaderFile = @"Main\Ogre\CLRConfig.h";
ClrObjectsBuildDirectory = @"Main\OgreSrc\build\include\";

// Mogre
MogreAssemblyInfoFile = @"Main\AssemblyInfo.cpp";
MogreSolutionFile_VS2010 = @"Main\Mogre_vs2010.sln";
MogreSolutionFile_VS2012 = @"Main\Mogre_vs2012.sln";
MogreRepository = @"https://bitbucket.org/BrainScan/mogre/";
MogreBranch = @"Mogre18";

// Ogre
OgreRootDirectory = @"Main\OgreSrc\ogre\";
OgreBuildDirectory = @"Main\OgreSrc\build\";
OgreIncludeDirectory = @"Main\OgreSrc\ogre\OgreMain\include\";
OgreSourceDirectory = @"Main\OgreSrc\ogre\OgreMain\src\";
OgrePrequisitesFile = @"Main\OgreSrc\ogre\OgreMain\include\OgrePrerequisites.h";
OgreProjectFile = @"Main\OgreSrc\build\OgreMain\OgreMain.vcxproj";
OgreSolutionFile = @"Main\OgreSrc\build\OGRE.sln";
OgreRepository = @"https://bitbucket.org/sinbad/ogre/";
// NOTE: You can specify a local path if you want to use a repository with your own modifications.
OgreBranch = @"v1-8-1";

// CMake
// CMakeExecutable = @"cmake.exe";

// dependencies
DependenciesRepository = "https://bitbucket.org/cabalistic/ogredeps";
DependenciesDirectory = @"Main\OgreSrc\ogre\Dependencies\";

// patches
ClrPatchFile = @"Main\Ogre Patches\mogre-1.8.1-clrobject.patch";

// cpp2java
Cpp2JavaDirectory = @"Codegen\cpp2java";
Cpp2JavaMetaDataFile = @"Codegen\cpp2java\build\all.xml";

// autowrap
AutoWrapExecutable = @"Codegen\AutoWrap\bin\Debug\AutoWrap.exe";
AutoWrapSolutionFile = @"Codegen\AutoWrap\AutoWrap_vs2010.sln";
AutoWrappedCodeDirectory = @"Main\src\auto\";
AutoWrapWorkingDirectory = @"Codegen\AutoWrap\bin\Debug\";


// ----- Add-ons -----

// official Add-on repository
MogreAddonsRepository = "https://bitbucket.org/mogre/mogreaddons"; // repository URL

// Add-ons subdirectory inside of MogreBuilder target path
MogreAddonsDirectory = @"MogreAddons\";


// ----- MogreNewt add-on -----

NewtonMainDirectory = @"MogreNewt\MogreNewt_Main\";
// NOTE: If relative path: Will point to "MogreAddonsDirectory", which contains clone of the official Add-ons repository
// If absolute path: Can be used for a custom MogreNewt directory (independent of the repository)

// directories where to insert all needed depency files
// --> will be done by the MogreBuilder
NewtonInputDirectory_Mogre_binary_debug = @"input_Mogre\Mogre_binary_debug\";
NewtonInputDirectory_Mogre_binary_release = @"input_Mogre\Mogre_binary_release\";
NewtonInputDirectory_Ogre_headers = @"input_Mogre\Ogre_headers\";
NewtonInputDirectory_Ogre_headers_Threading = @"input_Mogre\Ogre_headers\Threading\";
NewtonInputDirectory_Ogre_headers_Win32 = @"input_Mogre\Ogre_headers\WIN32\";
NewtonInputDirectory_OgreMain_binaries = @"input_Mogre\OgreMain_binaries\";
NewtonInputDirectory_OgreMain_headers = @"input_Mogre\OgreMain_headers\";
NewtonInputDirectory_NewtonBinary = @"input_Newton\";

// directory where to find the newton binaries
NewtonDepencySourceDir_NewtonLibrary = @"";


// ----- MOIS add-on -----

MoisSolutionFile_VS2010 = @"MogreAddons\MOIS\MOIS\MOIS_vs2010.sln";
MoisSolutionFile_VS2012 = @"MogreAddons\MOIS\MOIS\MOIS_vs2012.sln";

se5a

21-02-2014 08:21:42

spoke(posted) too soon, looks like it's still going.

Edit.
Due to an unrelated problem my computer compleatly froze up before it finished. unfortunatly I'm away for the weekend so won't be able to test further till I get back.

BrainScan

22-02-2014 22:37:24

Bummer. On the bright side, you can now enjoy your weekend without distractions. :)

se5a

23-02-2014 05:37:07

Back, and running the build again now.

Edit:
good news! it finished, MOIS included. took 40min
I've yet to test it in a project.

BrainScan

03-03-2014 04:49:49

I just updated the Mogre 1.8 repository. I performed a bunch of cleanup in the autowrapper and also implemented Xml Documentation! Now the autowrapper will generate inline Xml comments from the ogre files and the project will compile them into an Xml documentation file. This file will provide Intellisense support in Visual Studio for everything wrapped by Mogre. Just make sure to copy the Mogre.xml file to your project and put it in the same folder that you reference Mogre.dll from.

Please let me know if you find anything that's missing Intellisense. It's likely that anything missing is because it isn't documented in Ogre but I may have missed a few cases.

BrainScan

21-04-2014 00:34:16

Mogre 1.8 is now available in the official repository! All the details are in the first post.

BrainScan

22-04-2014 00:31:29

Added some large updates to all the classes ported from Ogre to Mogre. Everything should now be synced up to Ogre 1.8. Many of these classes hadn't been updated since they were originally ported in the early days of Mogre.

Lexer

23-04-2014 23:19:10

I've just had a look at the commits in the trunk, it's nice to see progress.

I have a technical question for you, since you might be the only one around that may have an answer : )

why is it necessary for Ogre class instances to keep a GCHandle on managed instances?
actually, I don't know for which class this approach is used (Listeners?)

also, I noticed that these managed instances are set as 'pinned' in the GC, and that GCHandles are converted into a native ptr, why not rather keep a gcroot instance? (which tracks instances even after memory defragmentation (I think))

Haven't seen the genrated sources yet, I might be speculating. but I'd be glad to have a copy of the code (way too lazy )

BrainScan

25-04-2014 06:00:15

why is it necessary for Ogre class instances to keep a GCHandle on managed instances?
actually, I don't know for which class this approach is used (Listeners?)

All the most commonly uses class hierarchies store a handle to the managed instance inside the native instance. This allows the managed instance to be created only once and returned whenever needed. I think speed is the primary benefit as each object is only allocated once and the GC doesn't have to constantly collect old instances. The wiki has some basic info on the subject: http://www.ogre3d.org/tikiwiki/tiki-ind ... connection
There have also bee some discussions in the past on the forums about why this is a good idea, but I can't seem to dig any up right now.

also, I noticed that these managed instances are set as 'pinned' in the GC, and that GCHandles are converted into a native ptr, why not rather keep a gcroot instance? (which tracks instances even after memory defragmentation (I think))
The internal implementation of gcroot actually uses a GCHandle. The Mogre implementation is very similar to the way gcroot does it. I'm not entirely sure why Mogre is using a custom implementation instead of using gcroot since that is way before my time. As long as the handle is created as GCHandleType::Normal there is no pinning involved. Both the gcroot and the Mogre implementation use this so there should be no pinning on the majority of objects. Mogre only uses pinning (with pin_ptr<>) where absolutely necessary such as string and array marshaling. They should only be pinned for long enough to transfer the data though so it really shouldn't be an issue.

Dalon

26-04-2014 01:26:13

I got it working with Visual Studio 2013.1 Professional 32 Bit.

Just had to change a few things in the MogreBuilder project. First of all, I added a new command line option: -vs2013
It works just like the -vs2012 command line option except that it will use VS 2013 for building (surprise!) :D

Then I had to remove the old MSBuild references from MogreBuilder since this would result in a .Net 4.0 build of Mogre using
Visual Studio 2012. The new MSBuild assemblies should be located here: C:\Program Files(x86)\MSBuild\12.0\bin

After that everything worked fine.

Edit

I uploaded a binary build of it here. Hope this helps somehow: MOgre_1_8_1_vs120_net451_boost.zip
I compiled it with thread support (using Boost 1.55.0) using Visual Studio 2013.1 32 Bit and Ogre 1.8.1

Lexer

27-04-2014 15:52:02


All the most commonly uses class hierarchies store a handle to the managed instance inside the native instance. This allows the managed instance to be created only once and returned whenever needed. I think speed is the primary benefit as each object is only allocated once and the GC doesn't have to constantly collect old instances. The wiki has some basic info on the subject: http://www.ogre3d.org/tikiwiki/tiki-ind ... connection


There are indeed benefits with this approach, but it might cost a high memory footprint.
This is fine for native classes that are designed to have few instances, but for those designed to be numerous this might be a problem.

The main debate here may be whether we want a" Stateful versus Stateless" wrapper. I personally prefer the stateless approach.
In my opinion Ogre should know nothing about its wrapper, and the wrapper has to handle native pointers.
Also to avoid working with the GC, one solution might be to rely on the stack rather the heap whenever possible, using light c# structs.

I'll try to find time to experiment.