[GSoC 2013 - accepted] Resource System Redesign

Threads related to Google Summer of Code
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

Code: Select all

1>------ Build started: Project: OgreMain, Configuration: Release Win32 ------
1>  OgreMain.vcxproj -> C:\Users\OShepherd\Projects\ogre-rs\build\bin\Release\OgreMain.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

C:\Users\OShepherd\Projects\ogre-rs>hg diff -r cde0338 --stat
 OgreMain/include/OgreFileSystem.h                       |     0
 OgreMain/include/OgreArchive.h                          |     0
 OgreMain/include/OgreArchiveFactory.h                   |     0
 OgreMain/include/OgreArchiveManager.h                   |     0
 OgreMain/include/OgreResourceBackgroundQueue.h          |     0
 OgreMain/include/OgreResourceGroupManager.h             |     0
 OgreMain/src/OgreArchiveManager.cpp                     |     0
 OgreMain/src/OgreFileSystem.cpp                         |     0
 OgreMain/src/OgreResourceBackgroundQueue.cpp            |     0
 OgreMain/src/OgreResourceGroupManager.cpp               |     0
 Components/Paging/src/OgreGrid2DPageStrategy.cpp        |     2 +-
 Components/Paging/src/OgreGrid3DPageStrategy.cpp        |     2 +-
 Components/Terrain/src/OgreTerrainMaterialGenerator.cpp |     4 +-
 Components/Volume/include/OgreVolumeChunk.h             |     4 +-
 Components/Volume/include/OgreVolumeMeshBuilder.h       |     2 +-
 Components/Volume/src/OgreVolumeChunk.cpp               |    34 +-
 Components/Volume/src/OgreVolumeDualGridGenerator.cpp   |     2 +-
 Components/Volume/src/OgreVolumeMeshBuilder.cpp         |     2 +-
 Components/Volume/src/OgreVolumeOctreeNode.cpp          |     2 +-
 OgreMain/CMakeLists.txt                                 |    53 -
 OgreMain/include/OgreBillboardChain.h                   |     6 +-
 OgreMain/include/OgreBillboardSet.h                     |    22 +-
 OgreMain/include/OgreCompositionPass.h                  |     4 -
 OgreMain/include/OgreCompositionTechnique.h             |     2 +-
 OgreMain/include/OgreCompositor.h                       |    10 +-
 OgreMain/include/OgreCompositorChain.h                  |     5 +-
 OgreMain/include/OgreCompositorInstance.h               |    17 +-
 OgreMain/include/OgreCompositorManager.h                |    14 +-
 OgreMain/include/OgreConfigFile.h                       |     8 +-
 OgreMain/include/OgreEntity.h                           |    31 +-
 OgreMain/include/OgreExternalTextureSource.h            |     5 +-
 OgreMain/include/OgreExternalTextureSourceManager.h     |     3 +-
 OgreMain/include/OgreGpuProgram.h                       |   129 +-
 OgreMain/include/OgreGpuProgramManager.h                |   135 +-
 OgreMain/include/OgreGpuProgramParams.h                 |    23 -
 OgreMain/include/OgreGpuProgramUsage.h                  |    21 +-
 OgreMain/include/OgreHighLevelGpuProgram.h              |     9 +-
 OgreMain/include/OgreHighLevelGpuProgramManager.h       |    30 +-
 OgreMain/include/OgreImage.h                            |    30 -
 OgreMain/include/OgreInstanceManager.h                  |    30 +-
 OgreMain/include/OgreInstancedGeometry.h                |    14 +-
 OgreMain/include/OgreIntrusivePtr.h                     |   203 +
 OgreMain/include/OgreManualObject.h                     |    32 +-
 OgreMain/include/OgreMaterial.h                         |    39 +-
 OgreMain/include/OgreMaterialManager.h                  |    50 +-
 OgreMain/include/OgreMesh.h                             |    41 +-
 OgreMain/include/OgreMeshManager.h                      |   139 +-
 OgreMain/include/OgreNode.h                             |     4 +-
 OgreMain/include/OgreParticleSystem.h                   |    28 +-
 OgreMain/include/OgreParticleSystemManager.h            |    18 +-
 OgreMain/include/OgrePass.h                             |    65 +-
 OgreMain/include/OgrePatchMesh.h                        |    11 +-
 OgreMain/include/OgrePrefabFactory.h                    |    35 +-
 OgreMain/include/OgrePrerequisites.h                    |    32 +-
 OgreMain/include/OgreQueuedProgressiveMeshGenerator.h   |     2 +-
 OgreMain/include/OgreRenderSystem.h                     |    14 -
 OgreMain/include/OgreRenderSystemCapabilitiesManager.h  |     5 -
 OgreMain/include/OgreRenderToVertexBuffer.h             |     2 +-
 OgreMain/include/OgreResource.h                         |   563 +-
 OgreMain/include/OgreResourceManager.h                  |   453 +-
 OgreMain/include/OgreRoot.h                             |   119 +-
 OgreMain/include/OgreSceneManager.h                     |    73 +-
 OgreMain/include/OgreShadowVolumeExtrudeProgram.h       |     6 +-
 OgreMain/include/OgreSimpleRenderable.h                 |     3 +-
 OgreMain/include/OgreSkeleton.h                         |    24 +-
 OgreMain/include/OgreSkeletonInstance.h                 |    14 +-
 OgreMain/include/OgreSkeletonManager.h                  |     7 +-
 OgreMain/include/OgreStableHeaders.h                    |     7 -
 OgreMain/include/OgreStaticGeometry.h                   |    10 +-
 OgreMain/include/OgreSubEntity.h                        |    13 -
 OgreMain/include/OgreSubMesh.h                          |    20 +-
 OgreMain/include/OgreTechnique.h                        |    22 +-
 OgreMain/include/OgreTexture.h                          |   288 +-
 OgreMain/include/OgreTextureManager.h                   |   326 +-
 OgreMain/include/OgreTextureUnitState.h                 |   194 +-
 OgreMain/include/OgreUnifiedHighLevelGpuProgram.h       |    59 +-
 OgreMain/include/OgreViewport.h                         |     6 +
 OgreMain/src/OgreBillboardChain.cpp                     |    24 +-
 OgreMain/src/OgreBillboardParticleRenderer.cpp          |     2 +-
 OgreMain/src/OgreBillboardSet.cpp                       |    50 +-
 OgreMain/src/OgreCompositionPass.cpp                    |     5 -
 OgreMain/src/OgreCompositor.cpp                         |    34 +-
 OgreMain/src/OgreCompositorChain.cpp                    |    60 +-
 OgreMain/src/OgreCompositorInstance.cpp                 |    72 +-
 OgreMain/src/OgreCompositorManager.cpp                  |   100 +-
 OgreMain/src/OgreConfigFile.cpp                         |    16 -
 OgreMain/src/OgreEntity.cpp                             |    80 +-
 OgreMain/src/OgreFrustum.cpp                            |     2 +-
 OgreMain/src/OgreGpuProgram.cpp                         |    96 +-
 OgreMain/src/OgreGpuProgramManager.cpp                  |   233 +-
 OgreMain/src/OgreGpuProgramParams.cpp                   |   129 -
 OgreMain/src/OgreGpuProgramUsage.cpp                    |    80 +-
 OgreMain/src/OgreHighLevelGpuProgram.cpp                |    38 +-
 OgreMain/src/OgreHighLevelGpuProgramManager.cpp         |   396 +-
 OgreMain/src/OgreImage.cpp                              |    29 -
 OgreMain/src/OgreInstanceBatchShader.cpp                |     6 +-
 OgreMain/src/OgreInstanceBatchVTF.cpp                   |    25 +-
 OgreMain/src/OgreInstanceManager.cpp                    |    45 +-
 OgreMain/src/OgreInstancedGeometry.cpp                  |    39 +-
 OgreMain/src/OgreManualObject.cpp                       |    50 +-
 OgreMain/src/OgreMaterial.cpp                           |   153 +-
 OgreMain/src/OgreMaterialManager.cpp                    |    54 +-
 OgreMain/src/OgreMesh.cpp                               |   261 +-
 OgreMain/src/OgreMeshManager.cpp                        |   466 +-
 OgreMain/src/OgreMeshSerializerImpl.cpp                 |  3488 -------
 OgreMain/src/OgreNode.cpp                               |    22 +-
 OgreMain/src/OgreParticleSystem.cpp                     |    38 +-
 OgreMain/src/OgreParticleSystemManager.cpp              |    34 +-
 OgreMain/src/OgrePass.cpp                               |   257 +-
 OgreMain/src/OgrePatchMesh.cpp                          |    21 +-
 OgreMain/src/OgrePrefabFactory.cpp                      |    76 +-
 OgreMain/src/OgreQueuedProgressiveMeshGenerator.cpp     |     2 +-
 OgreMain/src/OgreRectangle2D.cpp                        |     2 +-
 OgreMain/src/OgreRenderQueue.cpp                        |     2 +-
 OgreMain/src/OgreRenderSystem.cpp                       |     7 -
 OgreMain/src/OgreRenderSystemCapabilitiesManager.cpp    |    19 -
 OgreMain/src/OgreRenderToVertexBuffer.cpp               |     8 +-
 OgreMain/src/OgreResource.cpp                           |   500 +-
 OgreMain/src/OgreResourceManager.cpp                    |   552 +-
 OgreMain/src/OgreRoot.cpp                               |   198 +-
 OgreMain/src/OgreSceneManager.cpp                       |   764 +-
 OgreMain/src/OgreScriptTranslator.cpp                   |  6494 --------------
 OgreMain/src/OgreShadowTextureManager.cpp               |    26 +-
 OgreMain/src/OgreShadowVolumeExtrudeProgram.cpp         |   225 +-
 OgreMain/src/OgreSimpleRenderable.cpp                   |    15 +-
 OgreMain/src/OgreSkeleton.cpp                           |    74 +-
 OgreMain/src/OgreSkeletonInstance.cpp                   |    25 +-
 OgreMain/src/OgreSkeletonManager.cpp                    |    12 +-
 OgreMain/src/OgreStaticGeometry.cpp                     |    19 +-
 OgreMain/src/OgreSubEntity.cpp                          |    44 +-
 OgreMain/src/OgreSubMesh.cpp                            |    43 +-
 OgreMain/src/OgreTechnique.cpp                          |   102 +-
 OgreMain/src/OgreTexture.cpp                            |   377 +-
 OgreMain/src/OgreTextureManager.cpp                     |   225 +-
 OgreMain/src/OgreTextureUnitState.cpp                   |   353 +-
 OgreMain/src/OgreUnifiedHighLevelGpuProgram.cpp         |   221 +-
 OgreMain/src/OgreViewport.cpp                           |    29 +
 OgreMain/src/OgreWireBoundingBox.cpp                    |     2 +-
 PlugIns/BSPSceneManager/src/OgreBspSceneManager.cpp     |     8 +-
 OgreMain/include/OgreDDSCodec.h                         |     0
 OgreMain/src/OgreDDSCodec.cpp                           |     0
 OgreMain/include/OgreETCCodec.h                         |     0
 OgreMain/src/OgreETCCodec.cpp                           |     0
 OgreMain/include/OgreFreeImageCodec.h                   |     0
 OgreMain/src/OgreFreeImageCodec.cpp                     |     0
 OgreMain/include/OgrePVRTCCodec.h                       |     0
 OgreMain/src/OgrePVRTCCodec.cpp                         |     0
 PlugIns/ParticleFX/src/OgreColourImageAffector.cpp      |     2 +-
 OgreMain/include/OgreMaterialSerializer.h               |     0
 OgreMain/include/OgreScriptCompiler.h                   |     0
 OgreMain/include/OgreScriptLexer.h                      |     0
 OgreMain/include/OgreScriptLoader.h                     |     0
 OgreMain/include/OgreScriptParser.h                     |     0
 OgreMain/include/OgreScriptTranslator.h                 |     0
 OgreMain/src/OgreMaterialSerializer.cpp                 |     0
 OgreMain/src/OgreScriptCompiler.cpp                     |     0
 OgreMain/src/OgreScriptLexer.cpp                        |     0
 OgreMain/src/OgreScriptParser.cpp                       |     0
 PlugIns/ScriptLoaders/src/OgreScriptTranslator.cpp      |  6494 ++++++++++++++
 OgreMain/include/OgreMeshFileFormat.h                   |     0
 OgreMain/include/OgreMeshSerializer.h                   |     0
 OgreMain/include/OgreMeshSerializerImpl.h               |     0
 OgreMain/include/OgreSerializer.h                       |     0
 OgreMain/include/OgreSkeletonFileFormat.h               |     0
 OgreMain/include/OgreSkeletonSerializer.h               |     0
 OgreMain/include/OgreStreamSerialiser.h                 |     0
 OgreMain/src/OgreMeshSerializer.cpp                     |     0
 PlugIns/Serializers/src/OgreMeshSerializerImpl.cpp      |  3489 +++++++
 OgreMain/src/OgreSerializer.cpp                         |     0
 OgreMain/src/OgreSkeletonSerializer.cpp                 |     0
 OgreMain/src/OgreStreamSerialiser.cpp                   |     0
 OgreMain/src/OgreDeflate.cpp                            |     0
 OgreMain/include/OgreDeflate.h                          |     0
 OgreMain/include/OgreZip.h                              |     0
 OgreMain/src/OgreZip.cpp                                |     0
 RenderSystems/Direct3D9/include/OgreD3D9Mappings.h      |     3 +
 RenderSystems/Direct3D9/include/OgreD3D9Texture.h       |    72 +-
 RenderSystems/Direct3D9/src/OgreD3D9Mappings.cpp        |    19 +
 RenderSystems/Direct3D9/src/OgreD3D9Texture.cpp         |  1358 +--
 RenderSystems/GL/include/OgreGLTexture.h                |    30 +-
 RenderSystems/GL/src/GLSL/include/OgreGLSLProgram.h     |     4 +-
 RenderSystems/GL/src/OgreGLTexture.cpp                  |   293 +-
 Tools/XMLConverter/src/OgreXMLMeshSerializer.cpp        |    10 +-
 183 files changed, 12919 insertions(+), 19266 deletions(-)
That is all.

I pushed the first few changes; the rest to follow tomorrow. I still need to go back over the Textures, and touch the GL end of the shader system, but that shouldn't be too bad (well, besides the multitude of languages GL supports)
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

I pushed the entirety of the changes to OgreMain and RenderSystem_GL. It builds with VisualStudio; there are a few niggles building it with other compilers which I'm slowly working out.

I'll be building a test harness program tomorrow.
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

Image

Surprisingly and pleasingly... the world isn't entirely broken
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Klaim »

Looks like early versions of MineCraft when you look at the "moon". :mrgreen:

Well done!
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

Image
So, images work again.

Also, I'll be posting future minor updates on Twitter to avoid spamming the forum too much
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

A blog post - Looking to the future – Buffers and Textures in Ogre 2.0

The changes to the texture API discussed are already in. The addition of HBU_IMMUTABLE and TU_IMMUTABLE will be soon.
JordanWeber
Gnoblar
Posts: 7
Joined: Fri Feb 01, 2013 1:18 pm
x 1

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by JordanWeber »

Thank you for doing this :) I'm excited to see how this turns out.

Also this will hopefully make it easy to include encryption and/or better compression formats to the resource list. I personally feel that .zip compression is too old and doesn't compress well.

Edit: Although I realize it is possible to do this with the current system, perhaps there is just a lack of examples :S The "obfuscated zip" is a great starter tutorial, but writing out into compression formats would be helpful too.
Last edited by JordanWeber on Fri Aug 23, 2013 10:54 am, edited 1 time in total.
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by drwbns »

Hey Owen, do you have any latest updates for us? :)
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

Image

Slowly, life returns to the engine. Tracking down a bug took a while... turns out, when I added immutable buffer support to the GL render system, I made a mistake in setting up the vertex buffer and the initialization data never made it to the hardware buffer (but did make it to the shadow buffer!) with, suffice it to say, suboptimal results.

We will see how many ways I've broken the script subsystem next...

You may surmise things are not quite to schedule. By the GSoC soft pencils down, I expect to have things back "as were" functionality wise; I'll add the extra codecs soon thereafter. They're things I need anyway for the project of mine which spurred this whole thing; those are definitely a matter of when, not if. Additionally, codec code tends to be simple; its' mostly a matter of adding code to translate from the library's formats to Ogre's.
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

Image

Scripts are back.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Klaim »

Very nice! (I can't see the whole picture inside the forum though)

DRS is your own resource manager implementation? DummyResourceSystem?
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

Earlier in that file...

Code: Select all

namespace DRS = Ogre::DefaultResourceSystem;
It's a component which reimplements the functionality and behavior previously implemented by ResourceGroupManager and co. Existing applications should be able to relatively easily move to the DefaultResourceSystem.

The major differences are:
  • Resource names are group local, rather than global. You don't need to worry about resources from different groups conflicting
  • You now grab resources directly from the group
  • that you now specify which groups are to be searched as fallbacks when a resource is not found inside the group explicitly. As an example:

Code: Select all

[Common]
ZipArchive=common_patch1.zip
ZipArchive=common.zip

[Map1]
ZipArchive=map1.zip
Fallback=Common
The code which reads the config file will detect when the "archive type" would be fallback and instead insert a fallback group

The method group->initialiseAllResources() will cause all scripts to be parsed and all other resources in the group to be identified. group->loadAllResources() will then cause them to all be loaded.

Destroying a group will make all of its' resources candidates for destruction; they will be destroyed as and when their reference count drops to zero. If unloaded, they will always fail to load.

(This ensures that group destruction is safe in the face of inter-resource references, for example)

---

I've been looking through the errors that have been generated as all the resource scripts from the samples are loaded (There were a lot). The most common of these are related to shaders.

I think next I'm going to be doing a major refit of HighLevelGpuProgram and co. The distinction has become troublesome, and is pretty obsolete anyhow.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by scrawl »

I recently had the idea to use installed fonts from system folders rather than bundling them with my program.
With fontconfig, I can easily get a list of installed fonts and their locations.
The problem I have now is that I can't simply add a resource without also adding its folder, meaning the resource system will be clogged with tons of other files that I don't want.
Therefore I would like to request a method of adding a single file to the resource system / a specific resource group. I'm not sure if you already implemented this - if so, can you point me at the right function to use?
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Transporter »

I've looked at the code of the resource manager plugins. Could you remove zziplib from your ZIP plugin? There are a few proposals in this topic: http://www.ogre3d.org/forums/viewtopic.php?f=3&t=70443
User avatar
Mako_energy
Greenskin
Posts: 125
Joined: Mon Feb 22, 2010 7:48 pm
x 9

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Mako_energy »

Please forgive my ignorance, but what is the current status of this code?

I can see at the repo linked on the first page that there haven't been any additional pushes to the repo since the GSOC ended. I also see here that there were still some plans or at least indications of pending work, and it was said after the last push to the repo. Furthermore it looks like all the other GSOC's have made it into the Ogre 2.0 branch, but not this one.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by masterfalcon »

I think we're going to hold off until after 2.0 is a bit more stable.
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

For my Autumn semester I was completely snowed under. I still want to get this done, but with the amount of things on my plate finding time to do so was difficult.

My Spring semester is a lot less crowded (45 credits instead of 75!). I hope to find time to wrap things up then (~February, after exams)
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Klaim »

Are there things you think external devs could help with? Or is the current code not ready for external help yet?
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Wolfmanfx »

Would be great if you can sumup what is missing because atm I really do not know whats the state of this project is.
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

The resource system specific bits (Texture, GpuProgram etc subclasses) need porting to DX9/11 and GL3/GLES. This shouldn't take much work for each except DirectX 9, which will need some thinking.

The Overlays component needs quite a lot of work (Presently Overlays are Resources, but that doesn't mesh with the redesign. Probably Overlays should become non-resource things and new "OverlayTemplates" should be the resources or similar). Presently the Overlay component in the repository is kind of hacked up because I wanted to get the samples running and go through OgreMain bug hunting, but things get gnarlier and gnarlier the more I attempted to work around the impedance mismatch, so my conclusion was that going in and fixing it now is probably the easier option.

I think I'd finished converting the other addons (but double check that).

The samples were mostly ported, though they'll need further work around the Overlays because of the aforementioned parts.

Textures, materials and meshes, archives, codecs and script loaders and the default resource system are definitely in the working camp, so modulo bugs the core should be done.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Klaim »

Is there already any kind of documentation about the feature and how to port code from 1.9 to the new resource system? I suspect not yet.
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Wolfmanfx »

Sounds that we will need at least one more summer to get that thing as whole in the working camp so I wont hold my breath that we can merge that into 2.0. Do you have some docu written down as a pdf about the complete system you did maybe we can extract something out which we could put into 2.0?
Owen
Google Summer of Code Student
Google Summer of Code Student
Posts: 91
Joined: Mon May 01, 2006 11:36 am
x 21

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Owen »

I woudln't say it would take a whole summer. Converting DX11 should take ~a day; for GL3 and GLES its' very much copy and paste (with some modifications for newer APIs and differences) from the GL render system. DX9 will take a little longer (because it assumes it can synchronously pull in a resource multiple times when it needs to recreate multiple devices and it can't - synchronous loading is dead [and good riddance])

Overlays - a week doing it on off perhaps? What needs to be done is pretty clear, its just a matter of doing it.

From my perspective, once I get an opportunity to jump back into it then I don't expect the remaining work to take too long. The portions which took up most of the time during GSoC weren't the complex bits, but the tedious ones (that is, going through and converting all of the code to the new paradigm).
Wolfmanfx wrote:Do you have some docu written down as a pdf about the complete system you did maybe we can extract something out which we could put into 2.0?
I posted this earlier as an overview, and a blog post covering the HBU_IMMUTABLE feature I added.

Otherwise, there isn't much to be said. If you're just using Resource subclasses and the ResourceGroupManager - then your code should be relatively straightforward to translate towards the new DefaultResourceSystem. If you're implementing a resource or resource loader, that document should give you the high level overview, and I documented Resource quite comprehensively (I think) via Doxygen.

The trouble with extracting a sub-component is the nature of the changes. Modulo bugs, OgreMain and RenderSystem_GL are done. The hard part is that this has a knock on effect throughout the entire rest of the codebase. It was more of a marathon through the multitude of areas impacted rather than multiple short sprints through more targetted subsections.

As I say, I don't think there is much left to do. One more semi major module refactor (Overlays), fix up the samples, and then throw as many things as it as possible to flush out bugs.

(Oh - and reimplementing threaded loading in the default resource system, but that is probably a 100 line change considering we have Ogre::WorkQueue at our disposal)
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Klaim »

Thanks for these info, I'll read the document asap and will report if I have questions or comments.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: [GSoC 2013 - accepted] Resource System Redesign

Post by Klaim »

Sorry for the delay, I'm overloaded with work but have read the document and have some remarks and questions to post here soon, I hope tonight.
Post Reply