Skip to content

Commit

Permalink
i want to port to a updated fork of Veldrid! (so this is the last pus…
Browse files Browse the repository at this point in the history
…h of this version)
  • Loading branch information
MrScautHD committed Sep 18, 2024
1 parent 635bffc commit 6f86664
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/Bliss.Test/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ protected virtual void Draw(GraphicsDevice graphicsDevice, CommandList commandLi
// Draw ScreenPass.
commandList.Begin();

// TODO: Is just here because of OPENGL ._.
if (this.FullScreenTexture.SampleCount != TextureSampleCount.Count1) {
commandList.ResolveTexture(this.FullScreenTexture.ColorTexture, this.FullScreenTexture.DestinationTexture);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Bliss.Test/GameSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public GameSettings() {
this.TargetFps = 0;
this.FixedTimeStep = 1.0F / 60.0F;
this.WindowFlags = WindowState.Normal;
this.Backend = GraphicsBackend.OpenGL; // TODO: VeldridStartup.GetPlatformDefaultBackend()
this.Backend = GraphicsBackend.Metal; // TODO: VeldridStartup.GetPlatformDefaultBackend()
this.VSync = true;
this.SampleCount = TextureSampleCount.Count2;
this.SampleCount = TextureSampleCount.Count1;
}
}
16 changes: 3 additions & 13 deletions src/Bliss/Bliss.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,12 @@

<!-- Libraries -->
<ItemGroup>
<PackageReference Include="AssimpNet" Version="5.0.0-beta1" />
<PackageReference Include="FontStashSharp" Version="1.3.7" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
<PackageReference Include="Veldrid" Version="4.9.0" />
<PackageReference Include="Veldrid.SPIRV" Version="1.0.15" />
<PackageReference Include="Veldrid.StartupUtilities" Version="4.9.0" />
<PackageReference Include="Veldrid.Utilities" Version="4.9.0" />
</ItemGroup>

<!-- Native SDL2 -->
<ItemGroup>
<Content Include="runtimes/**/*" Pack="true">
<Link>%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<PackageReference Include="AssimpNet" Version="5.0.0-beta1" />
<PackageReference Include="FontStashSharp" Version="1.3.7" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
</ItemGroup>

<!-- Content -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public PrimitiveBatch(GraphicsDevice graphicsDevice, Window window, OutputDescri
// Create pipelines.
SimplePipelineDescription pipelineDescription = new SimplePipelineDescription() {
BlendState = BlendState.AlphaBlend.Description,
DepthStencilState = new DepthStencilStateDescription(false, false, ComparisonKind.LessEqual),
DepthStencilState = new DepthStencilStateDescription(true, true, ComparisonKind.LessEqual),
RasterizerState = new RasterizerStateDescription() {
DepthClipEnabled = true,
CullMode = FaceCullMode.None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,10 @@ private SimplePipeline GetOrCreatePipeline(Effect effect, BlendState blendState)
if (!this._cachedPipelines.TryGetValue((effect, blendState), out SimplePipeline? pipeline)) {
SimplePipeline newPipeline = new SimplePipeline(this.GraphicsDevice, new SimplePipelineDescription() {
BlendState = blendState.Description,
DepthStencilState = new DepthStencilStateDescription(false, false, ComparisonKind.LessEqual),
DepthStencilState = new DepthStencilStateDescription(true, true, ComparisonKind.LessEqual),
RasterizerState = new RasterizerStateDescription() {
DepthClipEnabled = true,
CullMode = FaceCullMode.None,
ScissorTestEnabled = true
CullMode = FaceCullMode.None
},
PrimitiveTopology = PrimitiveTopology.TriangleList,
Buffers = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public FullScreenRenderPass(GraphicsDevice graphicsDevice, OutputDescription out
// Create pipeline.
this._pipeline = new SimplePipeline(graphicsDevice, new SimplePipelineDescription() {
BlendState = BlendState.AlphaBlend.Description,
DepthStencilState = new DepthStencilStateDescription(false, false, ComparisonKind.LessEqual),
DepthStencilState = new DepthStencilStateDescription(true, true, ComparisonKind.LessEqual),
RasterizerState = new RasterizerStateDescription() {
DepthClipEnabled = true,
CullMode = FaceCullMode.None
Expand Down
Binary file removed src/Bliss/runtimes/osx-x64/libsdl2.dylib
Binary file not shown.
Binary file removed src/Bliss/runtimes/win-x64/SDL2.dll
Binary file not shown.
Binary file removed src/Bliss/runtimes/win-x86/SDL2.dll
Binary file not shown.

0 comments on commit 6f86664

Please sign in to comment.