Example #1
0
        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();
                }
            }
        }
Example #2
0
 internal void UnBindFrameBuffer(GLCachedBuffer CB)
 {
     if (LinkedCacheBuffers.Contains(CB))
     {
         LinkedCacheBuffers.Remove(CB);
     }
 }
Example #3
0
 internal void BindCachedBuffer(GLCachedBuffer CB)
 {
     if (LinkedCacheBuffers.Contains(CB))
     {
         throw new Exception("Cached Buffer Already Exists!");
     }
     else
     {
         LinkedCacheBuffers.Add(CB);
     }
 }
Example #4
0
        public void CreateCopyOnDraw(GLCachedBuffer TargetBuffer)
        {
            if (TargetBuffer == null)
            {
                throw new Exception("Cannot accept a null buffer!");
            }



            lock (ThreadLock)
            {
                RequestCopyAfterDraw = true;
                CD = TargetBuffer;
            }
        }