Browse Source

Added mip/format texture options
Updates docs a bit

Marko Pintera 11 years ago
parent
commit
e918178f0e
33 changed files with 150 additions and 456 deletions
  1. 3 0
      BansheeCore/BansheeCore.vcxproj
  2. 9 0
      BansheeCore/BansheeCore.vcxproj.filters
  3. 2 1
      BansheeCore/Include/BsCorePrerequisites.h
  4. 1 1
      BansheeCore/Include/BsMultiRenderTexture.h
  5. 3 18
      BansheeCore/Include/BsPixelUtil.h
  6. 1 1
      BansheeCore/Include/BsRenderTarget.h
  7. 1 1
      BansheeCore/Include/BsRenderTexture.h
  8. 1 1
      BansheeCore/Source/BsMultiRenderTexture.cpp
  9. 34 40
      BansheeCore/Source/BsPixelUtil.cpp
  10. 1 1
      BansheeCore/Source/BsRenderTexture.cpp
  11. 1 1
      BansheeD3D11RenderSystem/Include/BsD3D11RenderWindow.h
  12. 1 1
      BansheeD3D11RenderSystem/Source/BsD3D11RenderWindow.cpp
  13. 1 1
      BansheeD3D9RenderSystem/Include/BsD3D9Device.h
  14. 1 1
      BansheeD3D9RenderSystem/Include/BsD3D9RenderWindow.h
  15. 1 1
      BansheeD3D9RenderSystem/Source/BsD3D9Device.cpp
  16. 1 1
      BansheeD3D9RenderSystem/Source/BsD3D9RenderWindow.cpp
  17. 7 3
      BansheeEngine.sln
  18. 0 2
      BansheeFreeImgImporter/BansheeFreeImgImporter.vcxproj
  19. 0 6
      BansheeFreeImgImporter/BansheeFreeImgImporter.vcxproj.filters
  20. 26 17
      BansheeFreeImgImporter/Include/BsFreeImgImporter.h
  21. 1 7
      BansheeFreeImgImporter/Include/BsFreeImgPrerequisites.h
  22. 0 87
      BansheeFreeImgImporter/Include/BsTextureData.h
  23. 38 12
      BansheeFreeImgImporter/Source/BsFreeImgImporter.cpp
  24. 2 1
      BansheeFreeImgImporter/Source/BsFreeImgPlugin.cpp
  25. 0 59
      BansheeFreeImgImporter/Source/BsTextureData.cpp
  26. 1 1
      BansheeGLRenderSystem/Include/BsWin32Window.h
  27. 1 1
      BansheeGLRenderSystem/Source/BsWin32Window.cpp
  28. 4 122
      Notes.txt
  29. 0 23
      PlatformPorting.txt
  30. 7 3
      Polish.txt
  31. 1 26
      TODO.txt
  32. 0 8
      TODODoc.txt
  33. 0 8
      TransformUpdatesAndRenderer.txt

+ 3 - 0
BansheeCore/BansheeCore.vcxproj

@@ -349,6 +349,8 @@
     <ClInclude Include="Include\BsGpuProgIncludeImporter.h" />
     <ClInclude Include="Include\BsGpuProgIncludeImporter.h" />
     <ClInclude Include="Include\BsShaderProxy.h" />
     <ClInclude Include="Include\BsShaderProxy.h" />
     <ClInclude Include="Include\BsSubMesh.h" />
     <ClInclude Include="Include\BsSubMesh.h" />
+    <ClInclude Include="Include\BsTextureImportOptions.h" />
+    <ClInclude Include="Include\BsTextureImportOptionsRTTI.h" />
     <ClInclude Include="Include\BsTextureView.h" />
     <ClInclude Include="Include\BsTextureView.h" />
     <ClInclude Include="Include\BsTextData.h" />
     <ClInclude Include="Include\BsTextData.h" />
     <ClInclude Include="Include\BsTimerQuery.h" />
     <ClInclude Include="Include\BsTimerQuery.h" />
@@ -468,6 +470,7 @@
     <ClCompile Include="Source\BsQueryManager.cpp" />
     <ClCompile Include="Source\BsQueryManager.cpp" />
     <ClCompile Include="Source\BsRenderer.cpp" />
     <ClCompile Include="Source\BsRenderer.cpp" />
     <ClCompile Include="Source\BsResourceManifest.cpp" />
     <ClCompile Include="Source\BsResourceManifest.cpp" />
+    <ClCompile Include="Source\BsTextureImportOptions.cpp" />
     <ClCompile Include="Source\BsTextureView.cpp" />
     <ClCompile Include="Source\BsTextureView.cpp" />
     <ClCompile Include="Source\BsTextData.cpp" />
     <ClCompile Include="Source\BsTextData.cpp" />
     <ClCompile Include="Source\BsTimerQuery.cpp" />
     <ClCompile Include="Source\BsTimerQuery.cpp" />

+ 9 - 0
BansheeCore/BansheeCore.vcxproj.filters

@@ -516,6 +516,12 @@
     <ClInclude Include="Include\BsShaderProxy.h">
     <ClInclude Include="Include\BsShaderProxy.h">
       <Filter>Header Files\Renderer</Filter>
       <Filter>Header Files\Renderer</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="Include\BsTextureImportOptions.h">
+      <Filter>Header Files\Importer</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\BsTextureImportOptionsRTTI.h">
+      <Filter>Header Files\RTTI</Filter>
+    </ClInclude>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ClCompile Include="Source\BsCoreApplication.cpp">
     <ClCompile Include="Source\BsCoreApplication.cpp">
@@ -809,5 +815,8 @@
     <ClCompile Include="Source\BsCameraProxy.cpp">
     <ClCompile Include="Source\BsCameraProxy.cpp">
       <Filter>Source Files\Renderer</Filter>
       <Filter>Source Files\Renderer</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="Source\BsTextureImportOptions.cpp">
+      <Filter>Source Files\Importer</Filter>
+    </ClCompile>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 2 - 1
BansheeCore/Include/BsCorePrerequisites.h

@@ -295,7 +295,8 @@ namespace BansheeEngine
 		TID_GameObjectHandleBase = 1066,
 		TID_GameObjectHandleBase = 1066,
 		TID_ResourceManifest = 1067,
 		TID_ResourceManifest = 1067,
 		TID_ResourceManifestEntry = 1068,
 		TID_ResourceManifestEntry = 1068,
-		TID_EmulatedParamBlock = 1069
+		TID_EmulatedParamBlock = 1069,
+		TID_TextureImportOptions = 1070
 	};
 	};
 }
 }
 
 

+ 1 - 1
BansheeCore/Include/BsMultiRenderTexture.h

@@ -56,7 +56,7 @@ namespace BansheeEngine
 		void throwIfBuffersDontMatch() const;
 		void throwIfBuffersDontMatch() const;
 
 
 		// TODO - Not implemented
 		// TODO - Not implemented
-		virtual void copyToMemory(const PixelData &dst, FrameBuffer buffer = FB_AUTO);
+		virtual void copyToMemory(PixelData &dst, FrameBuffer buffer = FB_AUTO);
 
 
 	protected:
 	protected:
 		Vector<TextureViewPtr> mColorSurfaces;
 		Vector<TextureViewPtr> mColorSurfaces;

+ 3 - 18
BansheeCore/Include/BsPixelUtil.h

@@ -5,21 +5,6 @@
 
 
 namespace BansheeEngine 
 namespace BansheeEngine 
 {
 {
-	/**
-	 * @brief	Available compression formats.
-	 */
-	enum class CompressedFormat
-	{
-		BC1, /**< PF_BC1 */
-		BC1a, /**< PF_BC1a */
-		BC2, /**< PF_BC2 */
-		BC3, /**< PF_BC3 */
-		BC4, /**< PF_BC4 */
-		BC5, /**< PF_BC5 */
-		BC6H, /**< PF_BC6H */
-		BC7 /**< PF_BC7 */
-	};
-
 	/**
 	/**
 	 * @brief	Available types of texture compression quality.
 	 * @brief	Available types of texture compression quality.
 	 */
 	 */
@@ -66,7 +51,7 @@ namespace BansheeEngine
 	 */
 	 */
 	struct CompressionOptions
 	struct CompressionOptions
 	{
 	{
-		CompressedFormat format = CompressedFormat::BC1;
+		PixelFormat format = PF_BC1;
 		AlphaMode alphaMode = AlphaMode::None;
 		AlphaMode alphaMode = AlphaMode::None;
 		bool isNormalMap = false;
 		bool isNormalMap = false;
 		bool isSRGB = false;
 		bool isSRGB = false;
@@ -248,7 +233,7 @@ namespace BansheeEngine
 		 * @brief	Converts pixels from one format to another. Provided pixel data objects
 		 * @brief	Converts pixels from one format to another. Provided pixel data objects
 		 *			must have previously allocated buffers of adequate size and their sizes must match.
 		 *			must have previously allocated buffers of adequate size and their sizes must match.
 		 */
 		 */
-        static void bulkPixelConversion(const PixelData& src, const PixelData& dst);
+        static void bulkPixelConversion(const PixelData& src, PixelData& dst);
 
 
 		/**
 		/**
 		 * @brief	Compresses the provided data using the specified compression options. 
 		 * @brief	Compresses the provided data using the specified compression options. 
@@ -268,7 +253,7 @@ namespace BansheeEngine
 		 *			Provided pixel data objects must have previously allocated buffers of adequate size. You may
 		 *			Provided pixel data objects must have previously allocated buffers of adequate size. You may
 		 *			also provided a filtering method to use when scaling.
 		 *			also provided a filtering method to use when scaling.
 		 */
 		 */
-		static void scale(const PixelData& src, const PixelData& dst, Filter filter = FILTER_LINEAR);
+		static void scale(const PixelData& src, PixelData& dst, Filter filter = FILTER_LINEAR);
 
 
 		/**
 		/**
 		 * @brief	Applies gamma correction to the pixels in the provided buffer.
 		 * @brief	Applies gamma correction to the pixels in the provided buffer.

+ 1 - 1
BansheeCore/Include/BsRenderTarget.h

@@ -136,7 +136,7 @@ namespace BansheeEngine
 		 *
 		 *
 		 * @note	Core thread only.
 		 * @note	Core thread only.
 		 */
 		 */
-		virtual void copyToMemory(const PixelData &dst, FrameBuffer buffer = FB_AUTO) = 0;
+		virtual void copyToMemory(PixelData &dst, FrameBuffer buffer = FB_AUTO) = 0;
 
 
 		/**
 		/**
 		 * @brief	Does the texture need to be vertically flipped because of different screen space coordinate systems.
 		 * @brief	Does the texture need to be vertically flipped because of different screen space coordinate systems.

+ 1 - 1
BansheeCore/Include/BsRenderTexture.h

@@ -90,7 +90,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * @copydoc	RenderTarget::copyToMemory
 		 * @copydoc	RenderTarget::copyToMemory
 		 */
 		 */
-		virtual void copyToMemory(const PixelData &dst, FrameBuffer buffer = FB_AUTO);
+		virtual void copyToMemory(PixelData &dst, FrameBuffer buffer = FB_AUTO);
 
 
 	protected:
 	protected:
 		TextureViewPtr mColorSurface;
 		TextureViewPtr mColorSurface;

+ 1 - 1
BansheeCore/Source/BsMultiRenderTexture.cpp

@@ -146,7 +146,7 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
-	void MultiRenderTexture::copyToMemory(const PixelData &dst, FrameBuffer buffer)
+	void MultiRenderTexture::copyToMemory(PixelData &dst, FrameBuffer buffer)
 	{
 	{
 		throw std::exception("The method or operation is not implemented.");
 		throw std::exception("The method or operation is not implemented.");
 	}
 	}

+ 34 - 40
BansheeCore/Source/BsPixelUtil.cpp

@@ -868,21 +868,21 @@ namespace BansheeEngine
 		UINT8* bufferEnd;
 		UINT8* bufferEnd;
 	};
 	};
 
 
-	nvtt::Format toNVTTFormat(CompressedFormat format)
+	nvtt::Format toNVTTFormat(PixelFormat format)
 	{
 	{
 		switch (format)
 		switch (format)
 		{
 		{
-		case CompressedFormat::BC1:
+		case PF_BC1:
 			return nvtt::Format_BC1;
 			return nvtt::Format_BC1;
-		case CompressedFormat::BC1a:
+		case PF_BC1a:
 			return nvtt::Format_BC1a;
 			return nvtt::Format_BC1a;
-		case CompressedFormat::BC2:
+		case PF_BC2:
 			return nvtt::Format_BC2;
 			return nvtt::Format_BC2;
-		case CompressedFormat::BC3:
+		case PF_BC3:
 			return nvtt::Format_BC3;
 			return nvtt::Format_BC3;
-		case CompressedFormat::BC4:
+		case PF_BC4:
 			return nvtt::Format_BC4;
 			return nvtt::Format_BC4;
-		case CompressedFormat::BC5:
+		case PF_BC5:
 			return nvtt::Format_BC5;
 			return nvtt::Format_BC5;
 		}
 		}
 
 
@@ -940,33 +940,6 @@ namespace BansheeEngine
 		return nvtt::WrapMode_Mirror;
 		return nvtt::WrapMode_Mirror;
 	}
 	}
 
 
-
-	PixelFormat toPixelFormat(CompressedFormat format)
-	{
-		switch (format)
-		{
-		case CompressedFormat::BC1:
-			return PF_BC1;
-		case CompressedFormat::BC1a:
-			return PF_BC1a;
-		case CompressedFormat::BC2:
-			return PF_BC2;
-		case CompressedFormat::BC3:
-			return PF_BC3;
-		case CompressedFormat::BC4:
-			return PF_BC4;
-		case CompressedFormat::BC5:
-			return PF_BC5;
-		case CompressedFormat::BC6H:
-			return PF_BC6H;
-		case CompressedFormat::BC7:
-			return PF_BC7;
-		}
-
-		// Unknown format
-		return PF_BC3;
-	}
-
     UINT32 PixelUtil::getNumElemBytes(PixelFormat format)
     UINT32 PixelUtil::getNumElemBytes(PixelFormat format)
     {
     {
         return getDescriptionFor(format).elemBytes;
         return getDescriptionFor(format).elemBytes;
@@ -1353,14 +1326,14 @@ namespace BansheeEngine
         }
         }
     }
     }
 
 
-    void PixelUtil::bulkPixelConversion(const PixelData &src, const PixelData &dst)
+    void PixelUtil::bulkPixelConversion(const PixelData &src, PixelData &dst)
     {
     {
         assert(src.getWidth() == dst.getWidth() &&
         assert(src.getWidth() == dst.getWidth() &&
 			   src.getHeight() == dst.getHeight() &&
 			   src.getHeight() == dst.getHeight() &&
 			   src.getDepth() == dst.getDepth());
 			   src.getDepth() == dst.getDepth());
 
 
-		// Check for compressed formats, we don't support decompression, compression or recoding
-		if(PixelUtil::isCompressed(src.getFormat()) || PixelUtil::isCompressed(dst.getFormat()))
+		// Check for compressed formats, we don't support decompression
+		if(PixelUtil::isCompressed(src.getFormat()))
 		{
 		{
 			if(src.getFormat() == dst.getFormat())
 			if(src.getFormat() == dst.getFormat())
 			{
 			{
@@ -1373,6 +1346,24 @@ namespace BansheeEngine
 			}
 			}
 		}
 		}
 
 
+		// Check for compression
+		if (PixelUtil::isCompressed(dst.getFormat()))
+		{
+			if (src.getFormat() == dst.getFormat())
+			{
+				memcpy(dst.getData(), src.getData(), src.getConsecutiveSize());
+				return;
+			}
+			else
+			{
+				CompressionOptions co;
+				co.format = dst.getFormat();
+				dst = *compress(src, co);
+
+				return;
+			}
+		}
+
         // The easy case
         // The easy case
         if(src.getFormat() == dst.getFormat()) 
         if(src.getFormat() == dst.getFormat()) 
 		{
 		{
@@ -1478,7 +1469,7 @@ namespace BansheeEngine
         }
         }
     }
     }
 
 
-	void PixelUtil::scale(const PixelData& src, const PixelData& scaled, Filter filter)
+	void PixelUtil::scale(const PixelData& src, PixelData& scaled, Filter filter)
 	{
 	{
 		assert(PixelUtil::isAccessible(src.getFormat()));
 		assert(PixelUtil::isAccessible(src.getFormat()));
 		assert(PixelUtil::isAccessible(scaled.getFormat()));
 		assert(PixelUtil::isAccessible(scaled.getFormat()));
@@ -1624,14 +1615,17 @@ namespace BansheeEngine
 
 
 	PixelDataPtr PixelUtil::compress(const PixelData& src, const CompressionOptions& options)
 	PixelDataPtr PixelUtil::compress(const PixelData& src, const CompressionOptions& options)
 	{
 	{
+		if (!isCompressed(options.format))
+			BS_EXCEPT(InvalidParametersException, "Wanted format is not a compressed format.");
+
 		// Note: NVTT site has implementations for these two formats for when I decide to add them
 		// Note: NVTT site has implementations for these two formats for when I decide to add them
-		if (options.format == CompressedFormat::BC6H || options.format == CompressedFormat::BC7)
+		if (options.format == PF_BC6H || options.format == PF_BC7)
 			BS_EXCEPT(InvalidParametersException, "Specified formats are not yet supported.");
 			BS_EXCEPT(InvalidParametersException, "Specified formats are not yet supported.");
 
 
 		if (src.getDepth() != 1)
 		if (src.getDepth() != 1)
 			BS_EXCEPT(InvalidParametersException, "3D textures are not supported.");
 			BS_EXCEPT(InvalidParametersException, "3D textures are not supported.");
 
 
-		PixelFormat pf = toPixelFormat(options.format);
+		PixelFormat pf = options.format;
 
 
 		// TODO - Get rid of this limitation? Maybe it works without it with no additional changes.
 		// TODO - Get rid of this limitation? Maybe it works without it with no additional changes.
 		if (!isValidExtent(src.getWidth(), src.getHeight(), 1, pf))
 		if (!isValidExtent(src.getWidth(), src.getHeight(), 1, pf))

+ 1 - 1
BansheeCore/Source/BsRenderTexture.cpp

@@ -120,7 +120,7 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
-	void RenderTexture::copyToMemory( const PixelData &dst, FrameBuffer buffer /*= FB_AUTO */ )
+	void RenderTexture::copyToMemory(PixelData &dst, FrameBuffer buffer)
 	{
 	{
 		throw std::exception("The method or operation is not implemented.");
 		throw std::exception("The method or operation is not implemented.");
 	}
 	}

+ 1 - 1
BansheeD3D11RenderSystem/Include/BsD3D11RenderWindow.h

@@ -51,7 +51,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * @copydoc RenderWindow::copyContentsToMemory
 		 * @copydoc RenderWindow::copyContentsToMemory
 		 */
 		 */
-		void copyToMemory(const PixelData &dst, FrameBuffer buffer);
+		void copyToMemory(PixelData &dst, FrameBuffer buffer);
 
 
 		/**
 		/**
 		 * @copydoc RenderWindow::swapBuffers
 		 * @copydoc RenderWindow::swapBuffers

+ 1 - 1
BansheeD3D11RenderSystem/Source/BsD3D11RenderWindow.cpp

@@ -477,7 +477,7 @@ namespace BansheeEngine
 		RenderWindow::getCustomAttribute(name, pData);
 		RenderWindow::getCustomAttribute(name, pData);
 	}
 	}
 
 
-	void D3D11RenderWindow::copyToMemory(const PixelData &dst, FrameBuffer buffer)
+	void D3D11RenderWindow::copyToMemory(PixelData &dst, FrameBuffer buffer)
 	{
 	{
 		THROW_IF_NOT_CORE_THREAD;
 		THROW_IF_NOT_CORE_THREAD;
 
 

+ 1 - 1
BansheeD3D9RenderSystem/Include/BsD3D9Device.h

@@ -136,7 +136,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * @brief	Copies contents of the back or depth/stencil buffer in to the provided object.
 		 * @brief	Copies contents of the back or depth/stencil buffer in to the provided object.
 		 */
 		 */
-		void copyContentsToMemory(const D3D9RenderWindow* window, const PixelData &dst, RenderTarget::FrameBuffer buffer);
+		void copyContentsToMemory(const D3D9RenderWindow* window, PixelData &dst, RenderTarget::FrameBuffer buffer);
 
 
 		/**
 		/**
 		 * @brief	Resets bound pipeline states/streams to null.
 		 * @brief	Resets bound pipeline states/streams to null.

+ 1 - 1
BansheeD3D9RenderSystem/Include/BsD3D9RenderWindow.h

@@ -72,7 +72,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * @copydoc RenderWindow::copyContentsToMemory
 		 * @copydoc RenderWindow::copyContentsToMemory
 		 */
 		 */
-		void copyToMemory(const PixelData &dst, FrameBuffer buffer);
+		void copyToMemory(PixelData &dst, FrameBuffer buffer);
 
 
 		/**
 		/**
 		 * @copydoc RenderWindow::requiresTextureFlipping
 		 * @copydoc RenderWindow::requiresTextureFlipping

+ 1 - 1
BansheeD3D9RenderSystem/Source/BsD3D9Device.cpp

@@ -1033,7 +1033,7 @@ namespace BansheeEngine
 	}
 	}
 
 
 	void D3D9Device::copyContentsToMemory(const D3D9RenderWindow* renderWindow, 
 	void D3D9Device::copyContentsToMemory(const D3D9RenderWindow* renderWindow, 
-		const PixelData &dst, RenderTarget::FrameBuffer buffer)
+		PixelData &dst, RenderTarget::FrameBuffer buffer)
 	{
 	{
 		RenderWindowToResorucesIterator it = getRenderWindowIterator(renderWindow);
 		RenderWindowToResorucesIterator it = getRenderWindowIterator(renderWindow);
 		RenderWindowResources* resources = it->second;
 		RenderWindowResources* resources = it->second;

+ 1 - 1
BansheeD3D9RenderSystem/Source/BsD3D9RenderWindow.cpp

@@ -466,7 +466,7 @@ namespace BansheeEngine
 		return Vector2I(pos.x, pos.y);
 		return Vector2I(pos.x, pos.y);
 	}
 	}
 
 
-	void D3D9RenderWindow::copyToMemory(const PixelData &dst, FrameBuffer buffer)
+	void D3D9RenderWindow::copyToMemory(PixelData &dst, FrameBuffer buffer)
 	{
 	{
 		THROW_IF_NOT_CORE_THREAD;
 		THROW_IF_NOT_CORE_THREAD;
 
 

+ 7 - 3
BansheeEngine.sln

@@ -6,13 +6,11 @@ MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{1D081E5A-615A-4C06-B2DF-0D8D9390DE02}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{1D081E5A-615A-4C06-B2DF-0D8D9390DE02}"
 	ProjectSection(SolutionItems) = preProject
 	ProjectSection(SolutionItems) = preProject
 		CSharpWrap.txt = CSharpWrap.txt
 		CSharpWrap.txt = CSharpWrap.txt
-		Dependencies.txt = Dependencies.txt
 		DrawHelper.txt = DrawHelper.txt
 		DrawHelper.txt = DrawHelper.txt
 		EditorWindowDock.txt = EditorWindowDock.txt
 		EditorWindowDock.txt = EditorWindowDock.txt
 		GameGUI.txt = GameGUI.txt
 		GameGUI.txt = GameGUI.txt
 		GameObjectSerialization.txt = GameObjectSerialization.txt
 		GameObjectSerialization.txt = GameObjectSerialization.txt
 		Inspector.txt = Inspector.txt
 		Inspector.txt = Inspector.txt
-		MonoIntegrationGuide.txt = MonoIntegrationGuide.txt
 		Notes.txt = Notes.txt
 		Notes.txt = Notes.txt
 		Opts.txt = Opts.txt
 		Opts.txt = Opts.txt
 		Polish.txt = Polish.txt
 		Polish.txt = Polish.txt
@@ -21,7 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{1D081E
 		SpriteTexture.txt = SpriteTexture.txt
 		SpriteTexture.txt = SpriteTexture.txt
 		TODO.txt = TODO.txt
 		TODO.txt = TODO.txt
 		TODODoc.txt = TODODoc.txt
 		TODODoc.txt = TODODoc.txt
-		TransformUpdatesAndRenderer.txt = TransformUpdatesAndRenderer.txt
 		TreeView.txt = TreeView.txt
 		TreeView.txt = TreeView.txt
 		UndoRedo.txt = UndoRedo.txt
 		UndoRedo.txt = UndoRedo.txt
 	EndProjectSection
 	EndProjectSection
@@ -180,6 +177,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BansheeD3D11RenderSystem",
 		{CC7F9445-71C9-4559-9976-FF0A64DCB582} = {CC7F9445-71C9-4559-9976-FF0A64DCB582}
 		{CC7F9445-71C9-4559-9976-FF0A64DCB582} = {CC7F9445-71C9-4559-9976-FF0A64DCB582}
 	EndProjectSection
 	EndProjectSection
 EndProject
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Guides", "Guides", "{4259680D-8A9B-4C17-B75B-CA29482AB299}"
+	ProjectSection(SolutionItems) = preProject
+		Dependencies.txt = Dependencies.txt
+		MonoIntegrationGuide.txt = MonoIntegrationGuide.txt
+	EndProjectSection
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -627,6 +630,7 @@ Global
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
 	GlobalSection(NestedProjects) = preSolution
+		{4259680D-8A9B-4C17-B75B-CA29482AB299} = {1D081E5A-615A-4C06-B2DF-0D8D9390DE02}
 		{4F05EF0A-B8DE-424B-8848-6ECEE9D99912} = {32E4E2B7-1B4D-4B06-AD87-57CEE00BC247}
 		{4F05EF0A-B8DE-424B-8848-6ECEE9D99912} = {32E4E2B7-1B4D-4B06-AD87-57CEE00BC247}
 		{41CC18CE-139E-45A5-A9AA-336CBA2E1521} = {32E4E2B7-1B4D-4B06-AD87-57CEE00BC247}
 		{41CC18CE-139E-45A5-A9AA-336CBA2E1521} = {32E4E2B7-1B4D-4B06-AD87-57CEE00BC247}
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC} = {32E4E2B7-1B4D-4B06-AD87-57CEE00BC247}
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC} = {32E4E2B7-1B4D-4B06-AD87-57CEE00BC247}

+ 0 - 2
BansheeFreeImgImporter/BansheeFreeImgImporter.vcxproj

@@ -29,12 +29,10 @@
   <ItemGroup>
   <ItemGroup>
     <ClInclude Include="Include\BsFreeImgImporter.h" />
     <ClInclude Include="Include\BsFreeImgImporter.h" />
     <ClInclude Include="Include\BsFreeImgPrerequisites.h" />
     <ClInclude Include="Include\BsFreeImgPrerequisites.h" />
-    <ClInclude Include="Include\BsTextureData.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ClCompile Include="Source\BsFreeImgImporter.cpp" />
     <ClCompile Include="Source\BsFreeImgImporter.cpp" />
     <ClCompile Include="Source\BsFreeImgPlugin.cpp" />
     <ClCompile Include="Source\BsFreeImgPlugin.cpp" />
-    <ClCompile Include="Source\BsTextureData.cpp" />
   </ItemGroup>
   </ItemGroup>
   <PropertyGroup Label="Globals">
   <PropertyGroup Label="Globals">
     <ProjectGuid>{122B7A22-0C62-4B35-B661-EBF3F394EA79}</ProjectGuid>
     <ProjectGuid>{122B7A22-0C62-4B35-B661-EBF3F394EA79}</ProjectGuid>

+ 0 - 6
BansheeFreeImgImporter/BansheeFreeImgImporter.vcxproj.filters

@@ -15,9 +15,6 @@
     </Filter>
     </Filter>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <ClInclude Include="Include\BsTextureData.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="Include\BsFreeImgPrerequisites.h">
     <ClInclude Include="Include\BsFreeImgPrerequisites.h">
       <Filter>Header Files</Filter>
       <Filter>Header Files</Filter>
     </ClInclude>
     </ClInclude>
@@ -26,9 +23,6 @@
     </ClInclude>
     </ClInclude>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <ClCompile Include="Source\BsTextureData.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="Source\BsFreeImgPlugin.cpp">
     <ClCompile Include="Source\BsFreeImgPlugin.cpp">
       <Filter>Source Files</Filter>
       <Filter>Source Files</Filter>
     </ClCompile>
     </ClCompile>

+ 26 - 17
BansheeFreeImgImporter/Include/BsFreeImgImporter.h

@@ -6,6 +6,10 @@
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
+	/**
+	 * @brief	Importer implementation that handles various import for various
+	 *			image formats using the FreeImg library.
+	 */
 	class FreeImgImporter : public SpecificImporter
 	class FreeImgImporter : public SpecificImporter
 	{
 	{
 		struct RawImageData;
 		struct RawImageData;
@@ -15,31 +19,36 @@ namespace BansheeEngine
 		virtual ~FreeImgImporter();
 		virtual ~FreeImgImporter();
 
 
 		/**
 		/**
-		 * @brief	Should only be called by the plugin when its being loaded.
+		 * @copydoc	SpecificImporter::isExtensionSupported
 		 */
 		 */
-		static void startUp()
-		{
-			static FreeImgImporter* importer = nullptr;
-			if(importer == nullptr)
-			{
-				importer = bs_new<FreeImgImporter>();
-				Importer::instance()._registerAssetImporter(importer);
-			}
-		}
-
-		/** Inherited from SpecificImporter */
 		virtual bool isExtensionSupported(const WString& ext) const;
 		virtual bool isExtensionSupported(const WString& ext) const;
 
 
-		/** Inherited from SpecificImporter */
+		/**
+		 * @copydoc	SpecificImporter::isMagicNumberSupported
+		 */
 		virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const; 
 		virtual bool isMagicNumberSupported(const UINT8* magicNumPtr, UINT32 numBytes) const; 
 
 
-		/** Inherited from SpecificImporter */
+		/**
+		 * @copydoc	SpecificImporter::import
+		 */
 		virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions);
 		virtual ResourcePtr import(const Path& filePath, ConstImportOptionsPtr importOptions);
+
+		/**
+		 * @copydoc SpecificImporter::createImportOptions
+		 */
+		virtual ImportOptionsPtr createImportOptions() const;
 	private:
 	private:
+		/**
+		 * @brief	Converts a magic number into an extension name.
+		 */
+		WString magicNumToExtension(const UINT8* magic, UINT32 maxBytes) const;
+
+		/**
+		 * @brief	Imports an image from the provided data stream.
+		 */
+		PixelDataPtr importRawImage(DataStreamPtr fileData);
+
 		Vector<WString> mExtensions;
 		Vector<WString> mExtensions;
 		UnorderedMap<WString, int> mExtensionToFID;
 		UnorderedMap<WString, int> mExtensionToFID;
-
-		WString magicNumToExtension(const UINT8* magic, UINT32 maxBytes) const;
-		TextureDataPtr importRawImage(DataStreamPtr fileData);
 	};
 	};
 }
 }

+ 1 - 7
BansheeFreeImgImporter/Include/BsFreeImgPrerequisites.h

@@ -16,10 +16,4 @@
 #    define BS_FREEIMG_EXPORT  __attribute__ ((visibility("default")))
 #    define BS_FREEIMG_EXPORT  __attribute__ ((visibility("default")))
 #else
 #else
 #    define BS_FREEIMG_EXPORT
 #    define BS_FREEIMG_EXPORT
-#endif
-
-namespace BansheeEngine
-{
-	class TextureData;
-	typedef std::shared_ptr<TextureData> TextureDataPtr;
-}
+#endif

+ 0 - 87
BansheeFreeImgImporter/Include/BsTextureData.h

@@ -1,87 +0,0 @@
-#pragma once
-
-#include "BsFreeImgPrerequisites.h"
-#include "BsPixelUtil.h"
-
-namespace BansheeEngine
-{
-	enum TextureDataFlags
-	{
-		TDF_COMPRESSED = 0x00000001,
-		TDF_CUBEMAP    = 0x00000002,
-		TDF_3D_TEXTURE = 0x00000004
-	};
-
-	class BS_FREEIMG_EXPORT TextureData
-	{
-	public:
-		TextureData(UINT32 width, UINT32 height, UINT32 size, 
-			PixelFormat format, UINT32 depth = 1, INT32 flags = 0, UINT32 numMipmaps = 1);
-		~TextureData();
-
-		/** Returns a pointer to the internal image buffer.
-		@remarks
-			Be careful with this method. You will almost certainly
-			prefer to use getPixels, especially with complex images
-			which include custom mipmaps.
-        */
-        UINT8* getData(void) { return mData; }
-
-        /** Returns a const pointer to the internal image buffer.
-		@remarks
-			Be careful with this method. You will almost certainly
-			prefer to use getPixels, especially with complex images
-			which include custom mipmaps.
-        */
-        const UINT8* getData() const { return mData; } 
-
-        /** Returns the size of the data buffer.
-        */
-		UINT32 getSize() const { return mSize; }
-
-        /** Returns the number of mipmaps contained in the image.
-        */
-		UINT32 getNumMipmaps() const { return mNumMipmaps; }
-
-        /** Returns true if the image has the appropriate flag set.
-        */
-		bool hasFlag(const TextureDataFlags flag) const { return (mFlags & flag) != 0; }
-
-        /** Gets the width of the image in pixels.
-        */
-        UINT32 getWidth(void) const { return mWidth; }
-
-        /** Gets the height of the image in pixels.
-        */
-        UINT32 getHeight(void) const { return mHeight; }
-
-        /** Gets the depth of the image.
-        */
-        UINT32 getDepth(void) const { return mDepth; }
-
-        /** Returns the image format.
-        */
-        PixelFormat getFormat() const { return mFormat; }
-
-        /** Returns the number of bits per pixel.
-        */
-        UINT8 getBPP() const { return mBPP; }
-
-        /** Returns true if the image has an alpha component.
-        */
-        bool getHasAlpha() const { return PixelUtil::getFlags(mFormat) & PFF_HASALPHA; }
-
-		void getPixels(UINT32 mip, PixelData& output);
-
-	private:
-		UINT32 mNumMipmaps;
-		UINT32 mWidth;
-		UINT32 mHeight;
-		UINT32 mSize;
-		UINT32 mDepth;
-		INT32 mFlags;
-		UINT8 mBPP;
-		PixelFormat mFormat;
-		UINT8* mData;
-	};
-}

+ 38 - 12
BansheeFreeImgImporter/Source/BsFreeImgImporter.cpp

@@ -3,9 +3,9 @@
 #include "BsDebug.h"
 #include "BsDebug.h"
 #include "BsDataStream.h"
 #include "BsDataStream.h"
 #include "BsPath.h"
 #include "BsPath.h"
-#include "BsTextureData.h"
 #include "BsTextureManager.h"
 #include "BsTextureManager.h"
 #include "BsTexture.h"
 #include "BsTexture.h"
+#include "BsTextureImportOptions.h"
 #include "BsFileSystem.h"
 #include "BsFileSystem.h"
 #include "BsCoreApplication.h"
 #include "BsCoreApplication.h"
 #include "BsCoreThread.h"
 #include "BsCoreThread.h"
@@ -120,28 +120,54 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
+	ImportOptionsPtr FreeImgImporter::createImportOptions() const
+	{
+		return bs_shared_ptr<TextureImportOptions, ScratchAlloc>();
+	}
+
 	ResourcePtr FreeImgImporter::import(const Path& filePath, ConstImportOptionsPtr importOptions)
 	ResourcePtr FreeImgImporter::import(const Path& filePath, ConstImportOptionsPtr importOptions)
 	{
 	{
+		const TextureImportOptions* textureImportOptions = static_cast<const TextureImportOptions*>(importOptions.get());
+
 		DataStreamPtr fileData = FileSystem::openFile(filePath, true);
 		DataStreamPtr fileData = FileSystem::openFile(filePath, true);
 
 
-		TextureDataPtr imgData = importRawImage(fileData);
+		PixelDataPtr imgData = importRawImage(fileData);
 		if(imgData == nullptr || imgData->getData() == nullptr)
 		if(imgData == nullptr || imgData->getData() == nullptr)
 			return nullptr;
 			return nullptr;
 
 
+		UINT32 numMips = 0;
+		if (textureImportOptions->getGenerateMipmaps())
+		{
+			UINT32 maxPossibleMip = PixelUtil::getMaxMipmaps(imgData->getWidth(), imgData->getHeight(), imgData->getDepth(), imgData->getFormat());
+			if (textureImportOptions->getMaxMip() == 0)
+			{
+				numMips = maxPossibleMip;
+			}
+			else
+			{
+				numMips = std::min(maxPossibleMip, textureImportOptions->getMaxMip());
+			}
+		}
+
 		TexturePtr newTexture = Texture::_createPtr(TEX_TYPE_2D, 
 		TexturePtr newTexture = Texture::_createPtr(TEX_TYPE_2D, 
-			imgData->getWidth(), imgData->getHeight(), imgData->getNumMipmaps(), imgData->getFormat());
+			imgData->getWidth(), imgData->getHeight(), numMips, textureImportOptions->getFormat());
 
 
-		newTexture->synchronize(); // TODO - Required due to a bug in allocateSubresourceBuffer
+		Vector<PixelDataPtr> mipLevels;
+		if (numMips > 0)
+			mipLevels = PixelUtil::genMipmaps(*imgData, MipMapGenOptions());
+
+		mipLevels.insert(mipLevels.begin(), imgData);
 
 
-		for(UINT32 mip = 0; mip <= imgData->getNumMipmaps(); ++mip)
+		newTexture->synchronize(); // TODO - Required due to a bug in allocateSubresourceBuffer
+		for (UINT32 mip = 0; mip < (UINT32)mipLevels.size(); ++mip)
 		{
 		{
 			UINT32 subresourceIdx = newTexture->mapToSubresourceIdx(0, mip);
 			UINT32 subresourceIdx = newTexture->mapToSubresourceIdx(0, mip);
-			PixelDataPtr src = newTexture->allocateSubresourceBuffer(subresourceIdx);
+			PixelDataPtr dst = newTexture->allocateSubresourceBuffer(subresourceIdx);
 
 
-			imgData->getPixels(mip, *src);
+			PixelUtil::bulkPixelConversion(*mipLevels[mip], *dst);
 
 
-			src->_lock();
-			gCoreThread().queueReturnCommand(std::bind(&RenderSystem::writeSubresource, RenderSystem::instancePtr(), newTexture, subresourceIdx, src, false, _1));
+			dst->_lock();
+			gCoreThread().queueReturnCommand(std::bind(&RenderSystem::writeSubresource, RenderSystem::instancePtr(), newTexture, subresourceIdx, dst, false, _1));
 		}
 		}
 
 
 		fileData->close();
 		fileData->close();
@@ -152,7 +178,7 @@ namespace BansheeEngine
 		return newTexture;
 		return newTexture;
 	}
 	}
 
 
-	TextureDataPtr FreeImgImporter::importRawImage(DataStreamPtr fileData)
+	PixelDataPtr FreeImgImporter::importRawImage(DataStreamPtr fileData)
 	{
 	{
 		if(fileData->size() > std::numeric_limits<UINT32>::max())
 		if(fileData->size() > std::numeric_limits<UINT32>::max())
 		{
 		{
@@ -162,7 +188,6 @@ namespace BansheeEngine
 		UINT32 magicLen = std::min((UINT32)fileData->size(), 32u);
 		UINT32 magicLen = std::min((UINT32)fileData->size(), 32u);
 		UINT8 magicBuf[32];
 		UINT8 magicBuf[32];
 		fileData->read(magicBuf, magicLen);
 		fileData->read(magicBuf, magicLen);
-		// return to start
 		fileData->seek(0);
 		fileData->seek(0);
 
 
 		WString fileExtension = magicNumToExtension(magicBuf, magicLen);
 		WString fileExtension = magicNumToExtension(magicBuf, magicLen);
@@ -310,7 +335,8 @@ namespace BansheeEngine
 		UINT32 size = dstPitch * height;
 		UINT32 size = dstPitch * height;
 
 
 		// Bind output buffer
 		// Bind output buffer
-		TextureDataPtr texData = bs_shared_ptr<TextureData, ScratchAlloc>(width, height, size, format, 1, 0, 0);
+		PixelDataPtr texData = bs_shared_ptr<PixelData>(width, height, 1, format);
+		texData->allocateInternalBuffer();
 		UINT8* output = texData->getData();
 		UINT8* output = texData->getData();
 
 
 		UINT8* pSrc;
 		UINT8* pSrc;

+ 2 - 1
BansheeFreeImgImporter/Source/BsFreeImgPlugin.cpp

@@ -11,7 +11,8 @@ namespace BansheeEngine
 
 
 	extern "C" BS_FREEIMG_EXPORT void* loadPlugin()
 	extern "C" BS_FREEIMG_EXPORT void* loadPlugin()
 	{
 	{
-		FreeImgImporter::startUp();
+		FreeImgImporter* importer = bs_new<FreeImgImporter>();
+		Importer::instance()._registerAssetImporter(importer);
 
 
 		return nullptr;
 		return nullptr;
 	}
 	}

+ 0 - 59
BansheeFreeImgImporter/Source/BsTextureData.cpp

@@ -1,59 +0,0 @@
-#include "BsTextureData.h"
-#include "BsException.h"
-
-namespace BansheeEngine
-{
-	TextureData::TextureData(UINT32 width, UINT32 height, UINT32 size, 
-		PixelFormat format, UINT32 depth, INT32 flags, UINT32 numMipmaps)
-		:mWidth(width), mHeight(height), mDepth(depth), mSize(size), mFormat(format),
-		mFlags(flags), mNumMipmaps(numMipmaps)
-	{
-		mBPP = static_cast<UINT8>(PixelUtil::getNumElemBytes(mFormat)) * 8;
-		mData = (UINT8*)bs_alloc<ScratchAlloc>(size);
-	}
-
-	TextureData::~TextureData()
-	{
-		if(mData != nullptr)
-			bs_free<ScratchAlloc>(mData);
-	}
-
-	void TextureData::getPixels(UINT32 mip, PixelData& output)
-	{
-		if(mip < 0 || mip > mNumMipmaps)
-		{
-			BS_EXCEPT(InvalidParametersException, "Mip out of range: " + toString(mip) + ". While maximum available mip is: " + toString((mNumMipmaps)));
-		}
-
-		// Calculate mipmap offset and size
-		UINT8 *offset = const_cast<UINT8*>(getData());
-		UINT8 offsetSoFar = 0;
-
-		UINT32 width = getWidth(), height = getHeight(), depth = getDepth();
-		UINT32 numMips = getNumMipmaps();
-
-		// Figure out the offsets 
-		UINT32 finalWidth = 0, finalHeight = 0, finalDepth = 0;
-		for(UINT32 curMip = 0; curMip <= numMips; ++curMip)
-		{
-			if (curMip == mip)
-			{
-				offset += offsetSoFar;
-				finalWidth = width;
-				finalHeight = height;
-				finalDepth = depth;
-			}
-			offsetSoFar += PixelUtil::getMemorySize(width, height, depth, getFormat());
-
-			/// Half size in each dimension
-			if(width!=1) width /= 2;
-			if(height!=1) height /= 2;
-			if(depth!=1) depth /= 2;
-		}
-
-		PixelData myData(finalWidth, finalHeight, finalDepth, getFormat());
-		myData.setExternalBuffer(offset);
-
-		PixelUtil::bulkPixelConversion(myData, output);
-	}
-}

+ 1 - 1
BansheeGLRenderSystem/Include/BsWin32Window.h

@@ -61,7 +61,7 @@ namespace BansheeEngine
 		/**
 		/**
 		 * @copydoc RenderWindow::copyContentsToMemory
 		 * @copydoc RenderWindow::copyContentsToMemory
 		 */
 		 */
-		void copyToMemory(const PixelData &dst, FrameBuffer buffer);
+		void copyToMemory(PixelData &dst, FrameBuffer buffer);
 
 
 		/**
 		/**
 		 * @copydoc RenderWindow::swapBuffers
 		 * @copydoc RenderWindow::swapBuffers

+ 1 - 1
BansheeGLRenderSystem/Source/BsWin32Window.cpp

@@ -519,7 +519,7 @@ namespace BansheeEngine
 		}
 		}
 	}
 	}
 
 
-	void Win32Window::copyToMemory(const PixelData &dst, FrameBuffer buffer)
+	void Win32Window::copyToMemory(PixelData &dst, FrameBuffer buffer)
 	{
 	{
 		THROW_IF_NOT_CORE_THREAD;
 		THROW_IF_NOT_CORE_THREAD;
 
 

+ 4 - 122
Notes.txt

@@ -23,26 +23,15 @@ Reminders:
     - Asset postprocessor? Imports a regular mesh using normal importers and then postprocesses it into a specialized format?
     - Asset postprocessor? Imports a regular mesh using normal importers and then postprocesses it into a specialized format?
   - Load texture mips separately so we can unload HQ textures from far away objects (like UE3)
   - Load texture mips separately so we can unload HQ textures from far away objects (like UE3)
   - Add Unified shader so I can easily switch between HLSL and GLSL shaders (they need same parameters usually, just different code)
   - Add Unified shader so I can easily switch between HLSL and GLSL shaders (they need same parameters usually, just different code)
-    - Maybe just add support for Cg and force everyone to use that? - I'd like to be able to just switch out renderer in a single location and that everything keeps on working without 
-	  further modifications.
+    - UE4 has GLSL/HLSL shader cross compiler, so something similar
   - Remove HardwarePixelBuffer (DX11 doesn't use it, and DX9 and OpenGL textures can be rewritten so they have its methods internally)
   - Remove HardwarePixelBuffer (DX11 doesn't use it, and DX9 and OpenGL textures can be rewritten so they have its methods internally)
-  - Multihead device
-  - Don't forget to check out Unity DX11 documentation on how to implement DX11 features (http://docs.unity3d.com/Documentation/Manual/DirectX11.html)
-  - Go to Game Engine Architecture book and make a list of Utility systems we will need (Config files, Parsers, File I/O etc)
-  - Go to GEA book and read about resource managers before implementing them
-    - Actually I should re-read most of the chapers in the book, or all of it
-  - OpenGL non-Win32 window files haven't been properly parsed or tested
-    - Since I probably can't compile them, try adding them to VS and see what intellisense says?
-  - Textures and all other buffers keep a copy of their data in system memory. If there are memory constraints we might need a way to avoid this.
   - Make sure my Log system uses XML + HTML
   - Make sure my Log system uses XML + HTML
   - There is an issue that custom-UIs won't have their mesh shared. For example most game UIs will be advanced and will 
   - There is an issue that custom-UIs won't have their mesh shared. For example most game UIs will be advanced and will 
    likely use on GUIWidget per element. However currently I only perform batching within a single widget which 
    likely use on GUIWidget per element. However currently I only perform batching within a single widget which 
    doesn't help in the mentioned case.
    doesn't help in the mentioned case.
-  - Later add InputMap class in which you can bind certain actions (like move left, fire, etc.) to Keyboard, Joystick or Mouse buttons.
-    - Also ensure button combinations are possible. e.g. on keyboard I might want to press F1 to open debug menu, but on joystick it might be A+B+X
+  - Input: Allow combinations like A+B+X on joystick to be a virtual key
   - Add a field that tracks % of resource deserialization in BinarySerializer
   - Add a field that tracks % of resource deserialization in BinarySerializer
   - Add GL Texture buffers (They're equivalent to DX11 buffers) - http://www.opengl.org/wiki/Buffer_Texture
   - Add GL Texture buffers (They're equivalent to DX11 buffers) - http://www.opengl.org/wiki/Buffer_Texture
-  - Instead of doing setThisPtr on every CoreGpuObject, use intrusive shared_ptr instead?
   - I should consider creating two special Mesh types:
   - I should consider creating two special Mesh types:
      StreamMesh - constantly updated by CPU and read by GPU
      StreamMesh - constantly updated by CPU and read by GPU
      ReadMesh - written by GPU and easily read by CPU
      ReadMesh - written by GPU and easily read by CPU
@@ -66,6 +55,7 @@ Reminders:
   - Possible improvement: I can only update entire Mesh at once with writeSubresource
   - Possible improvement: I can only update entire Mesh at once with writeSubresource
   - Possible improvement: I keep bounds for the entire mesh and not per-submesh
   - Possible improvement: I keep bounds for the entire mesh and not per-submesh
   - Possible improvement: I don't serialize Mesh bounds and they are recalculated whenever a mesh is loaded
   - Possible improvement: I don't serialize Mesh bounds and they are recalculated whenever a mesh is loaded
+  - Add better mip map and compression options to the texture importer. Right now I'm ignoring a lot of the options even though I support them.
 
 
 Potential optimizations:
 Potential optimizations:
  - bulkPixelConversion is EXTREMELY poorly unoptimized. Each pixel it calls a separate method that does redudant operations every pixel.
  - bulkPixelConversion is EXTREMELY poorly unoptimized. Each pixel it calls a separate method that does redudant operations every pixel.
@@ -100,42 +90,6 @@ More detailed thought out system descriptions:
 	 - In inspector they can be expanded as children of the main resource, but cannot be directly modified?
 	 - In inspector they can be expanded as children of the main resource, but cannot be directly modified?
 	 - Deleting the main resource deletes the children too
 	 - Deleting the main resource deletes the children too
 
 
-<<<<SceneManager/SceneObject>>>>
-Two major parts:
-SceneObject update:
- - Just takes care of updating world/local transforms
-  - Transforms are only updated when requested
- - Marking a transform dirty will also mark it dirty in the SceneManager
- - Only SceneObjects that have an Interactable type component (Renderer, Collider, etc.) will reside in SceneManager
-
-SceneManager maintains a list of world matrices, bounds and primitives
- - We can query them for various collision (ray, frustum, etc.)
- - Internally they likely use BVH or oct-tree
- - Uses a binary-tree (unlike SceneObject hierarchy which is n-ary), which is laid out neatly in memory for quick traversal.
-   - What happens when object is removed/added? Tree keeps on growing, empty nodes have their space always reserved. Possibly add a method that can reduce tree size when enough empty nodes exist. 
-     Adding a node might increase tree size which will involve a memcpy while we increase the size.
- - (Updating an object is SceneManager should optionally transfer its world matrix to its owner object as well)
-
-This separation should work fine, as scripts requesting transforms is unlikely to be something that done often. Or not nearly as much as frustum culling and raycasting will be.
-
-How will Physics update objects (and when?)
- - It's unlikely there will be a massive amount of rigidbodies in the scene, so updating them should not be a huge matter of performance. 
-   Calling setTransform after physics simulation update (and before SceneManager update) should work fine.
-
-Updating children dirty whenever setPos/rot/tfrm is called is potentially slow. Can it be avoided?
- - Then again such updates will only be done from the simulation thread, usually from scripts so its unlikely they will be many of them
-
-Do I separate SceneObject and Transform?
- - I don' think I need to
-
-Make sure to let the user know SceneManager only gets updated after simulation, so changes to objects wont be applied right away. 
-(See that he doesn't transform something and call Raycast just so it fails)
- - It is unlikely functionality when query results are needed right after transform will be used much. 
-   So it is acceptable to implement it like this. We might add SceneManager::forceUpdate method in case it is not acceptable.
-
-!!!BUG!!! - When I change parent I don't update individual local position/rotation/scale on scene object
- - Also I don't have a way of setting world pos/rot directly
-
 <<<<Reducing render state changes>>>>
 <<<<Reducing render state changes>>>>
  - Transparent objects get sorted back to front, always
  - Transparent objects get sorted back to front, always
  - Opaque objects I can choose between front to back, no sort or back to front
  - Opaque objects I can choose between front to back, no sort or back to front
@@ -161,14 +115,6 @@ Questions/Notes:
  5. This guy: http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BRenderstate%20change%20costs%5D%5D (who's a driver programmer) sorts all opaque objects based on shader/state
  5. This guy: http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BRenderstate%20change%20costs%5D%5D (who's a driver programmer) sorts all opaque objects based on shader/state
     into buckets, and then orders elements in these bucks in front to back order. This gives him best of two worlds, early z rejection and low state changes.
     into buckets, and then orders elements in these bucks in front to back order. This gives him best of two worlds, early z rejection and low state changes.
 
 
-<<<<Input System>>>>
- - Input is currently ignoring all axes except for mouse axes
- - Remove/Improve smoothing
- - Add ability to get raw or smoothed axis input for any axis (currently you can only get mouse X and Y axes)
- - Allow the user to map axes to custom keys. e.g. Left/right axis can have A and D keys where A returns -1, and D 1
- - Add a way to handle multiple devices (e.g. 2 or more joysticks)
- - Hook up OIS joystick callbacks and test joysticks
-
 <<<<DirectDraw>>>>
 <<<<DirectDraw>>>>
  - Used for quickly drawing something, usually for debug and editor purposes.
  - Used for quickly drawing something, usually for debug and editor purposes.
  - It consists of methods like: DrawLine, DrawPolygon, DrawCube, DrawSphere, etc.
  - It consists of methods like: DrawLine, DrawPolygon, DrawCube, DrawSphere, etc.
@@ -179,71 +125,6 @@ Questions/Notes:
     - Drawing GUI element bounds when debugging GUI
     - Drawing GUI element bounds when debugging GUI
     - Drawing a wireframe selection effect when a mesh is selected in the scene
     - Drawing a wireframe selection effect when a mesh is selected in the scene
 
 
-<<<<Multithreaded memory allocator>>>>
- - Singlethreaded implementation from Game Engine Gems 2 book
- - Small and medium allocators separate for each thread. Memory overhead should be minimal considering how small the pages are. But performance benefits are great.
- - Large allocator just uses some simple form of page allocation and reuse, using atomics?
- - Must ensure that memory allocated on one thread can only be freed from that thread
- - How do I easily tell which allocator to call based on current thread? Require a thread ID with each alloc/dealloc?
- - Need to think this through more
- 
-<<<<More on memory allocator>>>>
- - Regarding potentially often allocating large amounts of memory:
-  - Ignore this for now. Allocating large amounts (16K+ of memory often probably won't be the case). This will only happen when modifying textures or meshes and I can assume there won't be many of such updates.
-    - (But there will be multiple such updates per frame when it comes to GUI meshes for example)
-  - However I should implement allocation counter in my allocator so I can know if I have a bottleneck.
-  - For those allocations that do hit this limit I should implement a FrameAllocator. Memory is allocated during simulation step and the entire block is cleared when the frame ends.
-   - Allocations like copying MeshData, PixelData, PassParams, etc. when queing commands for render thread should all be using this.
-   - Problem with such allocator is safety
-  - Allocations that are created and deleted in a single function should use a Stack allocator
-
-<<<<Resource changes and reimport>>>>
-Use case example:
- - User reimports a .gpuproginc file
-   - Dependencies are held by CoreGpuObjectManager. Objects are required to register/unregister
-      their dependencies in their methods manually.
- - Editor calls SomeClass::reimport(handle) after it detects a change 
-   - this will load a new resource, release the old one and assign the new one to Handle without changing the GUID
-   - In order to make it thread safe force all threads to finish what they're doing and pause them until the switch is done
-     - Should be okay considering this should only happen in edit-mode so performance isn't imperative
-   - reimport is recursively called on all dependant objects as well.
-
-<<<<Handle multithreaded object management>>>:
- - Make everything that is possible immutable. Once created it cant be changed.
-  - Example are shaders, state objects and similar
- - Things like Textures, Vertex, Index buffers, GpuParams may be changed
-  - Make Vertex/Index buffers and similar only accesible from render thread. Higher level classes like meshes can have deferred methods
-  - TODO - How to handle the remaining actually deferred methods? Like Textures?
-
-DirectX11 supports concurrent drawing and resource creation so all my resource updates should be direct calls to DX methods (I'll need a deferred context?)
- - DX9 doesn't so creating/updating resources should wait for render thread?
-  - Although these are sync points which kill the whole concept of separate render thread
-  - Updating via copy then? (DX11 driver does it internally if resource is used anyway)
- - OpenGL? No idea, need to study GL contexts
- - Although it seems DX11 also copies data when mapping/unmapping or updating on a non-immediate context. So maybe copy is the solution?
-
-So final solution:
- - Copy all data that will be updated on a deferred context
-  - Make deferred context have a scratch buffer it can use for storing temporary copied data
- - Immediate context will execute all commands right away
-  - This applies when rendering thread calls resource create/update internally
-  - Or when other thread blocks and waits for rendering thread
- - Create a simple distinction so user knows when is something executed deferred and when immediate?
-  - Move resource update/create methods to DeferredContext?
-    - Not ALL methods need to be moved, only those that are resource heavy
-    - Smaller methods may remain and always stay async, but keep internal state?
- - Resource creation on DX11 should be direct though, without a queue (especially if we manage to populate a resource in the same step)
- - Remove & replace internal data copying in GpuParamBlock (or just use a allocator instead of new())
-
-A POSSIBLY BETTER SOLUTION THAN COPYING ALL THE DATA?
-Classes derive from ISharedMemoryBuffer
- - For example PixelData, used when setting texture pixels
- - They have lock, unlock & clone methods
-  - Users can choose whether they want to lock themselves out from modifying the class, or clone it, before passing it to a threaded method
- - Downside is that I need to do this for every class that will be used in threaded methods
- - Upside is that I think that is how DX handles its buffers at the moment
-
-
 <<<<RenderSystem needed modifications>>>>
 <<<<RenderSystem needed modifications>>>>
   - Texture resource views (Specifying just a subresource of a texture as a shader parameter)
   - Texture resource views (Specifying just a subresource of a texture as a shader parameter)
   - UAV for textures
   - UAV for textures
@@ -269,6 +150,7 @@ Classes derive from ISharedMemoryBuffer
   - Sample mask when setting blend state (DX11, check if equivalent exists in GL)
   - Sample mask when setting blend state (DX11, check if equivalent exists in GL)
   - RGBA blend factor when setting blend state(DX11, check if equivalent exists in GL)
   - RGBA blend factor when setting blend state(DX11, check if equivalent exists in GL)
   - HLSL9/HLSL11/GLSL/Cg shaders need preprocessor defines & includes
   - HLSL9/HLSL11/GLSL/Cg shaders need preprocessor defines & includes
+  - DirectX11 supports concurrent drawing and resource creation so all my resource updates should be direct calls to DX methods (I'll need a deferred context?)
   - One camera -> one task (thread) approach for multithreading
   - One camera -> one task (thread) approach for multithreading
    - Also make sure to run off a thread pool (WorkQueue class already exists that provides needed interface)
    - Also make sure to run off a thread pool (WorkQueue class already exists that provides needed interface)
   - The way I handle rendering currently is to discard simulation results if gpu thread isn't finished.
   - The way I handle rendering currently is to discard simulation results if gpu thread isn't finished.

+ 0 - 23
PlatformPorting.txt

@@ -1,23 +0,0 @@
-Make porting to other platforms easier. Move platform specific files into their own /Platform subfolder.
-Reduce use of CM_PLATFORM where possible
-Split class into different files per-platform where possible
-
-GLRenderer
- - Win32Window
- - Win32Prerequisites
- - Win32Context
- - Win32GLSupport
- - GLPRerequisities - different includes are added depending on platform 
-
-Utility
- - Timer
- - DynLibManager (currently has everything in one file, need to split it up)
- - FileSystem - has some OS specific functionality
-
-Core
- - Cursor - Also move to Utility?
- - WindowEventUtilities - Rename the class, also split it into separate files per platform
- - Application::loadPlugin - uses different extensions based on platform. Move platform specific functionality outside?
-
-Search for all occurencess of CM_PLATFORM
- - Although in all other cases use of CM_PLATFORM can be removed, or is justified

+ 7 - 3
Polish.txt

@@ -1,12 +1,15 @@
 Polish TODO:
 Polish TODO:
  - Finalize example with resolution settings and proper GUI
  - Finalize example with resolution settings and proper GUI
+ - Add an example model
+ - Test release build
 
 
  - Add license text to all files
  - Add license text to all files
  - Make a separate release branch with no editor/script stuff, and without .txt files and other development data
  - Make a separate release branch with no editor/script stuff, and without .txt files and other development data
 
 
 Re-test gamepad buttons now that XInput is active
 Re-test gamepad buttons now that XInput is active
-Test frustum culling
 
 
+!!!BUG!!! - When I change parent I don't update individual local position/rotation/scale on scene object
+I don't have a way of setting world pos/rot directly on SOs
 -----------------
 -----------------
 
 
 Not so critical
 Not so critical
@@ -23,6 +26,7 @@ Not so critical
   - Make a Getting Started guide, along with the example project. Or just finish up the manual.
   - Make a Getting Started guide, along with the example project. Or just finish up the manual.
   - Compress and generate mips for texture on input (testing NVTT stuff)
   - Compress and generate mips for texture on input (testing NVTT stuff)
   - Perform optimizations as needed to get reasonable performance
   - Perform optimizations as needed to get reasonable performance
-  - Consider removing SceneManager from Core? I two scene manager base classes.
+  - Consider removing SceneManager from Core? I have two scene manager base classes.
   - GpuParamBlockBuffer and GpuParams::cloneForCore are very clumsy in how they deal in keeping two separate param blocks. Rethink this a bit.
   - GpuParamBlockBuffer and GpuParams::cloneForCore are very clumsy in how they deal in keeping two separate param blocks. Rethink this a bit.
-  - Add separable pass sorting to RenderQueue
+  - Add separable pass sorting to RenderQueue
+  - DDS file import

+ 1 - 26
TODO.txt

@@ -9,8 +9,6 @@ Optimization notes:
 
 
 A lot of stuff is still using GSyncedMainCA but it should be using gMainCA - Find and replace
 A lot of stuff is still using GSyncedMainCA but it should be using gMainCA - Find and replace
 
 
-TODO: Viewport can be modified from the sim thread, but is used on the core thread without any syncronization mechanisms. Maybe add a method that returns VIEWPORT_DATA, and have that used on the core thread.
-
 I still re-create GUIWidget mesh every frame instead of just updating it.
 I still re-create GUIWidget mesh every frame instead of just updating it.
 
 
 I call waitUntilLoaded too many times. Sometimes 5-6 times in a single function. Each of those calls will be extremely slow.
 I call waitUntilLoaded too many times. Sometimes 5-6 times in a single function. Each of those calls will be extremely slow.
@@ -39,9 +37,7 @@ TextBox needed elements:
 
 
 -----------
 -----------
 
 
- - My test model is rendering back faces. I need to flip them.
-  - Although more than likely I am loading the model incorrectly since it works in Unity?
-  - I probably want to determine front faces based on normals
+Maybe determine mesh front faces based on normals?
 
 
 Immediate TODO:
 Immediate TODO:
  - A way to update mesh buffers without recreating vertex/index buffers (Setting data currently does exactly that)
  - A way to update mesh buffers without recreating vertex/index buffers (Setting data currently does exactly that)
@@ -54,11 +50,6 @@ Other:
 
 
 ----------------------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------------------
 Medium priority:
 Medium priority:
- - Mesh loading:
-  - Example Freefall mesh has one index per vertex, and there are 17k+ vertices. I think I need a post-process step that optimizes them.
-  - Imported FBX meshes are too big
- - Ogre performed special DDS loading. I removed that. I'm not sure if I'll need to re-add it?
- - My log is not thread safe yet it is being called from multiple threads.
  - RTTI:
  - RTTI:
      When defining RTTIType like so: 
      When defining RTTIType like so: 
       RTTIType<D3D9HLSLProgram, HighLevelGpuProgram, D3D9HLSLProgramRTTI>
       RTTIType<D3D9HLSLProgram, HighLevelGpuProgram, D3D9HLSLProgramRTTI>
@@ -73,21 +64,14 @@ Medium priority:
 
 
 ----------------------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------------------
 Low priority TODO
 Low priority TODO
- - Mesh loading:
-  - Sub-meshes aren't being transformed by world matrices of their nodes
  - Remove template from RTTIType and move it to IReflectable? This way i can hopefully move GetRTTITypeStatic and GetRTTIType to IReflectable so I don't
  - Remove template from RTTIType and move it to IReflectable? This way i can hopefully move GetRTTITypeStatic and GetRTTIType to IReflectable so I don't
    need to manually implement those for every method.
    need to manually implement those for every method.
  - Viewport needs to be updated when I call RenderTarget::setFullscreen/finishSwitchingFullscreen/updateWindowRect/windowMovedOrResized. Currently it's not
  - Viewport needs to be updated when I call RenderTarget::setFullscreen/finishSwitchingFullscreen/updateWindowRect/windowMovedOrResized. Currently it's not
- - D3D9Texture::createTextureResources is commented out at the moment. It gets called on device reset, and at that point I should reload texture resources.
-  - I should probably keep all resources by DX managed. OpenGL apparently keeps a mirror of all its resources anyway.
- - Device reset and resource re-loading in general
- - Fix up WorkQueue as it doesn't lock when initializing, to make sure threads are actually started before returning
  - CPU reading or writing to a render texture in OpenGL is not supported. (CmGLHardwarePixelBuffer::upload/download). 
  - CPU reading or writing to a render texture in OpenGL is not supported. (CmGLHardwarePixelBuffer::upload/download). 
  - When saving a resource, make sure resource is properly loaded before saving
  - When saving a resource, make sure resource is properly loaded before saving
    - Add doc to Resources::save that says it will block until render thread updates the resource
    - Add doc to Resources::save that says it will block until render thread updates the resource
    - Add documentation that tells the user that reading a resource non-async will block the thread and execute all queued render commands first
    - Add documentation that tells the user that reading a resource non-async will block the thread and execute all queued render commands first
    - Remove Response handlers from Resources
    - Remove Response handlers from Resources
-- Cg doesn't work. Either remove it or get it to work
 - System is not yet ready for multiple rendering contexts
 - System is not yet ready for multiple rendering contexts
 - When serializing/deserializing derived classes, deserialization is done from most derived to base, while it should probably be done the other way around.
 - When serializing/deserializing derived classes, deserialization is done from most derived to base, while it should probably be done the other way around.
 - Because GLSL introspection API is built around basic types I don't support structs or arrays of objects: 
 - Because GLSL introspection API is built around basic types I don't support structs or arrays of objects: 
@@ -96,16 +80,11 @@ Low priority TODO
   - Arrays of objects aren't supported in HLSL or GLSL because of limited GLSL introspection
   - Arrays of objects aren't supported in HLSL or GLSL because of limited GLSL introspection
     - I might need to add an exception thrown if user tries to use them
     - I might need to add an exception thrown if user tries to use them
   - Structs aren't supported in GLSL for introspection reasons
   - Structs aren't supported in GLSL for introspection reasons
- - Go through pixel formats and removed unused ones: L8, L16, A4L4, and many others
  - Having shared_ptrs used in RenderSystem and CommandQueue can cause potential performance problems. Dozends of thousands of shared
  - Having shared_ptrs used in RenderSystem and CommandQueue can cause potential performance problems. Dozends of thousands of shared
     pointers may be getting queued in command queue per frame, in a slightly more complex scene, which will most certainly cause performance problems
     pointers may be getting queued in command queue per frame, in a slightly more complex scene, which will most certainly cause performance problems
     due to thread safety and atomics used by shared_ptr. However I still need some guarantee that objects queued in RenderSystem won't be destroyed
     due to thread safety and atomics used by shared_ptr. However I still need some guarantee that objects queued in RenderSystem won't be destroyed
 	by the sim. thread.
 	by the sim. thread.
   - A way to bind buffers to a Pass, while specifying buffer range
   - A way to bind buffers to a Pass, while specifying buffer range
-  - Better creation of PrimaryWindow
-    - RENDERWINDOWDESC accepts a "externalWindow" flag and an "externalHandle" so when creating the primary window with RenderSystem::initialize we don't always need to create a new window
-    - Actually new OpenGL seems to support creating context without a window with the help of wglCreateContextAttribsARB and wglMakeCurrent:
-  - OpenGL render window no longer looks for a monitor index
   - Material RTTI should also serialize shared buffers (they need to be made into a resource)
   - Material RTTI should also serialize shared buffers (they need to be made into a resource)
     - BE CAREFUL on how this will be implemented. Likely it will have much of the same interface as a material and/or GpuParams
     - BE CAREFUL on how this will be implemented. Likely it will have much of the same interface as a material and/or GpuParams
   - queueGpuCommand is handled weird. shared_ptr isn't used for setting (this) parameter, and could be optimized out by the compiler
   - queueGpuCommand is handled weird. shared_ptr isn't used for setting (this) parameter, and could be optimized out by the compiler
@@ -113,15 +92,11 @@ Low priority TODO
   - Resources::unload will deadlock if the resource isn't being loaded!
   - Resources::unload will deadlock if the resource isn't being loaded!
     - Maybe re-think how I handle ResourceHandle.isCreated?
     - Maybe re-think how I handle ResourceHandle.isCreated?
   - Check D3D9/D3D11/GL resource usages. DX11 reports many unreleased objects. I'm guessing DX9 will as well. Not sure how to check OpenGL.
   - Check D3D9/D3D11/GL resource usages. DX11 reports many unreleased objects. I'm guessing DX9 will as well. Not sure how to check OpenGL.
- - onMovedOrResized is still used by Viewport while that same callback is offered by RenderWindowManager. There is no need to have them in both places.
  - Texture "ScaleToFit" will cause the texture to repeat instead of clipping the image. e.g. a 50x20 texture placed on an 50x100 area will repeat 5x
  - Texture "ScaleToFit" will cause the texture to repeat instead of clipping the image. e.g. a 50x20 texture placed on an 50x100 area will repeat 5x
  - When writing to mesh vertex buffer in Mesh::writeSubresource that requires a color flip I need to create a temporary copy of the 
  - When writing to mesh vertex buffer in Mesh::writeSubresource that requires a color flip I need to create a temporary copy of the 
     entire buffer. It would be better to handle this differently. Same thing happens in MeshHeap
     entire buffer. It would be better to handle this differently. Same thing happens in MeshHeap
  - OpenGL also supports texture views using glTextureView but so far I only use them in DX11
  - OpenGL also supports texture views using glTextureView but so far I only use them in DX11
  - I don't have a way to set Texture filtering or wrap modes, default ones are always set on initialization
  - I don't have a way to set Texture filtering or wrap modes, default ones are always set on initialization
- - Module does need to be fixed for multi-threading. If it is created on one thread and used on another, a race condition could occurr. But do I use modules on two different threads?
-   - I will with Debug, and probably others
-   - Making the shutdown/destroy variables atomic should be enough
 ----------------------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------------------
 Optional:
 Optional:
  - Need better handling for shader techniques. Some Materials are able to run on all renderers yet I can only specify one. This is problematic
  - Need better handling for shader techniques. Some Materials are able to run on all renderers yet I can only specify one. This is problematic

+ 0 - 8
TODODoc.txt

@@ -1,10 +1,4 @@
  - Render system threading:
  - Render system threading:
-   - Make a list of thread-safe RenderSystem classes
-    - For example HighLevelGpuProgram is thread safe but GpuProgram itself isn't
-    - Classes that are safe to use outside of the render thread: RenderSystem, Mesh, Texture, HighLevelGpuProgram, Material, Shader, Technique
-	- Classes that are only accessible from the render thread: GpuProgram, HardwarePixelBuffer, HardwareVertexBuffer, HardwareIndexBuffer
-   - Add documentation notes to specific methods of classes that may be used both in and out of render thread
-     - RenderTarget & RenderWindow for example. Methods like getWidth/getHeight can be made thread safe, while swapBuffers() cannot
   - GLSL limitations
   - GLSL limitations
      - layout(row_major) is not supported and will likely result in incorrect matrices
      - layout(row_major) is not supported and will likely result in incorrect matrices
 	 - Because GLSL introspection API is built around basic types I don't support structs or arrays of objects: 
 	 - Because GLSL introspection API is built around basic types I don't support structs or arrays of objects: 
@@ -28,8 +22,6 @@
 		add a _ prefixed method, and in other cases I prefer not to modify the public interface and make a class a friend and use a private method.
 		add a _ prefixed method, and in other cases I prefer not to modify the public interface and make a class a friend and use a private method.
 	  A lot of the classes are only meant for internal usage. In that case the entire class is marked with "Internal class", but none of its methods are prefixed or specially documented. 
 	  A lot of the classes are only meant for internal usage. In that case the entire class is marked with "Internal class", but none of its methods are prefixed or specially documented. 
 	  In such class it is assumed all methods are internal and generally aren't meant for normal day to day use.
 	  In such class it is assumed all methods are internal and generally aren't meant for normal day to day use.
-	- "Core method" notation in method documentation. This means the method is only meant to be called from the core thread. Calling it from another thread
-	  will cause an exception at best, or cause unpredictable behaviour at worst.
   - If using Visual Studio make sure you enable throwing of C++ exceptions. They are automatically disabled for me in VS2012 and VS2013 which results in nasty
   - If using Visual Studio make sure you enable throwing of C++ exceptions. They are automatically disabled for me in VS2012 and VS2013 which results in nasty
     issues as the exception gets reported as "First chance exception" and the code attempts to be run again. Banshee does not perform cleanup upon exception throw as exceptions
     issues as the exception gets reported as "First chance exception" and the code attempts to be run again. Banshee does not perform cleanup upon exception throw as exceptions
 	are used for fatal errors. This means you will end up with memory corruption or some other issue, while you could have gotten a clean exception explaining the problem.
 	are used for fatal errors. This means you will end up with memory corruption or some other issue, while you could have gotten a clean exception explaining the problem.

+ 0 - 8
TransformUpdatesAndRenderer.txt

@@ -1,8 +0,0 @@
-Renderer should have its own set of bounds and transforms (and an Oct-Tree for culling)
- - Updated at the end of frame from actual SceneObjects (if they changed)
- - See UE4: RendererScene
- - For Octree see Scene->PrimitiveOctree
-   - See GenericOCtree.inl for OCtree implementation
- - Also see SceneVisibility, especially FrustumCull method
- - IMPORTANT: UE4 PrimitiveInfo and View (and View.PrimitiveVisibilityMap) seems like a good way to deal with the renderer.
-   Those are resized only before frame (during SceneObject updates) and can be quickly iterated, read and updated by the renderer after