public void Dispose() { InstanceBuffer.Dispose(); MaterialBuffer.Dispose(); PassCB.Dispose(); CmdListAlloc.Dispose(); }
public void Dispose() { MaterialBuffer.Dispose(); ObjectCB.Dispose(); PassCB.Dispose(); CmdListAlloc.Dispose(); }
bool MaterialBufferIdOverlap() { try { // 13 is already used by MaterialBufferTest, so it should throw testBuffer = new MaterialBuffer <MaterialBufferStruct>(13); } catch { return(true); } return(false); }
bool MaterialBufferId() { try { // ids for 0-2 should see MaterialBuffer throw an exceptions testBuffer = new MaterialBuffer <MaterialBufferStruct>(2); } catch { return(true); } return(false); }
/// <summary> /// Function to perform clean up on the shader state. /// </summary> internal void CleanUp() { ConstantBuffers[0] = null; if (DefaultPixelShaderDiffuseMaterial != null) { DefaultPixelShaderDiffuseMaterial.Dispose(); } if (DefaultPixelShaderTexturedMaterial != null) { DefaultPixelShaderTexturedMaterial.Dispose(); } if (DefaultPixelShaderDiffuse != null) { DefaultPixelShaderDiffuse.Dispose(); } if (DefaultPixelShaderTextured != null) { DefaultPixelShaderTextured.Dispose(); } DefaultPixelShaderTextured = null; DefaultPixelShaderDiffuse = null; DefaultPixelShaderDiffuseMaterial = null; DefaultPixelShaderTexturedMaterial = null; if (MaterialBuffer != null) { MaterialBuffer.Dispose(); } MaterialBuffer = null; if (AlphaTestValuesBuffer == null) { return; } AlphaTestValuesBuffer.Dispose(); AlphaTestValuesBuffer = null; }
bool MaterialBufferTest() { MaterialBufferStruct data = new MaterialBufferStruct { point = Vec3.One, scale = 2 }; try { testBuffer = new MaterialBuffer <MaterialBufferStruct>(13); testBuffer.Set(data); } catch (Exception e) { Log.Err(e.ToString()); return(false); } return(true); }