コード例 #1
0
        void createCache()
        {
            selectionMap = new byte[ClientRectangle.Width * ClientRectangle.Height * 4];

            if (cacheQuad != null)
            {
                cacheQuad.Dispose();
            }
            cacheQuad       = new QuadVAO(0, 0, ClientRectangle.Width, ClientRectangle.Height, 0, 1, 1, -1);
            cacheProjection = Matrix4.CreateOrthographicOffCenter
                                  (0, ClientRectangle.Width, 0, ClientRectangle.Height, 0, 1);
            initGridFbo();
        }
コード例 #2
0
 public void Dispose()
 {
     if (cacheQuad != null)
     {
         cacheQuad.Dispose();
     }
     if (GL.IsTexture(colorTexId))
     {
         GL.DeleteTexture(colorTexId);
     }
     if (GL.IsTexture(selectionTexId))
     {
         GL.DeleteTexture(selectionTexId);
     }
     if (GL.IsTexture(gridDepthTex))
     {
         GL.DeleteTexture(gridDepthTex);
     }
     if (GL.IsFramebuffer(fboGrid))
     {
         GL.DeleteFramebuffer(fboGrid);
     }
 }