Updated .gitignore and added Chunk loading and saving

This commit is contained in:
Simon Lübeß
2021-02-24 20:07:02 +01:00
parent afc7594df9
commit 4dcf1b5bec
3 changed files with 53 additions and 9 deletions
+4 -5
View File
@@ -190,17 +190,16 @@ namespace Sandbox.VoxelFun
blendDesc.RenderTarget[0] = .(true, .SourceAlpha, .InvertedSourceAlpha, .Add, .SourceAlpha, .InvertedSourceAlpha, .Add, .All);
_alphaBlendState = new BlendState(_context, blendDesc);
_opaqueBlendState = new BlendState(_context, .Default);
_chunkManager = new ChunkManager(_context, _vertexLayout);
_chunkManager.Texture = _texture..AddRef();
_chunkManager.TextureEffect = _textureEffect..AddRef();
_world = new World();
if(World.CreateWorld("test", 1337, _world) case .Err(.WorldAlreadyExists))
{
World.LoadWorld("test", _world);
}
_chunkManager = new ChunkManager(_context, _vertexLayout, _world);
_chunkManager.Texture = _texture..AddRef();
_chunkManager.TextureEffect = _textureEffect..AddRef();
}
/*
void GenerateTerrain(ref VoxelChunk vc)