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



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