Added textures for Blocks

This commit is contained in:
Simon Lübeß
2021-03-24 14:44:02 +01:00
parent 1b00fa67a5
commit 5873f12643
10 changed files with 269 additions and 31 deletions
+1 -2
View File
@@ -84,7 +84,6 @@ namespace Sandbox.VoxelFun
private HashSet<Int32_3> _generatingChunks = new .() ~ delete _;
private Monitor _generatingChunksLock = new .() ~ delete _;
public Texture2D Texture ~ _?.ReleaseRef();
public Effect TextureEffect ~ _?.ReleaseRef();
VoxelGeometryGenerator voxelGeoGen = new VoxelGeometryGenerator() ~ delete _;
@@ -618,7 +617,7 @@ namespace Sandbox.VoxelFun
chunkGeo.AddRef();
Texture.Bind();
BlockTextures.Atlas.Bind();
Renderer.Submit(chunk.Geometry, TextureEffect, chunk.Transform);
chunkGeo.ReleaseRef();