فهرست منبع

More work on manuals and documentation

BearishSun 10 سال پیش
والد
کامیت
3b2a4ab050

+ 0 - 2
Documentation/Manuals/Native/index.md

@@ -24,8 +24,6 @@ All classes are categorized into three primary groups:
  
 You should read the [architecture](@ref architecture) manual for a more detailed breakdown of the architecture.
 
-_Be aware that non-public (private, protected, internal) methods/classes are not available in the API reference, but these objects are documented nonetheless. User has to look into the source code for this documentation._
-
 <a class="el" href="modules.html">Visit</a>
 
 # Class list # {#mainpage_c}

+ 26 - 0
Documentation/Manuals/Native/manuals.md

@@ -0,0 +1,26 @@
+Manuals									{#manuals}
+===============
+[TOC]
+
+Here you will find a list of all manuals relating to Banshee's native code and their short descriptions. The manuals are for the most part unrelated so you can read them in the order needed.
+
+Name                                      | Description
+------------------------------------------|-------------
+[Getting started](@ref gettingStarted)    | Shows how to perform some basic operations using Banshee's user-facing interface. Allows you to get a general idea of how Banshee works.
+[Architecture](@ref architecture)         | Gives you an overview of the entire architecture of Banshee. Useful starting point for those modifying engine internals as it provides a way to identify major systems.
+[Custom GUI elements](@ref customGUI)     | Shows you how to create custom GUI elements, manually render text or modify GUI system in a general way.
+[Custom importers](@ref customImporters)  | Shows you how to create importers that handle conversion of third party resources into engine ready formats.
+[Custom plugins](@ref customPlugins)      | Shows you how to create custom plugins that can be loaded by Banshee.
+[Custom resources](@ref customResources)  | Shows you how to create brand new resource types.
+[Custom renderer](@ref customRenderer)    | Shows you how to create a custom renderer so you may fully customize the look of your application.
+[Core thread](@ref coreThread)            | Explains how core (rendering) thread works, how it interacts with simulation thread, what are core objects and how to create your own.
+[Game objects](@ref gameObjects)          | Explains what are scene objects and components and how can you use them to create your scene.
+[RTTI](@ref rtti)                         | Shows you how to add run-time type information for your objects.
+[Scripting](@ref scripting)               | Shows you how to interact with the scripting system, and how to expose C++ objects to the scripting API.
+[Render API](@ref renderAPI)              | Explains how to use the render API to use the graphics pipeline and draw objects. 
+[Textures](@ref textures)                 | Shows you how to create, use and manipulate textures.
+[Meshes](@ref meshes)                     | Shows you how to create, use and manipulate textures.
+[Utilities](@ref utilities)               | Provides an overview of a variety of utility systems used throughout Banshee.
+[Quick reference](@ref quickref)          | Provides a few bits of commonly required information, that might be hard to remember otherwise.
+[Porting](@ref porting)                   | Information about how to go on about porting Banshee to a different system.
+[Code style](@ref style)                  | Information about code style used when writing Banshee.

+ 5 - 1
Documentation/Manuals/Native/plugins.md

@@ -49,7 +49,11 @@ The exact implementations of these methods differ depending for which system are
 # Custom plugins {#customPlugins_b}
 Custom plugins can do whatever you wish, engine has no expectations from them so its up to your to load/unload them and to call their methods.
 
-To load a custom plugin you can use the @ref BansheeEngine::DynLibManager "DynLibManager". It has two methods:
+To load a custom plugin you can use:
+ - @ref BansheeEngine::CoreApplication::loadPlugin "loadPlugin" - Accepts the name of the plugin library and outputs the library. Optionally you may also pass a parameter to the `loadPlugin` method, if yours accepts one.
+ - @ref BansheeEngine::CoreApplication::unloadPlugin "unloadPlugin" - To unload a previously loaded plugin. 
+
+Both of those methods internally call @ref BansheeEngine::DynLibManager "DynLibManager". You can use it directly if you do not need the plugin interface (`loadPlugin` and etc.), it has two methods:
  - @ref BansheeEngine::DynLibManager::load "DynLibManager::load" - Accepts a file name to the library, and returns the @ref BansheeEngine::DynLib "DynLib" object if the load is successful or null otherwise. 
  - @ref BansheeEngine::DynLibManager::unload "DynLibManager::unload" - Unloads a previously loaded library.
  

+ 37 - 0
Documentation/Manuals/Native/profiling.md

@@ -0,0 +1,37 @@
+Profiling code								{#profiling}
+===============
+[TOC]
+
+Code profiling is an important process to determine performance bottlenecks. Profiling measures code execution times, memory allocations or various other resource usage. Banshee supports CPU and GPU profiling.
+
+# CPU profiling {#profiling_a}
+CPU profiler allow you to measure execution times of code executing on the CPU. It will also track the number of memory operations. CPU profiling is handled by the @ref BansheeEngine::ProfilerCPU "ProfilerCPU" module. You use that module to set up sampling points that determine which areas of code to measure, and to retrieve reports telling you the measured results.
+
+The profiler supports two separate measuring modes, the normal mode measures time in milliseconds, while the precise mode measures time in CPU cycles. The precise mode does have drawbacks as it is inacurrate for longer code as it will not account for OS context switches and similar. Usually you will be using the normal measuring mode, and reserve the precise mode when you need to know exactly how many cycles some relatively small operation takes.
+
+To start profiling, issue a call to @ref BansheeEngine::ProfilerCPU::beginSample "ProfilerCPU::beginSample" or @ref BansheeEngine::ProfilerCPU::beginSamplePrecise "ProfilerCPU::beginSamplePrecise". Both of these methods accept a string that can be used for identifying the result when the profiler report is generated. You must follow each of these with a call to @ref BansheeEngine::ProfilerCPU::endSample "ProfilerCPU::endSample" or @ref BansheeEngine::ProfilerCPU::endSamplePrecise "ProfilerCPU::endSamplePrecise", which take the same identifier string as their counterparts. Any code executed between these calls will be measured.
+
+You can also nest profiling calls, by calling another `beginSample` within an existing `beginSample` call.
+
+Once you are done sampling your code, call @ref BansheeEngine::ProfilerCPU::generateReport() "ProfilerCPU::generateReport". This will return a @ref BansheeEngine::CPUProfilerReport "CPUProfilerReport" which contains both normal and precise sampling data as a hierarchy of samples. You can then use this data to print it on the screen, save it to a log, or similar.
+
+You may also use the built-in @ref BansheeEngine::ProfilerOverlay component to automatically display contents of both CPU and GPU profilers every frame, which will save you from manually parsing the profiler reports. Just add it to the scene and assign it a camera to render to.
+
+If you just want to clear profiling data without generating a report, call @ref BansheeEngine::ProfilerCPU::reset "ProfilerCPU::reset()".
+
+## Threads {#profiling_b}
+The profiler is thread-safe, but if you will be profiling code on threads not managed by the engine, you must manually call @ref BansheeEngine::ProfilerCPU::beginThread "ProfilerCPU::beginThread" before any sample calls, and @ref BansheeEngine::ProfilerCPU::endThread "ProfilerCPU::endThread" after all sample calls.
+
+## Overhead {#profiling_c}
+Profiler code itself will introduce a certain amount of overhead which will slightly skew profiling results. The profiler attempts to estimate its error, which is reported in the returned reports. You can choose to take this into consideration if you need really precise results.
+
+# GPU profiling {#profiling_d}
+GPU profiling is handled through @ref BansheeEngine::ProfilerGPU "ProfilerGPU" module, which allows you to track execution times of GPU operations, as well as various resource usages.
+
+Similar to CPU profiling, you issue sampling calls using @ref BansheeEngine::ProfilerGPU::beginSample "ProfilerGPU::beginSample" and @ref BansheeEngine::ProfilerGPU::endSample "ProfilerGPU::endSample". Any GPU commands executed between these two calls will be measured.
+
+Each GPU sample will measure the time to took the execute the command on the GPU, but will also measure various resource usage stats. For example it will measure number of draw calls, number of vertices/primitives drawn, render state switches, and similar.
+
+All this information will be contained in a @ref BansheeEngine::GPUProfilerReport "GPUProfilerReport". To retrieve the report use @ref BansheeEngine::ProfilerGPU::getNumAvailableReports() "ProfilerGPU::getNumAvailableReports()" and @ref BansheeEngine::ProfilerGPU::getNextReport "ProfilerGPU::getNextReport()". 
+
+GPU profiler always generates only a single report per frame. It will queue the reports, and the above method will return the oldest report and remove it from the queue. Only a certain small number of reports are queued, and old reports will be lost if you don't retrieve them every few frames.

+ 13 - 0
Documentation/Manuals/Native/quickref.md

@@ -0,0 +1,13 @@
+Quick reference									{#quickref}
+===============
+[TOC]
+
+Here is some commonly required information that is assumed throughout Banshee.
+ - Right handed coordinate system is used
+ - Camera is looking towards negative z axis
+ - Screen/window space origin is located in the top left corner
+ - Normalized device coordinates origin is located in the bottom left corner
+ - Clip space ranges from -1 to 1 for x, y and depth
+ - Clockwise faces are considered as front facing
+ - Matrices are stored in row major format
+ - Vectors are interpreted as column vectors

+ 65 - 0
Documentation/Manuals/Native/style.md

@@ -0,0 +1,65 @@
+Coding style							{#style}
+===============
+[TOC]
+
+This document provides information on the coding style that should be used when contributing to Banshee. Although you should remember the notes in this document, you can get away without remembering all of this by just following the style in existing code. This guide applies only to C++ code.
+
+Guidelines
+ - Documentation
+   - Write JavaDoc style documentation.
+   - Document every class/structure/enum.
+   - Document every non-trivial method (i.e. anything that you can't deduce what it does from its name).
+   - You are allowed to omit documenting method parameters if its clear from the general method descriptions what they do.
+   - Documentation of fields in classes and enums is optional if it's clear what they do or their documentation is available elsewhere.
+   - Write RELEVANT documentation. For example `/** Gets value */ getValue(); ` is pointless documentation. Try to give the user a deeper understanding of what the code does from what he can already deduce by reading the name of the method.
+   - Use \@`addtogroup` to group classes into relevant sections.
+    - Use separate groups for code that can be considered internal (i.e. more specialized, not meant for normal use) to clean up the user-facing documentation.
+	- Use \@`name Internal` to group internal methods within a class for a similar purpose.
+   - Documentation should produce no Doxygen warnings when generating.
+   - If it is not obvious for which thread is a class/method meant to be used on, note it in the documentation.
+ - Prefixes/Sufixes
+   - Use "_" prefix to identify a method is internal. A method is internal if it is public but it is not meant to be used by the normal user. You can alternatively use a private method and C++ `friend` syntax. Although the former approach is sometimes preferable to avoid exposing too much of the interface.
+   - Use "Core" suffix to note that a class is used on the core thread, but also has a sim-thread counterpart. The sim-thread counterpart should share the name of the class but without the "Core" suffix.
+   - Use "Base" suffix to mark base classes unless a more generalized name is more appropriate.
+   - Prefix templated base classes/structs with a "T" unless a more generalized name is more appropriate.
+   - Use "C" prefix for component implementations.
+ - Naming
+  - Methods, fields and local variables should be written in camelCase with first letter as lowercase (e.g. `void myMethod(); int myVar;`).
+  - Class/struct/enum names should be in PascalCase with first letter as uppercase (e.g. `class MyClass`).
+  - Non-public class/struct fields should be prefixed with "m", followed by a capital first letter (e.g. `int mClassMemberField;`).
+  - Non-constant global variables and methods should be prefixed with an "g", followed by a capital first letter (e.g. `void gApplication();`).
+  - Constant global variables should be written in all caps with underscores separating the words (e.g. `int NUM_ELEMENTS = 5;`).
+  - Macros should be written in all caps with underscores separating the words (e.g. \#`define BS_EXCEPT`).
+  - Static non-constant variables should be prefixed with an "s", followed by a capital first letter (e.g. `bool sIsInitialized;`).
+  - Static constant variables should be written in all caps with underscores separating the words (e.g. `int NUM_ELEMENTS = 5;`).
+ - Brackets/Spacing
+  - Use indentation for new blocks
+  - Use tabs for one indentation step
+  - Brackets {} should always be on their own line unless they're empty or for small method definitions directly in class declaration
+  - Conditionals or loops that have just one line of content should omit the brackets
+  - Always put a space after a semicolon (e.g. for(int i = 0; i < 5; i++)).
+  - Always put a space between operators (e.g. 5 + 2).
+  - Separate meaningful parts of the code in a method with empty lines
+ - If method doesn't modify data, always mark it as const (getters especially)
+ - Always pass non-primitive parameters by reference unless `null` is a valid value in which case use a pointer
+ - Reference/pointer parameters that won't be modified by a function should always be `const`
+ - Prefer using `enum class` to `enum`
+ - Use built-in typedefs for standard library containers (e.g. `Vector`) and shared pointers (`SPtr`).
+ - Don't allocate memory using `new/delete` or `malloc/free`, instead use Banshee's allocators
+ - Carefully construct class interfaces, keeping only relevant methods public and everything else private/protected/internal
+ - No code warnings under default compiler warning settings are allowed. Fix all your warnings or if absolutely not possible isolate that bit of code and disable that specific warning (but only in that bit of code).
+ - Prefer putting helper types (e.g. structs, enums) to the bottom of the include file if possible and keep the first class in the file the primary class
+ - Put everything in BansheeEngine namespace unless specializing code for a third party library
+ - Never use `using namespace` in a header
+ - Public fields should be avoided (except for simple structures) and instead getter/setter methods should be provided
+ - In a class list elements in this order:
+    - typedefs
+    - nested classes/structures
+	- public methods
+	- public fields
+	- internal methods
+	- internal fields
+	- protected methods
+	- protected fields
+	- private methods
+    - private fields

+ 1 - 1
Source/BansheeCore/Include/BsCoreApplication.h

@@ -47,7 +47,7 @@ namespace BansheeEngine
 			 */
 			void runMainLoop();
 
-			/**	Stops a (infinite) main loop from running. The loop will complete its current cycle before stopping. */
+			/**	Stops the (infinite) main loop from running. The loop will complete its current cycle before stopping. */
 			void stopMainLoop();
 
 			/** Changes the maximum FPS the application is allowed to run in. Zero means unlimited. */

+ 0 - 4
Source/BansheeCore/Include/BsCorePrerequisites.h

@@ -33,10 +33,6 @@
  *	Materials, shaders and related functionality.
  */
 
-/** @defgroup Platform Platform
- *	Interface for interacting with the platform (OS).
- */
-
  /** @defgroup Profiling Profiling
   *	Measuring CPU and GPU execution times and memory usage.
   */

+ 3 - 3
Source/BansheeCore/Include/BsGpuProgram.h

@@ -97,7 +97,7 @@ namespace BansheeEngine
 		virtual ~GpuProgram() { }
 
 		/**
-		 * Returns true if shader was successfully compiled. 
+		 * Returns true if the program was successfully compiled. 
 		 *
 		 * @note	Only valid after core thread has initialized the program.
 		 */
@@ -135,7 +135,7 @@ namespace BansheeEngine
 		 * Creates a new GPU program using the provided source code. If compilation fails or program is not supported
 		 * isCompiled() with return false, and you will be able to retrieve the error message via getCompileErrorMessage().
 		 *
-		 * @param[in]	source				Source code to compile the shader from.
+		 * @param[in]	source				Source code to compile the program from.
 		 * @param[in]	entryPoint			Name of the entry point function, for example "main".
 		 * @param[in]	language			Language the source is written in, for example "hlsl" or "glsl".
 		 * @param[in]	gptype				Type of the program, for example vertex or fragment.
@@ -188,7 +188,7 @@ namespace BansheeEngine
 		/** Returns whether this program can be supported on the current renderer and hardware. */
         virtual bool isSupported() const;
 
-		/** Returns true if shader was successfully compiled. */
+		/** Returns true if program was successfully compiled. */
 		virtual bool isCompiled() const { return mIsCompiled; }
 
 		/**	Returns an error message returned by the compiler, if the compilation failed. */

+ 3 - 3
Source/BansheeCore/Include/BsSceneObject.h

@@ -65,9 +65,6 @@ namespace BansheeEngine
 		 */
 		void destroy(bool immediate = false);
 
-		/** @copydoc GameObject::_setInstanceData */
-		void _setInstanceData(GameObjectInstanceDataPtr& other) override;
-
 		/**	Returns a handle to this object. */
 		HSceneObject getHandle() const { return mThisHandle; }
 
@@ -98,6 +95,9 @@ namespace BansheeEngine
 		 *  @{
 		 */
 
+		/** @copydoc GameObject::_setInstanceData */
+		void _setInstanceData(GameObjectInstanceDataPtr& other) override;
+
 		/** Register the scene object with the scene and activate all of its components. */
 		void _instantiate();
 

+ 6 - 0
Source/BansheeCore/Include/BsTexture.h

@@ -245,6 +245,10 @@ namespace BansheeEngine
 		 */
 		static HTexture create(const PixelDataPtr& pixelData, int usage = TU_DEFAULT, bool hwGammaCorrection = false);
 
+		/** @name Internal 
+		 *  @{
+		 */
+
 		/**
 		 * @copydoc	create(TextureType, UINT32, UINT32, UINT32, int, PixelFormat, int, bool, UINT32)
 		 *
@@ -269,6 +273,8 @@ namespace BansheeEngine
 		 */
 		static TexturePtr _createPtr(const PixelDataPtr& pixelData, int usage = TU_DEFAULT, bool hwGammaCorrection = false);
 
+		/** @} */
+
     protected:
 		friend class TextureManager;
 

+ 2 - 0
Source/BansheeCore/Include/BsVertexDeclaration.h

@@ -98,7 +98,9 @@ namespace BansheeEngine
 		UINT16 mIndex;
     };
 
+	/** @cond SPECIALIZATIONS */
 	BS_ALLOW_MEMCPY_SERIALIZATION(VertexElement);
+	/** @endcond */
 
 	/**	Contains information about a vertex declaration. */
 	class BS_CORE_EXPORT VertexDeclarationProperties

+ 1 - 1
Source/BansheeCore/Source/BsCoreApplication.cpp

@@ -202,7 +202,7 @@ namespace BansheeEngine
 
 			Platform::_update();
 			DeferredCallManager::instance()._update();
-			gTime().update();
+			gTime()._update();
 			gInput()._update();
 			// RenderWindowManager::update needs to happen after Input::update and before Input::_triggerCallbacks,
 			// so that all input is properly captured in case there is a focus change, and so that

+ 1 - 1
Source/BansheeEditor/Include/BsEditorPrerequisites.h

@@ -67,7 +67,7 @@
  *  Entry point into the editor application.
  */
 
-/** @defgroup Internal-Core [INTERNAL]
+/** @defgroup Internal-Editor [INTERNAL]
  *	Low-level classes and methods not meant for normal use, useful for those that are modifying the engine.
  *  @{
  */

+ 1 - 9
Source/BansheeEngine/Include/BsPrerequisites.h

@@ -13,10 +13,6 @@
  *  @{
  */
 
-/** @defgroup Renderer-Engine Renderer
-  *	Abstract interface and helper functionality for rendering scene objects and other geometry.
-  */
-
 /** @defgroup 2D 2D
   *	Two dimensional geometry (sprites).
   */
@@ -51,15 +47,11 @@
  *  %Platform specific functionality.
  */
 
-/** @defgroup Script Script
- *  Interaction with scripting languages and libraries.
- */
-
 /** @defgroup Application-Engine Application
  *  Entry point into the application.
  */
 
-/** @defgroup Internal-Core [INTERNAL]
+/** @defgroup Internal-Engine [INTERNAL]
  *	Low-level classes and methods not meant for normal use, useful for those that are modifying the engine.
  *  @{
  */

+ 2 - 0
Source/BansheeMono/Include/BsMonoAssembly.h

@@ -16,6 +16,7 @@ namespace BansheeEngine
 	class BS_MONO_EXPORT MonoAssembly
 	{
 	public:
+		/** @cond INTERNAL */
 		/**	Used for uniquely identifying a managed class, normally for use in containers. */
 		struct ClassId
 		{
@@ -36,6 +37,7 @@ namespace BansheeEngine
 			String name;
 			::MonoClass* genericInstance;
 		};
+		/** @endcond */
 
 	public:
 		virtual ~MonoAssembly();

+ 4 - 0
Source/BansheeMono/Include/BsMonoClass.h

@@ -14,6 +14,8 @@ namespace BansheeEngine
 	/**	Contains information about a single Mono (managed) class. */
 	class BS_MONO_EXPORT MonoClass
 	{
+		/** @cond INTERNAL */
+
 		/** Used for uniquely identifying a method in a managed class, normally for use in containers. */
 		struct MethodId
 		{
@@ -33,6 +35,8 @@ namespace BansheeEngine
 			UINT32 numParams;
 		};
 
+		/** @endcond */
+
 	public:
 		~MonoClass();
 

+ 6 - 0
Source/BansheeUtility/Include/BsBinarySerializer.h

@@ -72,6 +72,10 @@ namespace BansheeEngine
 		 */
 		SPtr<IReflectable> decode(UINT8* data, UINT32 dataLength);
 
+		/** @name Internal 
+		 *  @{
+		 */
+
 		/**
 		 * Encodes an object into an intermediate representation.
 		 *
@@ -105,6 +109,8 @@ namespace BansheeEngine
 		 */
 		SPtr<IReflectable> _decodeIntermediate(const SPtr<SerializedObject>& serializedObject);
 
+		/** @} */
+
 	private:
 		struct ObjectMetaData
 		{

+ 3 - 3
Source/BansheeUtility/Include/BsRTTIPrerequisites.h

@@ -147,11 +147,11 @@ namespace BansheeEngine
 	};
 
 	/**
-	 * Tell the RTTI system that the specified type may be serialized just by using a memcpy.
+	 * Notify the RTTI system that the specified type may be serialized just by using a memcpy.
 	 *
-	 * @note	Internally this creates a basic RTTIPlainType specialization for the type.
+	 * @note	Internally this creates a basic RTTIPlainType<T> specialization for the type.
 	 * 
-	 * @see		RTTIPlainType
+	 * @see		RTTIPlainType<T>
 	 */
 #define BS_ALLOW_MEMCPY_SERIALIZATION(type)					\
 	template<> struct RTTIPlainType<type>					\

+ 24 - 7
Source/BansheeUtility/Include/BsRTTIType.h

@@ -22,65 +22,80 @@ namespace BansheeEngine
 	 *  @{
 	 */
 
+	/** Similar to BS_PLAIN_MEMBER but allows you to specify name of the field and the variable it's referencing separately. */
 #define BS_PLAIN_MEMBER_NAMED(name, field)								\
 	decltype(OwnerType::##field)& get##name(OwnerType* obj) { return obj->##field; }				\
 	void set##name(OwnerType* obj, decltype(OwnerType::##field)& val) { obj->##field = val; } 
 
+	/** Similar to BS_REFL_MEMBER but allows you to specify name of the field and the variable it's referencing separately. */
 #define BS_REFL_MEMBER_NAMED(name, field)								\
 	decltype(OwnerType::##field)& get##name(OwnerType* obj) { return obj->##field; }				\
 	void set##name(OwnerType* obj, decltype(OwnerType::##field)& val) { obj->##field = val; } 
 
+	/** Similar to BS_REFLPTR_MEMBER but allows you to specify name of the field and the variable it's referencing separately. */
 #define BS_REFLPTR_MEMBER_NAMED(name, field)								\
 	decltype(OwnerType::##field) get##name(OwnerType* obj) { return obj->##field; }				\
 	void set##name(OwnerType* obj, decltype(OwnerType::##field) val) { obj->##field = val; } 
 
+	/** Shortcut for defining getter/setter methods for a RTTI plain field. */
 #define BS_PLAIN_MEMBER(name)								\
 	decltype(OwnerType::##name)& get##name(OwnerType* obj) { return obj->##name; }				\
 	void set##name(OwnerType* obj, decltype(OwnerType::##name)& val) { obj->##name = val; } 
 
+	/** Shortcut for defining getter/setter methods for a RTTI reflectable field. */
 #define BS_REFL_MEMBER(name)								\
 	decltype(OwnerType::##name)& get##name(OwnerType* obj) { return obj->##name; }				\
 	void set##name(OwnerType* obj, decltype(OwnerType::##name)& val) { obj->##name = val; } 
 
+	/** Shortcut for defining getter/setter methods for a RTTI reflectable pointer field. */
 #define BS_REFLPTR_MEMBER(name)								\
 	decltype(OwnerType::##name) get##name(OwnerType* obj) { return obj->##name; }				\
 	void set##name(OwnerType* obj, decltype(OwnerType::##name) val) { obj->##name = val; } 
 
+	/** Registers a plain field defined with BS_PLAIN_MEMBER or BS_PLAIN_MEMBER_NAMED with the RTTI object. */
 #define BS_ADD_PLAIN_FIELD(name, id) \
 	addPlainField(#name, id##, &MyType::get##name, &MyType::set##name);
 
+	/** Registers a plain field defined with BS_REFL_MEMBER or BS_REFL_MEMBER_NAMED with the RTTI object. */
 #define BS_ADD_REFL_FIELD(name, id) \
 	addReflectableField(#name, id##, &MyType::get##name, &MyType::set##name);
 
+	/** Registers a plain field defined with BS_REFLPTR_MEMBER or BS_REFLPTR_MEMBER_NAMED with the RTTI object. */
 #define BS_ADD_REFLPTR_FIELD(name, id) \
 	addReflectablePtrField(#name, id##, &MyType::get##name, &MyType::set##name);
 
+	/** Shortcut for defining getter/setter methods for a RTTI plain Vector<T> field. */
 #define BS_PLAIN_MEMBER_VEC(name)								\
 	std::common_type<decltype(OwnerType::##name)>::type::value_type& get##name(OwnerType* obj, UINT32 idx) { return obj->##name[idx]; }				\
 	void set##name(OwnerType* obj, UINT32 idx, std::common_type<decltype(OwnerType::##name)>::type::value_type& val) { obj->##name[idx] = val; }		\
 	UINT32 getSize##name(OwnerType* obj) { return (UINT32)obj->##name.size(); }	\
 	void setSize##name(OwnerType* obj, UINT32 val) { obj->##name.resize(val); }
 
+	/** Shortcut for defining getter/setter methods for a RTTI reflectable Vector<T> field. */
 #define BS_REFL_MEMBER_VEC(name)								\
 	std::common_type<decltype(OwnerType::##name)>::type::value_type& get##name(OwnerType* obj, UINT32 idx) { return obj->##name[idx]; }				\
 	void set##name(OwnerType* obj, UINT32 idx, std::common_type<decltype(OwnerType::##name)>::type::value_type& val) { obj->##name[idx] = val; }		\
 	UINT32 getSize##name(OwnerType* obj) { return (UINT32)obj->##name.size(); }	\
 	void setSize##name(OwnerType* obj, UINT32 val) { obj->##name.resize(val); }
 
+	/** Shortcut for defining getter/setter methods for a RTTI reflectable pointer Vector<T> field. */
 #define BS_REFLPTR_MEMBER_VEC(name)								\
 	std::common_type<decltype(OwnerType::##name)>::type::value_type get##name(OwnerType* obj, UINT32 idx) { return obj->##name[idx]; }				\
 	void set##name(OwnerType* obj, UINT32 idx, std::common_type<decltype(OwnerType::##name)>::type::value_type val) { obj->##name[idx] = val; }		\
 	UINT32 getSize##name(OwnerType* obj) { return (UINT32)obj->##name.size(); }	\
 	void setSize##name(OwnerType* obj, UINT32 val) { obj->##name.resize(val); }
 
+	/** Registers a plain array field defined with BS_PLAIN_MEMBER_VEC with the RTTI object. */
 #define BS_ADD_PLAIN_FIELD_ARR(name, id) \
 	addPlainArrayField(#name, id##, &MyType::get##name, &MyType::getSize##name, \
 	&MyType::set##name, &MyType::setSize##name);
 
+	/** Registers a reflectable object array field defined with BS_PLAIN_MEMBER_VEC with the RTTI object. */
 #define BS_ADD_REFL_FIELD_ARR(name, id) \
 	addReflectableArrayField(#name, id##, &MyType::get##name, &MyType::getSize##name, \
 	&MyType::set##name, &MyType::setSize##name);
 
+	/** Registers a reflectable pointer array field defined with BS_PLAIN_MEMBER_VEC with the RTTI object. */
 #define BS_ADD_REFLPTR_FIELD_ARR(name, id) \
 	addReflectablePtrArrayField(#name, id##, &MyType::get##name, &MyType::getSize##name, \
 	&MyType::set##name, &MyType::setSize##name);
@@ -123,13 +138,6 @@ namespace BansheeEngine
 		/** Returns true if current RTTI class is derived from @p base. (Or if it is the same type as base) */
 		virtual bool isDerivedFrom(RTTITypeBase* base) = 0;
 
-		/**
-		 *  Called by the RTTI system when a class is first found in order to form child/parent class hierarchy.
-		 *
-		 * @note	Internal method.
-		 */
-		virtual void _registerDerivedClass(RTTITypeBase* derivedClass) = 0;
-
 		/** Creates a new instance of the class owning this RTTI type. */
 		virtual std::shared_ptr<IReflectable> newRTTIObject() = 0;
 
@@ -498,6 +506,15 @@ namespace BansheeEngine
 		 */
 		RTTIField* findField(int uniqueFieldId);
 
+		/** @name Internal 
+		 *  @{
+		 */
+
+		/** Called by the RTTI system when a class is first found in order to form child/parent class hierarchy. */
+		virtual void _registerDerivedClass(RTTITypeBase* derivedClass) = 0;
+
+		/** @} */
+
 	protected:
 		/**
 		 * Tries to add a new field to the fields array, and throws an exception if a field with the same name or id 

+ 6 - 0
Source/BansheeUtility/Include/BsServiceLocator.h

@@ -29,6 +29,10 @@ namespace BansheeEngine
 		 */
 		static T* instance() { return mService; }
 
+		/** @name Internal 
+		 *  @{
+		 */
+
 		/** Starts providing a new service when "instance()" is called. Replaces the previous service. */
 		static void _provide(T* service)
 		{
@@ -47,6 +51,8 @@ namespace BansheeEngine
 			mService = nullptr;
 		}
 
+		/** @} */
+
 	private:
 		static T* mService;
 	};

+ 2 - 1
Source/BansheeUtility/Include/BsStringID.h

@@ -12,7 +12,8 @@ namespace BansheeEngine
 	 */
 
 	/**
-	 * A string identifier that provides very fast comparisons to other string ids.
+	 * A string identifier that provides very fast comparisons to other string identifiers. Significantly faster than
+	 * comparing raw strings.
 	 *
 	 * @note	
 	 * Essentially a unique ID is generated for each string and then the ID is used for comparisons as if you were using 

+ 7 - 1
Source/BansheeUtility/Include/BsTime.h

@@ -71,8 +71,14 @@ namespace BansheeEngine
 		 */
 		UINT64 getStartTimeMs() const { return mAppStartTime; }
 
+		/** @name Internal 
+		 *  @{
+		 */
+
 		/** Called every frame. Should only be called by Application. */
-		void update();
+		void _update();
+
+		/** @} */
 
 		/** Multiply with time in microseconds to get a time in seconds. */
 		static const double MICROSEC_TO_SEC;

+ 1 - 1
Source/BansheeUtility/Source/BsTime.cpp

@@ -20,7 +20,7 @@ namespace BansheeEngine
 		bs_delete(mTimer);
 	}
 
-	void Time::update()
+	void Time::_update()
 	{
 		unsigned long currentFrameTime = mTimer->getMicroseconds();
 

+ 0 - 5
Source/MBansheeEngine/ProfilerOverlay.cs

@@ -1,10 +1,5 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
 namespace BansheeEngine
 {
     /// <summary>