Ver Fonte

Replaced all typedefed shared_ptrs with SPtr because it was making it hard for doxygen to create documentation links
Replaced shared_ptr with SPtr

BearishSun há 9 anos atrás
pai
commit
2b388725cb
100 ficheiros alterados com 366 adições e 422 exclusões
  1. 2 2
      Source/BansheeCore/Include/BsBlendState.h
  2. 1 1
      Source/BansheeCore/Include/BsBlendStateRTTI.h
  3. 1 1
      Source/BansheeCore/Include/BsCCapsuleColliderRTTI.h
  4. 1 1
      Source/BansheeCore/Include/BsCColliderRTTI.h
  5. 1 1
      Source/BansheeCore/Include/BsCJointRTTI.h
  6. 1 1
      Source/BansheeCore/Include/BsCMeshColliderRTTI.h
  7. 1 1
      Source/BansheeCore/Include/BsCPlaneColliderRTTI.h
  8. 1 1
      Source/BansheeCore/Include/BsCRigidbodyRTTI.h
  9. 1 1
      Source/BansheeCore/Include/BsCSphereColliderRTTI.h
  10. 3 3
      Source/BansheeCore/Include/BsCommandQueue.h
  11. 2 2
      Source/BansheeCore/Include/BsComponentRTTI.h
  12. 3 3
      Source/BansheeCore/Include/BsCoreApplication.h
  13. 9 9
      Source/BansheeCore/Include/BsCoreObject.h
  14. 1 1
      Source/BansheeCore/Include/BsCoreObjectCore.h
  15. 1 57
      Source/BansheeCore/Include/BsCorePrerequisites.h
  16. 2 2
      Source/BansheeCore/Include/BsCoreRenderer.h
  17. 2 2
      Source/BansheeCore/Include/BsCoreThread.h
  18. 2 2
      Source/BansheeCore/Include/BsDepthStencilState.h
  19. 1 1
      Source/BansheeCore/Include/BsDepthStencilStateRTTI.h
  20. 1 1
      Source/BansheeCore/Include/BsEventQuery.h
  21. 1 1
      Source/BansheeCore/Include/BsFont.h
  22. 1 1
      Source/BansheeCore/Include/BsFontImportOptionsRTTI.h
  23. 2 2
      Source/BansheeCore/Include/BsFontManager.h
  24. 2 2
      Source/BansheeCore/Include/BsFontRTTI.h
  25. 1 1
      Source/BansheeCore/Include/BsGameObject.h
  26. 11 11
      Source/BansheeCore/Include/BsGameObjectHandle.h
  27. 2 2
      Source/BansheeCore/Include/BsGameObjectHandleRTTI.h
  28. 1 1
      Source/BansheeCore/Include/BsGameObjectManager.h
  29. 3 3
      Source/BansheeCore/Include/BsGameObjectRTTI.h
  30. 1 1
      Source/BansheeCore/Include/BsGpuBuffer.h
  31. 1 1
      Source/BansheeCore/Include/BsGpuParam.h
  32. 1 1
      Source/BansheeCore/Include/BsGpuParamBlockBuffer.h
  33. 8 8
      Source/BansheeCore/Include/BsGpuParams.h
  34. 5 5
      Source/BansheeCore/Include/BsGpuProgram.h
  35. 2 2
      Source/BansheeCore/Include/BsGpuProgramManager.h
  36. 1 1
      Source/BansheeCore/Include/BsGpuProgramRTTI.h
  37. 1 1
      Source/BansheeCore/Include/BsGpuResourceDataRTTI.h
  38. 5 5
      Source/BansheeCore/Include/BsHardwareBufferManager.h
  39. 2 2
      Source/BansheeCore/Include/BsIconUtility.h
  40. 1 1
      Source/BansheeCore/Include/BsImportOptionsRTTI.h
  41. 6 6
      Source/BansheeCore/Include/BsImporter.h
  42. 1 1
      Source/BansheeCore/Include/BsIndexBuffer.h
  43. 3 3
      Source/BansheeCore/Include/BsInput.h
  44. 5 5
      Source/BansheeCore/Include/BsMaterial.h
  45. 3 3
      Source/BansheeCore/Include/BsMaterialManager.h
  46. 9 9
      Source/BansheeCore/Include/BsMaterialParams.h
  47. 6 6
      Source/BansheeCore/Include/BsMaterialParamsRTTI.h
  48. 3 3
      Source/BansheeCore/Include/BsMaterialRTTI.h
  49. 32 32
      Source/BansheeCore/Include/BsMesh.h
  50. 1 1
      Source/BansheeCore/Include/BsMeshBaseRTTI.h
  51. 5 5
      Source/BansheeCore/Include/BsMeshData.h
  52. 3 3
      Source/BansheeCore/Include/BsMeshDataRTTI.h
  53. 11 11
      Source/BansheeCore/Include/BsMeshHeap.h
  54. 1 1
      Source/BansheeCore/Include/BsMeshImportOptionsRTTI.h
  55. 11 11
      Source/BansheeCore/Include/BsMeshManager.h
  56. 6 6
      Source/BansheeCore/Include/BsMeshRTTI.h
  57. 3 3
      Source/BansheeCore/Include/BsMultiRenderTexture.h
  58. 1 1
      Source/BansheeCore/Include/BsOcclusionQuery.h
  59. 15 15
      Source/BansheeCore/Include/BsPass.h
  60. 19 19
      Source/BansheeCore/Include/BsPassRTTI.h
  61. 1 1
      Source/BansheeCore/Include/BsPhysics.h
  62. 1 1
      Source/BansheeCore/Include/BsPhysicsMaterial.h
  63. 1 1
      Source/BansheeCore/Include/BsPhysicsMaterialRTTI.h
  64. 7 7
      Source/BansheeCore/Include/BsPhysicsMesh.h
  65. 2 2
      Source/BansheeCore/Include/BsPixelData.h
  66. 2 2
      Source/BansheeCore/Include/BsPixelDataRTTI.h
  67. 1 1
      Source/BansheeCore/Include/BsPixelUtil.h
  68. 1 1
      Source/BansheeCore/Include/BsPrefab.h
  69. 3 3
      Source/BansheeCore/Include/BsPrefabDiffRTTI.h
  70. 3 3
      Source/BansheeCore/Include/BsPrefabRTTI.h
  71. 6 6
      Source/BansheeCore/Include/BsProfilerGPU.h
  72. 3 3
      Source/BansheeCore/Include/BsQueryManager.h
  73. 2 2
      Source/BansheeCore/Include/BsRasterizerState.h
  74. 1 1
      Source/BansheeCore/Include/BsRasterizerStateRTTI.h
  75. 16 16
      Source/BansheeCore/Include/BsRenderAPI.h
  76. 3 3
      Source/BansheeCore/Include/BsRenderAPIManager.h
  77. 16 16
      Source/BansheeCore/Include/BsRenderStateManager.h
  78. 4 4
      Source/BansheeCore/Include/BsRenderTexture.h
  79. 1 1
      Source/BansheeCore/Include/BsRenderWindow.h
  80. 2 2
      Source/BansheeCore/Include/BsRenderWindowManager.h
  81. 1 1
      Source/BansheeCore/Include/BsRendererFactory.h
  82. 4 4
      Source/BansheeCore/Include/BsRendererManager.h
  83. 6 6
      Source/BansheeCore/Include/BsRendererMeshData.h
  84. 2 2
      Source/BansheeCore/Include/BsResource.h
  85. 1 1
      Source/BansheeCore/Include/BsResourceHandle.h
  86. 2 2
      Source/BansheeCore/Include/BsResourceHandleRTTI.h
  87. 4 4
      Source/BansheeCore/Include/BsResourceManifest.h
  88. 1 1
      Source/BansheeCore/Include/BsResourceManifestRTTI.h
  89. 1 1
      Source/BansheeCore/Include/BsResourceMetaDataRTTI.h
  90. 3 3
      Source/BansheeCore/Include/BsResourceRTTI.h
  91. 9 9
      Source/BansheeCore/Include/BsResources.h
  92. 2 2
      Source/BansheeCore/Include/BsSamplerState.h
  93. 1 1
      Source/BansheeCore/Include/BsSamplerStateRTTI.h
  94. 1 1
      Source/BansheeCore/Include/BsSavedResourceDataRTTI.h
  95. 7 7
      Source/BansheeCore/Include/BsSceneObject.h
  96. 6 6
      Source/BansheeCore/Include/BsSceneObjectRTTI.h
  97. 3 3
      Source/BansheeCore/Include/BsShader.h
  98. 1 1
      Source/BansheeCore/Include/BsShaderImportOptionsRTTI.h
  99. 1 1
      Source/BansheeCore/Include/BsShaderInclude.h
  100. 1 1
      Source/BansheeCore/Include/BsShaderIncludeImporter.h

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

@@ -164,10 +164,10 @@ namespace BansheeEngine
 		SPtr<BlendStateCore> getCore() const;
 
 		/**	Creates a new blend state using the specified blend state description structure. */
-		static BlendStatePtr create(const BLEND_STATE_DESC& desc);
+		static SPtr<BlendState> create(const BLEND_STATE_DESC& desc);
 
 		/**	Returns the default blend state that you may use when no other is available. */
-		static const BlendStatePtr& getDefault();
+		static const SPtr<BlendState>& getDefault();
 
 		/**	Generates a hash value from a blend state descriptor. */
 		static UINT64 generateHash(const BLEND_STATE_DESC& desc);

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

@@ -84,7 +84,7 @@ namespace BansheeEngine
 			return TID_BlendState;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return RenderStateManager::instance()._createBlendStatePtr(BLEND_STATE_DESC());
 		}

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

@@ -39,7 +39,7 @@ namespace BansheeEngine
 			return TID_CCapsuleCollider;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return GameObjectRTTI::createGameObject<CCapsuleCollider>();
 		}

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

@@ -50,7 +50,7 @@ namespace BansheeEngine
 			return TID_CCollider;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
 			return nullptr;

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

@@ -58,7 +58,7 @@ namespace BansheeEngine
 			return TID_CJoint;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
 			return nullptr;

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

@@ -36,7 +36,7 @@ namespace BansheeEngine
 			return TID_CMeshCollider;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return GameObjectRTTI::createGameObject<CMeshCollider>();
 		}

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

@@ -37,7 +37,7 @@ namespace BansheeEngine
 			return TID_CPlaneCollider;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return GameObjectRTTI::createGameObject<CPlaneCollider>();
 		}

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

@@ -64,7 +64,7 @@ namespace BansheeEngine
 			return TID_CRigidbody;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return GameObjectRTTI::createGameObject<CRigidbody>();
 		}

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

@@ -36,7 +36,7 @@ namespace BansheeEngine
 			return TID_CSphereCollider;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return GameObjectRTTI::createGameObject<CSphereCollider>();
 		}

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

@@ -70,7 +70,7 @@ namespace BansheeEngine
 	struct QueuedCommand
 	{
 #if BS_DEBUG_MODE
-		QueuedCommand(std::function<void(AsyncOp&)> _callback, UINT32 _debugId, const AsyncOpSyncDataPtr& asyncOpSyncData,
+		QueuedCommand(std::function<void(AsyncOp&)> _callback, UINT32 _debugId, const SPtr<AsyncOpSyncData>& asyncOpSyncData,
 			bool _notifyWhenComplete = false, UINT32 _callbackId = 0)
 			:callbackWithReturnValue(_callback), debugId(_debugId), returnsValue(true), 
 			notifyWhenComplete(_notifyWhenComplete), callbackId(_callbackId), asyncOp(asyncOpSyncData)
@@ -82,7 +82,7 @@ namespace BansheeEngine
 
 		UINT32 debugId;
 #else
-		QueuedCommand(std::function<void(AsyncOp&)> _callback, const AsyncOpSyncDataPtr& asyncOpSyncData, 
+		QueuedCommand(std::function<void(AsyncOp&)> _callback, const SPtr<AsyncOpSyncData>& asyncOpSyncData, 
 			bool _notifyWhenComplete = false, UINT32 _callbackId = 0)
 			:callbackWithReturnValue(_callback), returnsValue(true), notifyWhenComplete(_notifyWhenComplete), 
 			callbackId(_callbackId), asyncOp(asyncOpSyncData)
@@ -237,7 +237,7 @@ namespace BansheeEngine
 		Queue<QueuedCommand>* mCommands;
 		Stack<Queue<QueuedCommand>*> mEmptyCommandQueues; /**< List of empty queues for reuse. */
 
-		AsyncOpSyncDataPtr mAsyncOpSyncData;
+		SPtr<AsyncOpSyncData> mAsyncOpSyncData;
 		BS_THREAD_ID_TYPE mMyThreadId;
 
 		// Various variables that allow for easier debugging by allowing us to trigger breakpoints

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

@@ -31,7 +31,7 @@ namespace BansheeEngine
 			{
 				// Register the newly created SO with the GameObjectManager and provide it with the original ID so that
 				// deserialized handles pointing to this object can be resolved.
-				ComponentPtr compPtr = std::static_pointer_cast<Component>(deserializationData.ptr);
+				SPtr<Component> compPtr = std::static_pointer_cast<Component>(deserializationData.ptr);
 
 				GameObjectManager::instance().registerObject(compPtr, deserializationData.originalId);
 			}
@@ -50,7 +50,7 @@ namespace BansheeEngine
 			return TID_Component;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
 			return nullptr;

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

@@ -60,7 +60,7 @@ namespace BansheeEngine
 			virtual void quitRequested();
 
 			/**	Returns the main window that was created on application start-up. */
-			RenderWindowPtr getPrimaryWindow() const { return mPrimaryWindow; }
+			SPtr<RenderWindow> getPrimaryWindow() const { return mPrimaryWindow; }
 
 			/**
 			 * Returns the id of the simulation thread.
@@ -99,7 +99,7 @@ namespace BansheeEngine
 		virtual void startUpRenderer();
 
 		/**	Returns a handler that is used for resolving shader include file paths. */
-		virtual ShaderIncludeHandlerPtr getShaderIncludeHandler() const;
+		virtual SPtr<IShaderIncludeHandler> getShaderIncludeHandler() const;
 
 	private:
 		/**	Called when the frame finishes rendering. */
@@ -114,7 +114,7 @@ namespace BansheeEngine
 	private:
 		typedef void(*UpdatePluginFunc)();
 
-		RenderWindowPtr mPrimaryWindow;
+		SPtr<RenderWindow> mPrimaryWindow;
 		START_UP_DESC mStartUpDesc;
 
 		UINT64 mFrameStep; // Microseconds

+ 9 - 9
Source/BansheeCore/Include/BsCoreObject.h

@@ -98,7 +98,7 @@ namespace BansheeEngine
 		 * @note	Internal method.
 		 * @note	This should be called by the factory creation methods so user doesn't have to call it manually.
 		 */
-		void _setThisPtr(std::shared_ptr<CoreObject> ptrThis);
+		void _setThisPtr(SPtr<CoreObject> ptrThis);
 
 		/**
 		 * Schedules the object to be destroyed, and then deleted.
@@ -247,9 +247,9 @@ namespace BansheeEngine
 	 * them manually.
 	 */
 	template<class Type, class MainAlloc, class PtrDataAlloc, class... Args>
-	std::shared_ptr<Type> bs_core_ptr_new(Args &&...args)
+	SPtr<Type> bs_core_ptr_new(Args &&...args)
 	{
-		return std::shared_ptr<Type>(bs_new<Type, MainAlloc>(std::forward<Args>(args)...),
+		return SPtr<Type>(bs_new<Type, MainAlloc>(std::forward<Args>(args)...),
 			&CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, PtrDataAlloc>());
 	}
 
@@ -261,9 +261,9 @@ namespace BansheeEngine
 	 * them manually.
 	 */
 	template<class Type, class MainAlloc, class... Args>
-	std::shared_ptr<Type> bs_core_ptr_new(Args &&...args)
+	SPtr<Type> bs_core_ptr_new(Args &&...args)
 	{
-		return std::shared_ptr<Type>(bs_new<Type, MainAlloc>(std::forward<Args>(args)...),
+		return SPtr<Type>(bs_new<Type, MainAlloc>(std::forward<Args>(args)...),
 			&CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, GenAlloc>());
 	}
 
@@ -275,9 +275,9 @@ namespace BansheeEngine
 	 * them manually.
 	 */
 	template<class Type, class... Args>
-	std::shared_ptr<Type> bs_core_ptr_new(Args &&...args)
+	SPtr<Type> bs_core_ptr_new(Args &&...args)
 	{
-		return std::shared_ptr<Type>(bs_new<Type, GenAlloc>(std::forward<Args>(args)...),
+		return SPtr<Type>(bs_new<Type, GenAlloc>(std::forward<Args>(args)...),
 			&CoreObject::_delete<Type, GenAlloc>, StdAlloc<Type, GenAlloc>());
 	}
 
@@ -289,9 +289,9 @@ namespace BansheeEngine
 	 * them manually.
 	 */
 	template<class Type, class MainAlloc = GenAlloc, class PtrDataAlloc = GenAlloc>
-	std::shared_ptr<Type> bs_core_ptr(Type* data)
+	SPtr<Type> bs_core_ptr(Type* data)
 	{
-		return std::shared_ptr<Type>(data, &CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, PtrDataAlloc>());  
+		return SPtr<Type>(data, &CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, PtrDataAlloc>());  
 	}
 
 	/** @} */

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

@@ -48,7 +48,7 @@ namespace BansheeEngine
 		 * @note	Internal method.
 		 * @note	Called automatically by the factory creation methods so user should not call this manually.
 		 */
-		void _setThisPtr(std::shared_ptr<CoreObjectCore> ptrThis);
+		void _setThisPtr(SPtr<CoreObjectCore> ptrThis);
 
 		/** @} */
 

+ 1 - 57
Source/BansheeCore/Include/BsCorePrerequisites.h

@@ -389,69 +389,13 @@ namespace BansheeEngine
 }
 
 /************************************************************************/
-/* 						Shared pointer typedefs	                    	*/
+/* 						         Typedefs								*/
 /************************************************************************/
 
 namespace BansheeEngine
 {
-	typedef std::shared_ptr<RenderAPICore> RenderAPIPtr;
-	typedef std::shared_ptr<GpuProgram> GpuProgramPtr;
-	typedef std::shared_ptr<PixelBuffer> PixelBufferPtr;
-	typedef std::shared_ptr<VertexBuffer> VertexBufferPtr;
-	typedef std::shared_ptr<IndexBuffer> IndexBufferPtr;
-	typedef std::shared_ptr<GpuBuffer> GpuBufferPtr;
-	typedef std::shared_ptr<VertexDeclaration> VertexDeclarationPtr;
-	typedef std::shared_ptr<Mesh> MeshPtr;
-	typedef std::shared_ptr<MeshBase> MeshBasePtr;
-	typedef std::shared_ptr<MeshHeap> MeshHeapPtr;
-	typedef std::shared_ptr<TransientMesh> TransientMeshPtr;
-	typedef std::shared_ptr<Texture> TexturePtr;
-	typedef std::shared_ptr<Resource> ResourcePtr;
-	typedef std::shared_ptr<Technique> TechniquePtr;
-	typedef std::shared_ptr<Pass> PassPtr;
-	typedef std::shared_ptr<Shader> ShaderPtr;
-	typedef std::shared_ptr<Material> MaterialPtr;
-	typedef std::shared_ptr<CoreRenderer> CoreRendererPtr;
-	typedef std::shared_ptr<RendererFactory> RendererFactoryPtr;
-	typedef std::shared_ptr<Component> ComponentPtr;
-	typedef std::shared_ptr<GameObject> GameObjectPtr;
-	typedef std::shared_ptr<SceneObject> SceneObjectPtr;
-	typedef std::shared_ptr<SamplerState> SamplerStatePtr;
-	typedef std::shared_ptr<DepthStencilState> DepthStencilStatePtr;
-	typedef std::shared_ptr<RasterizerState> RasterizerStatePtr;
-	typedef std::shared_ptr<BlendState> BlendStatePtr;
-	typedef std::shared_ptr<RenderWindow> RenderWindowPtr;
-	typedef std::shared_ptr<RenderTarget> RenderTargetPtr;
-	typedef std::shared_ptr<RenderTexture> RenderTexturePtr;
-	typedef std::shared_ptr<MultiRenderTexture> MultiRenderTexturePtr;
-	typedef std::shared_ptr<GpuParamBlockBuffer> GpuParamBlockBufferPtr;
-	typedef std::shared_ptr<GpuParams> GpuParamsPtr;
-	typedef std::shared_ptr<TextureView> TextureViewPtr;
-	typedef std::shared_ptr<Viewport> ViewportPtr;
-	typedef std::shared_ptr<ShaderInclude> ShaderIncludePtr;
-	typedef std::shared_ptr<ImportOptions> ImportOptionsPtr;
-	typedef std::shared_ptr<const ImportOptions> ConstImportOptionsPtr;
-	typedef std::shared_ptr<Font> FontPtr;
-	typedef std::shared_ptr<VertexDataDesc> VertexDataDescPtr;
 	typedef CoreThreadAccessor<CommandQueueNoSync> CoreAccessor;
 	typedef CoreThreadAccessor<CommandQueueSync> SyncedCoreAccessor;
-	typedef std::shared_ptr<CoreThreadAccessor<CommandQueueNoSync>> CoreAccessorPtr;
-	typedef std::shared_ptr<CoreThreadAccessor<CommandQueueSync>> SyncedCoreAccessorPtr;
-	typedef std::shared_ptr<EventQuery> EventQueryPtr;
-	typedef std::shared_ptr<TimerQuery> TimerQueryPtr;
-	typedef std::shared_ptr<OcclusionQuery> OcclusionQueryPtr;
-	typedef std::shared_ptr<ResourceManifest> ResourceManifestPtr;
-	typedef std::shared_ptr<VideoModeInfo> VideoModeInfoPtr;
-	typedef std::shared_ptr<RenderQueue> RenderQueuePtr;
-	typedef std::shared_ptr<GpuParamDesc> GpuParamDescPtr;
-	typedef std::shared_ptr<ResourceMetaData> ResourceMetaDataPtr;
-	typedef std::shared_ptr<IShaderIncludeHandler> ShaderIncludeHandlerPtr;
-	typedef std::shared_ptr<Prefab> PrefabPtr;
-	typedef std::shared_ptr<PrefabDiff> PrefabDiffPtr;
-	typedef std::shared_ptr<RendererMeshData> RendererMeshDataPtr;
-	typedef std::shared_ptr<RenderAPIFactory> RenderAPIFactoryPtr;
-	typedef std::shared_ptr<PhysicsMaterial> PhysicsMaterialPtr;
-	typedef std::shared_ptr<PhysicsMesh> PhysicsMeshPtr;
 }
 
 /************************************************************************/

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

@@ -88,7 +88,7 @@ namespace BansheeEngine
 		 *			
 		 * @see		RendererMeshData
 		 */
-		virtual RendererMeshDataPtr _createMeshData(UINT32 numVertices, UINT32 numIndices, VertexLayout layout, IndexType indexType = IT_32BIT);
+		virtual SPtr<RendererMeshData> _createMeshData(UINT32 numVertices, UINT32 numIndices, VertexLayout layout, IndexType indexType = IT_32BIT);
 
 		/**
 		 * Creates a new renderer mesh data using an existing generic mesh data buffer.
@@ -97,7 +97,7 @@ namespace BansheeEngine
 		 *			
 		 * @see		RendererMeshData
 		 */
-		virtual RendererMeshDataPtr _createMeshData(const MeshDataPtr& meshData);
+		virtual SPtr<RendererMeshData> _createMeshData(const SPtr<MeshData>& meshData);
 
 		/**
 		 * Registers a new callback that will be executed when the the specify camera is being rendered.

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

@@ -37,7 +37,7 @@ namespace BansheeEngine
 		/** Contains data about an accessor for a specific thread. */
 		struct AccessorContainer
 		{
-			CoreAccessorPtr accessor;
+			SPtr<CoreThreadAccessor<CommandQueueNoSync>> accessor;
 			bool isMain;
 		};
 
@@ -64,7 +64,7 @@ public:
 	 * Accessors contain their own command queue and their commands will only start to get executed once that queue is 
 	 * submitted to the core thread via submitAccessors() method.
 	 */
-	CoreAccessorPtr getAccessor();
+	SPtr<CoreThreadAccessor<CommandQueueNoSync>> getAccessor();
 
 	/**
 	 * Retrieves an accessor that you can use for executing commands on the core thread from a non-core thread. There is 

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

@@ -155,10 +155,10 @@ namespace BansheeEngine
 		SPtr<DepthStencilStateCore> getCore() const;
 
 		/**	Creates a new depth stencil state using the specified depth stencil state description structure. */
-		static DepthStencilStatePtr create(const DEPTH_STENCIL_STATE_DESC& desc);
+		static SPtr<DepthStencilState> create(const DEPTH_STENCIL_STATE_DESC& desc);
 
 		/**	Returns the default depth stencil state that you may use when no other is available. */
-		static const DepthStencilStatePtr& getDefault();
+		static const SPtr<DepthStencilState>& getDefault();
 
 		/**	Generates a hash value from a depth-stencil state descriptor. */
 		static UINT64 generateHash(const DEPTH_STENCIL_STATE_DESC& desc);

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

@@ -43,7 +43,7 @@ namespace BansheeEngine
 			return TID_DepthStencilState;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return RenderStateManager::instance()._createDepthStencilStatePtr(DEPTH_STENCIL_STATE_DESC());
 		}

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

@@ -42,7 +42,7 @@ namespace BansheeEngine
 		Event<void()> onTriggered;
 
 		/**	Creates a new query, but does not schedule it on GPU. */
-		static EventQueryPtr create();
+		static SPtr<EventQuery> create();
 
 	protected:
 		friend class QueryManager;

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

@@ -69,7 +69,7 @@ namespace BansheeEngine
 		void initialize(const Vector<SPtr<FontBitmap>>& fontData);
 
 		/** Creates a new font as a pointer instead of a resource handle. */
-		static FontPtr _createPtr(const Vector<SPtr<FontBitmap>>& fontInitData);
+		static SPtr<Font> _createPtr(const Vector<SPtr<FontBitmap>>& fontInitData);
 
 		/** @} */
 

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

@@ -56,7 +56,7 @@ namespace BansheeEngine
 			return TID_FontImportOptions;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<FontImportOptions>();
 		}

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

@@ -16,14 +16,14 @@ namespace BansheeEngine
 	{
 	public:
 		/**	Creates a new font from the provided populated font data structure. */
-		FontPtr create(const Vector<SPtr<FontBitmap>>& fontData) const;
+		SPtr<Font> create(const Vector<SPtr<FontBitmap>>& fontData) const;
 
 		/**
 		 * Creates an empty font.
 		 *
 		 * @note	Internal method. Used by factory methods.
 		 */
-		FontPtr _createEmpty() const;
+		SPtr<Font> _createEmpty() const;
 	};
 
 	/** @} */

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

@@ -49,7 +49,7 @@ namespace BansheeEngine
 			return TID_FontBitmap;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<FontBitmap>();
 		}
@@ -112,7 +112,7 @@ namespace BansheeEngine
 			return TID_Font;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return FontManager::instance()._createEmpty();
 		}

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

@@ -87,7 +87,7 @@ namespace BansheeEngine
 		friend class PrefabUtility;
 
 		/**	Initializes the GameObject after construction. */
-		void initialize(const std::shared_ptr<GameObject>& object, UINT64 instanceId);
+		void initialize(const SPtr<GameObject>& object, UINT64 instanceId);
 
 		/**
 		 * Destroys this object.

+ 11 - 11
Source/BansheeCore/Include/BsGameObjectHandle.h

@@ -20,11 +20,11 @@ namespace BansheeEngine
 			:mInstanceId(0), object(nullptr)
 		{ }
 
-		std::shared_ptr<GameObject> object;
+		SPtr<GameObject> object;
 		UINT64 mInstanceId;
 	};
 
-	typedef std::shared_ptr<GameObjectInstanceData> GameObjectInstanceDataPtr;
+	typedef SPtr<GameObjectInstanceData> GameObjectInstanceDataPtr;
 
 	/**	Internal data shared between GameObject handles. */
 	struct BS_CORE_EXPORT GameObjectHandleData
@@ -33,12 +33,12 @@ namespace BansheeEngine
 			:mPtr(nullptr)
 		{ }
 
-		GameObjectHandleData(const std::shared_ptr<GameObjectInstanceData>& ptr)
+		GameObjectHandleData(const SPtr<GameObjectInstanceData>& ptr)
 		{
 			mPtr = ptr;
 		}
 
-		std::shared_ptr<GameObjectInstanceData> mPtr;
+		SPtr<GameObjectInstanceData> mPtr;
 	};
 
 	/**
@@ -85,7 +85,7 @@ namespace BansheeEngine
 		 *
 		 * @note	Throws exception if the GameObject was destroyed.
 		 */
-		std::shared_ptr<GameObject> getInternalPtr() const
+		SPtr<GameObject> getInternalPtr() const
 		{
 			throwIfDestroyed();
 
@@ -112,13 +112,13 @@ namespace BansheeEngine
 		 */
 
 		/** Returns internal handle data. */
-		std::shared_ptr<GameObjectHandleData> _getHandleData() const { return mData; }
+		SPtr<GameObjectHandleData> _getHandleData() const { return mData; }
 
 		/** Resolves a handle to a proper GameObject in case it was created uninitialized. */
 		void _resolve(const GameObjectHandleBase& object);
 
 		/**	Changes the GameObject instance the handle is pointing to. */
-		void _setHandleData(const GameObjectPtr& object);
+		void _setHandleData(const SPtr<GameObject>& object);
 
 		/** @} */
 
@@ -128,8 +128,8 @@ namespace BansheeEngine
 		template<class _Ty1, class _Ty2>
 		friend bool operator==(const GameObjectHandle<_Ty1>& _Left, const GameObjectHandle<_Ty2>& _Right);
 
-		GameObjectHandleBase(const std::shared_ptr<GameObject> ptr);
-		GameObjectHandleBase(const std::shared_ptr<GameObjectHandleData>& data);
+		GameObjectHandleBase(const SPtr<GameObject> ptr);
+		GameObjectHandleBase(const SPtr<GameObjectHandleData>& data);
 		GameObjectHandleBase(std::nullptr_t ptr);
 
 		/**	Throws an exception if the referenced GameObject has been destroyed. */
@@ -145,7 +145,7 @@ namespace BansheeEngine
 				mData->mPtr->object = nullptr;
 		}
 
-		std::shared_ptr<GameObjectHandleData> mData;
+		SPtr<GameObjectHandleData> mData;
 
 		/************************************************************************/
 		/* 								RTTI		                     		*/
@@ -226,7 +226,7 @@ namespace BansheeEngine
 		 *
 		 * @note	Throws exception if the GameObject was destroyed.
 		 */
-		std::shared_ptr<T> getInternalPtr() const
+		SPtr<T> getInternalPtr() const
 		{
 			throwIfDestroyed();
 

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

@@ -55,9 +55,9 @@ namespace BansheeEngine
 			return TID_GameObjectHandleBase;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
-			std::shared_ptr<GameObjectHandleBase> obj = bs_shared_ptr<GameObjectHandleBase>(new (bs_alloc<GameObjectHandleBase>()) GameObjectHandleBase());
+			SPtr<GameObjectHandleBase> obj = bs_shared_ptr<GameObjectHandleBase>(new (bs_alloc<GameObjectHandleBase>()) GameObjectHandleBase());
 
 			return obj;
 		}

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

@@ -55,7 +55,7 @@ namespace BansheeEngine
 		 *								object's ID so that deserialized handles can map to it properly.
 		 * @return						Handle to the GameObject.
 		 */
-		GameObjectHandleBase registerObject(const std::shared_ptr<GameObject>& object, UINT64 originalId = 0);
+		GameObjectHandleBase registerObject(const SPtr<GameObject>& object, UINT64 originalId = 0);
 
 		/**
 		 * Unregisters a GameObject. Handles to this object will no longer be valid after this call. This should be called

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

@@ -22,7 +22,7 @@ namespace BansheeEngine
 			:isDeserializationParent(false), originalId(0)
 		{ }
 
-		GameObjectPtr ptr;
+		SPtr<GameObject> ptr;
 		bool isDeserializationParent;
 		UINT64 originalId;
 		Any moreData;
@@ -52,7 +52,7 @@ namespace BansheeEngine
 	public:
 		/**	Helper method used for creating Component objects used during deserialization. */
 		template <typename T>
-		static std::shared_ptr<T> createGameObject()
+		static SPtr<T> createGameObject()
 		{
 			SPtr<T> component = SceneObject::createEmptyComponent<T>();
 
@@ -85,7 +85,7 @@ namespace BansheeEngine
 			return TID_GameObject;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
 			return nullptr;

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

@@ -90,7 +90,7 @@ namespace BansheeEngine
 		SPtr<CoreObjectCore> createCore() const override;
 
 		/** @copydoc HardwareBufferManager::createGpuParamBlockBuffer */
-		static GpuParamBlockBufferPtr create(UINT32 size, GpuParamBlockUsage usage = GPBU_DYNAMIC);
+		static SPtr<GpuParamBlockBuffer> create(UINT32 size, GpuParamBlockUsage usage = GPBU_DYNAMIC);
 
 		GpuBufferProperties mProperties;
     };

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

@@ -27,7 +27,7 @@ namespace BansheeEngine
 	template<> struct TGpuParamTextureType < true > { typedef SPtr<TextureCore> Type; };
 
 	template<bool Core> struct TGpuParamSamplerStateType { };
-	template<> struct TGpuParamSamplerStateType < false > { typedef SamplerStatePtr Type; };
+	template<> struct TGpuParamSamplerStateType < false > { typedef SPtr<SamplerState> Type; };
 	template<> struct TGpuParamSamplerStateType < true > { typedef SPtr<SamplerStateCore> Type; };
 
 	/**

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

@@ -147,7 +147,7 @@ namespace BansheeEngine
 		SPtr<GpuParamBlockBufferCore> getCore() const;
 
 		/** @copydoc HardwareBufferManager::createGpuParamBlockBuffer */
-		static GpuParamBlockBufferPtr create(UINT32 size, GpuParamBlockUsage usage = GPBU_DYNAMIC);
+		static SPtr<GpuParamBlockBuffer> create(UINT32 size, GpuParamBlockUsage usage = GPBU_DYNAMIC);
 
 	protected:
 		/** @copydoc CoreObject::createCore */

+ 8 - 8
Source/BansheeCore/Include/BsGpuParams.h

@@ -61,7 +61,7 @@ namespace BansheeEngine
 		 *
 		 * @note	You normally do not want to call this manually. Instead use GpuProgram::createParameters.
 		 */
-		GpuParamsBase(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
+		GpuParamsBase(const SPtr<GpuParamDesc>& paramDesc, bool transposeMatrices);
 		virtual ~GpuParamsBase();
 
 		// Note: Disallow copy/assign because it would require some care when copying (copy internal data shared_ptr and
@@ -117,7 +117,7 @@ namespace BansheeEngine
 		/**	Gets a descriptor for a data parameter with the specified name. */
 		GpuParamDataDesc* getParamDesc(const String& name) const;
 
-		GpuParamDescPtr mParamDesc;
+		SPtr<GpuParamDesc> mParamDesc;
 
 		UINT32 mNumParamBlocks;
 		UINT32 mNumTextures;
@@ -139,7 +139,7 @@ namespace BansheeEngine
 		{ 
 			typedef GpuParams GpuParamsType; 
 			typedef HTexture TextureType;
-			typedef SamplerStatePtr SamplerType;
+			typedef SPtr<SamplerState> SamplerType;
 			typedef SPtr<GpuParamBlockBuffer> ParamsBufferType;
 		};
 
@@ -156,7 +156,7 @@ namespace BansheeEngine
 		typedef typename TTypes<Core>::SamplerType SamplerType;
 		typedef typename TTypes<Core>::ParamsBufferType ParamsBufferType;
 
-		TGpuParams(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
+		TGpuParams(const SPtr<GpuParamDesc>& paramDesc, bool transposeMatrices);
 
 		virtual ~TGpuParams();
 
@@ -250,13 +250,13 @@ namespace BansheeEngine
 		void updateHardwareBuffers();
 
 		/** @copydoc GpuParamsBase::GpuParamsBase */
-		static SPtr<GpuParamsCore> create(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
+		static SPtr<GpuParamsCore> create(const SPtr<GpuParamDesc>& paramDesc, bool transposeMatrices);
 
 	protected:
 		friend class GpuParams;
 
 		/** @copydoc GpuParamsBase::GpuParamsBase */
-		GpuParamsCore(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
+		GpuParamsCore(const SPtr<GpuParamDesc>& paramDesc, bool transposeMatrices);
 
 		/** @copydoc CoreObject::getThisPtr */
 		SPtr<GpuParamsCore> _getThisPtr() const override;
@@ -286,7 +286,7 @@ namespace BansheeEngine
 		SPtr<GpuParamsCore> getCore() const;
 
 		/** @copydoc GpuParamsBase::GpuParamsBase */
-		static SPtr<GpuParams> create(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
+		static SPtr<GpuParams> create(const SPtr<GpuParamDesc>& paramDesc, bool transposeMatrices);
 
 		/** Contains a lookup table for sizes of all data parameters. Sizes are in bytes. */
 		const static GpuDataParamInfos PARAM_SIZES;
@@ -304,7 +304,7 @@ namespace BansheeEngine
 		/** @} */
 	protected:
 		/** @copydoc GpuParamsBase::GpuParamsBase */
-		GpuParams(const GpuParamDescPtr& paramDesc, bool transposeMatrices);
+		GpuParams(const SPtr<GpuParamDesc>& paramDesc, bool transposeMatrices);
 
 		/** @copydoc CoreObject::getThisPtr */
 		SPtr<GpuParams> _getThisPtr() const override;

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

@@ -116,14 +116,14 @@ namespace BansheeEngine
 		 *
 		 * @note	Only valid after core thread has initialized the program.
 		 */
-		GpuParamsPtr createParameters();
+		SPtr<GpuParams> createParameters();
 
 		/**
 		 * Returns description of all parameters in this GPU program.
 		 *
 		 * @note	Only valid after core thread has initialized the program.
 		 */
-		GpuParamDescPtr getParamDesc() const;
+		SPtr<GpuParamDesc> getParamDesc() const;
 
 		/** Retrieves a core implementation of a gpu program usable only from the core thread. */
 		SPtr<GpuProgramCore> getCore() const;
@@ -143,7 +143,7 @@ namespace BansheeEngine
 		 * @param[in]	requiresAdjacency	If true then adjacency information will be provided when rendering using this 
 		 *									program.
 		 */
-		static GpuProgramPtr create(const String& source, const String& entryPoint, const String& language, GpuProgramType gptype,
+		static SPtr<GpuProgram> create(const String& source, const String& entryPoint, const String& language, GpuProgramType gptype,
 			GpuProgramProfile profile, bool requiresAdjacency = false);
 
 	protected:
@@ -212,7 +212,7 @@ namespace BansheeEngine
 		virtual SPtr<GpuParamsCore> createParameters();
 
 		/** @copydoc GpuProgram::getParamDesc */
-		GpuParamDescPtr getParamDesc() const { return mParametersDesc; }
+		SPtr<GpuParamDesc> getParamDesc() const { return mParametersDesc; }
 
 		/**	Returns GPU program input declaration. Only relevant for vertex programs. */
 		SPtr<VertexDeclarationCore> getInputDeclaration() const { return mInputDeclaration; }
@@ -236,7 +236,7 @@ namespace BansheeEngine
 		bool mIsCompiled;
 		String mCompileError;
 
-		GpuParamDescPtr mParametersDesc;
+		SPtr<GpuParamDesc> mParametersDesc;
 		SPtr<VertexDeclarationCore> mInputDeclaration;
 		GpuProgramProperties mProperties;
 	};

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

@@ -64,14 +64,14 @@ namespace BansheeEngine
 		 * @param[in]	requiresAdjacency	If true then adjacency information will be provided when rendering using this 
 		 *									program.
 		 */
-		GpuProgramPtr create(const String& source, const String& entryPoint, const String& language, 
+		SPtr<GpuProgram> create(const String& source, const String& entryPoint, const String& language, 
 			GpuProgramType gptype, GpuProgramProfile profile, bool requiresAdjacency = false);
 
 		/**
 		 * Creates a completely empty and uninitialized GpuProgram. Should only be used for specific purposes, like 
 		 * deserialization, as it requires additional manual initialization that is not required normally.
 		 */
-		GpuProgramPtr createEmpty(const String& language, GpuProgramType type);
+		SPtr<GpuProgram> createEmpty(const String& language, GpuProgramType type);
 	};
 
 	/**

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

@@ -62,7 +62,7 @@ namespace BansheeEngine
 			return TID_GpuProgram;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return GpuProgramManager::instance().createEmpty("", GPT_VERTEX_PROGRAM); // Params don't matter, they'll get overwritten
 		}

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

@@ -30,7 +30,7 @@ namespace BansheeEngine
 			return TID_GpuResourceData;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
 			return nullptr;

+ 5 - 5
Source/BansheeCore/Include/BsHardwareBufferManager.h

@@ -34,7 +34,7 @@ namespace BansheeEngine
 		 * @param[in]	usage		Usage that tells the hardware how will be buffer be used. 
 		 * @param[in]	streamOut	If true the buffer will be usable for streaming out data from the GPU.
 		 */
-		virtual VertexBufferPtr createVertexBuffer(UINT32 vertexSize, UINT32 numVerts, GpuBufferUsage usage, bool streamOut = false);
+		virtual SPtr<VertexBuffer> createVertexBuffer(UINT32 vertexSize, UINT32 numVerts, GpuBufferUsage usage, bool streamOut = false);
 
 		/**
 		 * Creates a new index buffer that holds indices referencing vertices in a vertex buffer. Indices are interpreted 
@@ -44,7 +44,7 @@ namespace BansheeEngine
 		 * @param[in]	numIndexes	Number of indexes can buffer can hold.
 		 * @param[in]	usage		Usage that tells the hardware how will be buffer be used. 
 		 */
-		virtual IndexBufferPtr createIndexBuffer(IndexType itype, UINT32 numIndexes, GpuBufferUsage usage);
+		virtual SPtr<IndexBuffer> createIndexBuffer(IndexType itype, UINT32 numIndexes, GpuBufferUsage usage);
 
 		/**
 		 * Creates an GPU parameter block that you can use for setting parameters for GPU programs. Parameter blocks may be
@@ -54,7 +54,7 @@ namespace BansheeEngine
 		 * @param[in]	size	Size of the parameter buffer in bytes.
 		 * @param[in]	usage	Usage that tells the hardware how will be buffer be used. 
 		 */
-		virtual GpuParamBlockBufferPtr createGpuParamBlockBuffer(UINT32 size, GpuParamBlockUsage usage = GPBU_DYNAMIC);
+		virtual SPtr<GpuParamBlockBuffer> createGpuParamBlockBuffer(UINT32 size, GpuParamBlockUsage usage = GPBU_DYNAMIC);
 
 		/**
 		 * Creates a generic buffer that can be passed as a parameter to a GPU program. This type of buffer can hold various 
@@ -71,11 +71,11 @@ namespace BansheeEngine
 		 * Be aware that due to some render API restrictions some of these settings cannot be used together, and if so you 
 		 * will receive an assert in debug mode.
 		 */
-		virtual GpuBufferPtr createGpuBuffer(UINT32 elementCount, UINT32 elementSize, 
+		virtual SPtr<GpuBuffer> createGpuBuffer(UINT32 elementCount, UINT32 elementSize, 
 			GpuBufferType type, GpuBufferUsage usage, bool randomGpuWrite = false, bool useCounter = false);
 
 		/** Creates a new vertex declaration from a list of vertex elements. */
-		virtual VertexDeclarationPtr createVertexDeclaration(const List<VertexElement>& elements);
+		virtual SPtr<VertexDeclaration> createVertexDeclaration(const List<VertexElement>& elements);
 	};
 
 	/**

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

@@ -22,7 +22,7 @@ namespace BansheeEngine
 		 * @param[in]	icons   	Pixels of images to replace. Each entry maps an icon width (and height, since they're 
 		 *							square) to its pixels.
 		 */
-		static void updateIconExe(const Path& filePath, const Map<UINT32, PixelDataPtr>& icons);
+		static void updateIconExe(const Path& filePath, const Map<UINT32, SPtr<PixelData>>& icons);
 
 	private:
 		/**
@@ -32,7 +32,7 @@ namespace BansheeEngine
 		 * @param[in]	icons		Pixels of images to replace. Each entry maps an icon width (and height, since they're
 		 *							square) to its pixels.
 		 */
-		static void updateIconData(UINT8* iconData, const Map<UINT32, PixelDataPtr>& icons);
+		static void updateIconData(UINT8* iconData, const Map<UINT32, SPtr<PixelData>>& icons);
 	};
 
 	/** @} */

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

@@ -30,7 +30,7 @@ namespace BansheeEngine
 			return TID_ImportOptions;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<ImportOptions>();
 		}

+ 6 - 6
Source/BansheeCore/Include/BsImporter.h

@@ -41,11 +41,11 @@ namespace BansheeEngine
 		 *
 		 * @see		createImportOptions
 		 */
-		HResource import(const Path& inputFilePath, ConstImportOptionsPtr importOptions = nullptr);
+		HResource import(const Path& inputFilePath, SPtr<const ImportOptions> importOptions = nullptr);
 
 		/** @copydoc import */
 		template <class T>
-		ResourceHandle<T> import(const Path& inputFilePath, ConstImportOptionsPtr importOptions = nullptr)
+		ResourceHandle<T> import(const Path& inputFilePath, SPtr<const ImportOptions> importOptions = nullptr)
 		{
 			return static_resource_cast<T>(import(inputFilePath, importOptions));
 		}
@@ -63,7 +63,7 @@ namespace BansheeEngine
 		 *
 		 * @see		createImportOptions
 		 */
-		Vector<SubResource> importAll(const Path& inputFilePath, ConstImportOptionsPtr importOptions = nullptr);
+		Vector<SubResource> importAll(const Path& inputFilePath, SPtr<const ImportOptions> importOptions = nullptr);
 
 		/**
 		 * Imports a resource and replaces the contents of the provided existing resource with new imported data.
@@ -75,7 +75,7 @@ namespace BansheeEngine
 		 *
 		 * @see		createImportOptions
 		 */
-		void reimport(HResource& existingResource, const Path& inputFilePath, ConstImportOptionsPtr importOptions = nullptr);
+		void reimport(HResource& existingResource, const Path& inputFilePath, SPtr<const ImportOptions> importOptions = nullptr);
 
 		/**
 		 * Automatically detects the importer needed for the provided file and returns valid type of import options for 
@@ -91,7 +91,7 @@ namespace BansheeEngine
 		 * expect to be used for this file type. If you don't use a proper import options type, an exception will be thrown 
 		 * during import.
 		 */
-		ImportOptionsPtr createImportOptions(const Path& inputFilePath);
+		SPtr<ImportOptions> createImportOptions(const Path& inputFilePath);
 
 		/** @copydoc createImportOptions */
 		template<class T>
@@ -147,7 +147,7 @@ namespace BansheeEngine
 		 *
 		 * @see		createImportOptions
 		 */
-		Vector<SubResourceRaw> _importAllRaw(const Path& inputFilePath, ConstImportOptionsPtr importOptions = nullptr);
+		Vector<SubResourceRaw> _importAllRaw(const Path& inputFilePath, SPtr<const ImportOptions> importOptions = nullptr);
 
 		/** @} */
 	private:

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

@@ -60,7 +60,7 @@ namespace BansheeEngine
 		SPtr<IndexBufferCore> getCore() const;
 
 		/** @copydoc HardwareBufferManager::createIndexBuffer */
-		static IndexBufferPtr create(IndexType itype, UINT32 numIndexes, GpuBufferUsage usage);
+		static SPtr<IndexBuffer> create(IndexType itype, UINT32 numIndexes, GpuBufferUsage usage);
 
 	protected:
 		friend class HardwareBufferManager;

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

@@ -163,7 +163,7 @@ namespace BansheeEngine
 		 *
 		 * @note	Internal method.
 		 */
-		void _registerRawInputHandler(std::shared_ptr<RawInputHandler> inputHandler);
+		void _registerRawInputHandler(SPtr<RawInputHandler> inputHandler);
 
 		/**
 		 * Called every frame. Detects button state changes and prepares callback events to trigger via a call to 
@@ -214,8 +214,8 @@ namespace BansheeEngine
 		void inputWindowChanged(RenderWindow& win);
 
 	private:
-		std::shared_ptr<RawInputHandler> mRawInputHandler;
-		std::shared_ptr<OSInputHandler> mOSInputHandler;
+		SPtr<RawInputHandler> mRawInputHandler;
+		SPtr<OSInputHandler> mOSInputHandler;
 
 		Vector<DeviceData> mDevices;
 		Vector2I mPointerPosition;

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

@@ -64,7 +64,7 @@ namespace BansheeEngine
 	template<> struct TGpuParamBlockBufferPtrType<true> { typedef SPtr<GpuParamBlockBufferCore> Type; };
 
 	template<bool Core> struct TGpuProgramType { };
-	template<> struct TGpuProgramType<false> { typedef GpuProgramPtr Type; };
+	template<> struct TGpuProgramType<false> { typedef SPtr<GpuProgram> Type; };
 	template<> struct TGpuProgramType<true> { typedef SPtr<GpuProgramCore> Type; };
 
 	/** Contains sim thread pass parameters for each shader stage. */
@@ -98,7 +98,7 @@ namespace BansheeEngine
 			StructData(UINT32 _size)
 				:size(_size)
 			{
-				data = std::shared_ptr<void>(bs_alloc(_size), &bs_free);
+				data = SPtr<void>(bs_alloc(_size), &bs_free);
 			}
 
 			/**
@@ -109,7 +109,7 @@ namespace BansheeEngine
 				memcpy(data.get(), _data, size);
 			}
 
-			std::shared_ptr<void> data;
+			SPtr<void> data;
 			UINT32 size;
 		};
 
@@ -129,10 +129,10 @@ namespace BansheeEngine
 		virtual void _markResourcesDirty() { }
 
 		/** Returns all GPU parameter descriptions in the specified technique. */
-		static Vector<GpuParamDescPtr> getAllParamDescs(const SPtr<Technique>& technique);
+		static Vector<SPtr<GpuParamDesc>> getAllParamDescs(const SPtr<Technique>& technique);
 
 		/** Returns all GPU parameter descriptions in the specified technique. */
-		static Vector<GpuParamDescPtr> getAllParamDescs(const SPtr<TechniqueCore>& technique);
+		static Vector<SPtr<GpuParamDesc>> getAllParamDescs(const SPtr<TechniqueCore>& technique);
 
 		Set<String> mValidShareableParamBlocks;
 		Map<String, String> mValidParams; // Also maps Shader param name -> gpu variable name

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

@@ -20,17 +20,17 @@ namespace BansheeEngine
 		 *
 		 * @note	Make sure to call Material::setShader() before using it.
 		 */
-		MaterialPtr create() const;
+		SPtr<Material> create() const;
 
 		/** Creates a new material with the specified shader. */
-		MaterialPtr create(const HShader& shader) const;
+		SPtr<Material> create(const HShader& shader) const;
 
 		/**
 		 * Creates a new empty material without initializing it.
 		 *
 		 * @note	You must manually call Material::initialize() after creation.
 		 */
-		MaterialPtr createEmpty() const;
+		SPtr<Material> createEmpty() const;
 	};
 
 	/** @} */

+ 9 - 9
Source/BansheeCore/Include/BsMaterialParams.h

@@ -213,7 +213,7 @@ namespace BansheeEngine
 		 * @param[in]	name		Name of the shader parameter.
 		 * @param[out]	value		Output value of the parameter.
 		 */
-		void getSamplerState(const String& name, SamplerStatePtr& value) const;
+		void getSamplerState(const String& name, SPtr<SamplerState>& value) const;
 
 		/** 
 		 * Sets the value of a shader sampler state parameter with the specified name. If the parameter name or type is not 
@@ -222,7 +222,7 @@ namespace BansheeEngine
 		 * @param[in]	name		Name of the shader parameter.
 		 * @param[in]	value		New value of the parameter.
 		 */
-		void setSamplerState(const String& name, const SamplerStatePtr& value);
+		void setSamplerState(const String& name, const SPtr<SamplerState>& value);
 
 		/** 
 		 * Returns data about a parameter and reports an error if there is a type or size mismatch, or if the parameter
@@ -333,16 +333,16 @@ namespace BansheeEngine
 		bool getIsTextureLoadStore(UINT32 index) const;
 
 		/** 
-		 * Equivalent to getSamplerState(const String&, SamplerStatePtr&) except it uses the internal parameter index 
+		 * Equivalent to getSamplerState(const String&, SPtr<SamplerState>&) except it uses the internal parameter index 
 		 * directly, avoiding the name lookup. Caller must guarantee the index is valid.
 		 */
-		void getSamplerState(UINT32 index, SamplerStatePtr& value) const;
+		void getSamplerState(UINT32 index, SPtr<SamplerState>& value) const;
 
 		/** 
-		 * Equivalent to setSamplerState(const String&, SamplerStatePtr&) except it uses the internal parameter index 
+		 * Equivalent to setSamplerState(const String&, SPtr<SamplerState>&) except it uses the internal parameter index 
 		 * directly, avoiding the name lookup. Caller must guarantee the index is valid.
 		 */
-		void setSamplerState(UINT32 index, const SamplerStatePtr& value);
+		void setSamplerState(UINT32 index, const SPtr<SamplerState>& value);
 
 		/** 
 		 * Returns the default texture (one assigned when no other is provided), if available for the specified index. 
@@ -354,7 +354,7 @@ namespace BansheeEngine
 		 * Returns the default sampler state (one assigned when no other is provided), if available for the specified index.
 		 * Index is the internal parameter index and the caller must guarantee the index is valid.
 		 */
-		void getDefaultSamplerState(UINT32 index, SamplerStatePtr& value) const;
+		void getDefaultSamplerState(UINT32 index, SPtr<SamplerState>& value) const;
 
 	private:
 		const static UINT32 STATIC_BUFFER_SIZE = 256;
@@ -364,9 +364,9 @@ namespace BansheeEngine
 		UINT8* mDataParamsBuffer = nullptr;
 		StructParamData* mStructParams = nullptr;
 		TextureParamData* mTextureParams = nullptr;
-		SamplerStatePtr* mSamplerStateParams = nullptr;
+		SPtr<SamplerState>* mSamplerStateParams = nullptr;
 		HTexture* mDefaultTextureParams = nullptr;
-		SamplerStatePtr* mDefaultSamplerStateParams = nullptr;
+		SPtr<SamplerState>* mDefaultSamplerStateParams = nullptr;
 
 		UINT32 mDataSize = 0;
 		UINT32 mNumStructParams = 0;

+ 6 - 6
Source/BansheeCore/Include/BsMaterialParamsRTTI.h

@@ -44,7 +44,7 @@ namespace BansheeEngine
 			return TID_TextureParamData;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<MaterialParams::TextureParamData>();
 		}
@@ -88,7 +88,7 @@ namespace BansheeEngine
 			return TID_StructParamData;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<MaterialParams::StructParamData>();
 		}
@@ -170,13 +170,13 @@ namespace BansheeEngine
 			obj->mTextureParams = obj->mAlloc.construct<MaterialParams::TextureParamData>(size);
 		}
 
-		SamplerStatePtr getSamplerStateParam(MaterialParams* obj, UINT32 idx) { return obj->mSamplerStateParams[idx]; }
-		void setSamplerStateParam(MaterialParams* obj, UINT32 idx, SamplerStatePtr param) { obj->mSamplerStateParams[idx] = param; }
+		SPtr<SamplerState> getSamplerStateParam(MaterialParams* obj, UINT32 idx) { return obj->mSamplerStateParams[idx]; }
+		void setSamplerStateParam(MaterialParams* obj, UINT32 idx, SPtr<SamplerState> param) { obj->mSamplerStateParams[idx] = param; }
 		UINT32 getSamplerStateArraySize(MaterialParams* obj) { return (UINT32)obj->mNumSamplerParams; }
 		void setSamplerStateArraySize(MaterialParams* obj, UINT32 size)
 		{
 			obj->mNumSamplerParams = size;
-			obj->mSamplerStateParams = obj->mAlloc.construct<SamplerStatePtr>(size);
+			obj->mSamplerStateParams = obj->mAlloc.construct<SPtr<SamplerState>>(size);
 		}
 
 		MaterialParamsRTTI()
@@ -225,7 +225,7 @@ namespace BansheeEngine
 			return TID_MaterialParams; 
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<MaterialParams>();
 		}

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

@@ -19,8 +19,8 @@ namespace BansheeEngine
 		HShader& getShader(Material* obj) { return obj->mShader; }
 		void setShader(Material* obj, HShader& val) { obj->mShader = val; }
 
-		std::shared_ptr<MaterialParams> getMaterialParams(Material* obj) { return obj->mCachedParams; }
-		void setMaterialParams(Material* obj, std::shared_ptr<MaterialParams> value) { obj->mRTTIData = value; }
+		SPtr<MaterialParams> getMaterialParams(Material* obj) { return obj->mCachedParams; }
+		void setMaterialParams(Material* obj, SPtr<MaterialParams> value) { obj->mRTTIData = value; }
 
 	public:
 		MaterialRTTI()
@@ -42,7 +42,7 @@ namespace BansheeEngine
 			return TID_Material;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override;
+		SPtr<IReflectable> newRTTIObject() override;
 	};
 
 	/** @} */

+ 32 - 32
Source/BansheeCore/Include/BsMesh.h

@@ -45,7 +45,7 @@ namespace BansheeEngine
 		 *
 		 * @see		MeshCore::writeSubresource
 		 */
-		AsyncOp writeSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const MeshDataPtr& data, 
+		AsyncOp writeSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const SPtr<MeshData>& data, 
 			bool discardEntireBuffer);
 
 		/**
@@ -60,7 +60,7 @@ namespace BansheeEngine
 		 *
 		 * @see		MeshCore::readSubresource
 		 */
-		AsyncOp readSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const MeshDataPtr& data);
+		AsyncOp readSubresource(CoreAccessor& accessor, UINT32 subresourceIdx, const SPtr<MeshData>& data);
 
 		/**
 		 * Allocates a buffer you may use for storage when reading a subresource. You need to allocate such a buffer if you
@@ -70,7 +70,7 @@ namespace BansheeEngine
 		 *
 		 * @note	Thread safe.
 		 */
-		MeshDataPtr allocateSubresourceBuffer(UINT32 subresourceIdx) const;
+		SPtr<MeshData> allocateSubresourceBuffer(UINT32 subresourceIdx) const;
 
 		/**
 		 * Reads data from the cached system memory mesh buffer into the provided buffer. 
@@ -94,18 +94,18 @@ namespace BansheeEngine
 	protected:
 		friend class MeshManager;
 
-		Mesh(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, 
+		Mesh(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc, 
 			int usage = MU_STATIC, DrawOperationType drawOp = DOT_TRIANGLE_LIST,
 			IndexType indexType = IT_32BIT);
 
-		Mesh(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc,
+		Mesh(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc,
 			const Vector<SubMesh>& subMeshes, int usage = MU_STATIC,
 			IndexType indexType = IT_32BIT);
 
-		Mesh(const MeshDataPtr& initialMeshData, int usage = MU_STATIC,
+		Mesh(const SPtr<MeshData>& initialMeshData, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
-		Mesh(const MeshDataPtr& initialMeshData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
+		Mesh(const SPtr<MeshData>& initialMeshData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
 
 		/**	Updates bounds by calculating them from the vertices in the provided mesh data object. */
 		void updateBounds(const MeshData& meshData);
@@ -123,9 +123,9 @@ namespace BansheeEngine
 		/**	Updates the cached CPU buffers with new data. */
 		void updateCPUBuffer(UINT32 subresourceIdx, const MeshData& data);
 
-		mutable MeshDataPtr mCPUData;
+		mutable SPtr<MeshData> mCPUData;
 
-		VertexDataDescPtr mVertexDesc;
+		SPtr<VertexDataDesc> mVertexDesc;
 		int mUsage;
 		IndexType mIndexType;
 
@@ -160,7 +160,7 @@ namespace BansheeEngine
 		 * @param[in]	indexType		Size of indices, use smaller size for better performance, however be careful not to
 		 *								go over the number of vertices limited by the size.
 		 */
-		static HMesh create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, int usage = MU_STATIC,
+		static HMesh create(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST, IndexType indexType = IT_32BIT);
 
 		/**
@@ -178,7 +178,7 @@ namespace BansheeEngine
 		 * @param[in]	indexType		Size of indices, use smaller size for better performance, however be careful not to
 		 *								go over the number of vertices limited by the size.
 		 */
-		static HMesh create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, const Vector<SubMesh>& subMeshes,
+		static HMesh create(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc, const Vector<SubMesh>& subMeshes,
 			int usage = MU_STATIC, IndexType indexType = IT_32BIT);
 
 		/**
@@ -190,7 +190,7 @@ namespace BansheeEngine
 		 * @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.
 		 */
-		static HMesh create(const MeshDataPtr& initialData, int usage = MU_STATIC,
+		static HMesh create(const SPtr<MeshData>& initialData, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 		/**
@@ -202,44 +202,44 @@ namespace BansheeEngine
 		 *								rendered. Sub-meshes may be rendered independently.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 */
-		static HMesh create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
+		static HMesh create(const SPtr<MeshData>& 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 SPtr<VertexDataDesc>&, int, DrawOperationType, IndexType)
 		 *
 		 * @note	Internal method. Use create() for normal use.
 		 */
-		static MeshPtr _createPtr(UINT32 numVertices, UINT32 numIndices, 
-			const VertexDataDescPtr& vertexDesc, int usage = MU_STATIC,
+		static SPtr<Mesh> _createPtr(UINT32 numVertices, UINT32 numIndices, 
+			const SPtr<VertexDataDesc>& vertexDesc, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST, IndexType indexType = IT_32BIT);
 
 		/**
-		 * @copydoc	create(UINT32, UINT32, const VertexDataDescPtr&, const Vector<SubMesh>&, int, IndexType)
+		 * @copydoc	create(UINT32, UINT32, const SPtr<VertexDataDesc>&, const Vector<SubMesh>&, int, IndexType)
 		 *
 		 * @note	Internal method. Use create() for normal use.
 		 */
-		static MeshPtr _createPtr(UINT32 numVertices, UINT32 numIndices, 
-			const VertexDataDescPtr& vertexDesc, const Vector<SubMesh>& subMeshes,
+		static SPtr<Mesh> _createPtr(UINT32 numVertices, UINT32 numIndices, 
+			const SPtr<VertexDataDesc>& vertexDesc, const Vector<SubMesh>& subMeshes,
 			int usage = MU_STATIC, IndexType indexType = IT_32BIT);
 
 		/**
-		 * @copydoc	create(const MeshDataPtr&, int, DrawOperationType)
+		 * @copydoc	create(const SPtr<MeshData>&, int, DrawOperationType)
 		 *
 		 * @note	Internal method. Use create() for normal use.
 		 */
-		static MeshPtr _createPtr(const MeshDataPtr& initialData, int usage = MU_STATIC,
+		static SPtr<Mesh> _createPtr(const SPtr<MeshData>& initialData, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 		/**
-		 * @copydoc	create(const MeshDataPtr&, const Vector<SubMesh>&, int)
+		 * @copydoc	create(const SPtr<MeshData>&, const Vector<SubMesh>&, int)
 		 *
 		 * @note	Internal method. Use create() for normal use.
 		 */
-		static MeshPtr _createPtr(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes,
+		static SPtr<Mesh> _createPtr(const SPtr<MeshData>& initialData, const Vector<SubMesh>& subMeshes,
 			int usage = MU_STATIC);
 
 		/** @} */
@@ -259,9 +259,9 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT MeshCore : public MeshCoreBase
 	{
 	public:
-		MeshCore(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc,
+		MeshCore(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc,
 			const Vector<SubMesh>& subMeshes, int usage, IndexType indexType,
-			MeshDataPtr initialMeshData);
+			SPtr<MeshData> initialMeshData);
 
 		~MeshCore();
 
@@ -315,7 +315,7 @@ namespace BansheeEngine
 		 * @param[in]	indexType		Size of indices, use smaller size for better performance, however be careful not to
 		 *								go over the number of vertices limited by the size.
 		 */
-		static SPtr<MeshCore> create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, int usage = MU_STATIC,
+		static SPtr<MeshCore> create(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST, IndexType indexType = IT_32BIT);
 
 		/**
@@ -333,7 +333,7 @@ namespace BansheeEngine
 		 * @param[in]	indexType		Size of indices, use smaller size for better performance, however be careful not 
 		 *								to go over the number of vertices limited by the size.
 		 */
-		static SPtr<MeshCore> create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, const Vector<SubMesh>& subMeshes,
+		static SPtr<MeshCore> create(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc, const Vector<SubMesh>& subMeshes,
 			int usage = MU_STATIC, IndexType indexType = IT_32BIT);
 
 		/**
@@ -345,7 +345,7 @@ namespace BansheeEngine
 		 * @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.
 		 */
-		static SPtr<MeshCore> create(const MeshDataPtr& initialData, int usage = MU_STATIC,
+		static SPtr<MeshCore> create(const SPtr<MeshData>& initialData, int usage = MU_STATIC,
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 		/**
@@ -357,7 +357,7 @@ namespace BansheeEngine
 		 *								rendered. Sub-meshes may be rendered independently.
 		 * @param[in]	usage			Optimizes performance depending on planned usage of the mesh.
 		 */
-		static SPtr<MeshCore> create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
+		static SPtr<MeshCore> create(const SPtr<MeshData>& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
 
 	protected:
 		friend class Mesh;
@@ -365,13 +365,13 @@ namespace BansheeEngine
 		/** Updates bounds by calculating them from the vertices in the provided mesh data object. */
 		void updateBounds(const MeshData& meshData);
 
-		std::shared_ptr<VertexData> mVertexData;
+		SPtr<VertexData> mVertexData;
 		SPtr<IndexBufferCore> mIndexBuffer;
 
-		VertexDataDescPtr mVertexDesc;
+		SPtr<VertexDataDesc> mVertexDesc;
 		int mUsage;
 		IndexType mIndexType;
-		MeshDataPtr mTempInitialMeshData;
+		SPtr<MeshData> mTempInitialMeshData;
 	};
 
 	/** @} */

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

@@ -40,7 +40,7 @@ namespace BansheeEngine
 				&MeshBaseRTTI::getNumSubmeshes, &MeshBaseRTTI::setSubMesh, &MeshBaseRTTI::setNumSubmeshes);
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
 			return nullptr;

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

@@ -100,7 +100,7 @@ namespace BansheeEngine
 		 * 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(UINT32 numVertices, UINT32 numIndexes, const SPtr<VertexDataDesc>& vertexData, IndexType indexType = IT_32BIT);
 		~MeshData();
 
 		/**
@@ -207,7 +207,7 @@ namespace BansheeEngine
 		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; }
+		const SPtr<VertexDataDesc>& getVertexDesc() const { return mVertexData; }
 
 		/**	Return the size (in bytes) of the entire buffer. */
 		UINT32 getSize() const { return getInternalBufferSize(); }
@@ -227,14 +227,14 @@ namespace BansheeEngine
 		 * @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,
+		static SPtr<MeshData> combine(const Vector<SPtr<MeshData>>& 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, 
+		static SPtr<MeshData> create(UINT32 numVertices, UINT32 numIndexes, const SPtr<VertexDataDesc>& vertexData, 
 			IndexType indexType = IT_32BIT)
 		{
 			return bs_shared_ptr_new<MeshData>(numVertices, numIndexes, vertexData, indexType);
@@ -290,7 +290,7 @@ namespace BansheeEngine
 		UINT32 mNumIndices;
 		IndexType mIndexType;
 
-		VertexDataDescPtr mVertexData;
+		SPtr<VertexDataDesc> mVertexData;
 
 		/************************************************************************/
 		/* 								SERIALIZATION                      		*/

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

@@ -20,8 +20,8 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT MeshDataRTTI : public RTTIType<MeshData, GpuResourceData, MeshDataRTTI>
 	{
 	private:
-		VertexDataDescPtr getVertexData(MeshData* obj) { return obj->mVertexData; }
-		void setVertexData(MeshData* obj, VertexDataDescPtr value) { obj->mVertexData = value; }
+		SPtr<VertexDataDesc> getVertexData(MeshData* obj) { return obj->mVertexData; }
+		void setVertexData(MeshData* obj, SPtr<VertexDataDesc> value) { obj->mVertexData = value; }
 
 		IndexType& getIndexType(MeshData* obj) { return obj->mIndexType; }
 		void setIndexType(MeshData* obj, IndexType& value) { obj->mIndexType = value; }
@@ -63,7 +63,7 @@ namespace BansheeEngine
 			addDataBlockField("data", 4, &MeshDataRTTI::getData, &MeshDataRTTI::setData, 0, &MeshDataRTTI::allocateData);
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr<MeshData>(new (bs_alloc<MeshData>()) MeshData());
 		}

+ 11 - 11
Source/BansheeCore/Include/BsMeshHeap.h

@@ -49,7 +49,7 @@ namespace BansheeEngine
 		/**	Data about a GPU query. */
 		struct QueryData
 		{
-			EventQueryPtr query;
+			SPtr<EventQuery> query;
 			UINT32 queryId;
 		};
 
@@ -62,7 +62,7 @@ namespace BansheeEngine
 		friend class TransientMeshCore;
 
 		MeshHeapCore(UINT32 numVertices, UINT32 numIndices, 
-			const VertexDataDescPtr& vertexDesc, IndexType indexType = IT_32BIT);
+			const SPtr<VertexDataDesc>& vertexDesc, IndexType indexType = IT_32BIT);
 
 		/** @copydoc CoreObjectCore::initialize() */
 		virtual void initialize() override;
@@ -73,7 +73,7 @@ namespace BansheeEngine
 		 * @param[in]	meshId		Mesh for which we are allocating the data.
 		 * @param[in]	meshData	Data to initialize the new mesh with.
 		 */
-		void alloc(SPtr<TransientMeshCore> mesh, const MeshDataPtr& meshData);
+		void alloc(SPtr<TransientMeshCore> mesh, const SPtr<MeshData>& meshData);
 
 		/** Deallocates the provided mesh. Freed memory will be re-used as soon as the GPU is done with the mesh. */
 		void dealloc(SPtr<TransientMeshCore> mesh);
@@ -141,7 +141,7 @@ namespace BansheeEngine
 
 		Map<UINT32, AllocatedData> mMeshAllocData;
 
-		VertexDataDescPtr mVertexDesc;
+		SPtr<VertexDataDesc> mVertexDesc;
 		IndexType mIndexType;
 
 		Vector<ChunkData> mVertChunks;
@@ -189,13 +189,13 @@ namespace BansheeEngine
 		 * @note	
 		 * Offsets provided by MeshData are ignored. MeshHeap will determine where the data will be written internally.
 		 */
-		TransientMeshPtr alloc(const MeshDataPtr& meshData, DrawOperationType drawOp = DOT_TRIANGLE_LIST);
+		SPtr<TransientMesh> alloc(const SPtr<MeshData>& meshData, DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
 		/**
 		 * Deallocates the provided mesh and makes that room on the heap re-usable as soon as the GPU is also done with the 
 		 * mesh.
 		 */
-		void dealloc(const TransientMeshPtr& mesh);
+		void dealloc(const SPtr<TransientMesh>& mesh);
 
 		/** Retrieves a core implementation of a mesh heap usable only from the core thread. */
 		SPtr<MeshHeapCore> getCore() const;
@@ -208,13 +208,13 @@ namespace BansheeEngine
 		 * @param[in]	vertexDesc	Description of the stored vertices.
 		 * @param[in]	indexType	Type of the stored indices.
 		 */
-		static MeshHeapPtr create(UINT32 numVertices, UINT32 numIndices, 
-			const VertexDataDescPtr& vertexDesc, IndexType indexType = IT_32BIT);
+		static SPtr<MeshHeap> create(UINT32 numVertices, UINT32 numIndices, 
+			const SPtr<VertexDataDesc>& vertexDesc, IndexType indexType = IT_32BIT);
 
 	private:
 		/** @copydoc create */
 		MeshHeap(UINT32 numVertices, UINT32 numIndices, 
-			const VertexDataDescPtr& vertexDesc, IndexType indexType = IT_32BIT);
+			const SPtr<VertexDataDesc>& vertexDesc, IndexType indexType = IT_32BIT);
 
 		/** @copydoc CoreObject::createCore */
 		SPtr<CoreObjectCore> createCore() const override;
@@ -223,10 +223,10 @@ namespace BansheeEngine
 		UINT32 mNumVertices;
 		UINT32 mNumIndices;
 
-		VertexDataDescPtr mVertexDesc;
+		SPtr<VertexDataDesc> mVertexDesc;
 		IndexType mIndexType;
 
-		Map<UINT32, TransientMeshPtr> mMeshes;
+		Map<UINT32, SPtr<TransientMesh>> mMeshes;
 		UINT32 mNextFreeId;
 	};
 

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

@@ -49,7 +49,7 @@ namespace BansheeEngine
 			return TID_MeshImportOptions;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<MeshImportOptions>();
 		}

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

@@ -19,29 +19,29 @@ namespace BansheeEngine
 		MeshManager();
 		~MeshManager();
 
-		/** @copydoc Mesh::create(UINT32, UINT32, const VertexDataDescPtr&, int, DrawOperationType, IndexType) */
-		MeshPtr create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, int usage = MU_STATIC, 
+		/** @copydoc Mesh::create(UINT32, UINT32, const SPtr<VertexDataDesc>&, int, DrawOperationType, IndexType) */
+		SPtr<Mesh> create(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc, int usage = MU_STATIC, 
 			DrawOperationType drawOp = DOT_TRIANGLE_LIST, IndexType indexType = IT_32BIT);
 
-		/** @copydoc Mesh::create(UINT32, UINT32, const VertexDataDescPtr&, const Vector<SubMesh>&, int, IndexType) */
-		MeshPtr create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, const Vector<SubMesh>& subMeshes, 
+		/** @copydoc Mesh::create(UINT32, UINT32, const SPtr<VertexDataDesc>&, const Vector<SubMesh>&, int, IndexType) */
+		SPtr<Mesh> create(UINT32 numVertices, UINT32 numIndices, const SPtr<VertexDataDesc>& vertexDesc, const Vector<SubMesh>& subMeshes, 
 			int usage = MU_STATIC, IndexType indexType = IT_32BIT);
 
-		/** @copydoc Mesh::create(const MeshDataPtr&, int, DrawOperationType) */
-		MeshPtr create(const MeshDataPtr& initialData, int usage = MU_STATIC, DrawOperationType drawOp = DOT_TRIANGLE_LIST);
+		/** @copydoc Mesh::create(const SPtr<MeshData>&, int, DrawOperationType) */
+		SPtr<Mesh> create(const SPtr<MeshData>& initialData, int usage = MU_STATIC, DrawOperationType drawOp = DOT_TRIANGLE_LIST);
 
-		/** @copydoc Mesh::create(const MeshDataPtr&, const Vector<SubMesh>&, int) */
-		MeshPtr create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
+		/** @copydoc Mesh::create(const SPtr<MeshData>&, const Vector<SubMesh>&, int) */
+		SPtr<Mesh> create(const SPtr<MeshData>& initialData, const Vector<SubMesh>& subMeshes, int usage = MU_STATIC);
 
 		/**
 		 * Creates a new empty and uninitialized mesh. You will need to manually initialize the mesh before using it.
 		 *	
 		 * @note	This should only be used for special cases and is not meant for normal use.
 		 */
-		MeshPtr createEmpty();
+		SPtr<Mesh> createEmpty();
 
 		/** Returns some dummy mesh data with one triangle you may use for initializing a mesh. */
-		MeshDataPtr getDummyMeshData() const { return mDummyMeshData; }
+		SPtr<MeshData> getDummyMeshData() const { return mDummyMeshData; }
 
 		/**	Returns a dummy mesh containing one triangle. */
 		HMesh getDummyMesh() const { return mDummyMesh; }
@@ -51,7 +51,7 @@ namespace BansheeEngine
 		virtual void onStartUp() override;
 
 	private:
-		MeshDataPtr mDummyMeshData;
+		SPtr<MeshData> mDummyMeshData;
 		HMesh mDummyMesh;
 	};
 

+ 6 - 6
Source/BansheeCore/Include/BsMeshRTTI.h

@@ -18,8 +18,8 @@ namespace BansheeEngine
 
 	class MeshRTTI : public RTTIType<Mesh, MeshBase, MeshRTTI>
 	{
-		VertexDataDescPtr getVertexDesc(Mesh* obj) { return obj->mVertexDesc; }
-		void setVertexDesc(Mesh* obj, VertexDataDescPtr value) { obj->mVertexDesc = value; }
+		SPtr<VertexDataDesc> getVertexDesc(Mesh* obj) { return obj->mVertexDesc; }
+		void setVertexDesc(Mesh* obj, SPtr<VertexDataDesc> value) { obj->mVertexDesc = value; }
 
 		IndexType& getIndexType(Mesh* obj) { return obj->mIndexType; }
 		void setIndexType(Mesh* obj, IndexType& value) { obj->mIndexType = value; }
@@ -27,9 +27,9 @@ namespace BansheeEngine
 		int& getBufferType(Mesh* obj) { return (int&)obj->mUsage; }
 		void setBufferType(Mesh* obj, int& value) { obj->mUsage = value; }
 
-		MeshDataPtr getMeshData(Mesh* obj) 
+		SPtr<MeshData> getMeshData(Mesh* obj) 
 		{ 
-			MeshDataPtr meshData = obj->allocateSubresourceBuffer(0);
+			SPtr<MeshData> meshData = obj->allocateSubresourceBuffer(0);
 
 			obj->readSubresource(gCoreAccessor(), 0, meshData);
 			gCoreAccessor().submitToCoreThread(true);
@@ -37,7 +37,7 @@ namespace BansheeEngine
 			return meshData;
 		}
 
-		void setMeshData(Mesh* obj, MeshDataPtr meshData) 
+		void setMeshData(Mesh* obj, SPtr<MeshData> meshData) 
 		{ 
 			obj->mCPUData = meshData;
 		}
@@ -59,7 +59,7 @@ namespace BansheeEngine
 			mesh->initialize();
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return MeshManager::instance().createEmpty();
 		}

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

@@ -76,7 +76,7 @@ namespace BansheeEngine
 		SPtr<MultiRenderTextureCore> getCore() const;
 
 		/** @copydoc TextureManager::createMultiRenderTexture */
-		static MultiRenderTexturePtr create(const MULTI_RENDER_TEXTURE_DESC& desc);
+		static SPtr<MultiRenderTexture> create(const MULTI_RENDER_TEXTURE_DESC& desc);
 
 		/**	Returns properties that describe the render texture. */
 		const MultiRenderTextureProperties& getProperties() const;
@@ -135,8 +135,8 @@ namespace BansheeEngine
 		virtual void copyToMemory(PixelData &dst, FrameBuffer buffer = FB_AUTO);
 
 	protected:
-		Vector<TextureViewPtr> mColorSurfaces;
-		TextureViewPtr mDepthStencilSurface;
+		Vector<SPtr<TextureView>> mColorSurfaces;
+		SPtr<TextureView> mDepthStencilSurface;
 
 		MULTI_RENDER_TEXTURE_CORE_DESC mDesc;
 	};

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

@@ -58,7 +58,7 @@ namespace BansheeEngine
 		 *						queries can return sooner as they potentially do not need to wait until all of the geometry
 		 *						is rendered.
 		 */
-		static OcclusionQueryPtr create(bool binary);
+		static SPtr<OcclusionQuery> create(bool binary);
 
 	protected:
 		friend class QueryManager;

+ 15 - 15
Source/BansheeCore/Include/BsPass.h

@@ -16,17 +16,17 @@ namespace BansheeEngine
 	/** Descriptor structure used for initializing a shader pass. */
 	struct PASS_DESC
 	{
-		BlendStatePtr blendState;
-		RasterizerStatePtr rasterizerState;
-		DepthStencilStatePtr depthStencilState;
+		SPtr<BlendState> blendState;
+		SPtr<RasterizerState> rasterizerState;
+		SPtr<DepthStencilState> depthStencilState;
 		UINT32 stencilRefValue;
 
-		GpuProgramPtr vertexProgram;
-		GpuProgramPtr fragmentProgram;
-		GpuProgramPtr geometryProgram;
-		GpuProgramPtr hullProgram;
-		GpuProgramPtr domainProgram;
-		GpuProgramPtr computeProgram;
+		SPtr<GpuProgram> vertexProgram;
+		SPtr<GpuProgram> fragmentProgram;
+		SPtr<GpuProgram> geometryProgram;
+		SPtr<GpuProgram> hullProgram;
+		SPtr<GpuProgram> domainProgram;
+		SPtr<GpuProgram> computeProgram;
 	};
 
 	/** @} */
@@ -65,10 +65,10 @@ namespace BansheeEngine
 	template<>
 	struct TPassTypes < false >
 	{
-		typedef BlendStatePtr BlendStateType;
-		typedef RasterizerStatePtr RasterizerStateType;
-		typedef DepthStencilStatePtr DepthStencilStateType;
-		typedef GpuProgramPtr GpuProgramType;
+		typedef SPtr<BlendState> BlendStateType;
+		typedef SPtr<RasterizerState> RasterizerStateType;
+		typedef SPtr<DepthStencilState> DepthStencilStateType;
+		typedef SPtr<GpuProgram> GpuProgramType;
 		typedef PASS_DESC PassDescType;
 	};
 
@@ -182,7 +182,7 @@ namespace BansheeEngine
 		SPtr<PassCore> getCore() const;
 
 		/**	Creates a new empty pass. */
-		static PassPtr create(const PASS_DESC& desc);
+		static SPtr<Pass> create(const PASS_DESC& desc);
 
 	protected:
 		friend class Technique;
@@ -200,7 +200,7 @@ namespace BansheeEngine
 		void getCoreDependencies(Vector<CoreObject*>& dependencies) override;
 
 		/**	Creates a new empty pass but doesn't initialize it. */
-		static PassPtr createEmpty();
+		static SPtr<Pass> createEmpty();
 
 		/************************************************************************/
 		/* 								RTTI		                     		*/

+ 19 - 19
Source/BansheeCore/Include/BsPassRTTI.h

@@ -16,35 +16,35 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT PassRTTI : public RTTIType<Pass, IReflectable, PassRTTI>
 	{
 	private:
-		BlendStatePtr getBlendState(Pass* obj) { return obj->mData.blendState; }
-		void setBlendState(Pass* obj, BlendStatePtr val) { obj->mData.blendState = val; }
+		SPtr<BlendState> getBlendState(Pass* obj) { return obj->mData.blendState; }
+		void setBlendState(Pass* obj, SPtr<BlendState> val) { obj->mData.blendState = val; }
 
-		RasterizerStatePtr getRasterizerState(Pass* obj) { return obj->mData.rasterizerState; }
-		void setRasterizerState(Pass* obj, RasterizerStatePtr val) { obj->mData.rasterizerState = val; }
+		SPtr<RasterizerState> getRasterizerState(Pass* obj) { return obj->mData.rasterizerState; }
+		void setRasterizerState(Pass* obj, SPtr<RasterizerState> val) { obj->mData.rasterizerState = val; }
 
-		DepthStencilStatePtr getDepthStencilState(Pass* obj) { return obj->mData.depthStencilState; }
-		void setDepthStencilState(Pass* obj, DepthStencilStatePtr val) { obj->mData.depthStencilState = val; }
+		SPtr<DepthStencilState> getDepthStencilState(Pass* obj) { return obj->mData.depthStencilState; }
+		void setDepthStencilState(Pass* obj, SPtr<DepthStencilState> val) { obj->mData.depthStencilState = val; }
 
 		UINT32& getStencilRefValue(Pass* obj) { return obj->mData.stencilRefValue; }
 		void setStencilRefValue(Pass* obj, UINT32& val) { obj->mData.stencilRefValue = val; }
 
-		GpuProgramPtr getVertexProgram(Pass* obj) { return obj->mData.vertexProgram; }
-		void setVertexProgram(Pass* obj, GpuProgramPtr val) { obj->mData.vertexProgram = val; }
+		SPtr<GpuProgram> getVertexProgram(Pass* obj) { return obj->mData.vertexProgram; }
+		void setVertexProgram(Pass* obj, SPtr<GpuProgram> val) { obj->mData.vertexProgram = val; }
 
-		GpuProgramPtr getFragmentProgram(Pass* obj) { return obj->mData.fragmentProgram; }
-		void setFragmentProgram(Pass* obj, GpuProgramPtr val) { obj->mData.fragmentProgram = val; }
+		SPtr<GpuProgram> getFragmentProgram(Pass* obj) { return obj->mData.fragmentProgram; }
+		void setFragmentProgram(Pass* obj, SPtr<GpuProgram> val) { obj->mData.fragmentProgram = val; }
 
-		GpuProgramPtr getGeometryProgram(Pass* obj) { return obj->mData.geometryProgram; }
-		void setGeometryProgram(Pass* obj, GpuProgramPtr val) { obj->mData.geometryProgram = val; }
+		SPtr<GpuProgram> getGeometryProgram(Pass* obj) { return obj->mData.geometryProgram; }
+		void setGeometryProgram(Pass* obj, SPtr<GpuProgram> val) { obj->mData.geometryProgram = val; }
 
-		GpuProgramPtr getHullProgram(Pass* obj) { return obj->mData.hullProgram; }
-		void setHullProgram(Pass* obj, GpuProgramPtr val) { obj->mData.hullProgram = val; }
+		SPtr<GpuProgram> getHullProgram(Pass* obj) { return obj->mData.hullProgram; }
+		void setHullProgram(Pass* obj, SPtr<GpuProgram> val) { obj->mData.hullProgram = val; }
 
-		GpuProgramPtr getDomainProgram(Pass* obj) { return obj->mData.domainProgram; }
-		void setDomainProgram(Pass* obj, GpuProgramPtr val) { obj->mData.domainProgram = val; }
+		SPtr<GpuProgram> getDomainProgram(Pass* obj) { return obj->mData.domainProgram; }
+		void setDomainProgram(Pass* obj, SPtr<GpuProgram> val) { obj->mData.domainProgram = val; }
 
-		GpuProgramPtr getComputeProgram(Pass* obj) { return obj->mData.computeProgram; }
-		void setComputeProgram(Pass* obj, GpuProgramPtr val) { obj->mData.computeProgram = val; }
+		SPtr<GpuProgram> getComputeProgram(Pass* obj) { return obj->mData.computeProgram; }
+		void setComputeProgram(Pass* obj, SPtr<GpuProgram> val) { obj->mData.computeProgram = val; }
 	public:
 		PassRTTI()
 		{
@@ -79,7 +79,7 @@ namespace BansheeEngine
 			return TID_Pass;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return Pass::createEmpty();
 		}

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

@@ -463,7 +463,7 @@ namespace BansheeEngine
 		virtual SPtr<PhysicsMaterial> createMaterial(float staticFriction, float dynamicFriction, float restitution) = 0;
 
 		/** @copydoc PhysicsMesh::create */
-		virtual SPtr<PhysicsMesh> createMesh(const MeshDataPtr& meshData, PhysicsMeshType type) = 0;
+		virtual SPtr<PhysicsMesh> createMesh(const SPtr<MeshData>& meshData, PhysicsMeshType type) = 0;
 
 		/** @copydoc Rigidbody::create */
 		virtual SPtr<Rigidbody> createRigidbody(const HSceneObject& linkedSO) = 0;

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

@@ -69,7 +69,7 @@ namespace BansheeEngine
 		 *
 		 * For internal use. Requires manual initialization after creation.
 		 */
-		static PhysicsMaterialPtr _createPtr(float staticFriction = 0.0f, float dynamicFriction = 0.0f, 
+		static SPtr<PhysicsMaterial> _createPtr(float staticFriction = 0.0f, float dynamicFriction = 0.0f, 
 			float restitution = 0.0f);
 
 		/** @} */

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

@@ -89,7 +89,7 @@ namespace BansheeEngine
 			return TID_PhysicsMaterial;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return PhysicsMaterial::_createPtr();
 		}

+ 7 - 7
Source/BansheeCore/Include/BsPhysicsMesh.h

@@ -20,14 +20,14 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT PhysicsMesh : public Resource
 	{
 	public:
-		PhysicsMesh(const MeshDataPtr& meshData, PhysicsMeshType type);
+		PhysicsMesh(const SPtr<MeshData>& meshData, PhysicsMeshType type);
 		virtual ~PhysicsMesh() { }
 
 		/** Returns the type of the physics mesh. */
 		PhysicsMeshType getType() const;
 
 		/** Returns the mesh's indices and vertices. */
-		MeshDataPtr getMeshData() const;
+		SPtr<MeshData> getMeshData() const;
 
 		/** 
 		 * Creates a new physics mesh. 
@@ -36,7 +36,7 @@ namespace BansheeEngine
 		 * @param[in]	type		Type of the mesh. If convex the provided mesh geometry will be converted into a convex
 		 *							mesh (that might not be the same as the provided mesh data).
 		 */
-		static HPhysicsMesh create(const MeshDataPtr& meshData, PhysicsMeshType type = PhysicsMeshType::Convex);
+		static HPhysicsMesh create(const SPtr<MeshData>& meshData, PhysicsMeshType type = PhysicsMeshType::Convex);
 
 		/** @name Internal
 		 *  @{
@@ -50,7 +50,7 @@ namespace BansheeEngine
 		 *
 		 * For internal use. Requires manual initialization after creation.
 		 */
-		static PhysicsMeshPtr _createPtr(const MeshDataPtr& meshData, PhysicsMeshType type);
+		static SPtr<PhysicsMesh> _createPtr(const SPtr<MeshData>& meshData, PhysicsMeshType type);
 
 		/** @} */
 
@@ -59,7 +59,7 @@ namespace BansheeEngine
 		void initialize() override;
 
 		SPtr<FPhysicsMesh> mInternal;
-		MeshDataPtr mInitMeshData; // Transient, only used during initalization
+		SPtr<MeshData> mInitMeshData; // Transient, only used during initalization
 		PhysicsMeshType mType; // Transient, only used during initalization
 
 		/************************************************************************/
@@ -80,11 +80,11 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT FPhysicsMesh : public IReflectable
 	{
 	public:
-		FPhysicsMesh(const MeshDataPtr& meshData, PhysicsMeshType type);
+		FPhysicsMesh(const SPtr<MeshData>& meshData, PhysicsMeshType type);
 		virtual ~FPhysicsMesh();
 
 		/** Returns the mesh's indices and vertices. */
-		virtual MeshDataPtr getMeshData() const = 0;
+		virtual SPtr<MeshData> getMeshData() const = 0;
 
 	protected:
 		friend class PhysicsMesh;

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

@@ -330,13 +330,13 @@ namespace BansheeEngine
 		 * Constructs a new object with an internal buffer capable of holding "extents" volume of pixels, where each pixel
 		 * is of the specified pixel format. Extent offsets are also stored, but are not used internally.
 		 */
-		static PixelDataPtr create(const PixelVolume &extents, PixelFormat pixelFormat);
+		static SPtr<PixelData> create(const PixelVolume &extents, PixelFormat pixelFormat);
 
 		/**
 		 * Constructs a new object with an internal buffer capable of holding volume of pixels described by provided width,
 		 * height and depth, where each pixel is of the specified pixel format.
 		 */
-		static PixelDataPtr create(UINT32 width, UINT32 height, UINT32 depth, PixelFormat pixelFormat);
+		static SPtr<PixelData> create(UINT32 width, UINT32 height, UINT32 depth, PixelFormat pixelFormat);
 
 	private:
 		/**

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

@@ -89,9 +89,9 @@ namespace BansheeEngine
 			return TID_PixelData;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject() override
+		virtual SPtr<IReflectable> newRTTIObject() override
 		{
-			PixelDataPtr newPixelData = bs_shared_ptr_new<PixelData>();
+			SPtr<PixelData> newPixelData = bs_shared_ptr_new<PixelData>();
 
 			return newPixelData;
 		}

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

@@ -206,7 +206,7 @@ namespace BansheeEngine
 		 * @return	A list of calculated mip-map data. First entry is the largest mip and other follow in order from 
 		 *			largest to smallest.
 		 */
-		static Vector<PixelDataPtr> genMipmaps(const PixelData& src, const MipMapGenOptions& options);
+		static Vector<SPtr<PixelData>> genMipmaps(const PixelData& src, const MipMapGenOptions& options);
 
 		/**
 		 * Scales pixel data in the source buffer and stores the scaled data in the destination buffer. Provided pixel data

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

@@ -76,7 +76,7 @@ namespace BansheeEngine
 		void initialize(const HSceneObject& sceneObject);
 
 		/**	Creates an empty and uninitialized prefab. */
-		static PrefabPtr createEmpty();
+		static SPtr<Prefab> createEmpty();
 
 		HSceneObject mRoot;
 		UINT32 mHash;

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

@@ -39,7 +39,7 @@ namespace BansheeEngine
 			return TID_PrefabComponentDiff;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<PrefabComponentDiff>();
 		}
@@ -96,7 +96,7 @@ namespace BansheeEngine
 			return TID_PrefabObjectDiff;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<PrefabObjectDiff>();
 		}
@@ -255,7 +255,7 @@ namespace BansheeEngine
 			return TID_PrefabDiff;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<PrefabDiff>();
 		}

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

@@ -17,8 +17,8 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT PrefabRTTI : public RTTIType < Prefab, Resource, PrefabRTTI >
 	{
 	private:
-		SceneObjectPtr getSceneObject(Prefab* obj) { return obj->mRoot.getInternalPtr(); }
-		void setSceneObject(Prefab* obj, SceneObjectPtr value) { obj->mRoot = value->getHandle(); }
+		SPtr<SceneObject> getSceneObject(Prefab* obj) { return obj->mRoot.getInternalPtr(); }
+		void setSceneObject(Prefab* obj, SPtr<SceneObject> value) { obj->mRoot = value->getHandle(); }
 
 		UINT32& getHash(Prefab* obj) { return obj->mHash; }
 		void setHash(Prefab* obj, UINT32& val) { obj->mHash = val; }
@@ -56,7 +56,7 @@ namespace BansheeEngine
 			return TID_Prefab;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return Prefab::createEmpty();
 		}

+ 6 - 6
Source/BansheeCore/Include/BsProfilerGPU.h

@@ -65,8 +65,8 @@ namespace BansheeEngine
 			ProfilerString sampleName;
 			RenderStatsData startStats;
 			RenderStatsData endStats;
-			TimerQueryPtr activeTimeQuery;
-			OcclusionQueryPtr activeOcclusionQuery;
+			SPtr<TimerQuery> activeTimeQuery;
+			SPtr<OcclusionQuery> activeOcclusionQuery;
 		};
 
 		struct ActiveFrame
@@ -150,10 +150,10 @@ namespace BansheeEngine
 		void endSampleInternal(ActiveSample& sample);
 
 		/**	Creates a new timer query or returns an existing free query. */
-		TimerQueryPtr getTimerQuery() const;
+		SPtr<TimerQuery> getTimerQuery() const;
 
 		/**	Creates a new occlusion query or returns an existing free query. */
-		OcclusionQueryPtr getOcclusionQuery() const;
+		SPtr<OcclusionQuery> getOcclusionQuery() const;
 
 		/**
 		 * Interprets the active frame results and generates a profiler report for the frame. Provided frame queries must 
@@ -172,8 +172,8 @@ namespace BansheeEngine
 		Queue<ActiveFrame> mUnresolvedFrames;
 		Queue<GPUProfilerReport> mReadyReports;
 
-		mutable Stack<TimerQueryPtr> mFreeTimerQueries;
-		mutable Stack<OcclusionQueryPtr> mFreeOcclusionQueries;
+		mutable Stack<SPtr<TimerQuery>> mFreeTimerQueries;
+		mutable Stack<SPtr<OcclusionQuery>> mFreeOcclusionQueries;
 
 		BS_MUTEX(mMutex);
 	};

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

@@ -24,12 +24,12 @@ namespace BansheeEngine
 		~QueryManager();
 
 		/** Creates a new event query that allows you to get notified when GPU starts executing the query. */
-		virtual EventQueryPtr createEventQuery() const = 0;
+		virtual SPtr<EventQuery> createEventQuery() const = 0;
 
 		/**
 		 * Creates a new timer query that allows you to get notified of how much time has passed between query start and end.
 		 */
-		virtual TimerQueryPtr createTimerQuery() const = 0;
+		virtual SPtr<TimerQuery> createTimerQuery() const = 0;
 
 		/**
 		 * Creates a new occlusion query that allows you to know how many fragments were rendered between query start and 
@@ -40,7 +40,7 @@ namespace BansheeEngine
 		 *						rendered). Binary queries can return sooner as they potentially do not need to wait until 
 		 *						all of the geometry is rendered.
 		 */
-		virtual OcclusionQueryPtr createOcclusionQuery(bool binary) const = 0;
+		virtual SPtr<OcclusionQuery> createOcclusionQuery(bool binary) const = 0;
 
 		/** Triggers completed queries. Should be called every frame. */
 		void _update();

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

@@ -136,10 +136,10 @@ namespace BansheeEngine
 		SPtr<RasterizerStateCore> getCore() const;
 
 		/** Creates a new rasterizer state using the specified rasterizer state descriptor structure. */
-		static RasterizerStatePtr create(const RASTERIZER_STATE_DESC& desc);
+		static SPtr<RasterizerState> create(const RASTERIZER_STATE_DESC& desc);
 
 		/**	Returns the default rasterizer state. */
-		static const RasterizerStatePtr& getDefault();
+		static const SPtr<RasterizerState>& getDefault();
 
 		/**	Generates a hash value from a rasterizer state descriptor. */
 		static UINT64 generateHash(const RASTERIZER_STATE_DESC& desc);

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

@@ -45,7 +45,7 @@ namespace BansheeEngine
 			return TID_RasterizerState;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return RenderStateManager::instance()._createRasterizerStatePtr(RASTERIZER_STATE_DESC());
 		}

+ 16 - 16
Source/BansheeCore/Include/BsRenderAPI.h

@@ -47,7 +47,7 @@ namespace BansheeEngine
 		 * @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);
+			const SPtr<Texture> &texPtr);
 
 		/**  
 		 * @copydoc RenderAPICore::setLoadStoreTexture()
@@ -55,7 +55,7 @@ namespace BansheeEngine
 		 * @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);
+			const SPtr<Texture>& texPtr, const TextureSurface& surface);
 
 		/** 
 		 * @copydoc RenderAPICore::setSamplerState()
@@ -63,28 +63,28 @@ namespace BansheeEngine
 		 * @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);
+			const SPtr<SamplerState>& samplerState);
 
 		/**  
 		 * @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 SPtr<BlendState>& blendState);
 
 		/** 
 		 * @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 SPtr<RasterizerState>& rasterizerState);
 
 		/** 
 		 * @copydoc RenderAPICore::setDepthStencilState()
 		 *
 		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
 		 */
-		static void setDepthStencilState(CoreAccessor& accessor, const DepthStencilStatePtr& depthStencilState, 
+		static void setDepthStencilState(CoreAccessor& accessor, const SPtr<DepthStencilState>& depthStencilState, 
 			UINT32 stencilRefValue);
 
 		/** 
@@ -95,21 +95,21 @@ namespace BansheeEngine
 		 * @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<SPtr<VertexBuffer>>& buffers);
 
 		/** 
 		 * @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 SPtr<IndexBuffer>& buffer);
 
 		/** 
 		 * @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 SPtr<VertexDeclaration>& vertexDeclaration);
 
 		/** 
 		 * @copydoc RenderAPICore::setViewport()
@@ -158,14 +158,14 @@ namespace BansheeEngine
 		 *
 		 * @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 SPtr<RenderTarget>& target, bool readOnlyDepthStencil = false);
 
 		/** 
 		 * @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 SPtr<GpuProgram>& prg);
 
 		/** 
 		 * @copydoc RenderAPICore::unbindGpuProgram()
@@ -179,14 +179,14 @@ namespace BansheeEngine
 		 *
 		 * @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 SPtr<GpuParams>& params);
 
 		/** 
 		 * @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 SPtr<GpuParams>& params);
 
 		/** 
 		 * @copydoc RenderAPICore::beginFrame()
@@ -223,7 +223,7 @@ namespace BansheeEngine
 		 *
 		 * @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 SPtr<RenderTarget>& target);
 
 		/** 
 		 * @copydoc RenderAPICore::draw()
@@ -656,7 +656,7 @@ namespace BansheeEngine
 		 * @note
 		 * Sim thread.
 		 */
-		RenderWindowPtr initialize(const RENDER_WINDOW_DESC& primaryWindowDesc);
+		SPtr<RenderWindow> initialize(const RENDER_WINDOW_DESC& primaryWindowDesc);
 
 		/**
 		 * Prepares the initialization of the render API system on the core thread. After the system is prepared a render 
@@ -706,7 +706,7 @@ namespace BansheeEngine
 		bool mClipPlanesDirty;
 
 		RenderAPICapabilities* mCurrentCapabilities;
-		VideoModeInfoPtr mVideoModeInfo;
+		SPtr<VideoModeInfo> mVideoModeInfo;
 	};
 
 	/** @} */

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

@@ -27,12 +27,12 @@ namespace BansheeEngine
 		 * @param[in]	primaryWindowDesc	Contains options used for creating the primary window.
 		 * @return							Created render window if initialization is successful, null otherwise.
 		 */
-		RenderWindowPtr initialize(const String& name, RENDER_WINDOW_DESC& primaryWindowDesc);
+		SPtr<RenderWindow> initialize(const String& name, RENDER_WINDOW_DESC& primaryWindowDesc);
 
 		/**	Registers a new render API factory responsible for creating a specific render system type. */
-		void registerFactory(RenderAPIFactoryPtr factory);
+		void registerFactory(SPtr<RenderAPIFactory> factory);
 	private:
-		Vector<RenderAPIFactoryPtr> mAvailableFactories;
+		Vector<SPtr<RenderAPIFactory>> mAvailableFactories;
 		bool mRenderAPIInitialized;
 	};
 

+ 16 - 16
Source/BansheeCore/Include/BsRenderStateManager.h

@@ -20,56 +20,56 @@ namespace BansheeEngine
 	{
 	public:
 		/**	Creates and initializes a new SamplerState. */
-		SamplerStatePtr createSamplerState(const SAMPLER_STATE_DESC& desc) const;
+		SPtr<SamplerState> createSamplerState(const SAMPLER_STATE_DESC& desc) const;
 
 		/** Creates and initializes a new DepthStencilState. */
-		DepthStencilStatePtr createDepthStencilState(const DEPTH_STENCIL_STATE_DESC& desc) const;
+		SPtr<DepthStencilState> createDepthStencilState(const DEPTH_STENCIL_STATE_DESC& desc) const;
 
 		/**	Creates and initializes a new RasterizerState. */
-		RasterizerStatePtr createRasterizerState(const RASTERIZER_STATE_DESC& desc) const;
+		SPtr<RasterizerState> createRasterizerState(const RASTERIZER_STATE_DESC& desc) const;
 
 		/**	Creates and initializes a new BlendState. */
-		BlendStatePtr createBlendState(const BLEND_STATE_DESC& desc) const;
+		SPtr<BlendState> createBlendState(const BLEND_STATE_DESC& desc) const;
 
 		/**
 		 * Creates an uninitialized sampler state. Requires manual initialization after creation.
 		 *
 		 * @note	Internal method.
 		 */
-		SamplerStatePtr _createSamplerStatePtr(const SAMPLER_STATE_DESC& desc) const;
+		SPtr<SamplerState> _createSamplerStatePtr(const SAMPLER_STATE_DESC& desc) const;
 
 		/**
 		 * Creates an uninitialized depth-stencil state. Requires manual initialization after creation.
 		 *
 		 * @note	Internal method.
 		 */
-		DepthStencilStatePtr _createDepthStencilStatePtr(const DEPTH_STENCIL_STATE_DESC& desc) const;
+		SPtr<DepthStencilState> _createDepthStencilStatePtr(const DEPTH_STENCIL_STATE_DESC& desc) const;
 
 		/**
 		 * Creates an uninitialized rasterizer state. Requires manual initialization after creation.
 		 *
 		 * @note	Internal method.
 		 */
-		RasterizerStatePtr _createRasterizerStatePtr(const RASTERIZER_STATE_DESC& desc) const;
+		SPtr<RasterizerState> _createRasterizerStatePtr(const RASTERIZER_STATE_DESC& desc) const;
 
 		/**
 		 * Creates an uninitialized blend state. Requires manual initialization	after creation.
 		 *
 		 * @note	Internal method.
 		 */
-		BlendStatePtr _createBlendStatePtr(const BLEND_STATE_DESC& desc) const;
+		SPtr<BlendState> _createBlendStatePtr(const BLEND_STATE_DESC& desc) const;
 
 		/** Gets a sampler state initialized with default options. */
-		const SamplerStatePtr& getDefaultSamplerState() const;
+		const SPtr<SamplerState>& getDefaultSamplerState() const;
 
 		/**	Gets a blend state initialized with default options. */
-		const BlendStatePtr& getDefaultBlendState() const;
+		const SPtr<BlendState>& getDefaultBlendState() const;
 
 		/**	Gets a rasterizer state initialized with default options. */
-		const RasterizerStatePtr& getDefaultRasterizerState() const;
+		const SPtr<RasterizerState>& getDefaultRasterizerState() const;
 
 		/**	Gets a depth stencil state initialized with default options. */
-		const DepthStencilStatePtr& getDefaultDepthStencilState() const;
+		const SPtr<DepthStencilState>& getDefaultDepthStencilState() const;
 
 	private:
 		friend class SamplerState;
@@ -77,10 +77,10 @@ namespace BansheeEngine
 		friend class RasterizerState;
 		friend class DepthStencilState;
 
-		mutable SamplerStatePtr mDefaultSamplerState;
-		mutable BlendStatePtr mDefaultBlendState;
-		mutable RasterizerStatePtr mDefaultRasterizerState;
-		mutable DepthStencilStatePtr mDefaultDepthStencilState;
+		mutable SPtr<SamplerState> mDefaultSamplerState;
+		mutable SPtr<BlendState> mDefaultBlendState;
+		mutable SPtr<RasterizerState> mDefaultRasterizerState;
+		mutable SPtr<DepthStencilState> mDefaultDepthStencilState;
 	};
 
 	/**	Handles creation of various render states. */

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

@@ -58,12 +58,12 @@ namespace BansheeEngine
 		 * @param[in]	createDepth			Should a depth/stencil surface be created along with the color surface.
 		 * @param[in]	depthStencilFormat	Format used by the depth stencil surface, if one is created.
 		 */
-		static RenderTexturePtr create(TextureType textureType, UINT32 width, UINT32 height, 
+		static SPtr<RenderTexture> create(TextureType textureType, UINT32 width, UINT32 height, 
 			PixelFormat format = PF_R8G8B8A8, bool hwGamma = false, UINT32 multisampleCount = 0, 
 			bool createDepth = true, PixelFormat depthStencilFormat = PF_D24S8);
 
 		/** @copydoc TextureManager::createRenderTexture(const RENDER_TEXTURE_DESC&) */
-		static RenderTexturePtr create(const RENDER_TEXTURE_DESC& desc);
+		static SPtr<RenderTexture> create(const RENDER_TEXTURE_DESC& desc);
 
 		/**
 		 * Returns a color surface texture you may bind as an input to an GPU program.
@@ -169,8 +169,8 @@ namespace BansheeEngine
 	protected:
 		friend class RenderTexture;
 
-		TextureViewPtr mColorSurface;
-		TextureViewPtr mDepthStencilSurface;
+		SPtr<TextureView> mColorSurface;
+		SPtr<TextureView> mDepthStencilSurface;
 
 		RENDER_TEXTURE_CORE_DESC mDesc;
 	};

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

@@ -189,7 +189,7 @@ namespace BansheeEngine
 		 * Creates a new render window using the specified options. Optionally makes the created window a child of another 
 		 * window.
 		 */
-		static RenderWindowPtr create(RENDER_WINDOW_DESC& desc, RenderWindowPtr parentWindow = nullptr);
+		static SPtr<RenderWindow> create(RENDER_WINDOW_DESC& desc, SPtr<RenderWindow> parentWindow = nullptr);
 
     protected:
 		friend class RenderWindowManager;

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

@@ -32,7 +32,7 @@ namespace BansheeEngine
 		 * Creates a new render window using the specified options. Optionally makes the created window a child of another
 		 * window.
 		 */
-		RenderWindowPtr create(RENDER_WINDOW_DESC& desc, RenderWindowPtr parentWindow);
+		SPtr<RenderWindow> create(RENDER_WINDOW_DESC& desc, SPtr<RenderWindow> parentWindow);
 
 		/** Called once per frame. Dispatches events. */
 		void _update();
@@ -73,7 +73,7 @@ namespace BansheeEngine
 		RenderWindow* getNonCore(const RenderWindowCore* window) const;
 
 		/** @copydoc create */
-		virtual RenderWindowPtr createImpl(RENDER_WINDOW_DESC& desc, UINT32 windowId, const RenderWindowPtr& parentWindow) = 0;
+		virtual SPtr<RenderWindow> createImpl(RENDER_WINDOW_DESC& desc, UINT32 windowId, const SPtr<RenderWindow>& parentWindow) = 0;
 
 	protected:
 		BS_MUTEX(mWindowMutex);

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

@@ -22,7 +22,7 @@ namespace BansheeEngine
 		virtual ~RendererFactory() { }
 
 		/**	Creates a new instance of the renderer. */
-		virtual CoreRendererPtr create() = 0;
+		virtual SPtr<CoreRenderer> create() = 0;
 
 		/**	Returns the name of the renderer this factory creates. */
 		virtual const String& name() const = 0;

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

@@ -33,17 +33,17 @@ namespace BansheeEngine
 		void initialize();
 
 		/**	Returns the currently active renderer. Null if no renderer is active. */
-		CoreRendererPtr getActive() { return mActiveRenderer; }
+		SPtr<CoreRenderer> getActive() { return mActiveRenderer; }
 
 		/**
 		 * Registers a new renderer factory. Any renderer you try to make active with setActive() you will need to have 
 		 * previously registered here.
 		 */
-		void _registerFactory(RendererFactoryPtr factory);
+		void _registerFactory(SPtr<RendererFactory> factory);
 	private:
-		Vector<RendererFactoryPtr> mAvailableFactories;
+		Vector<SPtr<RendererFactory>> mAvailableFactories;
 
-		CoreRendererPtr mActiveRenderer;
+		SPtr<CoreRenderer> mActiveRenderer;
 	};
 
 	/** @} */

+ 6 - 6
Source/BansheeCore/Include/BsRendererMeshData.h

@@ -207,24 +207,24 @@ namespace BansheeEngine
 		void setIndices(UINT32* buffer, UINT32 size);
 
 		/**	Returns the underlying MeshData structure. */
-		MeshDataPtr getData() const { return mMeshData; }
+		SPtr<MeshData> getData() const { return mMeshData; }
 
 		/**	Creates a new empty mesh data structure. */
-		static RendererMeshDataPtr create(UINT32 numVertices, UINT32 numIndices, VertexLayout layout, IndexType indexType = IT_32BIT);
+		static SPtr<RendererMeshData> create(UINT32 numVertices, UINT32 numIndices, VertexLayout layout, IndexType indexType = IT_32BIT);
 
 		/**	Creates a new mesh data structure using an existing mesh data buffer. */
-		static RendererMeshDataPtr create(const MeshDataPtr& meshData);
+		static SPtr<RendererMeshData> create(const SPtr<MeshData>& meshData);
 
 		/**	Creates a vertex descriptor from a vertex layout enum. */
-		static VertexDataDescPtr vertexLayoutVertexDesc(VertexLayout type);
+		static SPtr<VertexDataDesc> vertexLayoutVertexDesc(VertexLayout type);
 
 	private:
 		friend class CoreRenderer;
 
 		RendererMeshData(UINT32 numVertices, UINT32 numIndices, VertexLayout layout, IndexType indexType = IT_32BIT);
-		RendererMeshData(const MeshDataPtr& meshData);
+		RendererMeshData(const SPtr<MeshData>& meshData);
 
-		MeshDataPtr mMeshData;
+		SPtr<MeshData> mMeshData;
 	};
 
 	/** @} */

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

@@ -26,7 +26,7 @@ namespace BansheeEngine
 		void setName(const WString& name);
 
 		/**	Retrieves meta-data containing various information describing a resource. */
-		ResourceMetaDataPtr getMetaData() const { return mMetaData; }
+		SPtr<ResourceMetaData> getMetaData() const { return mMetaData; }
 
 		/**	Returns whether or not this resource is allowed to be asynchronously loaded. */
 		virtual bool allowAsyncLoading() const { return true; }
@@ -42,7 +42,7 @@ namespace BansheeEngine
 		bool areDependenciesLoaded() const;
 
 		UINT32 mSize;
-		ResourceMetaDataPtr mMetaData;
+		SPtr<ResourceMetaData> mMetaData;
 
 	/************************************************************************/
 	/* 								SERIALIZATION                      		*/

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

@@ -297,7 +297,7 @@ namespace BansheeEngine
 			mData = bs_shared_ptr_new<ResourceHandleData>();
 			addRef();
 
-			setHandleData(std::shared_ptr<Resource>(ptr, uuid));
+			setHandleData(SPtr<Resource>(ptr, uuid));
 		}
 
 		/**

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

@@ -56,7 +56,7 @@ namespace BansheeEngine
 			return TID_ResourceHandle;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			SPtr<TResourceHandleBase<false>> obj = bs_shared_ptr<TResourceHandleBase<false>>
 				(new (bs_alloc<TResourceHandleBase<false>>()) TResourceHandleBase<false>());
@@ -106,7 +106,7 @@ namespace BansheeEngine
 			return TID_WeakResourceHandle;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			SPtr<TResourceHandleBase<true>> obj = bs_shared_ptr<TResourceHandleBase<true>>
 				(new (bs_alloc<TResourceHandleBase<true>>()) TResourceHandleBase<true>());

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

@@ -63,7 +63,7 @@ namespace BansheeEngine
 		 * @param[in]	relativePath	If not empty, all pathnames in the manifest will be stored as if relative to this 
 		 *								path.
 		 */
-		static void save(const ResourceManifestPtr& manifest, const Path& path, const Path& relativePath);
+		static void save(const SPtr<ResourceManifest>& manifest, const Path& path, const Path& relativePath);
 
 		/**
 		 * Loads the resource manifest from the specified location.
@@ -71,10 +71,10 @@ namespace BansheeEngine
 		 * @param[in]	path			Full pathname of the file to load the manifest from.
 		 * @param[in]	relativePath	If not empty, all loaded pathnames will have this path prepended.
 		 */
-		static ResourceManifestPtr load(const Path& path, const Path& relativePath);
+		static SPtr<ResourceManifest> load(const Path& path, const Path& relativePath);
 
 		/** Creates a new empty resource manifest. Provided name should be unique among manifests. */
-		static ResourceManifestPtr create(const String& name);
+		static SPtr<ResourceManifest> create(const String& name);
 
 	private:
 		String mName;
@@ -86,7 +86,7 @@ namespace BansheeEngine
 		/************************************************************************/
 
 		/**	Creates a new empty resource manifest. */
-		static ResourceManifestPtr createEmpty();
+		static SPtr<ResourceManifest> createEmpty();
 
 	public:
 		friend class ResourceManifestRTTI;

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

@@ -50,7 +50,7 @@ namespace BansheeEngine
 			return TID_ResourceManifest;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return ResourceManifest::createEmpty();
 		}

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

@@ -36,7 +36,7 @@ namespace BansheeEngine
 			return TID_ResourceMetaData;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<ResourceMetaData>();
 		}

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

@@ -20,8 +20,8 @@ namespace BansheeEngine
 		UINT32& getSize(Resource* obj) { return obj->mSize; }
 		void setSize(Resource* obj, UINT32& size) { obj->mSize = size; } 
 
-		ResourceMetaDataPtr getMetaData(Resource* obj) { return obj->mMetaData; }
-		void setMetaData(Resource* obj, ResourceMetaDataPtr value) { obj->mMetaData = value; }
+		SPtr<ResourceMetaData> getMetaData(Resource* obj) { return obj->mMetaData; }
+		void setMetaData(Resource* obj, SPtr<ResourceMetaData> value) { obj->mMetaData = value; }
 
 	public:
 		ResourceRTTI()
@@ -41,7 +41,7 @@ namespace BansheeEngine
 			return 100;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class.");
 			return nullptr;

+ 9 - 9
Source/BansheeCore/Include/BsResources.h

@@ -39,7 +39,7 @@ namespace BansheeEngine
 			{ }
 
 			LoadedResourceData resData;
-			ResourcePtr loadedData;
+			SPtr<Resource> loadedData;
 			UINT32 remainingDependencies;
 			Vector<HResource> dependencies;
 			bool notifyImmediately;
@@ -194,7 +194,7 @@ namespace BansheeEngine
 		 * Updates an existing resource handle with a new resource. Caller must ensure that new resource type matches the 
 		 * original resource type.
 		 */
-		void update(HResource& handle, const ResourcePtr& resource);
+		void update(HResource& handle, const SPtr<Resource>& resource);
 
 		/**
 		 * Returns a list of dependencies from the resources at the specified path. Resource will not be loaded or parsed, 
@@ -224,10 +224,10 @@ namespace BansheeEngine
 		 * application restart, then you must save the resource manifest before closing the application and restore it 
 		 * upon startup. Otherwise resources will be assigned brand new UUIDs and references will be broken.
 		 */
-		void registerResourceManifest(const ResourceManifestPtr& manifest);
+		void registerResourceManifest(const SPtr<ResourceManifest>& manifest);
 
 		/**	Unregisters a resource manifest previously registered with registerResourceManifest(). */
-		void unregisterResourceManifest(const ResourceManifestPtr& manifest);
+		void unregisterResourceManifest(const SPtr<ResourceManifest>& manifest);
 
 		/**
 		 * Allows you to retrieve resource manifest containing UUID <-> file path mapping that is used when resolving 
@@ -238,7 +238,7 @@ namespace BansheeEngine
 		 *
 		 * @see		registerResourceManifest
 		 */
-		ResourceManifestPtr getResourceManifest(const String& name) const;
+		SPtr<ResourceManifest> getResourceManifest(const String& name) const;
 
 		/** Attempts to retrieve file path from the provided UUID. Returns true if successful, false otherwise. */
 		bool getFilePathFromUUID(const String& uuid, Path& filePath) const;
@@ -279,7 +279,7 @@ namespace BansheeEngine
 		 *
 		 * @note	Internal method used primarily be resource factory methods.
 		 */
-		HResource _createResourceHandle(const ResourcePtr& obj);
+		HResource _createResourceHandle(const SPtr<Resource>& obj);
 
 		/** Returns an existing handle for the specified UUID if one exists, or creates a new one. */
 		HResource _getResourceHandle(const String& uuid);
@@ -298,7 +298,7 @@ namespace BansheeEngine
 		HResource loadInternal(const String& UUID, const Path& filePath, bool synchronous, bool loadDependencies, bool incrementRef);
 
 		/** Performs actually reading and deserializing of the resource file. Called from various worker threads. */
-		ResourcePtr loadFromDiskAndDeserialize(const Path& filePath);
+		SPtr<Resource> loadFromDiskAndDeserialize(const Path& filePath);
 
 		/**	Triggered when individual resource has finished loading. */
 		void loadComplete(HResource& resource);
@@ -310,8 +310,8 @@ namespace BansheeEngine
 		void destroy(ResourceHandleBase& resource);
 
 	private:
-		Vector<ResourceManifestPtr> mResourceManifests;
-		ResourceManifestPtr mDefaultResourceManifest;
+		Vector<SPtr<ResourceManifest>> mResourceManifests;
+		SPtr<ResourceManifest> mDefaultResourceManifest;
 
 		BS_MUTEX(mInProgressResourcesMutex);
 		BS_MUTEX(mLoadedResourceMutex);

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

@@ -119,10 +119,10 @@ namespace BansheeEngine
 		SPtr<SamplerStateCore> getCore() const;
 
 		/**	Creates a new sampler state using the provided descriptor structure. */
-		static SamplerStatePtr create(const SAMPLER_STATE_DESC& desc);
+		static SPtr<SamplerState> create(const SAMPLER_STATE_DESC& desc);
 
 		/**	Returns the default sampler state. */
-		static const SamplerStatePtr& getDefault();
+		static const SPtr<SamplerState>& getDefault();
 
 		/**	Generates a hash value from a sampler state descriptor. */
 		static UINT64 generateHash(const SAMPLER_STATE_DESC& desc);

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

@@ -45,7 +45,7 @@ namespace BansheeEngine
 			return TID_SamplerState;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return RenderStateManager::instance()._createSamplerStatePtr(SAMPLER_STATE_DESC());
 		}

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

@@ -44,7 +44,7 @@ namespace BansheeEngine
 			return TID_ResourceDependencies;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<SavedResourceData>();
 		}

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

@@ -123,10 +123,10 @@ namespace BansheeEngine
 		 * Returns a prefab diff object containing instance specific modifications of this object compared to its prefab
 		 * reference, if any.
 		 */
-		const PrefabDiffPtr& _getPrefabDiff() const { return mPrefabDiff; }
+		const SPtr<PrefabDiff>& _getPrefabDiff() const { return mPrefabDiff; }
 
 		/** Assigns a new prefab diff object. Caller must ensure the prefab diff was generated for this object. */
-		void _setPrefabDiff(const PrefabDiffPtr& diff) { mPrefabDiff = diff; }
+		void _setPrefabDiff(const SPtr<PrefabDiff>& diff) { mPrefabDiff = diff; }
 
 		/** @} */
 
@@ -176,7 +176,7 @@ namespace BansheeEngine
 	private:
 		HSceneObject mThisHandle;
 		String mPrefabLinkUUID;
-		PrefabDiffPtr mPrefabDiff;
+		SPtr<PrefabDiff> mPrefabDiff;
 		UINT32 mPrefabHash;
 		UINT32 mFlags;
 
@@ -500,7 +500,7 @@ namespace BansheeEngine
 			static_assert((std::is_base_of<BansheeEngine::Component, T>::value),
 				"Specified type is not a valid Component.");
 
-			std::shared_ptr<T> gameObject(new (bs_alloc<T>()) T(mThisHandle,
+			SPtr<T> gameObject(new (bs_alloc<T>()) T(mThisHandle,
 				std::forward<Args>(args)...),
 				&bs_delete<T>, StdAlloc<T>());
 
@@ -629,18 +629,18 @@ namespace BansheeEngine
 	private:
 		/**	Creates an empty component with the default constructor. */
 		template <typename T>
-		static std::shared_ptr<T> createEmptyComponent()
+		static SPtr<T> createEmptyComponent()
 		{
 			static_assert((std::is_base_of<BansheeEngine::Component, T>::value), "Specified type is not a valid Component.");
 
 			T* rawPtr = new (bs_alloc<T>()) T();
-			std::shared_ptr<T> gameObject(rawPtr, &bs_delete<T>, StdAlloc<T>());
+			SPtr<T> gameObject(rawPtr, &bs_delete<T>, StdAlloc<T>());
 
 			return gameObject;
 		}
 
 		/**	Adds the component to the internal component array. */
-		void addComponentInternal(const std::shared_ptr<Component> component);
+		void addComponentInternal(const SPtr<Component> component);
 
 		Vector<HComponent> mComponents;
 

+ 6 - 6
Source/BansheeCore/Include/BsSceneObjectRTTI.h

@@ -41,7 +41,7 @@ namespace BansheeEngine
 		void setActive(SceneObject* obj, bool& value) { obj->mActiveSelf = value; }
 
 		// NOTE - These can only be set sequentially, specific array index is ignored
-		std::shared_ptr<SceneObject> getChild(SceneObject* obj, UINT32 idx) { return obj->mChildren[idx].getInternalPtr(); }
+		SPtr<SceneObject> getChild(SceneObject* obj, UINT32 idx) { return obj->mChildren[idx].getInternalPtr(); }
 		void setChild(SceneObject* obj, UINT32 idx, SPtr<SceneObject> param)
 		{
 			SceneObject* so = static_cast<SceneObject*>(obj);
@@ -55,7 +55,7 @@ namespace BansheeEngine
 		void setNumChildren(SceneObject* obj, UINT32 size) { /* DO NOTHING */ }
 
 		// NOTE - These can only be set sequentially, specific array index is ignored
-		std::shared_ptr<Component> getComponent(SceneObject* obj, UINT32 idx) { return obj->mComponents[idx].getInternalPtr(); }
+		SPtr<Component> getComponent(SceneObject* obj, UINT32 idx) { return obj->mComponents[idx].getInternalPtr(); }
 		void setComponent(SceneObject* obj, UINT32 idx, SPtr<Component> param)
 		{
 			SceneObject* so = static_cast<SceneObject*>(obj);
@@ -70,8 +70,8 @@ namespace BansheeEngine
 		String& getPrefabLink(SceneObject* obj) { return obj->mPrefabLinkUUID; }
 		void setPrefabLink(SceneObject* obj, String& value) { obj->mPrefabLinkUUID = value; }
 
-		PrefabDiffPtr getPrefabDiff(SceneObject* obj) { return obj->mPrefabDiff; }
-		void setPrefabDiff(SceneObject* obj, PrefabDiffPtr value) { obj->mPrefabDiff = value; }
+		SPtr<PrefabDiff> getPrefabDiff(SceneObject* obj) { return obj->mPrefabDiff; }
+		void setPrefabDiff(SceneObject* obj, SPtr<PrefabDiff> value) { obj->mPrefabDiff = value; }
 
 		UINT32& getFlags(SceneObject* obj) { return obj->mFlags; }
 		void setFlags(SceneObject* obj, UINT32& value) { obj->mFlags = value; }
@@ -120,7 +120,7 @@ namespace BansheeEngine
 
 			// Register the newly created SO with the GameObjectManager and provide it with the original ID so that
 			// deserialized handles pointing to this object can be resolved.
-			SceneObjectPtr soPtr = std::static_pointer_cast<SceneObject>(goDeserializationData.ptr);
+			SPtr<SceneObject> soPtr = std::static_pointer_cast<SceneObject>(goDeserializationData.ptr);
 			SceneObject::createInternal(soPtr, goDeserializationData.originalId);
 
 			// We stored all components and children in a temporary structure because they rely on the SceneObject being
@@ -163,7 +163,7 @@ namespace BansheeEngine
 			return TID_SceneObject;
 		}
 
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			SPtr<SceneObject> sceneObjectPtr = 
 				SPtr<SceneObject>(new (bs_alloc<SceneObject>()) SceneObject("", SOF_DontInstantiate),

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

@@ -67,7 +67,7 @@ namespace BansheeEngine
 		template<> struct TTextureType < true > { typedef SPtr<TextureCore> Type; };
 
 		template<bool Core> struct TSamplerStateType {};
-		template<> struct TSamplerStateType < false > { typedef SamplerStatePtr Type; };
+		template<> struct TSamplerStateType < false > { typedef SPtr<SamplerState> Type; };
 		template<> struct TSamplerStateType < true > { typedef SPtr<SamplerStateCore> Type; };
 
 		typedef typename TTextureType<Core>::Type TextureType;
@@ -430,7 +430,7 @@ namespace BansheeEngine
 		static HShader create(const String& name, const SHADER_DESC& desc, const Vector<SPtr<Technique>>& techniques);
 
 		/**	Returns a shader object but doesn't initialize it. */
-		static ShaderPtr createEmpty();
+		static SPtr<Shader> createEmpty();
 
 	public: // ***** INTERNAL ******
 		/** @name Internal
@@ -442,7 +442,7 @@ namespace BansheeEngine
 		 *
 		 * @note	Internal method.
 		 */
-		static ShaderPtr _createPtr(const String& name, const SHADER_DESC& desc, const Vector<SPtr<Technique>>& techniques);
+		static SPtr<Shader> _createPtr(const String& name, const SHADER_DESC& desc, const Vector<SPtr<Technique>>& techniques);
 
 		/** @} */
 

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

@@ -76,7 +76,7 @@ namespace BansheeEngine
 		}
 
 		/** @copydoc RTTIType::newRTTIObject */
-		std::shared_ptr<IReflectable> newRTTIObject() override
+		SPtr<IReflectable> newRTTIObject() override
 		{
 			return bs_shared_ptr_new<ShaderImportOptions>();
 		}

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

@@ -31,7 +31,7 @@ namespace BansheeEngine
 		 *
 		 * @note	Internal method. Use create() for normal use.
 		 */
-		static ShaderIncludePtr _createPtr(const String& includeString);
+		static SPtr<ShaderInclude> _createPtr(const String& includeString);
 
 		/** @} */
 	private:

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

@@ -28,7 +28,7 @@ namespace BansheeEngine
 		virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const override;
 
 		/** @copydoc SpecificImporter::import */
-		virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions) override;
+		virtual SPtr<Resource> import(const Path& filePath, SPtr<const ImportOptions> importOptions) override;
 	};
 
 	/** @} */

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff