From: Raphaël L. <rl...@ci...> - 2013-03-15 12:29:46
|
New version in CIVITEC branch, used in Pro-SiVIC version 2.2. Compilation projects: * Grouped mgCore, mgTexture and mgEngine projects into a single mgEngine project. * Moved mgCameraViewport back off mgEngine project, into its own one. * Fixed some project dependencies. * Changed Debug compilation configuration to use incremental link (but this doesn't work very well with such a plugin-heavy solution). General code: * Added more tests. * Minor code uniformizations and deduplications. * Added some "const" keywords where it made sense. * Fixed many small memory leaks. * Removed a few obsolete code, and dependency to GLU library. * Updated boost::filesystem calls to use version 3 (aligned on commit from June 2012). * Updated TestXXX and unsupported texture generation projects so that they compile. mgEngine (general): * mgCore now loads config files relative to the executable's path, not the current path. * Simplified mouse wheel management in mgCore. * Fixed major bug in mgAddrClientSet. Operator = was incorrectly declared (it did not compile anyway, but since it's a template class...) therefore never used. A default operator was generated by the compiler, which of course did not work as intended. * Init method is now in mgObject (was previously in mgResource and mgScriptable, separately). * Added new class mgComponent. Such objects can be attached to scriptables to add modular functionality or prevent diamond inheritance. An example use is camera filters. However, development is not entirely finished (there are some minor design flaws) and this class is currently not used. * Fixed several bugs caused when adding scale in mgCoordFrame: mgCS_Sphere did not correctly update sphere radius, normals were scaled during rendering (fixed with GL_RESCALE_NORMALS), and BSP frustum culling did not take scale into account. * To allow fixing scale in all cases, added MaxGlobalScale method in mgCoordFrame (instead of mgRenderable), and updated code to use absolute value. * Added several new mgVariant types. * Added mgLoadShader utility files (currently not used in other mgEngine files), as a stub for a future shader wrapper class. * Added more empty members/accessors to mgPostProcessFilter that are not used in other mgEngine files. We should think of a better way to implement this in the future. * Added mgColor structure for storing 8bit RGBA colors, with convenience methods to convert it to/from 32bit integers, and sort them. * Added RGBA color formats (not extensively tested) in mgColorFormat.h, and moved depth format declarations to this file instead of mgCamera. * Added new accessors to mgLightSource, to separately configure the light color and intensity (scale). * Added new operators to mgMatrix4 and mgQuaternion, also they are now initialized to identity. * Experimental simplification of mgVertexBufferObject and mgElementBufferObject to work around major performance and memory issues. Now an OpenGL object is created for each buffer object instance instead of storing everything in a single, huge buffer. This circumvents problems due to slow STL implementation and graphics driver assumptions/optimizations. * mgNamedVector is now header-only to avoid getting a warning about exported templates, and because this warning eventually and inexplicably transformed into a link error after the buffer object change. Also, the list of mgNamedVector objects is now stored in the mgEngine class instead of a static mgNamedVector member. * Added methods to obtain current user's home and AppData directories in mgMisc.h. These are now called in main.cpp (and mgConfig, see below). * mge-run no more creates a mgSTDConsole when run in batch mode, so that it can quit with "quit" command in all cases. mgConfig: * Added ability to save a .conf file. * References to other keys using $(key) are now evaluated dynamically. * GetValue/SetValue now use mgVariant parameters. Previous uses of GetValue updated to use GetStringValue. * Added new implicit config key "user path" that points to the current user's home directory. mgScriptable/mgSceneObject/mgPositionable: * Split mgScriptable into two classes: mgScriptable and mgSceneObject. mgScriptable holds the scripting methods and is now inherited by mgSceneObject and a new class mgComponent. mgSceneObject holds the scene graph management. * Added ability to attach mgComponent objects to a mgSceneObject and arraneg them. * Added ability to access dynamic properties (including layers). * Fixed visitor "break" system for scene graph walkthroughs. We now use two conditions: one for deciding whether to traverse a node, and one for deciding whether to process it. This fixes various unexpected behaviors. * Added new visitor conditions allowing to search for nodes that have a given property (with any value, or a defined value), or have a given component. * Added new visitor conditions allowing to combine other conditions (union, intersection). * Added security check when creating an object: it may delete itself in Init(), so we detect this and return 0 (using mgAddrClient). * Fixed bug in mgPositionable, which was due to a confusion between Parent and PosParent. Now the mechanism is much more simple and works better. * Fixed TransformName method, as the star replacement was performed on the original (not transformed) name. * Uniformized collision shape management code from mgLightMask, mgCollidable and mgAmbientMask. Rendering pipeline: * Added BindChannelToTexCoords method in mgVertexBufferBindings to allow using a texture coordinate channel that's different from the current texture's own channel (also in mgMateriel: see below). * Added ability to use "alpha to coverage" instead of alpha test when multisampling is enabled. This can be configured globally in engine.conf, and overridden in renderers (but there is no accessor yet). * Fixed missing call to mgRenderer's BeginRender method in some of its children's own BeginRender. This fixes bad state and context initialization in several cases. mgResource/mgResourceServer: * Added PathKey declaration, to set the mgConfig key corresponding to each resource class. * Changed how paths are computed for resources. The PathKey keys should contain only one path, relative to the "data path" paths. This forces all resource to be stored in a standardized subdirectory structure, however they can be in multiple data repositories. Resources can be referenced using only their name (relative to the PathKey value), or with their entire path from the "data path". To expand all these possible directory structures, we added mgExpandPath in mgMisc.h. * Differenciated read and write paths in mgResourceServer, as some resources can now written to disc in Pro-SiVIC and our importer tools. Read path is the list of possible paths for a resource class. Write path is the first path in the list (it is created if non existent, see mgMainPath in mgMisc.h). * Added FileStreamRequested, ResourceLoading, ResourceLoaded and ResourceCreated signals in mgResourceServer and resource classes, used for GUI update. * Cleanup and Listdata are now called recursively if a mgResourceServer is a resource in another mgResourceServer. mgTexture/texture generators: * Grouped accessors to various mgTexture parameters (mipmapping, clamping, border color...) in a single SetParameters method. Also, these parameters are stored as members of the class and use better default values. * mgTextureGenerator now uses the mipmapping parameter from its calling texture. * Forced 0 multisampling and no scaling for cubeenvironment's virtual cameras. mgMaterial/mgMesh: * Added ability to duplicate mgMesh and mgMaterial resources. * mgMesh now has an update method to apply skinning (based on bones and weights). * mgMaterial now has an accessor to update its emissive color (but nothing else, we should generalize that in the future using properties). * Added new [channel X tex coord channel] directive in mgMaterial to allow using a texture coordinate channel that's different from the texture's own channel. * Added FixTextures method in mgMaterial, called after initialization. This method checks for invalid texture parameters, issues warnings, and tries to fix them to avoid rendering artifacts. Various plugins: * Fixed ForceCameraResize mthod in mgCameraViewport (did not update every time). * Added ability to disable simulated motion blur in mgRainActor. * Added new properties to several classes that were previously forgotten. * Split mgPositionController code into two classes mgPositionControllerBase (abstract) and mgPositionController (mgSceneObject wrapper with properties). This was done to share mgPositionControllerBase's code with another child class (mgComponent wrapper) but the work was not completed. Raphaël Lerbour, R&D Software Developer / Engineer _________________________________________ CIVITEC Bâtiment le Sésame 8 rue Germain Soufflot 78180 Montigny-le-Bretonneux FRANCE Tel: (+33) 1 79 92 10 57 http://www.civitec.com |