void Dispose(bool fin) { state = CacheableState.Disposed; if (driverPart != null) { driverPart.Dispose(); driverPart = null; } if (!fin) { GC.SuppressFinalize(this); } else { Common.NotDisposed(this, "If shader is created manually, you must dispose it, otherwise dispose the ShaderCode."); } }
/// <summary> /// Constructor from device. /// </summary> /// <param name="d">The ShaderCode.</param> /// <param name="s">The shader.</param> internal VShader(FixedShaderParameters f, Driver.IVShader s) { driverPart = s; fixedParams = f; }