Esempio n. 1
0
        public void Clear(ClearMask mask)
        {
            this.CheckUpdate();
            int errorCode = PsmGraphicsContext.Clear(this.handle, mask);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
        }
Esempio n. 2
0
 public void Clear(ClearMask mask)
 {
     if ((mask & ClearMask.ColorBuffer) == ClearMask.ColorBuffer)
     {
         _framebuffer.ClearColorBuffer();
     }
     if ((mask & ClearMask.DepthBuffer) == ClearMask.DepthBuffer)
     {
         _framebuffer.ClearColorBuffer();
     }
 }
Esempio n. 3
0
    public void Clear(ClearMask mask, Color?clearColor = null, float depth = float.PositiveInfinity)
    {
        Color realClearColor = clearColor == null ? Color.clear : clearColor.Value;

        for (int i = 0; i < m_FrameBuffer.m_Width; i++)
        {
            for (int j = 0; j < m_FrameBuffer.m_Height; j++)
            {
                if ((mask & ClearMask.COLOR) > 0)
                {
                    m_FrameBuffer.SetColor(i, j, realClearColor);
                }
                if ((mask & ClearMask.DEPTH) > 0)
                {
                    m_FrameBuffer.SetDepth(i, j, depth);
                }
            }
        }

        m_FrameBuffer.Apply();
    }
Esempio n. 4
0
 public void Clear(ClearMask mask)
 {
     NativeGl.glClear((uint)mask);
 }
Esempio n. 5
0
 static extern void Graphics_Clear(ClearMask mask);
Esempio n. 6
0
 public static void Clear(ClearMask mask)
 {
     Graphics_Clear(mask);
 }
Esempio n. 7
0
 public static extern int Clear(int handle, ClearMask mask);