Exemple #1
0
 public void Dispose()
 {
     if (vectors != null)
     {
         vectors.Clear();
     }
     if (batch != null)
     {
         batch.Dispose();
         batch = null;
     }
     if (_XnaToGL != null)
     {
         _XnaToGL = null;
     }
     if (polyLazy != null)
     {
         foreach (XNAPolyline line in polyLazy.Values)
         {
             if (line != null)
             {
                 line.Dispose();
             }
         }
         polyLazy.Clear();
         polyLazy = null;
     }
 }
Exemple #2
0
 public void Dispose()
 {
     if (vectors != null)
     {
         vectors.Clear();
     }
     if (batch != null)
     {
         batch.Dispose();
         batch = null;
     }
     if (_XnaToGL != null)
     {
         _XnaToGL = null;
     }
     if (polyLazy != null)
     {
         foreach (XNAPolyline line in polyLazy.Values)
         {
             if (line != null)
             {
                 line.Dispose();
             }
         }
         polyLazy.Clear();
         polyLazy = null;
     }
 }
Exemple #3
0
 public GLBatch(int maxVertices)
 {
     this.batch = new XNA_GL(maxVertices);
     this.maxVertices = maxVertices;
 }
Exemple #4
0
 public GLBatch()
 {
     batch = new XNA_GL();
 }
Exemple #5
0
        public GLEx(GraphicsDevice device, LFont f)
        {
            GLEx.device = device;
            GLEx.cemera = new GLExCamera(device);
            clipRasterizerState = new RasterizerState() { ScissorTestEnable = true };
            device.RasterizerState = RasterizerState.CullNone;
            device.DepthStencilState = DepthStencilState.None;
            cemera.viewMatrix = cemera.Result;
            if (f == null)
            {
                SetFont(LFont.GetDefaultFont());
            }
            else
            {
                SetFont(f);
            }
            this.xnaClip = new RectBox(LSystem.screenRect);
            this.font = LFont.GetDefaultFont();
            this.innterBatch = new SpriteBatch(device);
            this.rectangle = new Rectangle(0, 0, 0, 0);
            this.postion = new Vector2(0, 0);
            this.color = Color.White;

            WhitePixel = new Texture2D(device, 1, 1, true, SurfaceFormat.Color);
            Color[] pixels = { Color.White };
            WhitePixel.SetData(pixels);
            GLEx.self = this;

            GLEx.gl = new GL();
            GLEx.gl10 = new GL10();

            shape = XNA_GL.LoadGLShape;
        }
Exemple #6
0
 public void Dispose()
 {
     this.initBatch = false;
     this.isClose = true;
     this.isDirty = false;
     this.useFont = false;
     this.useGLBegin = false;
     if (innterBatch != null)
     {
         innterBatch.Dispose();
         innterBatch = null;
     }
     if (batchSprite != null)
     {
         batchSprite.Dispose();
         batchSprite = null;
     }
     if (shape != null)
     {
         shape.Dispose();
         shape = null;
     }
     if (font != null)
     {
         font.Dispose();
         font = null;
     }
     GLEx.device = null;
     GLEx.cemera = null;
     if (WhitePixel != null)
     {
         WhitePixel.Dispose();
         WhitePixel = null;
     }
 }
Exemple #7
0
 public GLBatch(int maxVertices)
 {
     this.batch       = new XNA_GL(maxVertices);
     this.maxVertices = maxVertices;
 }
Exemple #8
0
 public GLBatch()
 {
     batch = new XNA_GL();
 }