Răsfoiți Sursa

More work on improving documentation for doxygen generation

BearishSun 9 ani în urmă
părinte
comite
fe2e34ed16
52 a modificat fișierele cu 1010 adăugiri și 706 ștergeri
  1. 5 0
      Documentation/GitHub/features.md
  2. 7 9
      Documentation/GitHub/roadmap.md
  3. 2 2
      Doxyfile
  4. 1 1
      Source/BansheeCore/Include/BsBlendState.h
  5. 2 2
      Source/BansheeCore/Include/BsCCollider.h
  6. 1 1
      Source/BansheeCore/Include/BsCJoint.h
  7. 1 1
      Source/BansheeCore/Include/BsCMeshCollider.h
  8. 1 1
      Source/BansheeCore/Include/BsCPlaneCollider.h
  9. 1 1
      Source/BansheeCore/Include/BsCRigidbody.h
  10. 2 2
      Source/BansheeCore/Include/BsCharacterController.h
  11. 4 4
      Source/BansheeCore/Include/BsCollider.h
  12. 3 0
      Source/BansheeCore/Include/BsCommandQueue.h
  13. 3 1
      Source/BansheeCore/Include/BsCoreThread.h
  14. 1 1
      Source/BansheeCore/Include/BsDepthStencilState.h
  15. 1 1
      Source/BansheeCore/Include/BsEventQuery.h
  16. 4 3
      Source/BansheeCore/Include/BsGpuBuffer.h
  17. 2 2
      Source/BansheeCore/Include/BsGpuParamBlockBuffer.h
  18. 12 16
      Source/BansheeCore/Include/BsGpuParams.h
  19. 0 3
      Source/BansheeCore/Include/BsGpuProgram.h
  20. 1 1
      Source/BansheeCore/Include/BsGpuProgramManager.h
  21. 4 3
      Source/BansheeCore/Include/BsImporter.h
  22. 4 4
      Source/BansheeCore/Include/BsJoint.h
  23. 2 2
      Source/BansheeCore/Include/BsMaterial.h
  24. 1 0
      Source/BansheeCore/Include/BsMaterialParams.h
  25. 29 14
      Source/BansheeCore/Include/BsMesh.h
  26. 307 307
      Source/BansheeCore/Include/BsMeshData.h
  27. 2 2
      Source/BansheeCore/Include/BsMeshManager.h
  28. 1 1
      Source/BansheeCore/Include/BsPhysics.h
  29. 82 82
      Source/BansheeCore/Include/BsPhysicsCommon.h
  30. 1 1
      Source/BansheeCore/Include/BsPhysicsManager.h
  31. 9 4
      Source/BansheeCore/Include/BsPixelBuffer.h
  32. 3 3
      Source/BansheeCore/Include/BsProfilerCPU.h
  33. 4 2
      Source/BansheeCore/Include/BsProfilingManager.h
  34. 1 1
      Source/BansheeCore/Include/BsRasterizerState.h
  35. 252 47
      Source/BansheeCore/Include/BsRenderAPI.h
  36. 5 1
      Source/BansheeCore/Include/BsRenderTarget.h
  37. 3 3
      Source/BansheeCore/Include/BsRenderTexture.h
  38. 58 14
      Source/BansheeCore/Include/BsRenderWindow.h
  39. 1 1
      Source/BansheeCore/Include/BsRenderWindowManager.h
  40. 1 1
      Source/BansheeCore/Include/BsResourceHandle.h
  41. 14 6
      Source/BansheeCore/Include/BsResources.h
  42. 1 1
      Source/BansheeCore/Include/BsSamplerState.h
  43. 4 4
      Source/BansheeCore/Include/BsSceneObject.h
  44. 7 5
      Source/BansheeCore/Include/BsSpecificImporter.h
  45. 1 0
      Source/BansheeCore/Include/BsStringTable.h
  46. 31 13
      Source/BansheeCore/Include/BsTexture.h
  47. 1 2
      Source/BansheeCore/Include/BsTextureManager.h
  48. 10 7
      Source/BansheeCore/Include/BsViewport.h
  49. 1 1
      Source/BansheeCore/Source/BsRenderAPI.cpp
  50. 1 0
      Source/BansheeUtility/Include/BsTestSuite.h
  51. 101 104
      Source/MBansheeEngine/RenderTarget.cs
  52. 14 18
      Source/MBansheeEngine/RenderTexture.cs

+ 5 - 0
Documentation/GitHub/features.md

@@ -2,6 +2,9 @@
 
 
 All features listed here are the ones currently available (implemented). If you are interested in what's coming up in the near future check out our [roadmap](roadmap.md).
 All features listed here are the ones currently available (implemented). If you are interested in what's coming up in the near future check out our [roadmap](roadmap.md).
   
   
+**Current version: v0.3**
+---------------------------------------------------  
+  
 ## Core
 ## Core
 * __Quality design__
 * __Quality design__
   * Modern code using C++14
   * Modern code using C++14
@@ -81,6 +84,8 @@ All features listed here are the ones currently available (implemented). If you
 	* Unit testing
 	* Unit testing
 	* Custom memory allocators
 	* Custom memory allocators
 
 
+---------------------------------------------------	
+	
 ## Editor
 ## Editor
 * __Asset management__
 * __Asset management__
   * Simple drag and drop import for many popular formats
   * Simple drag and drop import for many popular formats

+ 7 - 9
Documentation/GitHub/roadmap.md

@@ -1,10 +1,6 @@
 # Roadmap
 # Roadmap
 
 
-**Current version: v0.2**
-
----------------------------------------------------
-
-Banshee is currently in development, and the current focus is to finish the most important high level systems so that people can start using it to create games as soon as possible. These systems are:
+Focus right now is to implement the most critical missing features:
  - Physics (colliders, triggers, rigidbodies, joints, character controller)
  - Physics (colliders, triggers, rigidbodies, joints, character controller)
  - Animation (skeletal, blend shapes, generic script variables)
  - Animation (skeletal, blend shapes, generic script variables)
  - Audio (popular file format support, music, 3D audio)
  - Audio (popular file format support, music, 3D audio)
@@ -27,7 +23,7 @@ There are many more features planned, but these are without a specific timeline
  - Mobile render API (likely Vulkan, possibly Metal for iOS)
  - Mobile render API (likely Vulkan, possibly Metal for iOS)
  - Android/iOS/WP ports
  - Android/iOS/WP ports
  - High level networking (replication, RPCs)
  - High level networking (replication, RPCs)
- - Global illumination (+ other fancy graphics)
+ - Dynamic global illumination (+ other high fidelity graphical improvements)
  - Occlussion culling
  - Occlussion culling
  - Terrain
  - Terrain
  - Effects/Particle editor
  - Effects/Particle editor
@@ -39,7 +35,9 @@ There are many more features planned, but these are without a specific timeline
  - More specialized 2D editor features
  - More specialized 2D editor features
  - Script debugging
  - Script debugging
  - Level of detail
  - Level of detail
- - XBONE/PS4/WIIU ports
- - Much more...
+ - XBONE/PS4 ports
+ - And more to be decided later...
  
  
-A *very* rough estimate is about two months each for every one of these features.
+Implementation times for each of those roughly ranges from 1-4 months.
+
+More contributors mean we can add more of these features quicker. Consider contributing!

+ 2 - 2
Doxyfile

@@ -715,7 +715,7 @@ CITE_BIB_FILES         =
 # messages are off.
 # messages are off.
 # The default value is: NO.
 # The default value is: NO.
 
 
-QUIET                  = NO
+QUIET                  = YES
 
 
 # The WARNINGS tag can be used to turn on/off the warning messages that are
 # The WARNINGS tag can be used to turn on/off the warning messages that are
 # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
 # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
@@ -2067,7 +2067,7 @@ INCLUDE_FILE_PATTERNS  =
 # recursively expanded use the := operator instead of the = operator.
 # recursively expanded use the := operator instead of the = operator.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 
-PREDEFINED             = protected=private
+PREDEFINED             = 
 
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # tag can be used to specify a list of macro names that should be expanded. The
 # tag can be used to specify a list of macro names that should be expanded. The

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

@@ -177,7 +177,7 @@ namespace BansheeEngine
 
 
 		BlendState(const BLEND_STATE_DESC& desc);
 		BlendState(const BLEND_STATE_DESC& desc);
 
 
-		/** @copydoc CoreObjectCore::createCore */
+		/** @copydoc CoreObject::createCore */
 		SPtr<CoreObjectCore> createCore() const override;
 		SPtr<CoreObjectCore> createCore() const override;
 
 
 		BlendProperties mProperties;
 		BlendProperties mProperties;

+ 2 - 2
Source/BansheeCore/Include/BsCCollider.h

@@ -68,10 +68,10 @@ namespace BansheeEngine
 		/** @copydoc Collider::getRigidbody */
 		/** @copydoc Collider::getRigidbody */
 		HRigidbody getRigidbody() const { return mParent; }
 		HRigidbody getRigidbody() const { return mParent; }
 
 
-		/** @copydoc Collider::rayCast(const Ray&, PhysicsQueryHit&, float) */
+		/** @copydoc Collider::rayCast(const Ray&, PhysicsQueryHit&, float) const */
 		inline bool rayCast(const Ray& ray, PhysicsQueryHit& hit, float maxDist = FLT_MAX) const;
 		inline bool rayCast(const Ray& ray, PhysicsQueryHit& hit, float maxDist = FLT_MAX) const;
 
 
-		/** @copydoc Collider::rayCast(const Vector3&, const Vector3&, PhysicsQueryHit&, float) */
+		/** @copydoc Collider::rayCast(const Vector3&, const Vector3&, PhysicsQueryHit&, float) const */
 		inline bool rayCast(const Vector3& origin, const Vector3& unitDir, PhysicsQueryHit& hit,
 		inline bool rayCast(const Vector3& origin, const Vector3& unitDir, PhysicsQueryHit& hit,
 			float maxDist = FLT_MAX) const;
 			float maxDist = FLT_MAX) const;
 
 

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

@@ -47,7 +47,7 @@ namespace BansheeEngine
 		/** @copydoc Joint::getBreakTorque */
 		/** @copydoc Joint::getBreakTorque */
 		inline float getBreakTorque() const;
 		inline float getBreakTorque() const;
 
 
-		/** @copydoc Joint::setBreakToque */
+		/** @copydoc Joint::setBreakTorque */
 		inline void setBreakToque(float torque);
 		inline void setBreakToque(float torque);
 
 
 		/** @copydoc Joint::getEnableCollision */
 		/** @copydoc Joint::getEnableCollision */

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

@@ -46,7 +46,7 @@ namespace BansheeEngine
 		/** @copydoc CCollider::createInternal */
 		/** @copydoc CCollider::createInternal */
 		SPtr<Collider> createInternal() override;
 		SPtr<Collider> createInternal() override;
 
 
-		/** @copydoc CPlaneCollider::isValidParent */
+		/** @copydoc CCollider::isValidParent */
 		bool isValidParent(const HRigidbody& parent) const override;
 		bool isValidParent(const HRigidbody& parent) const override;
 
 
     protected:
     protected:

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

@@ -52,7 +52,7 @@ namespace BansheeEngine
 		/** @copydoc CCollider::createInternal */
 		/** @copydoc CCollider::createInternal */
 		SPtr<Collider> createInternal() override;
 		SPtr<Collider> createInternal() override;
 
 
-		/** @copydoc CPlaneCollider::isValidParent */
+		/** @copydoc CCollider::isValidParent */
 		bool isValidParent(const HRigidbody& parent) const override;
 		bool isValidParent(const HRigidbody& parent) const override;
 
 
     protected:
     protected:

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

@@ -172,7 +172,7 @@ namespace BansheeEngine
 		/** Sets that joint that this rigidbody is attached to. Allows the rigidbody to notify the joint when it moves. */
 		/** Sets that joint that this rigidbody is attached to. Allows the rigidbody to notify the joint when it moves. */
 		void _setJoint(const HJoint& joint) { mParentJoint = joint; }
 		void _setJoint(const HJoint& joint) { mParentJoint = joint; }
 
 
-		/** @copydoc Rigidbody::_updateMassDistribution */
+		/** @copydoc Rigidbody::updateMassDistribution */
 		inline void _updateMassDistribution();
 		inline void _updateMassDistribution();
 
 
 		/** @} */
 		/** @} */

+ 2 - 2
Source/BansheeCore/Include/BsCharacterController.h

@@ -290,7 +290,7 @@ namespace BansheeEngine
 	{
 	{
 		/**
 		/**
 		 * Component of the controller that was touched. Can be null if the controller has no component parent, in which 
 		 * Component of the controller that was touched. Can be null if the controller has no component parent, in which 
-		 * case check ::colliderRaw. 
+		 * case check #colliderRaw. 
 		 */
 		 */
 		HCollider collider;
 		HCollider collider;
 		Collider* colliderRaw; /**< Collider that was touched. */
 		Collider* colliderRaw; /**< Collider that was touched. */
@@ -302,7 +302,7 @@ namespace BansheeEngine
 	{
 	{
 		/**
 		/**
 		 * Component of the controller that was touched. Can be null if the controller has no component parent, in which 
 		 * Component of the controller that was touched. Can be null if the controller has no component parent, in which 
-		 * case check ::controllerRaw. 
+		 * case check #controllerRaw. 
 		 */
 		 */
 		HCharacterController controller; 
 		HCharacterController controller; 
 		CharacterController* controllerRaw; /**< Controller that was touched. */
 		CharacterController* controllerRaw; /**< Controller that was touched. */

+ 4 - 4
Source/BansheeCore/Include/BsCollider.h

@@ -34,10 +34,10 @@ namespace BansheeEngine
 		/** @copydoc FCollider::setTransform */
 		/** @copydoc FCollider::setTransform */
 		inline void setTransform(const Vector3& pos, const Quaternion& rot);
 		inline void setTransform(const Vector3& pos, const Quaternion& rot);
 
 
-		/** @copydoc FCollider::setScale */
+		/** Sets the scale of the collider geometry. */
 		virtual void setScale(const Vector3& scale);
 		virtual void setScale(const Vector3& scale);
 
 
-		/** @copydoc FCollider::getScale */
+		/** Retrieves the scale of the collider geometry. */
 		inline Vector3 getScale() const;
 		inline Vector3 getScale() const;
 
 
 		/** @copydoc FCollider::setIsTrigger */
 		/** @copydoc FCollider::setIsTrigger */
@@ -46,10 +46,10 @@ namespace BansheeEngine
 		/** @copydoc FCollider::getIsTrigger */
 		/** @copydoc FCollider::getIsTrigger */
 		inline bool getIsTrigger() const;
 		inline bool getIsTrigger() const;
 
 
-		/** @copydoc FCollider::setRigidbody */
+		/** Sets the Rigidbody that controls this collider (if any). */
 		inline void setRigidbody(Rigidbody* value);
 		inline void setRigidbody(Rigidbody* value);
 
 
-		/** Returns the rigidbody this collider is attached to, if any. */
+		/** Retrieves the Rigidbody that controls this collider (if any). */
 		Rigidbody* getRigidbody() const { return mRigidbody; }
 		Rigidbody* getRigidbody() const { return mRigidbody; }
 
 
 		/** @copydoc FCollider::setMass */
 		/** @copydoc FCollider::setMass */

+ 3 - 0
Source/BansheeCore/Include/BsCommandQueue.h

@@ -157,6 +157,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Executes all provided commands one by one in order. To get the commands you should call flush().
 		 * Executes all provided commands one by one in order. To get the commands you should call flush().
 		 *
 		 *
+		 * @param[in]	commands			Commands to execute.
 		 * @param[in]	notifyCallback  	Callback that will be called if a command that has @p notifyOnComplete flag set.
 		 * @param[in]	notifyCallback  	Callback that will be called if a command that has @p notifyOnComplete flag set.
 		 * 									The callback will receive @p callbackId of the command.
 		 * 									The callback will receive @p callbackId of the command.
 		 */
 		 */
@@ -184,6 +185,7 @@ namespace BansheeEngine
 		 * Last parameter must be unbound and of AsyncOp& type. This is used to signal that the command is completed, and 
 		 * Last parameter must be unbound and of AsyncOp& type. This is used to signal that the command is completed, and 
 		 * also for storing the return value.		
 		 * also for storing the return value.		
 		 *
 		 *
+		 * @param[in]	commandCallback		Command to queue for execution.
 		 * @param[in]	_notifyWhenComplete	(optional) Call the notify method (provided in the call to playback())
 		 * @param[in]	_notifyWhenComplete	(optional) Call the notify method (provided in the call to playback())
 		 * 									when the command is complete.
 		 * 									when the command is complete.
 		 * @param[in]	_callbackId			(optional) Identifier for the callback so you can then later find it
 		 * @param[in]	_callbackId			(optional) Identifier for the callback so you can then later find it
@@ -204,6 +206,7 @@ namespace BansheeEngine
 		 * Provided command is not expected to return a value. If you wish to return a value from the callback use the 
 		 * Provided command is not expected to return a value. If you wish to return a value from the callback use the 
 		 * queueReturn() which accepts an AsyncOp parameter.
 		 * queueReturn() which accepts an AsyncOp parameter.
 		 *
 		 *
+		 * @param[in]	commandCallback		Command to queue for execution.
 		 * @param[in]	_notifyWhenComplete	(optional) Call the notify method (provided in the call to playback())
 		 * @param[in]	_notifyWhenComplete	(optional) Call the notify method (provided in the call to playback())
 		 * 									when the command is complete.
 		 * 									when the command is complete.
 		 * @param[in]	_callbackId		   	(optional) Identifier for the callback so you can then later find
 		 * @param[in]	_callbackId		   	(optional) Identifier for the callback so you can then later find

+ 3 - 1
Source/BansheeCore/Include/BsCoreThread.h

@@ -85,7 +85,8 @@ public:
 	/**
 	/**
 	 * Queues a new command that will be added to the global command queue. You are allowed to call this from any thread,
 	 * Queues a new command that will be added to the global command queue. You are allowed to call this from any thread,
 	 * however be aware that it involves possibly slow synchronization primitives, so limit your usage.
 	 * however be aware that it involves possibly slow synchronization primitives, so limit your usage.
-	 * 			
+	 * 		
+	 * @param[in]	commandCallback		Command to queue.
 	 * @param[in]	blockUntilComplete	If true the thread will be blocked until the command executes. Be aware that there 
 	 * @param[in]	blockUntilComplete	If true the thread will be blocked until the command executes. Be aware that there 
 	 *									may be many commands queued before it and they all need to be executed in order 
 	 *									may be many commands queued before it and they all need to be executed in order 
 	 *									before the current command is reached, which might take a long time.
 	 *									before the current command is reached, which might take a long time.
@@ -98,6 +99,7 @@ public:
 	 * Queues a new command that will be added to the global command queue.You are allowed to call this from any thread,
 	 * Queues a new command that will be added to the global command queue.You are allowed to call this from any thread,
 	 * however be aware that it involves possibly slow synchronization primitives, so limit your usage.
 	 * however be aware that it involves possibly slow synchronization primitives, so limit your usage.
 	 * 	
 	 * 	
+	 * @param[in]	commandCallback		Command to queue.
 	 * @param[in]	blockUntilComplete	If true the thread will be blocked until the command executes. Be aware that there 
 	 * @param[in]	blockUntilComplete	If true the thread will be blocked until the command executes. Be aware that there 
 	 *									may be many commands queued before it and they all need to be executed in order 
 	 *									may be many commands queued before it and they all need to be executed in order 
 	 *									before the current command is reached, which might take a long time.
 	 *									before the current command is reached, which might take a long time.

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

@@ -168,7 +168,7 @@ namespace BansheeEngine
 
 
 		DepthStencilState(const DEPTH_STENCIL_STATE_DESC& desc);
 		DepthStencilState(const DEPTH_STENCIL_STATE_DESC& desc);
 
 
-		/** @copydoc CoreObjectCore::createCore */
+		/** @copydoc CoreObject::createCore */
 		SPtr<CoreObjectCore> createCore() const override;
 		SPtr<CoreObjectCore> createCore() const override;
 
 
 		DepthStencilProperties mProperties;
 		DepthStencilProperties mProperties;

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

@@ -31,7 +31,7 @@ namespace BansheeEngine
 		 * 			
 		 * 			
 		 * @note	
 		 * @note	
 		 * Once the query is started you may poll isReady() method to check when query has finished, or you may hook up 
 		 * Once the query is started you may poll isReady() method to check when query has finished, or you may hook up 
-		 * an ::onTriggered callback and be notified that way.
+		 * an #onTriggered callback and be notified that way.
 		 */
 		 */
 		virtual void begin() = 0;
 		virtual void begin() = 0;
 
 

+ 4 - 3
Source/BansheeCore/Include/BsGpuBuffer.h

@@ -132,7 +132,7 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @param[in]	offset	Number of bytes at which to start reading the buffer.
 		 * @param[in]	offset	Number of bytes at which to start reading the buffer.
 		 * @param[in]	length	Number of bytes to read.
 		 * @param[in]	length	Number of bytes to read.
-		 * @param[in]	pDest	Previously allocated buffer of @p length bytes size.
+		 * @param[in]	pDest	Previously allocated buffer of @p length bytes size that the data will be written to.
 		 */
 		 */
         virtual void readData(UINT32 offset, UINT32 length, void* pDest) = 0;
         virtual void readData(UINT32 offset, UINT32 length, void* pDest) = 0;
 
 
@@ -141,10 +141,11 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @param[in]	offset		Number of bytes at which to start writing to the buffer.
 		 * @param[in]	offset		Number of bytes at which to start writing to the buffer.
 		 * @param[in]	length		Number of bytes to write.
 		 * @param[in]	length		Number of bytes to write.
-		 * @param[in]	pDest		Previously allocated buffer used to retrieve the data from.
+		 * @param[in]	pSource		Buffer containg the data to write.
 		 * @param[in]	writeFlags  Flags that may be used to improve performance for specific use cases.
 		 * @param[in]	writeFlags  Flags that may be used to improve performance for specific use cases.
 		 */
 		 */
-        virtual void writeData(UINT32 offset, UINT32 length, const void* pSource, BufferWriteType writeFlags = BufferWriteType::Normal) = 0;
+        virtual void writeData(UINT32 offset, UINT32 length, const void* pSource, 
+			BufferWriteType writeFlags = BufferWriteType::Normal) = 0;
 
 
 		/**
 		/**
 		 * Copies data from another buffer into this buffer.
 		 * Copies data from another buffer into this buffer.

+ 2 - 2
Source/BansheeCore/Include/BsGpuParamBlockBuffer.h

@@ -84,10 +84,10 @@ namespace BansheeEngine
 		GenericGpuParamBlockBufferCore(UINT32 size, GpuParamBlockUsage usage);
 		GenericGpuParamBlockBufferCore(UINT32 size, GpuParamBlockUsage usage);
 		~GenericGpuParamBlockBufferCore();
 		~GenericGpuParamBlockBufferCore();
 
 
-		/** @copydoc GpuParamBlockBufferCore::writeData */
+		/** @copydoc GpuParamBlockBufferCore::writeToGPU */
 		void writeToGPU(const UINT8* data) override;
 		void writeToGPU(const UINT8* data) override;
 
 
-		/** @copydoc GpuParamBlockBufferCore::readData */
+		/** @copydoc GpuParamBlockBufferCore::readFromGPU */
 		void readFromGPU(UINT8* data) const override;
 		void readFromGPU(UINT8* data) const override;
 
 
 	protected:
 	protected:

+ 12 - 16
Source/BansheeCore/Include/BsGpuParams.h

@@ -107,7 +107,7 @@ namespace BansheeEngine
 		/**	Checks whether matrices should be transformed before being written to the parameter buffer. */
 		/**	Checks whether matrices should be transformed before being written to the parameter buffer. */
 		bool getTransposeMatrices() const { return mTransposeMatrices; }
 		bool getTransposeMatrices() const { return mTransposeMatrices; }
 
 
-		/** @copydoc CoreObject::markCoreDirty */
+		/** Marks the sim thread object as dirty, causing it to sync its contents with its core thread counterpart. */
 		virtual void _markCoreDirty() { }
 		virtual void _markCoreDirty() { }
 
 
 		/** @copydoc IResourceListener::markListenerResourcesDirty */
 		/** @copydoc IResourceListener::markListenerResourcesDirty */
@@ -156,7 +156,6 @@ namespace BansheeEngine
 		typedef typename TTypes<Core>::SamplerType SamplerType;
 		typedef typename TTypes<Core>::SamplerType SamplerType;
 		typedef typename TTypes<Core>::ParamsBufferType ParamsBufferType;
 		typedef typename TTypes<Core>::ParamsBufferType ParamsBufferType;
 
 
-		/** @copydoc GpuParamsBase::GpuParamsBase(const GpuParamDescPtr&, bool) */
 		TGpuParams(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
 		TGpuParams(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
 
 
 		virtual ~TGpuParams();
 		virtual ~TGpuParams();
@@ -283,20 +282,6 @@ namespace BansheeEngine
 	public:
 	public:
 		~GpuParams() { }
 		~GpuParams() { }
 
 
-		/**
-		 * @copydoc	CoreObject::markCoreDirty
-		 *
-		 * @note	Internal method.
-		 */
-		void _markCoreDirty() override;
-
-		/**
-		 * @copydoc	IResourceListener::markResourcesDirty
-		 *
-		 * @note	Internal method.
-		 */
-		void _markResourcesDirty() override;
-
 		/** Retrieves a core implementation of a mesh usable only from the core thread. */
 		/** Retrieves a core implementation of a mesh usable only from the core thread. */
 		SPtr<GpuParamsCore> getCore() const;
 		SPtr<GpuParamsCore> getCore() const;
 
 
@@ -306,6 +291,17 @@ namespace BansheeEngine
 		/** Contains a lookup table for sizes of all data parameters. Sizes are in bytes. */
 		/** Contains a lookup table for sizes of all data parameters. Sizes are in bytes. */
 		const static GpuDataParamInfos PARAM_SIZES;
 		const static GpuDataParamInfos PARAM_SIZES;
 
 
+		/** @name Internal
+		 *  @{
+		 */
+
+		/** @copydoc GpuParamsBase::_markCoreDirty */
+		void _markCoreDirty() override;
+
+		/** @copydoc IResourceListener::markListenerResourcesDirty */
+		void _markResourcesDirty() override;
+
+		/** @} */
 	protected:
 	protected:
 		/** @copydoc GpuParamsBase::GpuParamsBase */
 		/** @copydoc GpuParamsBase::GpuParamsBase */
 		GpuParams(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
 		GpuParams(const GpuParamDescPtr& paramDesc, bool transposeMatrices);

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

@@ -155,9 +155,6 @@ namespace BansheeEngine
 		/** @copydoc CoreObject::createCore */
 		/** @copydoc CoreObject::createCore */
 		SPtr<CoreObjectCore> createCore() const;
 		SPtr<CoreObjectCore> createCore() const;
 
 
-		/** @copydoc Resource::calculateSize */
-		size_t calculateSize() const { return 0; } // TODO 
-
 	protected:
 	protected:
 		bool mNeedsAdjacencyInfo;
 		bool mNeedsAdjacencyInfo;
 		String mLanguage;
 		String mLanguage;

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

@@ -36,7 +36,7 @@ namespace BansheeEngine
 		 *									program.
 		 *									program.
 		 */
 		 */
 		virtual SPtr<GpuProgramCore> create(const String& source, const String& entryPoint, GpuProgramType gptype, 
 		virtual SPtr<GpuProgramCore> create(const String& source, const String& entryPoint, GpuProgramType gptype, 
-			GpuProgramProfile profile, bool requiresAdjacencyInformation) = 0;
+			GpuProgramProfile profile, bool requiresAdjacency) = 0;
 
 
 		/** @copydoc GpuProgramManager::createEmpty */
 		/** @copydoc GpuProgramManager::createEmpty */
 		virtual SPtr<GpuProgramCore> create(GpuProgramType type) = 0;
 		virtual SPtr<GpuProgramCore> create(GpuProgramType type) = 0;

+ 4 - 3
Source/BansheeCore/Include/BsImporter.h

@@ -68,9 +68,10 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Imports a resource and replaces the contents of the provided existing resource with new imported data.
 		 * Imports a resource and replaces the contents of the provided existing resource with new imported data.
 		 *
 		 *
-		 * @param[in]	inputFilePath	Pathname of the input file.
-		 * @param[in]	importOptions	(optional) Options for controlling the import. Caller must ensure import options 
-		 *								actually match the type of the importer used for the file type. 
+		 * @param[in]	existingResource	Resource whose contents to replace.
+		 * @param[in]	inputFilePath		Pathname of the input file.
+		 * @param[in]	importOptions		(optional) Options for controlling the import. Caller must ensure import options 
+		 *									actually match the type of the importer used for the file type. 
 		 *
 		 *
 		 * @see		createImportOptions
 		 * @see		createImportOptions
 		 */
 		 */

+ 4 - 4
Source/BansheeCore/Include/BsJoint.h

@@ -164,7 +164,7 @@ namespace BansheeEngine
 		 * @param	lower		Lower distance of the limit. Must be less than @p upper.
 		 * @param	lower		Lower distance of the limit. Must be less than @p upper.
 		 * @param	upper		Upper distance of the limit. Must be more than @p lower.
 		 * @param	upper		Upper distance of the limit. Must be more than @p lower.
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
-		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 * @param	restitution	Controls how do objects react when the limit is reached, values closer to zero specify
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						collision. Must be in [0, 1] range.
 		 *						collision. Must be in [0, 1] range.
 		 */
 		 */
@@ -209,7 +209,7 @@ namespace BansheeEngine
 		 * 
 		 * 
 		 * @param	extent		Distance at which the limit becomes active. 
 		 * @param	extent		Distance at which the limit becomes active. 
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
-		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 * @param	restitution	Controls how do objects react when the limit is reached, values closer to zero specify
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						collision. Must be in [0, 1] range.
 		 *						collision. Must be in [0, 1] range.
 		 */
 		 */
@@ -253,7 +253,7 @@ namespace BansheeEngine
 		 * @param	lower		Lower angle of the limit. Must be less than @p upper.
 		 * @param	lower		Lower angle of the limit. Must be less than @p upper.
 		 * @param	upper		Upper angle of the limit. Must be more than @p lower.
 		 * @param	upper		Upper angle of the limit. Must be more than @p lower.
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
-		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 * @param	restitution	Controls how do objects react when the limit is reached, values closer to zero specify
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						collision. Must be in [0, 1] range.
 		 *						collision. Must be in [0, 1] range.
 		 */
 		 */
@@ -301,7 +301,7 @@ namespace BansheeEngine
 		 * @param	yLimitAngle	Y angle of the cone. Movement is constrainted between 0 and this angle on the Y axis.
 		 * @param	yLimitAngle	Y angle of the cone. Movement is constrainted between 0 and this angle on the Y axis.
 		 * @param	zLimitAngle	Z angle of the cone. Movement is constrainted between 0 and this angle on the Z axis.
 		 * @param	zLimitAngle	Z angle of the cone. Movement is constrainted between 0 and this angle on the Z axis.
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
 		 * @param	spring		Spring that controls how are the bodies pulled back towards the limit when they breach it.
-		 * @param	resitution	Controls how do objects react when the limit is reached, values closer to zero specify
+		 * @param	restitution	Controls how do objects react when the limit is reached, values closer to zero specify
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy)
 		 *						collision. Must be in [0, 1] range.
 		 *						collision. Must be in [0, 1] range.
 		 */
 		 */

+ 2 - 2
Source/BansheeCore/Include/BsMaterial.h

@@ -119,13 +119,13 @@ namespace BansheeEngine
 		/** Retrieves a list of all shader GPU parameters, and the GPU program variable names they map to. */
 		/** Retrieves a list of all shader GPU parameters, and the GPU program variable names they map to. */
 		const Map<String, String>& getValidParamNames() const { return mValidParams; }
 		const Map<String, String>& getValidParamNames() const { return mValidParams; }
 
 
-		/** @copydoc CoreObject::markCoreDirty */
+		/** Marks the contents of the sim thread object as dirty, causing it to sync with its core thread counterpart. */
 		virtual void _markCoreDirty() { }
 		virtual void _markCoreDirty() { }
 
 
 		/** @copydoc CoreObject::markDependenciesDirty */
 		/** @copydoc CoreObject::markDependenciesDirty */
 		virtual void _markDependenciesDirty() { }
 		virtual void _markDependenciesDirty() { }
 
 
-		/** @copydoc IResourceListener::markResourcesDirty */
+		/** @copydoc IResourceListener::markListenerResourcesDirty */
 		virtual void _markResourcesDirty() { }
 		virtual void _markResourcesDirty() { }
 
 
 		/** Returns all GPU parameter descriptions in the specified technique. */
 		/** Returns all GPU parameter descriptions in the specified technique. */

+ 1 - 0
Source/BansheeCore/Include/BsMaterialParams.h

@@ -246,6 +246,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Logs an error that was reported by getParamData().
 		 * Logs an error that was reported by getParamData().
 		 *
 		 *
+		 * @param[in]	errorCode	Information about the error.
 		 * @param[in]	name		Name of the shader parameter for which the error occurred.
 		 * @param[in]	name		Name of the shader parameter for which the error occurred.
 		 * @param[in]	arrayIdx	Array index for which the error occurred. 
 		 * @param[in]	arrayIdx	Array index for which the error occurred. 
 		 */
 		 */

+ 29 - 14
Source/BansheeCore/Include/BsMesh.h

@@ -34,8 +34,14 @@ namespace BansheeEngine
 		 * Updates the mesh with new data. The actual write will be queued for later execution on the core thread. Provided 
 		 * Updates the mesh with new data. The actual write will be queued for later execution on the core thread. Provided 
 		 * data buffer will be locked until the operation completes.
 		 * data buffer will be locked until the operation completes.
 		 *
 		 *
-		 * @param[in]	accessor	Accessor to queue the operation on.
-		 * @return					Async operation object you can use to track operation completion.
+		 * @param[in]	accessor			Accessor to queue the operation on.
+		 * @param[in]	subresourceIdx		Index of the subresource to write to. Ignored for now.
+		 * @param[in]	data				Data of valid size and format to write to the subresource.
+		 * @param[in]	discardEntireBuffer When true the existing contents of the resource you are updating will be
+		 *									discarded. This can make the operation faster. Resources with certain buffer
+		 *									types might require this flag to be in a specific state otherwise the operation
+		 *									will fail.
+		 * @return							Async operation object you can use to track operation completion.
 		 *
 		 *
 		 * @see		MeshCore::writeSubresource
 		 * @see		MeshCore::writeSubresource
 		 */
 		 */
@@ -46,8 +52,11 @@ namespace BansheeEngine
 		 * Reads internal mesh data to the provided previously allocated buffer. The read is queued for execution on the 
 		 * Reads internal mesh data to the provided previously allocated buffer. The read is queued for execution on the 
 		 * core thread and not executed immediately. Provided data buffer will be locked until the operation completes.
 		 * core thread and not executed immediately. Provided data buffer will be locked until the operation completes.
 		 *
 		 *
-		 * @param[in]	accessor	Accessor to queue the operation on.
-		 * @return					Async operation object you can use to track operation completion.
+		 * @param[in]	accessor		Accessor to queue the operation on.
+		 * @param[in]	subresourceIdx	Index of the subresource to read from. Ignored for now.
+		 * @param[out]	data			Previously allocated buffer of valid size and format to read the data into. Can be
+		 *								allocated using allocateSubresourceBuffer().
+		 * @return						Async operation object you can use to track operation completion.
 		 *
 		 *
 		 * @see		MeshCore::readSubresource
 		 * @see		MeshCore::readSubresource
 		 */
 		 */
@@ -176,24 +185,28 @@ namespace BansheeEngine
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described
 		 * by the mesh data exactly. Mesh will have no sub-meshes.
 		 * by the mesh data exactly. Mesh will have no sub-meshes.
 		 *
 		 *
-		 * @param[in]	initialMeshData	Vertex and index data to initialize the mesh with.
+		 * @param[in]	initialData		Vertex and index data to initialize the mesh with.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 * @param[in]	drawOp			Determines how should the provided indices be interpreted by the pipeline. Default 
 		 * @param[in]	drawOp			Determines how should the provided indices be interpreted by the pipeline. Default 
 		 *								option is a triangle strip, where three indices represent a single triangle.
 		 *								option is a triangle strip, where three indices represent a single triangle.
 		 */
 		 */
-		static HMesh create(const MeshDataPtr& initialMeshData, int usage = MU_STATIC,
+		static HMesh create(const MeshDataPtr& initialData, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 
 		/**
 		/**
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described by
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described by
 		 * the mesh data exactly. Mesh will have specified the sub-meshes.
 		 * the mesh data exactly. Mesh will have specified the sub-meshes.
 		 *
 		 *
-		 * @param[in]	initialMeshData	Vertex and index data used for initializing the mesh. 
+		 * @param[in]	initialData		Vertex and index data used for initializing the mesh. 
 		 * @param[in]	subMeshes		Defines how are indices separated into sub-meshes, and how are those sub-meshes 
 		 * @param[in]	subMeshes		Defines how are indices separated into sub-meshes, and how are those sub-meshes 
 		 *								rendered. Sub-meshes may be rendered independently.
 		 *								rendered. Sub-meshes may be rendered independently.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 */
 		 */
-		static HMesh create(const MeshDataPtr& initialMeshData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
+		static HMesh create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
+
+		/** @name Internal
+		 *  @{
+		 */
 
 
 		/**
 		/**
 		 * @copydoc	create(UINT32, UINT32, const VertexDataDescPtr&, int, DrawOperationType, IndexType)
 		 * @copydoc	create(UINT32, UINT32, const VertexDataDescPtr&, int, DrawOperationType, IndexType)
@@ -218,7 +231,7 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @note	Internal method. Use create() for normal use.
 		 * @note	Internal method. Use create() for normal use.
 		 */
 		 */
-		static MeshPtr _createPtr(const MeshDataPtr& initialMeshData, int usage = MU_STATIC,
+		static MeshPtr _createPtr(const MeshDataPtr& initialData, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 
 		/**
 		/**
@@ -226,8 +239,10 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @note	Internal method. Use create() for normal use.
 		 * @note	Internal method. Use create() for normal use.
 		 */
 		 */
-		static MeshPtr _createPtr(const MeshDataPtr& initialMeshData, const Vector<SubMesh>& subMeshes,
+		static MeshPtr _createPtr(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes,
 			int usage = MU_STATIC);
 			int usage = MU_STATIC);
+
+		/** @} */
 	};
 	};
 
 
 	/** @} */
 	/** @} */
@@ -325,24 +340,24 @@ namespace BansheeEngine
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described
 		 * by the mesh data exactly. Mesh will have no sub-meshes.
 		 * by the mesh data exactly. Mesh will have no sub-meshes.
 		 *
 		 *
-		 * @param[in]	initialMeshData	Vertex and index data to initialize the mesh with.
+		 * @param[in]	initialData		Vertex and index data to initialize the mesh with.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 * @param[in]	drawOp			Determines how should the provided indices be interpreted by the pipeline. Default 
 		 * @param[in]	drawOp			Determines how should the provided indices be interpreted by the pipeline. Default 
 		 *								option is a triangle strip, where three indices represent a single triangle.
 		 *								option is a triangle strip, where three indices represent a single triangle.
 		 */
 		 */
-		static SPtr<MeshCore> create(const MeshDataPtr& initialMeshData, int usage = MU_STATIC,
+		static SPtr<MeshCore> create(const MeshDataPtr& initialData, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 
 		/**
 		/**
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described
 		 * Creates a new mesh from an existing mesh data. Created mesh will match the vertex and index buffers described
 		 * by the mesh data exactly. Mesh will have specified the sub-meshes.
 		 * by the mesh data exactly. Mesh will have specified the sub-meshes.
 		 *
 		 *
-		 * @param[in]	initialMeshData	Vertex and index data used for initializing the mesh. 
+		 * @param[in]	initialData		Vertex and index data used for initializing the mesh. 
 		 * @param[in]	subMeshes		Defines how are indices separated into sub-meshes, and how are those sub-meshes 
 		 * @param[in]	subMeshes		Defines how are indices separated into sub-meshes, and how are those sub-meshes 
 		 *								rendered. Sub-meshes may be rendered independently.
 		 *								rendered. Sub-meshes may be rendered independently.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 */
 		 */
-		static SPtr<MeshCore> create(const MeshDataPtr& initialMeshData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
+		static SPtr<MeshCore> create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
 
 
 	protected:
 	protected:
 		friend class Mesh;
 		friend class Mesh;

+ 307 - 307
Source/BansheeCore/Include/BsMeshData.h

@@ -1,308 +1,308 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsCorePrerequisites.h"
-#include "BsGpuResourceData.h"
-#include "BsVertexBuffer.h"
-#include "BsIndexBuffer.h"
-#include "BsVertexDeclaration.h"
-#include "BsDrawOps.h"
-#include "BsSubMesh.h"
-#include "BsBounds.h"
-
-namespace BansheeEngine
-{
-	/** @addtogroup Resources
-	 *  @{
-	 */
-
-	/** Iterator that allows you to easily populate or read vertex elements in MeshData. */
-	template<class T>
-	class VertexElemIter
-	{
-	public:
-		VertexElemIter()
-			:mData(nullptr), mEnd(nullptr), mByteStride(0), mNumElements(0)
-		{
-
-		}
-
-		VertexElemIter(UINT8* data, UINT32 byteStride, UINT32 numElements)
-			:mData(data), mByteStride(byteStride), mNumElements(numElements)
-		{
-			mEnd = mData + byteStride * numElements;
-		}
-
-		/**	Adds a new value to the iterators current position and advances the iterator. */
-		void addValue(const T& value)
-		{
-			setValue(value);
-			moveNext();
-		}
-
-		/**	Sets a new value at the iterators current position. */
-		void setValue(const T& value)
-		{
-			memcpy(mData, &value, sizeof(T));
-		}
-
-		/**	Returns the value at the iterators current position. */
-		T& getValue()
-		{
-			return *((T*)mData);
-		}
-
-		/**	Moves the iterator to the next position. Returns true if there are more elements. */
-		bool moveNext()
-		{
-#ifdef BS_DEBUG_MODE
-			if(mData >= mEnd)
-			{
-				BS_EXCEPT(InternalErrorException, "Vertex element iterator out of buffer bounds.");
-			}
-#endif
-
-			mData += mByteStride;
-
-			return mData < mEnd;
-		}
-
-		/**	Returns the number of elements this iterator can iterate over. */
-		UINT32 getNumElements() const { return mNumElements; }
-
-	private:
-		UINT8* mData;
-		UINT8* mEnd;
-		UINT32 mByteStride;
-		UINT32 mNumElements;
-	};
-
-	/** Contains per-vertex bone weights and indexes used for skinning, for up to four bones. */
-	struct BoneWeight
-	{
-		int index0;
-		int index1;
-		int index2;
-		int index3;
-
-		float weight0;
-		float weight1;
-		float weight2;
-		float weight3;
-	};
-
-	/** Contains mesh vertex and index data used for initializing, updating and reading mesh data from Mesh. */
-	class BS_CORE_EXPORT MeshData : public GpuResourceData
-	{
-	public:
-		/**
-		 * Constructs a new object that can hold number of vertices described by the provided vertex data description. As 
-		 * well as a number of indices of the provided type.
-		 */
-		MeshData(UINT32 numVertices, UINT32 numIndexes, const VertexDataDescPtr& vertexData, IndexType indexType = IT_32BIT);
-		~MeshData();
-
-		/**
-		 * Copies data from @p data parameter into the internal buffer for the specified semantic.
-		 *
-		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
-		 * @param[in]	data			Vertex data, containing at least @p size bytes.
-		 * @param[in]	size			The size of the data. Must be the size of the vertex element type * number of 
-		 *								vertices.
-		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index
-		 *								to differentiate between them.
-		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
-		 *								represented as a single vertex buffer.
-		 */
-		void setVertexData(VertexElementSemantic semantic, UINT8* data, UINT32 size, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
-
-		/**
-		 * Copies data from the internal buffer to the pre-allocated buffer for the specified semantic.
-		 *
-		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
-		 * @param[in]	data			Buffer that will receive vertex data, of at least @p size bytes.
-		 * @param[in]	size			The size of the data. Must be the size of the vertex element type * number of 
-		 *								vertices.
-		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index
-		 *								to differentiate between them.
-		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
-		 *								represented as a single vertex buffer.
-		 */
-		void getVertexData(VertexElementSemantic semantic, UINT8* data, UINT32 size, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
-
-		/**
-		 * Returns an iterator you can use for easily retrieving or setting Vector2 vertex elements. This is the preferred
-		 * method of assigning or reading vertex data. 
-		 * 			
-		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
-		 */
-		VertexElemIter<Vector2> getVec2DataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
-
-		/**
-		 * Returns an iterator you can use for easily retrieving or setting Vector3 vertex elements. This is the preferred
-		 * method of assigning or reading vertex data. 
-		 * 			
-		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
-		 */
-		VertexElemIter<Vector3> getVec3DataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
-
-		/**
-		 * Returns an iterator you can use for easily retrieving or setting Vector4 vertex elements. This is the preferred
-		 * method of assigning or reading vertex data. 
-		 * 			
-		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
-		 */
-		VertexElemIter<Vector4> getVec4DataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
-
-		/**
-		 * Returns an iterator you can use for easily retrieving or setting DWORD vertex elements. This is the preferred
-		 * method of assigning or reading vertex data. 
-		 * 			
-		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
-		 */
-		VertexElemIter<UINT32> getDWORDDataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
-
-		/** Returns the total number of vertices this object can hold. */
-		UINT32 getNumVertices() const { return mNumVertices; }
-
-		/** Returns the total number of indices this object can hold. */
-		UINT32 getNumIndices() const;
-
-		/**	Returns a 16-bit pointer to the start of the internal index buffer. */
-		UINT16* getIndices16() const;
-
-		/**	Returns a 32-bit pointer to the start of the internal index buffer. */
-		UINT32* getIndices32() const;
-
-		/**	Returns the size of an index element in bytes. */
-		UINT32 getIndexElementSize() const;
-
-		/**	Returns the type of an index element. */
-		IndexType getIndexType() const { return mIndexType; }
-
-		/**
-		 * Returns the pointer to the first element of the specified type. If you want to iterate over all elements you 
-		 * need to call getVertexStride() to get the number	of bytes you need to advance between each element.
-		 *
-		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
-		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index 
-		 *								to differentiate between them.
-		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
-		 *								represented as a single vertex buffer.
-		 * @return						null if it fails, else the element data.
-		 */
-		UINT8* getElementData(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0) const;
-
-		/**
-		 * Returns an offset into the internal buffer where this element with the provided semantic starts. Offset is 
-		 * provided in number of bytes.
-		 * 
-		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
-		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index 
-		 *								to differentiate between them.
-		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
-		 *								represented as a single vertex buffer.
-		 */
-		UINT32 getElementOffset(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0) const;
-
-		/** Returns an object that describes data contained in a single vertex. */
-		const VertexDataDescPtr& getVertexDesc() const { return mVertexData; }
-
-		/**	Return the size (in bytes) of the entire buffer. */
-		UINT32 getSize() const { return getInternalBufferSize(); }
-
-		/**	Calculates the bounds of all vertices stored in the internal buffer. */
-		Bounds calculateBounds() const;
-
-		/**
-		 * Combines a number of submeshes and their mesh data into one large mesh data buffer.
-		 *
-		 * @param[in]	elements	Data containing vertices and indices referenced by the submeshes. Number of elements
-		 *							must be the same as number of submeshes.
-		 * @param[in]	subMeshes	Submeshes representing vertex and index range to take from mesh data and combine. 
-		 *							Number of submeshes must match the number of provided MeshData elements.
-		 * @param[out]	subMeshes	Outputs all combined sub-meshes with their new index and vertex offsets referencing
-		 *							the newly created MeshData.
-		 * @return					Combined mesh data containing all vertices and indexes references by the provided 
-		 *							sub-meshes.
-		 */
-		static MeshDataPtr combine(const Vector<MeshDataPtr>& elements, const Vector<Vector<SubMesh>>& allSubMeshes,
-			Vector<SubMesh>& subMeshes);
-
-		/**
-		 * Constructs a new object that can hold number of vertices described by the provided vertex data description. As 
-		 * well as a number of indices of the provided type.
-		 */
-		static MeshDataPtr create(UINT32 numVertices, UINT32 numIndexes, const VertexDataDescPtr& vertexData, 
-			IndexType indexType = IT_32BIT)
-		{
-			return bs_shared_ptr_new<MeshData>(numVertices, numIndexes, vertexData, indexType);
-		}
-
-	protected:
-		/**	Returns the size of the internal buffer in bytes. */
-		UINT32 getInternalBufferSize() const override;
-
-	private:
-		/**	Returns a pointer to the start of the index buffer. */
-		UINT8* getIndexData() const { return getData(); }
-
-		/**	Returns a pointer to the start of the specified vertex stream. */
-		UINT8* getStreamData(UINT32 streamIdx) const;
-
-		/**	Returns an offset in bytes to the start of the index buffer from the start of the internal buffer. */
-		UINT32 getIndexBufferOffset() const;
-
-		/**	Returns an offset in bytes to the start of the stream from the start of the internal buffer. */
-		UINT32 getStreamOffset(UINT32 streamIdx = 0) const;
-
-		/**	Returns the size of the index buffer in bytes. */
-		UINT32 getIndexBufferSize() const;
-
-		/**	Returns the size of the specified stream in bytes. */
-		UINT32 getStreamSize(UINT32 streamIdx) const;
-
-		/**	Returns the size of all the streams in bytes. */
-		UINT32 getStreamSize() const;
-
-		/**
-		 * Returns the data needed for iterating over the requested vertex element.
-		 *
-		 * @param[in]	semantic   		Semantic of the element we are looking for.
-		 * @param[in]	semanticIdx 	If there are multiple semantics with the same name, use different index to 
-		 *								differentiate between them.
-		 * @param[in]	streamIdx   	Zero-based index of the stream the element resides in.
-		 * @param[out] data				Pointer to the start of this elements data.
-		 * @param[out] stride			Number of bytes between vertex elements of this type.
-		 */
-		void getDataForIterator(VertexElementSemantic semantic, UINT32 semanticIdx, UINT32 streamIdx, UINT8*& data, UINT32& stride) const;
-
-	private:
-		friend class Mesh;
-		friend class MeshCore;
-		friend class MeshHeap;
-		friend class MeshHeapCore;
-
-		UINT32 mDescBuilding;
-
-		UINT32 mNumVertices;
-		UINT32 mNumIndices;
-		IndexType mIndexType;
-
-		VertexDataDescPtr mVertexData;
-
-		/************************************************************************/
-		/* 								SERIALIZATION                      		*/
-		/************************************************************************/
-	private:
-		MeshData(); // Serialization only
-
-	public:
-		friend class MeshDataRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const override;
-	};
-
-	/** @} */
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsCorePrerequisites.h"
+#include "BsGpuResourceData.h"
+#include "BsVertexBuffer.h"
+#include "BsIndexBuffer.h"
+#include "BsVertexDeclaration.h"
+#include "BsDrawOps.h"
+#include "BsSubMesh.h"
+#include "BsBounds.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup Resources
+	 *  @{
+	 */
+
+	/** Iterator that allows you to easily populate or read vertex elements in MeshData. */
+	template<class T>
+	class VertexElemIter
+	{
+	public:
+		VertexElemIter()
+			:mData(nullptr), mEnd(nullptr), mByteStride(0), mNumElements(0)
+		{
+
+		}
+
+		VertexElemIter(UINT8* data, UINT32 byteStride, UINT32 numElements)
+			:mData(data), mByteStride(byteStride), mNumElements(numElements)
+		{
+			mEnd = mData + byteStride * numElements;
+		}
+
+		/**	Adds a new value to the iterators current position and advances the iterator. */
+		void addValue(const T& value)
+		{
+			setValue(value);
+			moveNext();
+		}
+
+		/**	Sets a new value at the iterators current position. */
+		void setValue(const T& value)
+		{
+			memcpy(mData, &value, sizeof(T));
+		}
+
+		/**	Returns the value at the iterators current position. */
+		T& getValue()
+		{
+			return *((T*)mData);
+		}
+
+		/**	Moves the iterator to the next position. Returns true if there are more elements. */
+		bool moveNext()
+		{
+#ifdef BS_DEBUG_MODE
+			if(mData >= mEnd)
+			{
+				BS_EXCEPT(InternalErrorException, "Vertex element iterator out of buffer bounds.");
+			}
+#endif
+
+			mData += mByteStride;
+
+			return mData < mEnd;
+		}
+
+		/**	Returns the number of elements this iterator can iterate over. */
+		UINT32 getNumElements() const { return mNumElements; }
+
+	private:
+		UINT8* mData;
+		UINT8* mEnd;
+		UINT32 mByteStride;
+		UINT32 mNumElements;
+	};
+
+	/** Contains per-vertex bone weights and indexes used for skinning, for up to four bones. */
+	struct BoneWeight
+	{
+		int index0;
+		int index1;
+		int index2;
+		int index3;
+
+		float weight0;
+		float weight1;
+		float weight2;
+		float weight3;
+	};
+
+	/** Contains mesh vertex and index data used for initializing, updating and reading mesh data from Mesh. */
+	class BS_CORE_EXPORT MeshData : public GpuResourceData
+	{
+	public:
+		/**
+		 * Constructs a new object that can hold number of vertices described by the provided vertex data description. As 
+		 * well as a number of indices of the provided type.
+		 */
+		MeshData(UINT32 numVertices, UINT32 numIndexes, const VertexDataDescPtr& vertexData, IndexType indexType = IT_32BIT);
+		~MeshData();
+
+		/**
+		 * Copies data from @p data parameter into the internal buffer for the specified semantic.
+		 *
+		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
+		 * @param[in]	data			Vertex data, containing at least @p size bytes.
+		 * @param[in]	size			The size of the data. Must be the size of the vertex element type * number of 
+		 *								vertices.
+		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index
+		 *								to differentiate between them.
+		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
+		 *								represented as a single vertex buffer.
+		 */
+		void setVertexData(VertexElementSemantic semantic, UINT8* data, UINT32 size, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
+
+		/**
+		 * Copies data from the internal buffer to the pre-allocated buffer for the specified semantic.
+		 *
+		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
+		 * @param[in]	data			Buffer that will receive vertex data, of at least @p size bytes.
+		 * @param[in]	size			The size of the data. Must be the size of the vertex element type * number of 
+		 *								vertices.
+		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index
+		 *								to differentiate between them.
+		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
+		 *								represented as a single vertex buffer.
+		 */
+		void getVertexData(VertexElementSemantic semantic, UINT8* data, UINT32 size, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
+
+		/**
+		 * Returns an iterator you can use for easily retrieving or setting Vector2 vertex elements. This is the preferred
+		 * method of assigning or reading vertex data. 
+		 * 			
+		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
+		 */
+		VertexElemIter<Vector2> getVec2DataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
+
+		/**
+		 * Returns an iterator you can use for easily retrieving or setting Vector3 vertex elements. This is the preferred
+		 * method of assigning or reading vertex data. 
+		 * 			
+		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
+		 */
+		VertexElemIter<Vector3> getVec3DataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
+
+		/**
+		 * Returns an iterator you can use for easily retrieving or setting Vector4 vertex elements. This is the preferred
+		 * method of assigning or reading vertex data. 
+		 * 			
+		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
+		 */
+		VertexElemIter<Vector4> getVec4DataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
+
+		/**
+		 * Returns an iterator you can use for easily retrieving or setting DWORD vertex elements. This is the preferred
+		 * method of assigning or reading vertex data. 
+		 * 			
+		 * @note	If vertex data of this type/semantic/index/stream doesn't exist and exception will be thrown.
+		 */
+		VertexElemIter<UINT32> getDWORDDataIter(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0);
+
+		/** Returns the total number of vertices this object can hold. */
+		UINT32 getNumVertices() const { return mNumVertices; }
+
+		/** Returns the total number of indices this object can hold. */
+		UINT32 getNumIndices() const;
+
+		/**	Returns a 16-bit pointer to the start of the internal index buffer. */
+		UINT16* getIndices16() const;
+
+		/**	Returns a 32-bit pointer to the start of the internal index buffer. */
+		UINT32* getIndices32() const;
+
+		/**	Returns the size of an index element in bytes. */
+		UINT32 getIndexElementSize() const;
+
+		/**	Returns the type of an index element. */
+		IndexType getIndexType() const { return mIndexType; }
+
+		/**
+		 * Returns the pointer to the first element of the specified type. If you want to iterate over all elements you 
+		 * need to call getVertexStride() to get the number	of bytes you need to advance between each element.
+		 *
+		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
+		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index 
+		 *								to differentiate between them.
+		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
+		 *								represented as a single vertex buffer.
+		 * @return						null if it fails, else the element data.
+		 */
+		UINT8* getElementData(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0) const;
+
+		/**
+		 * Returns an offset into the internal buffer where this element with the provided semantic starts. Offset is 
+		 * provided in number of bytes.
+		 * 
+		 * @param[in]	semantic   		Semantic that allows the engine to connect the data to a shader input slot.
+		 * @param[in]	semanticIdx 	(optional) If there are multiple semantics with the same name, use different index 
+		 *								to differentiate between them.
+		 * @param[in]	streamIdx   	(optional) Zero-based index of the stream. Each stream will internally be 
+		 *								represented as a single vertex buffer.
+		 */
+		UINT32 getElementOffset(VertexElementSemantic semantic, UINT32 semanticIdx = 0, UINT32 streamIdx = 0) const;
+
+		/** Returns an object that describes data contained in a single vertex. */
+		const VertexDataDescPtr& getVertexDesc() const { return mVertexData; }
+
+		/**	Return the size (in bytes) of the entire buffer. */
+		UINT32 getSize() const { return getInternalBufferSize(); }
+
+		/**	Calculates the bounds of all vertices stored in the internal buffer. */
+		Bounds calculateBounds() const;
+
+		/**
+		 * Combines a number of submeshes and their mesh data into one large mesh data buffer.
+		 *
+		 * @param[in]	elements		Data containing vertices and indices referenced by the submeshes. Number of elements
+		 *								must be the same as number of submeshes.
+		 * @param[in]	allSubMeshes	Submeshes representing vertex and index range to take from mesh data and combine. 
+		 *								Number of submeshes must match the number of provided MeshData elements.
+		 * @param[out]	subMeshes		Outputs all combined sub-meshes with their new index and vertex offsets referencing
+		 *								the newly created MeshData.
+		 * @return						Combined mesh data containing all vertices and indexes references by the provided 
+		 *								sub-meshes.
+		 */
+		static MeshDataPtr combine(const Vector<MeshDataPtr>& elements, const Vector<Vector<SubMesh>>& allSubMeshes,
+			Vector<SubMesh>& subMeshes);
+
+		/**
+		 * Constructs a new object that can hold number of vertices described by the provided vertex data description. As 
+		 * well as a number of indices of the provided type.
+		 */
+		static MeshDataPtr create(UINT32 numVertices, UINT32 numIndexes, const VertexDataDescPtr& vertexData, 
+			IndexType indexType = IT_32BIT)
+		{
+			return bs_shared_ptr_new<MeshData>(numVertices, numIndexes, vertexData, indexType);
+		}
+
+	protected:
+		/**	Returns the size of the internal buffer in bytes. */
+		UINT32 getInternalBufferSize() const override;
+
+	private:
+		/**	Returns a pointer to the start of the index buffer. */
+		UINT8* getIndexData() const { return getData(); }
+
+		/**	Returns a pointer to the start of the specified vertex stream. */
+		UINT8* getStreamData(UINT32 streamIdx) const;
+
+		/**	Returns an offset in bytes to the start of the index buffer from the start of the internal buffer. */
+		UINT32 getIndexBufferOffset() const;
+
+		/**	Returns an offset in bytes to the start of the stream from the start of the internal buffer. */
+		UINT32 getStreamOffset(UINT32 streamIdx = 0) const;
+
+		/**	Returns the size of the index buffer in bytes. */
+		UINT32 getIndexBufferSize() const;
+
+		/**	Returns the size of the specified stream in bytes. */
+		UINT32 getStreamSize(UINT32 streamIdx) const;
+
+		/**	Returns the size of all the streams in bytes. */
+		UINT32 getStreamSize() const;
+
+		/**
+		 * Returns the data needed for iterating over the requested vertex element.
+		 *
+		 * @param[in]	semantic   		Semantic of the element we are looking for.
+		 * @param[in]	semanticIdx 	If there are multiple semantics with the same name, use different index to 
+		 *								differentiate between them.
+		 * @param[in]	streamIdx   	Zero-based index of the stream the element resides in.
+		 * @param[out] data				Pointer to the start of this elements data.
+		 * @param[out] stride			Number of bytes between vertex elements of this type.
+		 */
+		void getDataForIterator(VertexElementSemantic semantic, UINT32 semanticIdx, UINT32 streamIdx, UINT8*& data, UINT32& stride) const;
+
+	private:
+		friend class Mesh;
+		friend class MeshCore;
+		friend class MeshHeap;
+		friend class MeshHeapCore;
+
+		UINT32 mDescBuilding;
+
+		UINT32 mNumVertices;
+		UINT32 mNumIndices;
+		IndexType mIndexType;
+
+		VertexDataDescPtr mVertexData;
+
+		/************************************************************************/
+		/* 								SERIALIZATION                      		*/
+		/************************************************************************/
+	private:
+		MeshData(); // Serialization only
+
+	public:
+		friend class MeshDataRTTI;
+		static RTTITypeBase* getRTTIStatic();
+		virtual RTTITypeBase* getRTTI() const override;
+	};
+
+	/** @} */
 }
 }

+ 2 - 2
Source/BansheeCore/Include/BsMeshManager.h

@@ -27,10 +27,10 @@ namespace BansheeEngine
 		MeshPtr create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, const Vector<SubMesh>& subMeshes, 
 		MeshPtr create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, const Vector<SubMesh>& subMeshes, 
 			int usage = MU_STATIC, IndexType indexType = IT_32BIT);
 			int usage = MU_STATIC, IndexType indexType = IT_32BIT);
 
 
-		/** @copyodc Mesh::create(const MeshDataPtr&, int, DrawOperationType) */
+		/** @copydoc Mesh::create(const MeshDataPtr&, int, DrawOperationType) */
 		MeshPtr create(const MeshDataPtr& initialData, int usage = MU_STATIC, DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 		MeshPtr create(const MeshDataPtr& initialData, int usage = MU_STATIC, DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 
-		/** @copyodc Mesh::create(const MeshDataPtr&, const Vector<SubMesh>&, int) */
+		/** @copydoc Mesh::create(const MeshDataPtr&, const Vector<SubMesh>&, int) */
 		MeshPtr create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
 		MeshPtr create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
 
 
 		/**
 		/**

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

@@ -328,7 +328,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Returns a list of all colliders in the scene that overlap the provided sphere.
 		 * Returns a list of all colliders in the scene that overlap the provided sphere.
 		 * 
 		 * 
-		 * @param[in]	Sphere		Sphere to check for overlap.
+		 * @param[in]	sphere		Sphere to check for overlap.
 		 * @param[in]	layer		Layers to consider for the query. This allows you to ignore certain groups of objects.
 		 * @param[in]	layer		Layers to consider for the query. This allows you to ignore certain groups of objects.
 		 * @return					List of all colliders that overlap the sphere.
 		 * @return					List of all colliders that overlap the sphere.
 		 */
 		 */

+ 82 - 82
Source/BansheeCore/Include/BsPhysicsCommon.h

@@ -1,83 +1,83 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsCorePrerequisites.h"
-#include "BsVector3.h"
-#include "BsVector2.h"
-
-namespace BansheeEngine
-{
-	/** @addtogroup Physics
-	 *  @{
-	 */
-
-	/** Information about a single contact point during physics collision. */
-	struct ContactPoint
-	{
-		Vector3 position; /**< Contact point in world space. */
-		Vector3 normal; /**< Normal pointing from the second shape to the first shape. */
-		/** Impulse applied to the objects to keep them from penetrating. Divide by simulation step to get the force. */
-		float impulse;
-		float separation; /**< Determines how far are the objects. Negative value denotes penetration. */
-	};
-
-	/** Information about a collision between two physics objects. */
-	struct CollisionData
-	{
-		Collider* collidersRaw[2]; /**< Colliders involved in the collision. */
-
-		/** 
-		 * Components of the colliders that were hit. Can be null if collider is not owned by a component, in which case
-		 * use ::collidersRaw directly. 
-		 */
-		HCollider collider[2]; 
-		// Note: Not too happy this is heap allocated, use static allocator?
-		Vector<ContactPoint> contactPoints; /**< Information about all the contact points for the hit. */ 
-	};
-
-	/** Determines what parent, if any, owns a physics object. */
-	enum class PhysicsOwnerType
-	{
-		None, /** No parent, object is used directly. */
-		Component, /** Object is used by a C++ Component. */
-		Script /** Object is used by the scripting system. */
-	};
-
-	/** Contains information about a parent for a physics object. */
-	struct PhysicsObjectOwner
-	{
-		PhysicsOwnerType type = PhysicsOwnerType::None; /**< Type of owner. */
-		void* ownerData = nullptr; /**< Data managed by the owner. */
-	};
-
-	/** Determines which collision events will be reported by physics objects. */
-	enum class CollisionReportMode
-	{
-		None, /**< No collision events will be triggered. */
-		Report, /**< Collision events will be triggered when object enters and/or leaves collision. */
-		/** 
-		 * Collision events will be triggered when object enters and/or leaves collision, but also every frame the object
-		 * remains in collision. 
-		 */
-		ReportPersistent, 
-	};
-
-	/** Hit information from a physics query. */
-	struct PhysicsQueryHit
-	{
-		Vector3 point; /**< Position of the hit in world space. */
-		Vector3 normal; /**< Normal to the surface that was hit. */
-		Vector2 uv; /**< UV coordinates of the triangle that was hit (only applicable when triangle meshes are hit). */
-		float distance; /**< Distance from the query origin to the hit position. */
-		UINT32 triangleIdx; /**< Index of the triangle that was hit (only applicable when triangle meshes are hit). */
-		Collider* colliderRaw; /**< Collider that was hit. */
-		/** 
-		 * Component of the collider that was hit. This may be null if the hit collider has no owner component, in which
-		 * case refer to ::colliderRaw.
-		 */
-		HCollider collider;
-	};
-
-	/** @} */
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsCorePrerequisites.h"
+#include "BsVector3.h"
+#include "BsVector2.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup Physics
+	 *  @{
+	 */
+
+	/** Information about a single contact point during physics collision. */
+	struct ContactPoint
+	{
+		Vector3 position; /**< Contact point in world space. */
+		Vector3 normal; /**< Normal pointing from the second shape to the first shape. */
+		/** Impulse applied to the objects to keep them from penetrating. Divide by simulation step to get the force. */
+		float impulse;
+		float separation; /**< Determines how far are the objects. Negative value denotes penetration. */
+	};
+
+	/** Information about a collision between two physics objects. */
+	struct CollisionData
+	{
+		Collider* collidersRaw[2]; /**< Colliders involved in the collision. */
+
+		/** 
+		 * Components of the colliders that were hit. Can be null if collider is not owned by a component, in which case
+		 * use #collidersRaw directly. 
+		 */
+		HCollider collider[2]; 
+		// Note: Not too happy this is heap allocated, use static allocator?
+		Vector<ContactPoint> contactPoints; /**< Information about all the contact points for the hit. */ 
+	};
+
+	/** Determines what parent, if any, owns a physics object. */
+	enum class PhysicsOwnerType
+	{
+		None, /** No parent, object is used directly. */
+		Component, /** Object is used by a C++ Component. */
+		Script /** Object is used by the scripting system. */
+	};
+
+	/** Contains information about a parent for a physics object. */
+	struct PhysicsObjectOwner
+	{
+		PhysicsOwnerType type = PhysicsOwnerType::None; /**< Type of owner. */
+		void* ownerData = nullptr; /**< Data managed by the owner. */
+	};
+
+	/** Determines which collision events will be reported by physics objects. */
+	enum class CollisionReportMode
+	{
+		None, /**< No collision events will be triggered. */
+		Report, /**< Collision events will be triggered when object enters and/or leaves collision. */
+		/** 
+		 * Collision events will be triggered when object enters and/or leaves collision, but also every frame the object
+		 * remains in collision. 
+		 */
+		ReportPersistent, 
+	};
+
+	/** Hit information from a physics query. */
+	struct PhysicsQueryHit
+	{
+		Vector3 point; /**< Position of the hit in world space. */
+		Vector3 normal; /**< Normal to the surface that was hit. */
+		Vector2 uv; /**< UV coordinates of the triangle that was hit (only applicable when triangle meshes are hit). */
+		float distance = 0.0f; /**< Distance from the query origin to the hit position. */
+		UINT32 triangleIdx = 0; /**< Index of the triangle that was hit (only applicable when triangle meshes are hit). */
+		Collider* colliderRaw = nullptr; /**< Collider that was hit. */
+		/** 
+		 * Component of the collider that was hit. This may be null if the hit collider has no owner component, in which
+		 * case refer to #colliderRaw.
+		 */
+		HCollider collider;
+	};
+
+	/** @} */
 }
 }

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

@@ -32,7 +32,7 @@ namespace BansheeEngine
 		 * Initializes the physics manager and a particular physics implementation. 
 		 * Initializes the physics manager and a particular physics implementation. 
 		 *
 		 *
 		 * @param[in]	pluginName	Name of the plugin containing a physics implementation.
 		 * @param[in]	pluginName	Name of the plugin containing a physics implementation.
-		 * @param[in]	cookign		Should the cooking library be initialized with physics (normally only needed for 
+		 * @param[in]	cooking		Should the cooking library be initialized with physics (normally only needed for 
 		 *							editor).
 		 *							editor).
 		 */
 		 */
 		PhysicsManager(const String& pluginName, bool cooking);
 		PhysicsManager(const String& pluginName, bool cooking);

+ 9 - 4
Source/BansheeCore/Include/BsPixelBuffer.h

@@ -52,10 +52,11 @@ namespace BansheeEngine
         virtual void* lock(UINT32 offset, UINT32 length, GpuLockOptions options);
         virtual void* lock(UINT32 offset, UINT32 length, GpuLockOptions options);
 		
 		
 		/** @copydoc HardwareBuffer::readData */
 		/** @copydoc HardwareBuffer::readData */
-		virtual void readData(UINT32 offset, UINT32 length, void* pDest);
+		virtual void readData(UINT32 offset, UINT32 length, void* dest);
 
 
 		/** @copydoc HardwareBuffer::writeData */
 		/** @copydoc HardwareBuffer::writeData */
-		virtual void writeData(UINT32 offset, UINT32 length, const void* pSource, BufferWriteType writeFlags = BufferWriteType::Normal);
+		virtual void writeData(UINT32 offset, UINT32 length, const void* source, 
+			BufferWriteType writeFlags = BufferWriteType::Normal);
 
 
 		/**	Returns width of the surface in pixels. */
 		/**	Returns width of the surface in pixels. */
         UINT32 getWidth() const { return mWidth; }
         UINT32 getWidth() const { return mWidth; }
@@ -72,10 +73,14 @@ namespace BansheeEngine
 	protected:
 	protected:
 		friend class RenderTexture;
 		friend class RenderTexture;
 
 
-		/**	Internal implementation of the lock() method. */
+		/**	
+		 * Internal implementation of the lock() method. 
+		 *
+		 * @copydoc	lock(const PixelVolume&, GpuLockOptions)
+		 */
 		virtual PixelData lockImpl(PixelVolume lockBox, GpuLockOptions options) = 0;
 		virtual PixelData lockImpl(PixelVolume lockBox, GpuLockOptions options) = 0;
 
 
-		/** @copydoc HardwareBuffer::lockImpl */
+		/** @copydoc HardwareBuffer::lock(UINT32, UINT32, GpuLockOptions) */
 		virtual void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options);
 		virtual void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options);
 
 
 	protected:
 	protected:

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

@@ -17,7 +17,7 @@ namespace BansheeEngine
 	/**
 	/**
 	 * Provides various performance measuring methods.
 	 * Provides various performance measuring methods.
 	 * 			
 	 * 			
-	 * @note	Thread safe. Matching begin*\end* calls must belong to the same thread though.
+	 * @note	Thread safe. Matching begin* \ end* calls must belong to the same thread though.
 	 */
 	 */
 	class BS_CORE_EXPORT ProfilerCPU : public Module<ProfilerCPU>
 	class BS_CORE_EXPORT ProfilerCPU : public Module<ProfilerCPU>
 	{
 	{
@@ -242,14 +242,14 @@ namespace BansheeEngine
 		~ProfilerCPU();
 		~ProfilerCPU();
 
 
 		/**
 		/**
-		 * Registers a new thread we will be doing sampling in. This needs to be called before any beginSample*\endSample* 
+		 * Registers a new thread we will be doing sampling in. This needs to be called before any beginSample* \ endSample* 
 		 * calls are made in that thread.
 		 * calls are made in that thread.
 		 *
 		 *
 		 * @param[in]	name	Name that will allow you to more easily identify the thread.
 		 * @param[in]	name	Name that will allow you to more easily identify the thread.
 		 */
 		 */
 		void beginThread(const char* name);
 		void beginThread(const char* name);
 
 
-		/**	Ends sampling for the current thread. No beginSample*\endSample* calls after this point. */
+		/**	Ends sampling for the current thread. No beginSample* \ endSample* calls after this point. */
 		void endThread();
 		void endThread();
 
 
 		/**
 		/**

+ 4 - 2
Source/BansheeCore/Include/BsProfilingManager.h

@@ -49,8 +49,10 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Returns a profiler report for the specified frame, for the specified thread.
 		 * Returns a profiler report for the specified frame, for the specified thread.
 		 *
 		 *
-		 * @param[in]	Profiler report index, ranging [0, NUM_SAVED_FRAMES]. 0 always returns the latest  report. 
-		 *				Increasing indexes return reports for older and older frames. Out of range  indexes will be clamped.
+		 * @param[in]	thread	Thread for which to retrieve the profiler report.
+		 * @param[in]	idx		Profiler report index, ranging [0, NUM_SAVED_FRAMES]. 0 always returns the latest  report. 
+		 *						Increasing indexes return reports for older and older frames. Out of range  indexes will be
+		 *						clamped.
 		 *
 		 *
 		 * @note	
 		 * @note	
 		 * Profiler reports get updated every frame. Oldest reports that no longer fit in the saved reports buffer are 
 		 * Profiler reports get updated every frame. Oldest reports that no longer fit in the saved reports buffer are 

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

@@ -149,7 +149,7 @@ namespace BansheeEngine
 
 
 		RasterizerState(const RASTERIZER_STATE_DESC& desc);
 		RasterizerState(const RASTERIZER_STATE_DESC& desc);
 		
 		
-		/** @copydoc CoreObjectCore::createCore */
+		/** @copydoc CoreObject::createCore */
 		SPtr<CoreObjectCore> createCore() const override;
 		SPtr<CoreObjectCore> createCore() const override;
 
 
 		RasterizerProperties mProperties;
 		RasterizerProperties mProperties;

+ 252 - 47
Source/BansheeCore/Include/BsRenderAPI.h

@@ -34,94 +34,216 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT RenderAPI
 	class BS_CORE_EXPORT RenderAPI
 	{
 	{
 	public:
 	public:
-		/** @copydoc RenderAPICore::disableTextureUnit() */
+		/** 
+		 * @copydoc RenderAPICore::disableTextureUnit()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void disableTextureUnit(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit);
 		static void disableTextureUnit(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit);
 
 
-		/** @copydoc RenderAPICore::setTexture() */
-		static void setTexture(CoreAccessor& accessor, GpuProgramType gptype, UINT16 unit, bool enabled, const TexturePtr &texPtr);
+		/**  
+		 * @copydoc RenderAPICore::setTexture()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
+		static void setTexture(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit, bool enabled, 
+			const TexturePtr &texPtr);
 
 
-		/** @copydoc RenderAPICore::setLoadStoreTexture() */
-		static void setLoadStoreTexture(CoreAccessor& accessor, GpuProgramType gptype, UINT16 unit, bool enabled, const TexturePtr& texPtr,
-			const TextureSurface& surface);
+		/**  
+		 * @copydoc RenderAPICore::setLoadStoreTexture()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
+		static void setLoadStoreTexture(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit, bool enabled, 
+			const TexturePtr& texPtr, const TextureSurface& surface);
 
 
-		/** @copydoc RenderAPICore::setSamplerState() */
-		static void setSamplerState(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit, const SamplerStatePtr& samplerState);
+		/** 
+		 * @copydoc RenderAPICore::setSamplerState()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
+		static void setSamplerState(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit, 
+			const SamplerStatePtr& samplerState);
 
 
-		/** @copydoc RenderAPICore::setBlendState() */
+		/**  
+		 * @copydoc RenderAPICore::setBlendState()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setBlendState(CoreAccessor& accessor, const BlendStatePtr& blendState);
 		static void setBlendState(CoreAccessor& accessor, const BlendStatePtr& blendState);
 
 
-		/** @copydoc RenderAPICore::setRasterizerState() */
+		/** 
+		 * @copydoc RenderAPICore::setRasterizerState()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setRasterizerState(CoreAccessor& accessor, const RasterizerStatePtr& rasterizerState);
 		static void setRasterizerState(CoreAccessor& accessor, const RasterizerStatePtr& rasterizerState);
 
 
-		/** @copydoc RenderAPICore::setRasterizerState() */
-		static void setDepthStencilState(CoreAccessor& accessor, const DepthStencilStatePtr& depthStencilState, UINT32 stencilRefValue);
+		/** 
+		 * @copydoc RenderAPICore::setDepthStencilState()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
+		static void setDepthStencilState(CoreAccessor& accessor, const DepthStencilStatePtr& depthStencilState, 
+			UINT32 stencilRefValue);
 
 
-		/** @copydoc RenderAPICore::setVertexBuffers() */
+		/** 
+		 * Sets the provided vertex buffers starting at the specified source index.	Set buffer to nullptr to clear the
+		 * buffer at the specified index.
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 * @param[in]	index		Index at which to start binding the vertex buffers.
+		 * @param[in]	buffers		A list of buffers to bind to the pipeline.
+		 */
 		static void setVertexBuffers(CoreAccessor& accessor, UINT32 index, const Vector<VertexBufferPtr>& buffers);
 		static void setVertexBuffers(CoreAccessor& accessor, UINT32 index, const Vector<VertexBufferPtr>& buffers);
 
 
-		/** @copydoc RenderAPICore::setIndexBuffer() */
+		/** 
+		 * @copydoc RenderAPICore::setIndexBuffer()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setIndexBuffer(CoreAccessor& accessor, const IndexBufferPtr& buffer);
 		static void setIndexBuffer(CoreAccessor& accessor, const IndexBufferPtr& buffer);
 
 
-		/** @copydoc RenderAPICore::setVertexDeclaration() */
+		/** 
+		 * @copydoc RenderAPICore::setVertexDeclaration()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setVertexDeclaration(CoreAccessor& accessor, const VertexDeclarationPtr& vertexDeclaration);
 		static void setVertexDeclaration(CoreAccessor& accessor, const VertexDeclarationPtr& vertexDeclaration);
 
 
-		/** @copydoc RenderAPICore::setViewport() */
-		static void setViewport(CoreAccessor& accessor, const Rect2& vp);
+		/** 
+		 * @copydoc RenderAPICore::setViewport()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
+		static void setViewport(CoreAccessor& accessor, const Rect2& area);
 
 
-		/** @copydoc RenderAPICore::setDrawOperation() */
+		/** 
+		 * @copydoc RenderAPICore::setDrawOperation() 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setDrawOperation(CoreAccessor& accessor, DrawOperationType op);
 		static void setDrawOperation(CoreAccessor& accessor, DrawOperationType op);
 
 
-		/** @copydoc RenderAPICore::setClipPlanes() */
+		/** 
+		 * @copydoc RenderAPICore::setClipPlanes() 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setClipPlanes(CoreAccessor& accessor, const PlaneList& clipPlanes);
 		static void setClipPlanes(CoreAccessor& accessor, const PlaneList& clipPlanes);
 
 
-		/** @copydoc RenderAPICore::addClipPlane(const Plane&) */
+		/** 
+		 * @copydoc RenderAPICore::addClipPlane(const Plane&) 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void addClipPlane(CoreAccessor& accessor, const Plane& p);
 		static void addClipPlane(CoreAccessor& accessor, const Plane& p);
 
 
-		/** @copydoc RenderAPICore::resetClipPlanes() */
+		/** 
+		 * @copydoc RenderAPICore::resetClipPlanes() 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void resetClipPlanes(CoreAccessor& accessor);
 		static void resetClipPlanes(CoreAccessor& accessor);
 
 
-		/** @copydoc RenderAPICore::setScissorTest() */
-		static void setScissorTest(CoreAccessor& accessor, UINT32 left = 0, UINT32 top = 0, UINT32 right = 800, UINT32 bottom = 600);
+		/** 
+		 * @copydoc RenderAPICore::setScissorRect() 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
+		static void setScissorRect(CoreAccessor& accessor, UINT32 left = 0, UINT32 top = 0, UINT32 right = 800, UINT32 bottom = 600);
 
 
-		/** @copydoc RenderAPICore::setRenderTarget() */
+		/** 
+		 * @copydoc RenderAPICore::setRenderTarget()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setRenderTarget(CoreAccessor& accessor, const RenderTargetPtr& target, bool readOnlyDepthStencil = false);
 		static void setRenderTarget(CoreAccessor& accessor, const RenderTargetPtr& target, bool readOnlyDepthStencil = false);
 
 
-		/** @copydoc RenderAPICore::bindGpuProgram() */
+		/** 
+		 * @copydoc RenderAPICore::bindGpuProgram()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void bindGpuProgram(CoreAccessor& accessor, const GpuProgramPtr& prg);
 		static void bindGpuProgram(CoreAccessor& accessor, const GpuProgramPtr& prg);
 
 
-		/** @copydoc RenderAPICore::unbindGpuProgram() */
+		/** 
+		 * @copydoc RenderAPICore::unbindGpuProgram()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void unbindGpuProgram(CoreAccessor& accessor, GpuProgramType gptype);
 		static void unbindGpuProgram(CoreAccessor& accessor, GpuProgramType gptype);
 
 
-		/** @copydoc RenderAPICore::setConstantBuffers() */
+		/** 
+		 * @copydoc RenderAPICore::setConstantBuffers()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setConstantBuffers(CoreAccessor& accessor, GpuProgramType gptype, const GpuParamsPtr& params);
 		static void setConstantBuffers(CoreAccessor& accessor, GpuProgramType gptype, const GpuParamsPtr& params);
 
 
-		/** @copydoc RenderAPICore::setGpuParams() */
+		/** 
+		 * @copydoc RenderAPICore::setGpuParams()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void setGpuParams(CoreAccessor& accessor, GpuProgramType gptype, const GpuParamsPtr& params);
 		static void setGpuParams(CoreAccessor& accessor, GpuProgramType gptype, const GpuParamsPtr& params);
 
 
-		/** @copydoc RenderAPICore::beginFrame() */
+		/** 
+		 * @copydoc RenderAPICore::beginFrame()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void beginRender(CoreAccessor& accessor);
 		static void beginRender(CoreAccessor& accessor);
 
 
-		/** @copydoc RenderAPICore::endFrame() */
+		/** 
+		 * @copydoc RenderAPICore::endFrame()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void endRender(CoreAccessor& accessor);
 		static void endRender(CoreAccessor& accessor);
 
 
-		/** @copydoc RenderAPICore::clearRenderTarget() */
+		/** 
+		 * @copydoc RenderAPICore::clearRenderTarget() 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void clearRenderTarget(CoreAccessor& accessor, UINT32 buffers, 
 		static void clearRenderTarget(CoreAccessor& accessor, UINT32 buffers, 
 			const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, UINT8 targetMask = 0xFF);
 			const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, UINT8 targetMask = 0xFF);
 
 
-		/** @copydoc RenderAPICore::clearViewport() */
+		/** 
+		 * @copydoc RenderAPICore::clearViewport()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void clearViewport(CoreAccessor& accessor, UINT32 buffers, const Color& color = Color::Black, 
 		static void clearViewport(CoreAccessor& accessor, UINT32 buffers, const Color& color = Color::Black, 
 			float depth = 1.0f, UINT16 stencil = 0, UINT8 targetMask = 0xFF);
 			float depth = 1.0f, UINT16 stencil = 0, UINT8 targetMask = 0xFF);
 
 
-		/** @copydoc RenderAPICore::swapBuffers() */
+		/** 
+		 * @copydoc RenderAPICore::swapBuffers()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void swapBuffers(CoreAccessor& accessor, const RenderTargetPtr& target);
 		static void swapBuffers(CoreAccessor& accessor, const RenderTargetPtr& target);
 
 
-		/** @copydoc RenderAPICore::draw() */
+		/** 
+		 * @copydoc RenderAPICore::draw()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void draw(CoreAccessor& accessor, UINT32 vertexOffset, UINT32 vertexCount);
 		static void draw(CoreAccessor& accessor, UINT32 vertexOffset, UINT32 vertexCount);
 
 
-		/** @copydoc RenderAPICore::drawIndexed() */
+		/** 
+		 * @copydoc RenderAPICore::drawIndexed()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void drawIndexed(CoreAccessor& accessor, UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 vertexCount);
 		static void drawIndexed(CoreAccessor& accessor, UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 vertexCount);
 
 
-		/** @copydoc RenderAPICore::dispatchCompute() */
+		/** 
+		 * @copydoc RenderAPICore::dispatchCompute()
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		static void dispatchCompute(CoreAccessor& accessor, UINT32 numGroupsX, UINT32 numGroupsY = 1, UINT32 numGroupsZ = 1);
 		static void dispatchCompute(CoreAccessor& accessor, UINT32 numGroupsX, UINT32 numGroupsY = 1, UINT32 numGroupsZ = 1);
 
 
 		/** @copydoc RenderAPICore::getVideoModeInfo */
 		/** @copydoc RenderAPICore::getVideoModeInfo */
@@ -219,6 +341,10 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Sets a sampler state for the specified texture unit.
 		 * Sets a sampler state for the specified texture unit.
 		 *
 		 *
+		 * @param[in]	gptype			Determines to which GPU program slot to bind the sampler state.
+		 * @param[in]	texUnit			Texture unit index to bind the state to.
+		 * @param[in]	samplerState	Sampler state to bind, or null to unbind.
+		 *
 		 * @see		SamplerState
 		 * @see		SamplerState
 		 */
 		 */
 		virtual void setSamplerState(GpuProgramType gptype, UINT16 texUnit, const SPtr<SamplerStateCore>& samplerState) = 0;
 		virtual void setSamplerState(GpuProgramType gptype, UINT16 texUnit, const SPtr<SamplerStateCore>& samplerState) = 0;
@@ -226,6 +352,8 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Sets a blend state used for all active render targets.
 		 * Sets a blend state used for all active render targets.
 		 *
 		 *
+		 * @param[in]	blendState	Blend state to bind, or null to unbind.
+		 *
 		 * @see		BlendState
 		 * @see		BlendState
 		 */
 		 */
 		virtual void setBlendState(const SPtr<BlendStateCore>& blendState) = 0;
 		virtual void setBlendState(const SPtr<BlendStateCore>& blendState) = 0;
@@ -233,6 +361,8 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Sets a state that controls various rasterizer options. 
 		 * Sets a state that controls various rasterizer options. 
 		 *
 		 *
+		 * @param[in]	rasterizerState		Rasterizer state to bind, or null to unbind.
+		 *
 		 * @see		RasterizerState
 		 * @see		RasterizerState
 		 */
 		 */
 		virtual void setRasterizerState(const SPtr<RasterizerStateCore>& rasterizerState) = 0;
 		virtual void setRasterizerState(const SPtr<RasterizerStateCore>& rasterizerState) = 0;
@@ -240,6 +370,9 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Sets a state that controls depth & stencil buffer options.
 		 * Sets a state that controls depth & stencil buffer options.
 		 *
 		 *
+		 * @param[in]	depthStencilState		Depth-stencil state to bind, or null to unbind.
+		 * @param[in]	stencilRefValue			Stencil reference value to be used for stencil comparisons, if enabled.
+		 *
 		 * @see		DepthStencilState
 		 * @see		DepthStencilState
 		 */
 		 */
 		virtual void setDepthStencilState(const SPtr<DepthStencilStateCore>& depthStencilState, UINT32 stencilRefValue) = 0;
 		virtual void setDepthStencilState(const SPtr<DepthStencilStateCore>& depthStencilState, UINT32 stencilRefValue) = 0;
@@ -247,14 +380,32 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Binds a texture to the pipeline for the specified GPU program type at the specified slot. If the slot matches 
 		 * Binds a texture to the pipeline for the specified GPU program type at the specified slot. If the slot matches 
 		 * the one configured in the GPU program the program will be able to access this texture on the GPU.
 		 * the one configured in the GPU program the program will be able to access this texture on the GPU.
+		 *
+		 * @param[in]	gptype			Determines to which GPU program slot to bind the texture.
+		 * @param[in]	texUnit			Texture unit index to bind the texture to.
+		 * @param[in]	enabled			True to bind the texture at the specified unit, false to unbind.
+		 * @param[in]	texPtr			Texture to bind.
 		 */
 		 */
-		virtual void setTexture(GpuProgramType gptype, UINT16 unit, bool enabled, const SPtr<TextureCore>& texPtr) = 0;
+		virtual void setTexture(GpuProgramType gptype, UINT16 texUnit, bool enabled, const SPtr<TextureCore>& texPtr) = 0;
 
 
-		/**	Turns off a texture unit. */
+		/**	
+		 * Removes a texture at the specified texture unit.
+		 *
+		 * @param[in]	gptype			Determines at which GPU program slot to unbind the texture.
+		 * @param[in]	texUnit			Texture unit index to unbind the texture from.
+		 */
 		virtual void disableTextureUnit(GpuProgramType gptype, UINT16 texUnit);
 		virtual void disableTextureUnit(GpuProgramType gptype, UINT16 texUnit);
 
 
-		/**	Binds a texture that can be used for random load/store operations from a GPU program. */
-		virtual void setLoadStoreTexture(GpuProgramType gptype, UINT16 unit, bool enabled, 
+		/**	
+		 * Binds a texture that can be used for random load/store operations from a GPU program. 
+		 *
+		 * @param[in]	gptype			Determines to which GPU program slot to bind the texture.
+		 * @param[in]	texUnit			Texture unit index to bind the texture to.
+		 * @param[in]	enabled			True to bind the texture at the specified unit, false to unbind.
+		 * @param[in]	texPtr			Texture to bind.
+		 * @param[in]	surface			Determines which surface of the texture to bind.
+		 */
+		virtual void setLoadStoreTexture(GpuProgramType gptype, UINT16 texUnit, bool enabled,
 			const SPtr<TextureCore>& texPtr, const TextureSurface& surface) = 0;
 			const SPtr<TextureCore>& texPtr, const TextureSurface& surface) = 0;
 
 
 		/**
 		/**
@@ -276,31 +427,53 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Sets the provided vertex buffers starting at the specified source index.	Set buffer to nullptr to clear the 
 		 * Sets the provided vertex buffers starting at the specified source index.	Set buffer to nullptr to clear the 
 		 * buffer at the specified index.
 		 * buffer at the specified index.
+		 *
+		 * @param[in]	index		Index at which to start binding the vertex buffers.
+		 * @param[in]	buffers		A list of buffers to bind to the pipeline.
+		 * @param[in]	numBuffers	Number of buffers in the @p buffers list.
 		 */
 		 */
 		virtual void setVertexBuffers(UINT32 index, SPtr<VertexBufferCore>* buffers, UINT32 numBuffers) = 0;
 		virtual void setVertexBuffers(UINT32 index, SPtr<VertexBufferCore>* buffers, UINT32 numBuffers) = 0;
 
 
 		/**
 		/**
 		 * Sets an index buffer to use when drawing. Indices in an index buffer reference vertices in the vertex buffer, 
 		 * Sets an index buffer to use when drawing. Indices in an index buffer reference vertices in the vertex buffer, 
 		 * which increases cache coherency and reduces the size of vertex buffers by eliminating duplicate data.
 		 * which increases cache coherency and reduces the size of vertex buffers by eliminating duplicate data.
+		 *
+		 * @param[in]	buffer	Index buffer to bind, null to unbine.
 		 */
 		 */
 		virtual void setIndexBuffer(const SPtr<IndexBufferCore>& buffer) = 0;
 		virtual void setIndexBuffer(const SPtr<IndexBufferCore>& buffer) = 0;
 
 
 		/**
 		/**
 		 * Sets the vertex declaration to use when drawing. Vertex declaration is used to decode contents of a single 
 		 * Sets the vertex declaration to use when drawing. Vertex declaration is used to decode contents of a single 
 		 * vertex in a vertex buffer.
 		 * vertex in a vertex buffer.
+		 *
+		 * @param[in]	vertexDeclaration	Vertex declaration to bind.
 		 */
 		 */
 		virtual void setVertexDeclaration(const SPtr<VertexDeclarationCore>& vertexDeclaration) = 0;
 		virtual void setVertexDeclaration(const SPtr<VertexDeclarationCore>& vertexDeclaration) = 0;
 
 
-		/** Sets the draw operation that determines how to interpret the elements of the index or vertex buffers. */
+		/** 
+		 * Sets the draw operation that determines how to interpret the elements of the index or vertex buffers. 
+		 *
+		 * @param[in]	op	Draw operation to enable.
+		 */
 		virtual void setDrawOperation(DrawOperationType op) = 0;
 		virtual void setDrawOperation(DrawOperationType op) = 0;
 
 
 		/**
 		/**
 		 * Draw an object based on currently bound GPU programs, vertex declaration and vertex buffers. Draws directly from
 		 * Draw an object based on currently bound GPU programs, vertex declaration and vertex buffers. Draws directly from
 		 * the vertex buffer without using indices.
 		 * the vertex buffer without using indices.
+		 *
+		 * @param[in]	vertexOffset	Offset into the currently bound vertex buffer to start drawing from.
+		 * @param[in]	vertexCount		Number of vertices to draw.
 		 */
 		 */
 		virtual void draw(UINT32 vertexOffset, UINT32 vertexCount) = 0;
 		virtual void draw(UINT32 vertexOffset, UINT32 vertexCount) = 0;
 
 
-		/** Draw an object based on currently bound GPU programs, vertex declaration, vertex and index buffers. */
+		/** 
+		 * Draw an object based on currently bound GPU programs, vertex declaration, vertex and index buffers. 
+		 *
+		 * @param[in]	startIndex		Offset into the currently bound index buffer to start drawing from.
+		 * @param[in]	indexCount		Number of indices to draw.
+		 * @param[in]	vertexOffset	Offset to apply to each vertex index.
+		 * @param[in]	vertexCount		Number of vertices to draw.
+		 */
 		virtual void drawIndexed(UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 vertexCount) = 0;
 		virtual void drawIndexed(UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 vertexCount) = 0;
 
 
 		/** 
 		/** 
@@ -312,7 +485,11 @@ namespace BansheeEngine
 		 */
 		 */
 		virtual void dispatchCompute(UINT32 numGroupsX, UINT32 numGroupsY = 1, UINT32 numGroupsZ = 1) = 0;
 		virtual void dispatchCompute(UINT32 numGroupsX, UINT32 numGroupsY = 1, UINT32 numGroupsZ = 1) = 0;
 
 
-		/** Swap the front and back buffer of the specified render target. */
+		/** 
+		 * Swap the front and back buffer of the specified render target. 
+		 *
+		 * @param[in]	target	Render target to perform the buffer swap on.
+		 */
 		virtual void swapBuffers(const SPtr<RenderTargetCore>& target);
 		virtual void swapBuffers(const SPtr<RenderTargetCore>& target);
 
 
 		/**
 		/**
@@ -328,28 +505,51 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Binds the provided GPU program to the pipeline. Any following draw operations will use this program. 
 		 * Binds the provided GPU program to the pipeline. Any following draw operations will use this program. 
 		 *
 		 *
+		 * @param[in]	prg		GPU program to bind. Slot it is bound to is determined by the program type.
+		 *
 		 * @note	You need to bind at least a vertex and a fragment program in order to draw something.
 		 * @note	You need to bind at least a vertex and a fragment program in order to draw something.
 		 */
 		 */
 		virtual void bindGpuProgram(const SPtr<GpuProgramCore>& prg);
 		virtual void bindGpuProgram(const SPtr<GpuProgramCore>& prg);
 
 
 		/**
 		/**
 		 * Binds constant(uniform) GPU program parameters. Caller must ensure these match the previously bound GPU program.
 		 * Binds constant(uniform) GPU program parameters. Caller must ensure these match the previously bound GPU program.
+		 *
+		 * @param[in]	gptype	GPU program slot to bind the buffer to.
+		 * @param[in]	params	Object containing the required constant buffers.
 		 */
 		 */
 		virtual void setConstantBuffers(GpuProgramType gptype, const SPtr<GpuParamsCore>& params) = 0;
 		virtual void setConstantBuffers(GpuProgramType gptype, const SPtr<GpuParamsCore>& params) = 0;
 
 
-		/** Binds all specified GPU program parameters. Caller must ensure these match the previously bound GPU program. */
+		/** 
+		 * Binds all specified GPU program parameters (textures, buffers, samplers and constant buffers). Caller must
+		 * ensure these match the previously bound GPU program. 
+		 *
+		 * @param[in]	gptype	GPU program slot to bind the buffer to.
+		 * @param[in]	params	Object containing the required parameters.
+		 */
 		virtual void setGpuParams(GpuProgramType gptype, const SPtr<GpuParamsCore>& params);
 		virtual void setGpuParams(GpuProgramType gptype, const SPtr<GpuParamsCore>& params);
 
 
-		/**	Unbinds a program of a given type. */
+		/**	
+		 * Unbinds a program of a given type. 
+		 *
+		 * @param[in]	gptype	GPU program slot to unbind the program from.
+		 */
 		virtual void unbindGpuProgram(GpuProgramType gptype);
 		virtual void unbindGpuProgram(GpuProgramType gptype);
 
 
 		/**	Query if a GPU program of a given type is currently bound. */
 		/**	Query if a GPU program of a given type is currently bound. */
 		virtual bool isGpuProgramBound(GpuProgramType gptype);
 		virtual bool isGpuProgramBound(GpuProgramType gptype);
 
 
-		/**	Sets up clip planes that will clip drawn geometry on the negative side of the planes. */
+		/**	
+		 * Sets up clip planes that will clip drawn geometry on the negative side of the planes. 
+		 *
+		 * @param[in]	clipPlanes	A list of planes to set, replacing the old ones.
+		 */
 		virtual void setClipPlanes(const PlaneList& clipPlanes);
 		virtual void setClipPlanes(const PlaneList& clipPlanes);
 
 
-		/**	Adds a new clip plane. All drawn geometry will be clipped to this plane. */
+		/**	
+		 * Adds a new clip plane. All drawn geometry will be clipped to this plane. 
+		 *
+		 * @param[in]	p	Clip plane to add.
+		 */
 		virtual void addClipPlane(const Plane& p);
 		virtual void addClipPlane(const Plane& p);
 
 
 		/**	Clears all clip planes. */
 		/**	Clears all clip planes. */
@@ -358,6 +558,11 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Allows you to set up a region in which rendering can take place. Coordinates are in pixels. No rendering will be
 		 * Allows you to set up a region in which rendering can take place. Coordinates are in pixels. No rendering will be
 		 * done to render target pixels outside of the provided region.
 		 * done to render target pixels outside of the provided region.
+		 *
+		 * @param[in]	left	Left border of the scissor rectangle, in pixels.
+		 * @param[in]	top		Top border of the scissor rectangle, in pixels.
+		 * @param[in]	right	Right border of the scissor rectangle, in pixels.
+		 * @param[in]	bottom	Bottom border of the scissor rectangle, in pixels.
 		 */
 		 */
 		virtual void setScissorRect(UINT32 left, UINT32 top, UINT32 right, UINT32 bottom) = 0;
 		virtual void setScissorRect(UINT32 left, UINT32 top, UINT32 right, UINT32 bottom) = 0;
 
 

+ 5 - 1
Source/BansheeCore/Include/BsRenderTarget.h

@@ -130,7 +130,11 @@ namespace BansheeEngine
 		/** Queries the render target for a custom attribute. This may be anything and is implementation specific. */
 		/** Queries the render target for a custom attribute. This may be anything and is implementation specific. */
 		virtual void getCustomAttribute(const String& name, void* pData) const;
 		virtual void getCustomAttribute(const String& name, void* pData) const;
 
 
-		/** @copydoc RenderTargetCore::setPriority */
+		/** 
+		 * @copydoc RenderTargetCore::setPriority 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void setPriority(CoreAccessor& accessor, INT32 priority);
 		void setPriority(CoreAccessor& accessor, INT32 priority);
 
 
 		/**
 		/**

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

@@ -94,10 +94,10 @@ namespace BansheeEngine
 
 
 		RenderTexture(const RENDER_TEXTURE_DESC& desc);
 		RenderTexture(const RENDER_TEXTURE_DESC& desc);
 
 
-		/** @copydoc RenderTexture::createCore */
+		/** @copydoc CoreObject::createCore */
 		virtual SPtr<CoreObjectCore> createCore() const override;
 		virtual SPtr<CoreObjectCore> createCore() const override;
 
 
-		/** @copydoc CoreObjectCore::syncToCore */
+		/** @copydoc CoreObject::syncToCore */
 		virtual CoreSyncData syncToCore(FrameAlloc* allocator) override;
 		virtual CoreSyncData syncToCore(FrameAlloc* allocator) override;
 
 
 	protected:
 	protected:
@@ -138,7 +138,7 @@ namespace BansheeEngine
 		/** @copydoc CoreObjectCore::initialize */
 		/** @copydoc CoreObjectCore::initialize */
 		virtual void initialize();
 		virtual void initialize();
 
 
-		/** @copydoc TextureCoreManager::createRenderTexture(const RENDER_TEXTURE_DESC&) */
+		/** @copydoc TextureCoreManager::createRenderTexture(const RENDER_TEXTURE_CORE_DESC&) */
 		static SPtr<RenderTextureCore> create(const RENDER_TEXTURE_CORE_DESC& desc);
 		static SPtr<RenderTextureCore> create(const RENDER_TEXTURE_CORE_DESC& desc);
 
 
 		/**
 		/**

+ 58 - 14
Source/BansheeCore/Include/BsRenderWindow.h

@@ -105,34 +105,78 @@ namespace BansheeEngine
 		/**	Converts window local position to screen position. */
 		/**	Converts window local position to screen position. */
 		virtual Vector2I windowToScreenPos(const Vector2I& windowPos) const = 0;
 		virtual Vector2I windowToScreenPos(const Vector2I& windowPos) const = 0;
 
 
-		/**	Resize the window to specified width and height in pixels. */
+		/**	
+		 * Resize the window to specified width and height in pixels. 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 * @param[in]	width		Width of the window in pixels.
+		 * @param[in]	height		Height of the window in pixels.
+		 */
 		void resize(CoreAccessor& accessor, UINT32 width, UINT32 height);
 		void resize(CoreAccessor& accessor, UINT32 width, UINT32 height);
 
 
-		/**	Move the window to specified screen coordinates. */
+		/**	
+		 * Move the window to specified screen coordinates. 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 * @param[in]	left		Position of the left border of the window on the screen.
+		 * @param[in]	top			Position of the top border of the window on the screen.
+		 */
 		void move(CoreAccessor& accessor, INT32 left, INT32 top);
 		void move(CoreAccessor& accessor, INT32 left, INT32 top);
 
 
-		/**	Hide the window. (Does not destroy it, just hides it). */
+		/**	
+		 * Hide the window. (Does not destroy it, just hides it). 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void hide(CoreAccessor& accessor);
 		void hide(CoreAccessor& accessor);
 
 
-		/**	Shows a previously hidden window. */
+		/**	
+		 * Shows a previously hidden window. 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void show(CoreAccessor& accessor);
 		void show(CoreAccessor& accessor);
 
 
-		/** @copydoc RenderWindowCore::minimize */
+		/** 
+		 * @copydoc RenderWindowCore::minimize 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void minimize(CoreAccessor& accessor);
 		void minimize(CoreAccessor& accessor);
 
 
-		/** @copydoc RenderWindowCore::maximize */
+		/** 
+		 * @copydoc RenderWindowCore::maximize 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void maximize(CoreAccessor& accessor);
 		void maximize(CoreAccessor& accessor);
 
 
-		/** @copydoc RenderWindowCore::restore */
+		/** 
+		 * @copydoc RenderWindowCore::restore 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void restore(CoreAccessor& accessor);
 		void restore(CoreAccessor& accessor);
 
 
-		/** @copydoc RenderWindowCore::setFullscreen(UINT32, UINT32, float, UINT32) */
+		/** 
+		 * @copydoc RenderWindowCore::setFullscreen(UINT32, UINT32, float, UINT32) 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void setFullscreen(CoreAccessor& accessor, UINT32 width, UINT32 height, float refreshRate = 60.0f, UINT32 monitorIdx = 0);
 		void setFullscreen(CoreAccessor& accessor, UINT32 width, UINT32 height, float refreshRate = 60.0f, UINT32 monitorIdx = 0);
 
 
-		/** @copydoc RenderWindowCore::setFullscreen(const VideoMode&) */
-		void setFullscreen(CoreAccessor& accessor, const VideoMode& mode);
+		/** 
+		 * @copydoc RenderWindowCore::setFullscreen(const VideoMode&) 
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
+		void setFullscreen(CoreAccessor& accessor, const VideoMode& videoMode);
 
 
-		/** @copydoc RenderWindowCore::setWindowed */
+		/**
+		 * @copydoc RenderWindowCore::setWindowed
+		 *
+		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
+		 */
 		void setWindowed(CoreAccessor& accessor, UINT32 width, UINT32 height);
 		void setWindowed(CoreAccessor& accessor, UINT32 width, UINT32 height);
 
 
 		/**	Retrieves a core implementation of a render window usable only from the core thread. */
 		/**	Retrieves a core implementation of a render window usable only from the core thread. */
@@ -200,13 +244,13 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @param[in]	videoMode	Mode retrieved from VideoModeInfo in RenderAPI.
 		 * @param[in]	videoMode	Mode retrieved from VideoModeInfo in RenderAPI.
 		 */
 		 */
-		virtual void setFullscreen(const VideoMode& mode) { }
+		virtual void setFullscreen(const VideoMode& videoMode) { }
 
 
 		/**
 		/**
 		 * Switches the window to windowed mode.
 		 * Switches the window to windowed mode.
 		 *
 		 *
-		 * @param[in]	Window width in pixels.
-		 * @param[in]	Window height in pixels.
+		 * @param[in]	width	Window width in pixels.
+		 * @param[in]	height	Window height in pixels.
 		 */
 		 */
 		virtual void setWindowed(UINT32 width, UINT32 height) { }
 		virtual void setWindowed(UINT32 width, UINT32 height) { }
 
 

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

@@ -96,7 +96,7 @@ namespace BansheeEngine
 	public:
 	public:
 		RenderWindowCoreManager();
 		RenderWindowCoreManager();
 
 
-		/** @copydoc RenderWindowCoreManager::create */
+		/** Creates a new render window using the specified options. */
 		SPtr<RenderWindowCore> create(RENDER_WINDOW_DESC& desc);
 		SPtr<RenderWindowCore> create(RENDER_WINDOW_DESC& desc);
 
 
 		/** Called once per frame. Dispatches events. */
 		/** Called once per frame. Dispatches events. */

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

@@ -90,7 +90,7 @@ namespace BansheeEngine
 		/** Increments the reference count of the handle. Only to be used by Resources for keeping internal references. */
 		/** Increments the reference count of the handle. Only to be used by Resources for keeping internal references. */
 		void addInternalRef();
 		void addInternalRef();
 
 
-		/** Decrements the reference count of the handle. Only to be used by ::Resources for keeping internal references. */
+		/** Decrements the reference count of the handle. Only to be used by Resources for keeping internal references. */
 		void removeInternalRef();
 		void removeInternalRef();
 
 
 		/** 
 		/** 

+ 14 - 6
Source/BansheeCore/Include/BsResources.h

@@ -71,7 +71,7 @@ namespace BansheeEngine
 		 */
 		 */
 		HResource load(const Path& filePath, bool loadDependencies = true, bool keepInternalReference = true);
 		HResource load(const Path& filePath, bool loadDependencies = true, bool keepInternalReference = true);
 
 
-		/** @copydoc load(const Path&, bool) */
+		/** @copydoc load(const Path&, bool, bool) */
 		template <class T>
 		template <class T>
 		ResourceHandle<T> load(const Path& filePath, bool loadDependencies = true, bool keepInternalReference = true)
 		ResourceHandle<T> load(const Path& filePath, bool loadDependencies = true, bool keepInternalReference = true)
 		{
 		{
@@ -81,11 +81,11 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Loads the resource for the provided weak resource handle, or returns a loaded resource if already loaded.
 		 * Loads the resource for the provided weak resource handle, or returns a loaded resource if already loaded.
 		 * 			
 		 * 			
-		 * @see		load(const Path&, bool)
+		 * @see		load(const Path&, bool, bool)
 		 */
 		 */
 		HResource load(const WeakResourceHandle<Resource>& handle, bool loadDependencies = true, bool keepInternalReference = true);
 		HResource load(const WeakResourceHandle<Resource>& handle, bool loadDependencies = true, bool keepInternalReference = true);
 
 
-		/** @copydoc load(const WeakResourceHandle<T>&, bool) */
+		/** @copydoc load(const WeakResourceHandle<Resource>&, bool, bool) */
 		template <class T>
 		template <class T>
 		ResourceHandle<T> load(const WeakResourceHandle<T>& handle, bool loadDependencies = true, bool keepInternalReference = true)
 		ResourceHandle<T> load(const WeakResourceHandle<T>& handle, bool loadDependencies = true, bool keepInternalReference = true)
 		{
 		{
@@ -97,7 +97,15 @@ namespace BansheeEngine
 		 * done.
 		 * done.
 		 *
 		 *
 		 * @param[in]	filePath	Full pathname of the file.
 		 * @param[in]	filePath	Full pathname of the file.
-		 * 						
+		 * @param[in]	loadDependencies		If true all resources referenced by the root resource will be loaded as well.
+		 * @param[in]	keepInternalReference	If true the resource system will keep an internal reference to the resource
+		 *										so it doesn't get destroyed with it goes out of scope. You can call
+		 *										release() to release the internal reference. Each call to load will create
+		 *										a new internal reference and therefore must be followed by the same number
+		 *										of release calls.
+		 *										If dependencies are being loaded, they will not have internal references
+		 *										created regardless of this parameter.
+		 *
 		 * @note	
 		 * @note	
 		 * You can use returned invalid handle in many engine systems as the engine will check for handle validity before 
 		 * You can use returned invalid handle in many engine systems as the engine will check for handle validity before 
 		 * using it.
 		 * using it.
@@ -137,11 +145,11 @@ namespace BansheeEngine
 		 * Releases an internal reference to the resource held by the resources system. This allows the resource to be 
 		 * Releases an internal reference to the resource held by the resources system. This allows the resource to be 
 		 * unloaded when it goes out of scope, if the resource was loaded with @p keepInternalReference parameter.
 		 * unloaded when it goes out of scope, if the resource was loaded with @p keepInternalReference parameter.
 		 *
 		 *
-		 * Alternatively you can also skip manually calling release() and call ::unloadAllUnused which will unload all 
+		 * Alternatively you can also skip manually calling release() and call unloadAllUnused() which will unload all 
 		 * resources that do not have any external references, but you lose the fine grained control of what will be 
 		 * resources that do not have any external references, but you lose the fine grained control of what will be 
 		 * unloaded.
 		 * unloaded.
 		 *			
 		 *			
-		 * @param[in]	resourceHandle	Handle of the resource to release.
+		 * @param[in]	resource	Handle of the resource to release.
 		 */
 		 */
 		void release(ResourceHandleBase& resource);
 		void release(ResourceHandleBase& resource);
 
 

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

@@ -130,7 +130,7 @@ namespace BansheeEngine
 	protected:
 	protected:
 		SamplerState(const SAMPLER_STATE_DESC& desc);
 		SamplerState(const SAMPLER_STATE_DESC& desc);
 
 
-		/** @copydoc CoreObjectCore::createCore */
+		/** @copydoc CoreObject::createCore */
 		SPtr<CoreObjectCore> createCore() const override;
 		SPtr<CoreObjectCore> createCore() const override;
 
 
 		SamplerProperties mProperties;
 		SamplerProperties mProperties;

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

@@ -383,9 +383,9 @@ namespace BansheeEngine
 		 * Changes the parent of this object. Also removes the object from the current parent, and assigns it to the new 
 		 * Changes the parent of this object. Also removes the object from the current parent, and assigns it to the new 
 		 * parent.
 		 * parent.
 		 *
 		 *
-		 * @param[in]	parent			New parent.
-		 * @param[in]	keepWorldPos	Determines should the current transform be maintained even after the parent is 
-		 *								changed (this means the local transform will be modified accordingly).
+		 * @param[in]	parent				New parent.
+		 * @param[in]	keepWorldTransform	Determines should the current transform be maintained even after the parent is 
+		 *									changed (this means the local transform will be modified accordingly).
 		 */
 		 */
 		void setParent(const HSceneObject& parent, bool keepWorldTransform = true);
 		void setParent(const HSceneObject& parent, bool keepWorldTransform = true);
 
 
@@ -453,7 +453,7 @@ namespace BansheeEngine
 		 * Makes a deep copy of this object.
 		 * Makes a deep copy of this object.
 		 * 			
 		 * 			
 		 * @param[in]	instantiate	If false, the cloned hierarchy will just be a memory copy, but will not be present in the
 		 * @param[in]	instantiate	If false, the cloned hierarchy will just be a memory copy, but will not be present in the
-		 * 							scene or otherwise active until ::instantiate() is called.
+		 * 							scene or otherwise active until instantiate() is called.
 		 */
 		 */
 		HSceneObject clone(bool instantiate = true);
 		HSceneObject clone(bool instantiate = true);
 
 

+ 7 - 5
Source/BansheeCore/Include/BsSpecificImporter.h

@@ -47,8 +47,9 @@ namespace BansheeEngine
 		 * Imports the given file. If file contains more than one resource only the primary resource is imported (for 
 		 * Imports the given file. If file contains more than one resource only the primary resource is imported (for 
 		 * example for an FBX a mesh would be imported, but animations ignored).
 		 * example for an FBX a mesh would be imported, but animations ignored).
 		 *
 		 *
-		 * @param[in]	filePath	Pathname of the file, with file extension.
-		 * @return					null if it fails, otherwise the loaded object.
+		 * @param[in]	filePath		Pathname of the file, with file extension.
+		 * @param[in]	importOptions	Options that can control how is the resource imported.
+		 * @return						null if it fails, otherwise the loaded object.
 		 */
 		 */
 		virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions) = 0;
 		virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions) = 0;
 
 
@@ -56,9 +57,10 @@ namespace BansheeEngine
 		 * Imports the given file. This method returns all imported resources, which is relevant for files that can contain
 		 * Imports the given file. This method returns all imported resources, which is relevant for files that can contain
 		 * multiple resources (for example an FBX which may contain both a mesh and animations). 
 		 * multiple resources (for example an FBX which may contain both a mesh and animations). 
 		 *
 		 *
-		 * @param[in]	filePath	Pathname of the file, with file extension.
-		 * @return					Empty array if it fails, otherwise the loaded objects. First element is always the 
-		 *							primary resource.
+		 * @param[in]	filePath		Pathname of the file, with file extension.
+		 * @param[in]	importOptions	Options that can control how are the resources imported.
+		 * @return						Empty array if it fails, otherwise the loaded objects. First element is always the 
+		 *								primary resource.
 		 */
 		 */
 		virtual Vector<SubResourceRaw> importAll(const Path& filePath, ConstImportOptionsPtr importOptions);
 		virtual Vector<SubResourceRaw> importAll(const Path& filePath, ConstImportOptionsPtr importOptions);
 
 

+ 1 - 0
Source/BansheeCore/Include/BsStringTable.h

@@ -202,6 +202,7 @@ namespace BansheeEngine
 		Count // Number of entries
 		Count // Number of entries
 	};
 	};
 
 
+	/** @} */
 	/** @addtogroup Localization-Internal
 	/** @addtogroup Localization-Internal
 	 *  @{
 	 *  @{
 	 */
 	 */

+ 31 - 13
Source/BansheeCore/Include/BsTexture.h

@@ -144,10 +144,16 @@ namespace BansheeEngine
 		 * Updates the texture with new data. The actual write will be queued for later execution on the core thread. 
 		 * Updates the texture with new data. The actual write will be queued for later execution on the core thread. 
 		 * Provided data buffer will be locked until the operation completes.
 		 * Provided data buffer will be locked until the operation completes.
 		 *
 		 *
-		 * @param[in]	accessor	Accessor to queue the operation on.
-		 * @return					Async operation object you can use to track operation completion.
-		 *
-		 * @see		TextureCore::writeSubresource
+		 * @param[in]	accessor			Accessor to queue the operation on.
+		 * @param[in]	subresourceIdx		Index of the subresource to write. Retrieved from 
+		 *									TextureProperties::mapToSubresourceIdx().
+		 * @param[in]	data				Pixel data to write. User must ensure it is in format and size compatible with 
+		 *									the texture.
+		 * @param[in]	discardEntireBuffer When true the existing contents of the resource you are updating will be 
+		 *									discarded. This can make the operation faster. Resources with certain buffer 
+		 *									types might require this flag to be in a specific state otherwise the operation 
+		 *									will fail.
+		 * @return							Async operation object you can use to track operation completion.
 		 */
 		 */
 		AsyncOp writeSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const PixelDataPtr& data, 
 		AsyncOp writeSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const PixelDataPtr& data, 
 			bool discardEntireBuffer);
 			bool discardEntireBuffer);
@@ -156,8 +162,13 @@ namespace BansheeEngine
 		 * Reads internal texture data to the provided previously allocated buffer. The read is queued for execution on the
 		 * Reads internal texture data to the provided previously allocated buffer. The read is queued for execution on the
 		 * core thread and not executed immediately. Provided data buffer will be locked until the operation completes.
 		 * core thread and not executed immediately. Provided data buffer will be locked until the operation completes.
 		 *
 		 *
-		 * @param[in]	accessor	Accessor to queue the operation on.
-		 * @return					Async operation object you can use to track operation completion.
+		 * @param[in]	accessor			Accessor to queue the operation on.
+		 * @param[in]	subresourceIdx		Index of the subresource to read. Retrieved from
+		 *									TextureProperties::mapToSubresourceIdx().
+		 * @param[out]	data				Pre-allocated buffer of proper size and format where data will be read to. You 
+		 *									can use TextureProperties::allocateSubresourceBuffer() to allocate a valid 
+		 *									buffer.
+		 * @return							Async operation object you can use to track operation completion.
 		 *
 		 *
 		 * @see		TextureCore::readSubresource
 		 * @see		TextureCore::readSubresource
 		 */
 		 */
@@ -240,7 +251,7 @@ namespace BansheeEngine
 		 * @note	Internal method. Creates a texture pointer without a handle. Use create() for normal usage.
 		 * @note	Internal method. Creates a texture pointer without a handle. Use create() for normal usage.
 		 */
 		 */
 		static TexturePtr _createPtr(TextureType texType, UINT32 width, UINT32 height, UINT32 depth,
 		static TexturePtr _createPtr(TextureType texType, UINT32 width, UINT32 height, UINT32 depth,
-			int num_mips, PixelFormat format, int usage = TU_DEFAULT,
+			int numMips, PixelFormat format, int usage = TU_DEFAULT,
 			bool hwGammaCorrection = false, UINT32 multisampleCount = 0);
 			bool hwGammaCorrection = false, UINT32 multisampleCount = 0);
 
 
 		/**
 		/**
@@ -248,7 +259,7 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @note	Internal method. Creates a texture pointer without a handle. Use create() for normal usage.
 		 * @note	Internal method. Creates a texture pointer without a handle. Use create() for normal usage.
 		 */
 		 */
-		static TexturePtr _createPtr(TextureType texType, UINT32 width, UINT32 height, int num_mips,
+		static TexturePtr _createPtr(TextureType texType, UINT32 width, UINT32 height, int numMips,
 			PixelFormat format, int usage = TU_DEFAULT, bool hwGammaCorrection = false, UINT32 multisampleCount = 0);
 			PixelFormat format, int usage = TU_DEFAULT, bool hwGammaCorrection = false, UINT32 multisampleCount = 0);
 
 
 		/**
 		/**
@@ -272,7 +283,7 @@ namespace BansheeEngine
 		/** @copydoc CoreObject::createCore */
 		/** @copydoc CoreObject::createCore */
 		SPtr<CoreObjectCore> createCore() const override;
 		SPtr<CoreObjectCore> createCore() const override;
 
 
-		/** @copydoc Resource::calculateSize */
+		/** Calculates the size of the texture, in bytes. */
 		UINT32 calculateSize() const;
 		UINT32 calculateSize() const;
 
 
 		/**
 		/**
@@ -336,8 +347,7 @@ namespace BansheeEngine
 		virtual void writeSubresource(UINT32 subresourceIdx, const PixelData& data, bool discardEntireBuffer);
 		virtual void writeSubresource(UINT32 subresourceIdx, const PixelData& data, bool discardEntireBuffer);
 
 
 		/**
 		/**
-		 * Reads a part of the current resource into the provided @p data parameter.
-		 * 			Data buffer needs to be pre-allocated.
+		 * Reads a part of the current resource into the provided @p data parameter. Data buffer needs to be pre-allocated.
 		 *
 		 *
 		 * @param[in]	subresourceIdx		Index of the subresource to update, if the texture has more than one.
 		 * @param[in]	subresourceIdx		Index of the subresource to update, if the texture has more than one.
 		 * @param[out]	data				Buffer that will receive the data. Should be allocated with 
 		 * @param[out]	data				Buffer that will receive the data. Should be allocated with 
@@ -391,7 +401,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Writes data from the provided buffer into the texture buffer.
 		 * Writes data from the provided buffer into the texture buffer.
 		 * 		  
 		 * 		  
-		 * @param[in]	dest				Buffer to retrieve the data from.
+		 * @param[in]	src					Buffer to retrieve the data from.
 		 * @param[in]	mipLevel			(optional) Mipmap level to write into.
 		 * @param[in]	mipLevel			(optional) Mipmap level to write into.
 		 * @param[in]	face				(optional) Texture face to write into.
 		 * @param[in]	face				(optional) Texture face to write into.
 		 * @param[in]	discardWholeBuffer	(optional) If true any existing texture data will be discard. This can improve 
 		 * @param[in]	discardWholeBuffer	(optional) If true any existing texture data will be discard. This can improve 
@@ -436,7 +446,15 @@ namespace BansheeEngine
 		/** @copydoc unlock */
 		/** @copydoc unlock */
 		virtual void unlockImpl() = 0;
 		virtual void unlockImpl() = 0;
 
 
-		/** @copydoc copy */
+		/** 
+		 * API specific implementation of copy(). 
+		 *
+		 * @param[in]	srcFace			Face index to copy from.
+		 * @param[in]	srcMipLevel		Mip level to copy from.
+		 * @param[in]	destFace		Face index to copy to.
+		 * @param[in]	destMipLevel	Mip level to copy to.
+		 * @param[in]	target			Texture to copy to.
+		 */
 		virtual void copyImpl(UINT32 srcFace, UINT32 srcMipLevel, UINT32 destFace, UINT32 destMipLevel, 
 		virtual void copyImpl(UINT32 srcFace, UINT32 srcMipLevel, UINT32 destFace, UINT32 destMipLevel, 
 			const SPtr<TextureCore>& target) = 0;
 			const SPtr<TextureCore>& target) = 0;
 
 

+ 1 - 2
Source/BansheeCore/Include/BsTextureManager.h

@@ -52,14 +52,13 @@ namespace BansheeEngine
 		/**
 		/**
 		 * Creates a new RenderTexture and automatically generates a color surface and (optionally) a depth/stencil surface.
 		 * Creates a new RenderTexture and automatically generates a color surface and (optionally) a depth/stencil surface.
 		 *
 		 *
-		 * @param[in]	texType				Type of the texture.
+		 * @param[in]	textureType			Type of the texture.
 		 * @param[in]	width				Width of the texture in pixels.
 		 * @param[in]	width				Width of the texture in pixels.
 		 * @param[in]	height				Height of the texture in pixels.
 		 * @param[in]	height				Height of the texture in pixels.
 		 * @param[in]	format				Format of the pixels.
 		 * @param[in]	format				Format of the pixels.
 		 * @param[in]	hwGamma				If true, any color data will be gamma corrected before being written into the 
 		 * @param[in]	hwGamma				If true, any color data will be gamma corrected before being written into the 
 		 *									texture.
 		 *									texture.
 		 * @param[in]	multisampleCount	If higher than 1, texture containing multiple samples per pixel is created.
 		 * @param[in]	multisampleCount	If higher than 1, texture containing multiple samples per pixel is created.
-		 * @param[in]	multisampleHint		Hint about what kind of multisampling to use. Render system specific.
 		 * @param[in]	createDepth			Determines will a depth/stencil buffer of the same size as the color buffer be
 		 * @param[in]	createDepth			Determines will a depth/stencil buffer of the same size as the color buffer be
 		 *									created for the render texture.
 		 *									created for the render texture.
 		 * @param[in]	depthStencilFormat	Format of the depth/stencil buffer if enabled.
 		 * @param[in]	depthStencilFormat	Format of the depth/stencil buffer if enabled.

+ 10 - 7
Source/BansheeCore/Include/BsViewport.h

@@ -96,7 +96,10 @@ namespace BansheeEngine
     protected:
     protected:
 		ViewportBase(float x = 0.0f, float y = 0.0f, float width = 1.0f, float height = 1.0f);
 		ViewportBase(float x = 0.0f, float y = 0.0f, float width = 1.0f, float height = 1.0f);
 
 
-		/** @copydoc CoreObject::markCoreDirty */
+		/** 
+		 * Marks the core data as dirty. This causes the data from the sim thread object be synced with the core thread
+		 * version of the object.
+		 */
 		virtual void _markCoreDirty() { }
 		virtual void _markCoreDirty() { }
 
 
 		/** Gets the render target width. */
 		/** Gets the render target width. */
@@ -148,13 +151,13 @@ namespace BansheeEngine
     protected:
     protected:
         Viewport(const RenderTargetPtr& target, float x = 0.0f, float y = 0.0f, float width = 1.0f, float height = 1.0f);
         Viewport(const RenderTargetPtr& target, float x = 0.0f, float y = 0.0f, float width = 1.0f, float height = 1.0f);
 
 
-		/** @copydoc CoreObject::markCoreDirty */
+		/** @copydoc ViewportBase::_markCoreDirty */
 		void _markCoreDirty() override;
 		void _markCoreDirty() override;
 
 
-		/** @copydoc CoreObject::getTargetWidth */
+		/** @copydoc ViewportBase::getTargetWidth */
 		UINT32 getTargetWidth() const override;
 		UINT32 getTargetWidth() const override;
 
 
-		/** @copydoc CoreObject::getTargetHeight */
+		/** @copydoc ViewportBase::getTargetHeight */
 		UINT32 getTargetHeight() const override;
 		UINT32 getTargetHeight() const override;
 
 
 		/** @copydoc CoreObject::syncToCore */
 		/** @copydoc CoreObject::syncToCore */
@@ -206,13 +209,13 @@ namespace BansheeEngine
 
 
 		ViewportCore(const SPtr<RenderTargetCore>& target, float x = 0.0f, float y = 0.0f, float width = 1.0f, float height = 1.0f);
 		ViewportCore(const SPtr<RenderTargetCore>& target, float x = 0.0f, float y = 0.0f, float width = 1.0f, float height = 1.0f);
 
 
-		/** @copydoc CoreObject::getTargetWidth */
+		/** @copydoc ViewportBase::getTargetWidth */
 		UINT32 getTargetWidth() const override;
 		UINT32 getTargetWidth() const override;
 
 
-		/** @copydoc CoreObject::getTargetHeight */
+		/** @copydoc ViewportBase::getTargetHeight */
 		UINT32 getTargetHeight() const override;
 		UINT32 getTargetHeight() const override;
 
 
-		/** @copydoc	CoreObject::syncToCore */
+		/** @copydoc CoreObject::syncToCore */
 		void syncToCore(const CoreSyncData& data) override;
 		void syncToCore(const CoreSyncData& data) override;
 
 
 		SPtr<RenderTargetCore> mTarget;
 		SPtr<RenderTargetCore> mTarget;

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

@@ -106,7 +106,7 @@ namespace BansheeEngine
 		accessor.queueCommand(std::bind(&RenderAPICore::resetClipPlanes, RenderAPICore::instancePtr()));
 		accessor.queueCommand(std::bind(&RenderAPICore::resetClipPlanes, RenderAPICore::instancePtr()));
 	}
 	}
 
 
-	void RenderAPI::setScissorTest(CoreAccessor& accessor, UINT32 left, UINT32 top, UINT32 right, UINT32 bottom)
+	void RenderAPI::setScissorRect(CoreAccessor& accessor, UINT32 left, UINT32 top, UINT32 right, UINT32 bottom)
 	{
 	{
 		accessor.queueCommand(std::bind(&RenderAPICore::setScissorRect, RenderAPICore::instancePtr(), left, top, right, bottom));
 		accessor.queueCommand(std::bind(&RenderAPICore::setScissorRect, RenderAPICore::instancePtr(), left, top, right, bottom));
 	}
 	}

+ 1 - 0
Source/BansheeUtility/Include/BsTestSuite.h

@@ -76,6 +76,7 @@ namespace BansheeEngine
 		 * Reports success or failure depending on the result of an expression.
 		 * Reports success or failure depending on the result of an expression.
 		 *
 		 *
 		 * @param[in]	success		If true success is reported, otherwise failure.
 		 * @param[in]	success		If true success is reported, otherwise failure.
+		 * @param[in]	desc		Message describing the nature of the failure.
 		 * @param[in]	file		Name of the source code file the assertment originates from.
 		 * @param[in]	file		Name of the source code file the assertment originates from.
 		 * @param[in]	line		Line number at which the assertment was triggered at.
 		 * @param[in]	line		Line number at which the assertment was triggered at.
 		 */
 		 */

+ 101 - 104
Source/MBansheeEngine/RenderTarget.cs

@@ -1,105 +1,102 @@
-//********************************** 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.Runtime.CompilerServices;
-using System.Text;
-
-namespace BansheeEngine
-{
-    /// <summary>
-    /// Render target is a frame buffer or a texture that the render system renders the scene to.
-    /// </summary>
-    public class RenderTarget : ScriptObject
-    {
-        /// <summary>
-        /// Returns the width of the render target, in pixels.
-        /// </summary>
-        public int Width
-        {
-            get
-            {
-                int value;
-                Internal_GetWidth(mCachedPtr, out value);
-                return value;
-            }
-        }
-
-        /// <summary>
-        /// Returns the height of the render target, in pixels.
-        /// </summary>
-        public int Height
-        {
-            get
-            {
-                int value;
-                Internal_GetHeight(mCachedPtr, out value);
-                return value;
-            }
-        }
-
-        /// <summary>
-        /// Returns true if pixels written to the render target will be gamma corrected.
-        /// </summary>
-        public bool GammaCorrection
-        {
-            get
-            {
-                bool value;
-                Internal_GetGammaCorrection(mCachedPtr, out value);
-                return value;
-            }
-        }
-
-        /// <summary>
-        /// Gets the number of samples used for multisampling (0 or 1 if multisampling is not used).
-        /// </summary>
-        public int SampleCount
-        {
-            get
-            {
-                int value;
-                Internal_GetSampleCount(mCachedPtr, out value);
-                return value;
-            }
-        }
-
-        /// <summary>
-        /// Controls in what order is the render target rendered to compared to other render targets. Targets with higher 
-        /// priority will be rendered before ones with lower priority.
-        /// </summary>
-        public int Priority
-        {
-            get
-            {
-                int value;
-                Internal_GetPriority(mCachedPtr, out value);
-                return value;
-            }
-
-            set
-            {
-                Internal_SetPriority(mCachedPtr, value);
-            }
-        }
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_GetWidth(IntPtr thisPtr, out int value);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_GetHeight(IntPtr thisPtr, out int value);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_GetGammaCorrection(IntPtr thisPtr, out bool value);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_GetSampleCount(IntPtr thisPtr, out int value);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_GetPriority(IntPtr thisPtr, out int value);
-
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_SetPriority(IntPtr thisPtr, int value);
-    }
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+using System;
+using System.Runtime.CompilerServices;
+
+namespace BansheeEngine
+{
+    /// <summary>
+    /// Render target is a frame buffer or a texture that the render system renders the scene to.
+    /// </summary>
+    public class RenderTarget : ScriptObject
+    {
+        /// <summary>
+        /// Returns the width of the render target, in pixels.
+        /// </summary>
+        public int Width
+        {
+            get
+            {
+                int value;
+                Internal_GetWidth(mCachedPtr, out value);
+                return value;
+            }
+        }
+
+        /// <summary>
+        /// Returns the height of the render target, in pixels.
+        /// </summary>
+        public int Height
+        {
+            get
+            {
+                int value;
+                Internal_GetHeight(mCachedPtr, out value);
+                return value;
+            }
+        }
+
+        /// <summary>
+        /// Returns true if pixels written to the render target will be gamma corrected.
+        /// </summary>
+        public bool GammaCorrection
+        {
+            get
+            {
+                bool value;
+                Internal_GetGammaCorrection(mCachedPtr, out value);
+                return value;
+            }
+        }
+
+        /// <summary>
+        /// Gets the number of samples used for multisampling (0 or 1 if multisampling is not used).
+        /// </summary>
+        public int SampleCount
+        {
+            get
+            {
+                int value;
+                Internal_GetSampleCount(mCachedPtr, out value);
+                return value;
+            }
+        }
+
+        /// <summary>
+        /// Controls in what order is the render target rendered to compared to other render targets. Targets with higher 
+        /// priority will be rendered before ones with lower priority.
+        /// </summary>
+        public int Priority
+        {
+            get
+            {
+                int value;
+                Internal_GetPriority(mCachedPtr, out value);
+                return value;
+            }
+
+            set
+            {
+                Internal_SetPriority(mCachedPtr, value);
+            }
+        }
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_GetWidth(IntPtr thisPtr, out int value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_GetHeight(IntPtr thisPtr, out int value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_GetGammaCorrection(IntPtr thisPtr, out bool value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_GetSampleCount(IntPtr thisPtr, out int value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_GetPriority(IntPtr thisPtr, out int value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetPriority(IntPtr thisPtr, int value);
+    }
 }
 }

+ 14 - 18
Source/MBansheeEngine/RenderTexture.cs

@@ -1,18 +1,14 @@
-//********************************** 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>
-    /// Base class for all render textures of specific dimensions. Render textures allow the rendering to be performed
-    /// into a texture as opposed to a frame buffer.
-    /// </summary>
-    public class RenderTexture : RenderTarget
-    {
-
-    }
-}
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+
+namespace BansheeEngine
+{
+    /// <summary>
+    /// Base class for all render textures of specific dimensions. Render textures allow the rendering to be performed
+    /// into a texture as opposed to a frame buffer.
+    /// </summary>
+    public class RenderTexture : RenderTarget
+    {
+
+    }
+}