loading Wellspring correctly
							parent
							
								
									099c1d4fa3
								
							
						
					
					
						commit
						76c10f65e3
					
				|  | @ -14,7 +14,7 @@ | ||||||
| 		<ProjectReference Include=".\lib\SDL2-CS\SDL2-CS.Core.csproj" /> | 		<ProjectReference Include=".\lib\SDL2-CS\SDL2-CS.Core.csproj" /> | ||||||
| 		<ProjectReference Include=".\lib\RefreshCS\RefreshCS.csproj" /> | 		<ProjectReference Include=".\lib\RefreshCS\RefreshCS.csproj" /> | ||||||
| 		<ProjectReference Include=".\lib\FAudio\csharp\FAudio-CS.Core.csproj" /> | 		<ProjectReference Include=".\lib\FAudio\csharp\FAudio-CS.Core.csproj" /> | ||||||
| 		<ProjectReference Include="lib\WellspringCS\WellspringCS.csproj" /> | 		<ProjectReference Include=".\lib\WellspringCS\WellspringCS.csproj" /> | ||||||
| 	</ItemGroup> | 	</ItemGroup> | ||||||
| 
 | 
 | ||||||
| 	<ItemGroup> | 	<ItemGroup> | ||||||
|  |  | ||||||
|  | @ -11,4 +11,8 @@ | ||||||
| 	<dllmap dll="FAudio" os="windows" target="FAudio.dll"/> | 	<dllmap dll="FAudio" os="windows" target="FAudio.dll"/> | ||||||
| 	<dllmap dll="FAudio" os="osx" target="libFAudio.0.dylib"/> | 	<dllmap dll="FAudio" os="osx" target="libFAudio.0.dylib"/> | ||||||
| 	<dllmap dll="FAudio" os="linux,freebsd,netbsd" target="libFAudio.so.0"/> | 	<dllmap dll="FAudio" os="linux,freebsd,netbsd" target="libFAudio.so.0"/> | ||||||
|  | 
 | ||||||
|  | 	<dllmap dll="Wellspring" os="windows" target="Wellspring.dll"/> | ||||||
|  | 	<dllmap dll="Wellspring" os="osx" target="libWellspring.0.dylib"/> | ||||||
|  | 	<dllmap dll="Wellspring" os="linux,freebsd,netbsd" target="libWellspring.so.0"/> | ||||||
| </configuration> | </configuration> | ||||||
|  |  | ||||||
|  | @ -6,11 +6,11 @@ namespace MoonWorks.Graphics.Font | ||||||
| 	[StructLayout(LayoutKind.Sequential)] | 	[StructLayout(LayoutKind.Sequential)] | ||||||
| 	public struct FontRange | 	public struct FontRange | ||||||
| 	{ | 	{ | ||||||
| 		uint FontSize; | 		public uint FontSize; | ||||||
| 		uint FirstCodepoint; | 		public uint FirstCodepoint; | ||||||
| 		uint NumChars; | 		public uint NumChars; | ||||||
| 		byte OversampleH; | 		public byte OversampleH; | ||||||
| 		byte OversampleV; | 		public byte OversampleV; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	[StructLayout(LayoutKind.Sequential)] | 	[StructLayout(LayoutKind.Sequential)] | ||||||
|  |  | ||||||
|  | @ -11,6 +11,7 @@ namespace MoonWorks.Graphics.Font | ||||||
| 		public Buffer VertexBuffer { get; protected set; } = null; | 		public Buffer VertexBuffer { get; protected set; } = null; | ||||||
| 		public Buffer IndexBuffer { get; protected set; } = null; | 		public Buffer IndexBuffer { get; protected set; } = null; | ||||||
| 		public Texture Texture { get; protected set; } | 		public Texture Texture { get; protected set; } | ||||||
|  | 		public uint PrimitiveCount { get; protected set; } | ||||||
| 
 | 
 | ||||||
| 		public TextBatch(GraphicsDevice graphicsDevice) | 		public TextBatch(GraphicsDevice graphicsDevice) | ||||||
| 		{ | 		{ | ||||||
|  | @ -22,6 +23,7 @@ namespace MoonWorks.Graphics.Font | ||||||
| 		{ | 		{ | ||||||
| 			Wellspring.Wellspring_StartTextBatch(Handle, packer.Handle); | 			Wellspring.Wellspring_StartTextBatch(Handle, packer.Handle); | ||||||
| 			Texture = packer.Texture; | 			Texture = packer.Texture; | ||||||
|  | 			PrimitiveCount = 0; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		public unsafe void Draw(float x, float y, float depth, Color color, string text) | 		public unsafe void Draw(float x, float y, float depth, Color color, string text) | ||||||
|  | @ -46,6 +48,8 @@ namespace MoonWorks.Graphics.Font | ||||||
| 				{ | 				{ | ||||||
| 					throw new System.ArgumentException("Could not decode string!"); | 					throw new System.ArgumentException("Could not decode string!"); | ||||||
| 				} | 				} | ||||||
|  | 
 | ||||||
|  | 				PrimitiveCount += (uint) (text.Length * 2); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -195,6 +195,7 @@ namespace MoonWorks | ||||||
| 			NativeLibrary.SetDllImportResolver(typeof(SDL2.SDL).Assembly, MapAndLoad); | 			NativeLibrary.SetDllImportResolver(typeof(SDL2.SDL).Assembly, MapAndLoad); | ||||||
| 			NativeLibrary.SetDllImportResolver(typeof(RefreshCS.Refresh).Assembly, MapAndLoad); | 			NativeLibrary.SetDllImportResolver(typeof(RefreshCS.Refresh).Assembly, MapAndLoad); | ||||||
| 			NativeLibrary.SetDllImportResolver(typeof(FAudio).Assembly, MapAndLoad); | 			NativeLibrary.SetDllImportResolver(typeof(FAudio).Assembly, MapAndLoad); | ||||||
|  | 			NativeLibrary.SetDllImportResolver(typeof(WellspringCS.Wellspring).Assembly, MapAndLoad); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		#endregion | 		#endregion | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue