Castor3D  ..
Castor3D Engine

Change log

This page is here to inform about the changes since the earliest versions of the engine.

Version 0.10.0

Features

CastorUtils

  • Renamed namespace Castor to castor.
  • Added ChangeTracked and GroupChangeTracked classes, allowing to track changes to a member variable.
  • Renamed CubeBox and SphereBox to BoundingBox and BoundingSphere.
  • Splitted Colour in two classes: RgbColour and RgbaColour.
  • PlaneEquation is no more a template class.
  • Created a buddy allocator class: BuddyAllocator.

Castor3D

  • Renamed namespace Castor3D to castor3d.
  • Emissive in a material is now stored on a single floating point (emissive maps still hold a colour though).
  • Implemented Physical Based Rendering, using both metallic/roughness and specular/glossiness workflows.
  • RenderPipeline now also holds the shader program.
  • Implemented Screen Space Subsurface Scattering.
  • The light pass result is now stored in two render targets: diffuse and specular.
  • Vertex buffers now use a buddy allocated pool.
  • Shadow mapping now uses variance shadow maps.
  • Transparent meshes are now rendered using Weighted Blended rendering.
  • Screen Space Ambiant Occlusion has been improved, using Scalable Ambiant Obscurance implementation.
  • Parallax Occlusion mapping is implemented.
  • Reflection and refraction mapping have been implemented.
  • Deferred rendering has been fully integrated, for opaque objects rendering.
  • Created components for submeshes, to move functionalities out of Submesh.
  • Rendering now uses a depth prepass.
  • Created ColourSkybox, to handle background colour and skyboxes in the same way.
  • Created ShaderBuffer class, to be able to handle SSBOs or TBOs in a similar way, choosing the most appropriate one, depending on running machine.

Generators

  • Created DiamondSquareTerrain plugin.

Generic

  • Events from CastorGUI are now forwarded to the user.

Importers

  • Removed almost every importer plugin, keeping only Assimp, OBJ, and PLY importers.

RenderSystems

  • Updated to support the features provided by Castor3D.

PostEffects

  • Created SMAA post effect.
  • Created Kawase Light Streaks post effect.
  • Created Film Grain post effect.

Techniques

  • Technique plugins have been completely removed.

Tone mappings

  • Created Uncharted 2 tone mappings.

Fixed Bugs

Castor3D

  • Fixed bounding boxes for animated meshes and skinned meshes.
  • Repaired an reenabled frustum culling.
  • Fixed alpha rejection.

Version 0.9.0

Features

CastorUtils

  • Dropped libzip, and added minizip to the source tree.

Castor3D

  • Entire review of the render loop: RenderPipeline is no more a unique instance, but it actually contains the states, the program, and uniform buffer bindings.
    It has been done to prepare the arrival of Vulkan, in which the pipeline can't be modified once it has been created, and that is now the case in Castor3D too.
  • The rendering has been splitted in RenderPasses, that each have one or more RenderQueues, that are updated asynchronously on CPU.
    This allows the GPU loop to be cleaned of most CPU computations.
  • Skybox have been added.
  • Binary export has been completely reviewed, it now uses a chunk data format (like LWO or 3DS).
    It is used for meshes, and skeletons.
  • Plug-ins interface's consistency has been improved.
  • Fog basic implementations (linear, exponential, and squared exponential) have been added.
  • Morphing (per-vertex) animations are now supported by Castor3D.
  • Frustum culling has been implemented.
  • Colour picking has been implemented.
  • Shadow mapping is implemented, lights can produce shadows, and objects can cast shadows.
  • Particle system has been implemented, giving to the user the implementation choice (CPU through class override, GPU through Transform Feedback or Compute shaders).
  • Fixed the lighting in GLSL, to make it behave properly without dirty hacks.
  • Compute shaders have been integrated to Castor3D, along with Shader Storage Buffers and Atomic Counter Buffers.
  • Textures implementation have been completely reviewed, we now have TextureLayout, which holds the TextureImage(s), and the TextureStorage per image.
    It has allowed the creation of cube textures.
  • Textures transfer to RAM has been fixed.
  • Billboard rendering no more uses a geometry shader, it now relies on hardware instantiation of a quad, and the positions are given as side attributes.
  • UniformBuffer (formerly FrameVariableBuffer) no longer depends on ShaderProgram.
  • A new class, UniformBufferBinding has been created which depends on both UniformBuffer and ShaderProgram.
    Instances of this class are held by RenderPipeline.
  • FrameVariable class has been split in two classes: Uniform (for uniform variables contained in a UniformBuffer) and PushUniform (for uniform variables out of a UniformBuffer).

GlRenderSystem

  • Updated to support the features provided by Castor3D.

Techniques

  • DeferredRenderTechnique and DeferredMsaaRenderTechnique are now real deferred rendering techniques, with a light pass per light, taking care of it's impact area.
  • DeferredRenderTechnique is now the default render technique, when none is specified.

PostEffects

  • Added GrayScale post effect.
  • Added FXAA post effect.

Version 0.8.0

Features

General

  • Compiles now with VS >= 2013 and GCC >= 4.9.
  • Direct3D support has eventually been dropped, I don't have time for it.

CastorUtils

  • Point4f and Matrix4x4f can now use SSE2 instructions for computations.
  • All Castor projects are now using UTF-8 texts, using std::string.

Castor3D

  • The skeleton animation system is now finished and working.
  • Removed every XxxRenderer class, except for OverlayRenderer.
  • The topology type is no longer in Camera, but in GeometryBuffers.
  • Engine has been splitted, creating a RenderLoop class, and Managers to create elements, collect them, and retrieve them.
  • SceneFileParser has been extended, to be able to use parsers from external plug-ins.
  • The back frame buffers are retrieved and bindable like other FrameBuffers though you can't create or add attachments to it.
  • Added a debug GPU objects tracking system, to ensure their destruction is made before context destruction.
  • Can now read scenes from zip archive files.
  • The text overlays now can have a horizontal and a vertical alignment.
  • Added an initial zip data folder, Core.zip, which contains basic materials and debug overlays.
  • The shader lighting has been reviewed and fixed.
  • The Scene class has been reworked, to use ObjectManager classes, and ResourceManager views.
  • Now, the ShaderProgram retrieves the vertex inputs layout. This layout is used in Submesh, to create the appropriate GeometryBuffers.
  • Castor3D now renders the scenes using HDR and tone mapping. The default tone mapping configuration will make the render look like there were no HDR enabled.

GlRenderSystem

  • Lights texture now uses Texture Buffer Objects.
  • Removed every GlXxxRenderer class, except for GlOverlayRenderer.
  • Support for OpenGL 1.x has been removed.
  • Support for OpenGL 3.x has been enforced, forcing UBOs, for example.
  • Implemented a GlslWriter, to write GLSL code from C++ source.

Subdividers

  • Implemented a Phong tessellation subdivider.

Importers

  • Implemented a FBX importer plug-in.

Techniques

  • Each render technique is now implemented in its own plug-in.

PostEffects

  • The first post effect plug-in has been implemented: Bloom.

CastorGUI

  • New plug-in, allowing creation of GUIs inside Castor3D scenes.

GuiCommon

  • The whole look and feel has been reworked, using wxAuiManager.
  • Properties are displayed through wxTreeCtrl and wxPropertyGrid, to list objects and view their properties.

Fixed Bugs

CastorUtils

  • Fixed transformation matrices.

Castor3D

  • Fixed hardware instantiation, and instantiation, for meshes with different materials.
  • Fixed a bug in border panel overlays material management.
  • Fixed an overlays bug, on Intel GPU (was due to a real bug in AMD driver that hid the bug).
  • The billboards are now fixed.

Subdividers

  • Fixed PN Triangles subdivider, to use Bezier patches.
  • Updated Loop subdivider.

GlRenderSystem

  • Fixed a crash on Linux, with Intel GPUs.

Version 0.7.0

Features

General

  • Supports x64 compilation
  • Cleaned up a FrameBuffer, GlFrameBuffer and Dx11FrameBuffer.
  • Linux and wxWidgets 2.8 compatibility improved.
  • Added AStyle support.

CastorUtils

  • Modified DynamicLibrary::getFunction, added a template parameter that is the function type, and a method parameter that is the pointer to the function to retrieve so no more casts when using DynamicLibrary::getFunction.
  • Added log level support for Logger.
  • Implemented intersection function in Line3D.
  • That class now has to named constructors : fromPointAndSlope and fromPoints, to avoid confusion between them.
  • Created two classes Size and Position instead of just having a typedef for these.
  • Improved FileParser, now functions have parameters and not only parameters types, and parameters parse themselves.
  • castor::Point now holds a static array as it's members instead of a dynamic one.
  • Removed Unicode file encoding.
  • Added stream indentation support.

Castor3D

  • Modified shaders, they now take care of the shader model, they hold all defined files and sources for each model. The choice of the source is made at compile time, taking the source with the highest supported model.
  • Improved memory occupation, limited overhead of Vertex (152 to 24 bytes) and Face (140 to 16 bytes).
  • Modified Subdivision, now only in Subdivider, no more in Geometry, mesh or Submesh.
  • Implemented Implemented Lights in texture.
  • Added hasParameter and setParameter functions in ShaderObject, to apply matrices from RenderPipeline.
  • Removed ApplyXXXMatrix from IPipelineImpl, now the RenderPipeline applies matrices itself.
  • Added channel for textures (colour, ambient, diffuse, specular, normal, height).
  • Implemented MSAA.
  • Implemented Alpha to Coverage when MSAA is activated.
  • Modified default sources in GlShaderProgram and Dx9ShaderProgram, they are now computed and no more external shader file is needed.
  • Implemented Frame buffers.
  • Submeshes are sorted by Material's alpha in order to render submeshes without alpha before others.
  • Added functions Begin and End in Mesh class to be able to iterate through submeshes without using getSubmesh and getSubmeshCount.
  • Added Material functions Begin and End to retrieve passes in standard way.
  • Added possibility to activate or deactivate deferred rendering, this is also possible from cscn files.
  • Created TechniqueParameters class to be able to pass generic parameters instead of, for example, the samples count.
  • Introducing SamplerState class to group calls to setSamplerState and all relative stuff.
  • Reviewed sizes a bit : Viewport holds the internal size, RenderTarget and RenderWindow hold external size. Modified SceneFileParser, added <size> directive for viewport.
  • Splitted eBUFFER_MODE in BufferAccessType and BufferAccessNature.
  • Modified a bit Uniform in order to take care of eFRAME_VARIABLE_TYPE previously defined for SceneFileParser.
  • Modified Submesh::AddUniforms so it takes a stVERTEX_GROUP structure as a parameter.
  • Introducing Buffer to manage frame variables with OpenGl UBO or DirectX 11 Constants buffer.
  • Implemented initialisation and cleanup of GPU side objects in two events : InitialiseEvent and CleanupEvent.
  • Merged GpuBuffer::Initialise and GpuBuffer::SetShaderProgram functions to ease their use.
  • Removed auto mipmap generation, now if user wants it, he does it with TextureLayout::GenerateMipmaps function.
  • Added DepthStencilState class to manage those buffers states like Direct3D 11 (who does it well).
  • Added blend state, implemented raster state.
  • Put a BlendState instance in Pass and removed rgb/alpha blending from the pass.
  • Removed Context::Enable and Context::Disable, removed RenderState class.
  • Removed setPolygonMode from Context.
  • Moved Render to buffer common code (from FrameBuffer and RenderWindow) into Context::BtoBRender.
  • Implemented mesh instantiation on hardware.
  • Modified Submesh normals generation.
  • Moved materials from Submesh to Geometry.
  • Modified submeshes instance count, to make it specific to the materials used by the submesh instances.

GuiCommon

  • Now ShaderDialog uses wxSizers.
  • Using wxStcEditor to view and edit shaders.
  • Materials windows now use wxSizer classes to place and resize elements.
  • Added possibility to change the material used by a submesh in wxGeometriesListFrame.
  • Corrected few bugs in images loading.
  • Improved StcTextEditor in order to have a better syntactic coloration.

CastorViewer

  • Now MainFrame uses wxSizers.
  • Added command line options :
    • -f/–file to load a scene on startup
    • -h/–help to display help
    • -l/–level to define log level :
      • 0 for debug to errors
      • 1 for release to errors
      • 2 for warnings to errors
      • 3 for errors only.
  • Now loads plug-ins in a thread.
  • Added an "Export" button.

GlRenderSystem

  • Removed GLEW dependency.
  • Implemented OpenGL debug output so I have more verbose debug outputs for OpenGL too.
  • Added GL_MIRRORED_REPEAT.
  • Added GL_TEXTURE_MAX_ANISOTROPY.

Miscellaneous

General

  • Splitted file to have one class per file.

CMake

  • Updated UnitTest integration, Enabled CTest.

CastorUtils

  • Removed all static members and globals.
  • Removed String class, added string.
  • Removed all dependencies to boost, except for thread, for non C++11 compilers.
  • Modified Point, moved functions that shouldn't be in that class in a small helper class : point. It holds normalise, getNormalised, dot, all distance functions, cosTheta, negate.
  • Modified FileParser in order to be able to ignore complete sections without commenting it (such as HLSL shader blocks in GlRenderSystem...).
  • Modified FileParser to take care of parsers parameters.
  • Reduced images memory occupation.
  • Removed Point::link, Point::copy/clopy/clone functions.
  • Replaced macros for cstrnlen, cstrftime, cstrncpy, cfopen, cfopen64, cfseek and cftell by functions in namespace castor.
  • Modified Colour class, it doesn't extend Point4f anymore.
  • Removed macro DECLARE_SHARED_PTR, now using DECLARE_SMART_PTR, so I replaced each XXxPtr by it's equivalent XxxSPtr.

Castor3D

  • Merged Submesh and SmoothingGroup classes.
  • Reduced memory size of vertex buffers.
  • Modified Submesh::computeTangents to take care of each vertex normal.
  • Modified BufferElementGroup so it can't hold anymore its buffer.
  • When initialising Pass, the texture units are re-ordered so the ones with a defined channel come first.
  • Passes now initialise their shaders in Pass::Initialiser instead of trying to do it at each frame.
  • Changed RenderTarget : now it only holds frame buffer and all needed for that. It is now a Renderable so TargetRenderer has been created.
  • RenderWindow no longer extends RenderTarget, but now it has a RenderTarget as a private class member.
  • Created Texture class, StaticTexture and TextureLayout to help implementing render targets.
  • RenderTarget now uses RenderTechnique to make its rendering.
  • Created GeometryBuffers class which holds a Vertex buffer and an Index buffer, they are created by the RenderSystem.
  • Moved RenderTechnique basic frame buffer, texture and depth buffer into RenderTarget.
  • Moved TargetRenderer::PostRender code into RenderWindow.
  • Created WindowRenderer::EndScene function to prepare the render of the RenderTarget's frame buffer into the window.
  • Removed calls to ShaderObject in order to make it more internal to Castor3D.
  • Overlays are no more Renderable, there is one instance of OverlayRenderer class in the OverlayCache. All overlays will be rendered through this instance by the OverlayCache.
  • Modified Scene, added template functions to add, remove or get an object whatever it's type may be (Light, Geometry, Camera, SceneNode).

GlRenderSystem

  • Reviewed Vertex Array Objects, they now hold their buffers so the choice of using it or not is wrapped into it.
  • Geometry shader work in OpenGL, created a shader to show wireframe models with Normals, Tangents and Bitangents.

Fixed bugs

General

  • Added Destroy functions for each create function in plug-ins, so creation and deletion is made in DLL memory space (for Windows).
  • Added ASSIMP importer plug-in to import actually unsupported file types, modified ImporterPlugin::getExtensions to be able to retrieve an array of pairs <extension, file="" type="">.
  • Modified Importers so no more memory leaks are detected with Visual Studio.

CMake

  • Added possibility to change binaries directory and also MSVC temporary binaries directory, through PROJECTS_BINARIES_OUTPUT_PATH and PROJECTS_BINTEMP_OUTPUT_PATH.
  • Added possibility to activate code profiling with MSVC through PROJECTS_PROFILING boolean value.

CastorUtils

  • Modified Image to make FreeImage load images by path and no more by handle (caused trouble with some formats).
  • Repaired a matrix trouble when rendering overlays.
  • Corrected recursive transformations.

Castor3D

  • Repaired alpha submeshes that were not displayed.
  • Corrected mipmaps generation.

CastorViewer

  • Moved m_pCastor3D destruction and ImageLoader::Cleanup in the OnDestroy event handler.

GlRenderSystem

  • Corrected a bug in doGetDeferredShaderSource.
  • Corrected mipmaps generation in GlStaticTexture and GlDynamicTexture.
  • Corrected the gloss map in GLSL computed programs.

ObjImporter

  • Corrected materials and textures import.

Version 0.6.1.2

adds

  • Created Dx9Renderer to render with Direct3D 9. Stills things to correct, in shaders and matrices, but it's almost done.
  • Created different files for OpenGL contexts (X11, Gtk, Msw), X11 and Gtk still untested.
  • Created a splash screen for CastorViewer and CastorShape, created a dialog box in order to choose the renderer at startup.
  • Added a small app to converet from an image to a XPM.
  • Added new features to scene files (alpha_rejection, rgb_blend, alpha_blend, hl_shader_program, ...)

Modifications

  • Optimised CMakeLists file and 'cmake_modules' files in order to take care of various configurations in a better way.
  • Revised VertexBuffers and IndexBuffers, introducing VertexDeclaration and BufferElementGroup, so we can create VertexBuffersof customisable types.
  • Vertex class now derives from BufferElementGroup.
  • TextureEnvironment are going to disappear in the next version, now multitexturing management is done with passes and texture units.
  • Suppressed GLU dependencies.

Bugs

  • Trouble with Direct3D matrices (maybe differences between right-handed / left-handed).
  • Trouble with HLSL shaders, surely linked to previous trouble.
  • Still troubles with Cg shaders (not worked on it).

Version 0.6.1.1

adds

  • Created a CMakeLists file to generate the solution from CMake.
  • Reorganised folders to make them more compliant with CMake.
  • Splitted Plugin class in 3 parts : Renderer, Divider et Importer.
  • Created one project per importer (OBJ, PLY, MD2, MD3, 3DS, ...)
  • PNTrianglesDivider is left in Castor3D because it is sstill used by Icosahedron, LoopDivider is exported in a plug-in.
  • Began Cg shaders implementation. This implies a scene file modification because in Cg, uniform variables are are linked to a shader instead of being linked to the whole program. Still buggy.

Modifications

  • Suppressed FreeImagePlus dependencies.
  • Vertex, Attribute and Index buffers are now created by RenderSystem so they can be created out of the renderers.
  • Suppressed Singletons for the Managers (Image, Font, Scene, Material, Animation and Mesh).
  • Remerged SceneNode classes.
  • Created IdPoint class, it is a point with just an index. Submes::addPoint creates now IdPoints and Submesh::addFace uses them to create the vertex.
  • Subdividers can subdivide in a thread in order not to freeze the main thread. It is possible to define a function to use at the end of the subdivision (cf. CastorShape).

Corrections

  • Corrected LoopDivider which didn't reposition the Vertex

Version 0.6.1.0

adds

  • Using std or tr1 or boost smart pointers.
  • Created OpenGlCommon for common treatments between GL2RenderSystem and GL3RenderSystem
  • Created class RenderPipeline which performs the matrix computings and other functions (frustum, perspective, ortho, ...)

Modifications

  • Modified MemoryManager, added a template class MemoryTraced which overload new, delete new [] et delete [] operators in order to have better trace of allocations and deallocations. Each Castor class derive from this one and 3 files are created in root folder to log allocations, deallocations : memoryleaks.log, memoryalloc.log and memorydealloc.log
  • TransformationUniform no longer exists, it is now a collection of functions which computes 4x4 matrix operations
  • Modification SceneNode management : base class NodeBase holds the informations that were in SceneNode, 3 derived classes (GeometryMaterial, CameraMaterial et LightMaterial) take care of each category specificities.
  • MovableObject class now has less features (name and NodeBase), Light and Camera now derive from it
  • Renamed UniformVariable to .
  • OpenGL 3.x/4.x now fully supported.
  • Modified Vertex class in order to make them include texture coordinates and normals in order to have only 1 vertex buffer instead of 3 in a mesh.

Corrections

  • Corrected the shutdown crash.
  • Corrected the black render with OpenGL 3.x

Version 0.6.0.0

adds

  • Added a projection/normal and view matrices management class, in order to suppress the fixed pipeline support in OpenGl renderers.
  • Added personnal smart pointers.
  • Added an agle management class in order not to take care of degrees or radians.
  • Added a path class, to manage slashes or backslashes according to OS.
  • Created thread safe containers derived from STL ones (vector, list, map, multimap, set).
  • Splitted GLRenderer in two parts : one compatible OpenGL 2.x and before (GL2RenderSystem), one compatible OpenGL3.x et after (GL3RenderSystem).
  • GL2RenderSystem : according to client configuration, the fixed pipe is suppressed or keeped

Modifications

  • Modified thread management, leaving the user choosing between Win32, MFC or boost.
  • Modified point and matrices classes.
  • Modified String class which now is independant from MBCS or Unicode.
  • Modified File class which now only uses streams.
  • Modified the render system, added a class Renderable used to create associated renderer in order to ease the creation of derived classes (submesh, scene node, light, camera...)
  • Changed scenes/materials/meshes files name (respectively cscn/cmtl/cmsh)

Corrections

  • Protected managers with recursive mutexes to avoid random crashes.

Bugs

  • Still a crash at shutdown, supposedly due to shaders.
  • In GL3RenderSystem, I've got a black screen (?!?) but transformations seem to be correct.

Version 0.5.0.1

adds

  • Tangent space is computed and available in GLSL shaders.
  • Only tangent is computed, bitangent can be in the shader with a cross product.
  • To access to the tangent you must declare the following attribute in the vertex shader :
  • attribute vec3 tangent;

Modifications

  • The points classes have their members in a union so you can call it as you wish (xyz, rgb, left right top bottom)

Corrections

  • Corrected the crash on shutdown. It was due to VBOs which are now destroyed in a final render loop.