public unsafe void CopyFromCache(GLCachedBuffer SourceBuffer, CopyMethod CopyOptions) { if (SourceBuffer == null) { throw new Exception("Cannot accept a null buffer!"); } lock (ThreadLock) { ops.bptr = (byte *)DrawingBuffer; ops.dptr = (float *)DepthBuffer; ops.iptr = (int *)DrawingBuffer; CD = SourceBuffer; ops.CDptr = (float *)CD.Z_ptr; ops.CPptr = (byte *)CD.RGB_ptr; ops.CIptr = (int *)CD.RGB_ptr; if (CopyOptions == CopyMethod.Memcpy) { CopyQuickReverse(); } else if (CopyOptions == CopyMethod.SplitLoop) { CopyQuickSplitLoop(); } else { CopyQuickReverseDepthTest(); } } }
internal void UnBindFrameBuffer(GLCachedBuffer CB) { if (LinkedCacheBuffers.Contains(CB)) { LinkedCacheBuffers.Remove(CB); } }
internal void BindCachedBuffer(GLCachedBuffer CB) { if (LinkedCacheBuffers.Contains(CB)) { throw new Exception("Cached Buffer Already Exists!"); } else { LinkedCacheBuffers.Add(CB); } }
public void CreateCopyOnDraw(GLCachedBuffer TargetBuffer) { if (TargetBuffer == null) { throw new Exception("Cannot accept a null buffer!"); } lock (ThreadLock) { RequestCopyAfterDraw = true; CD = TargetBuffer; } }