public override Hash64 GetHash64() { var result = Hash64.Empty; if (mShaderMacroArray.Count > 0) { Hash64.CalcHash64(ref result, ToString()); } return(result); }
public CBlendState GetBlendState(CRenderContext rc, CBlendStateDesc desc) { Hash64 hash = new Hash64(); unsafe { Hash64.CalcHash64(&hash, (byte *)&desc, sizeof(CBlendStateDesc)); } CBlendState state; if (States.TryGetValue(hash, out state) == false) { state = rc.CreateBlendState(desc); States.Add(hash, state); } return(state); }