private void ShutdownLineBuffers() { // Release the index buffer. LineIndexBuffer?.Dispose(); LineIndexBuffer = null; // Release the vertex buffer. LineVertexBuffer?.Dispose(); LineVertexBuffer = null; }
public Line(float pX1, float pY1, float pX2, float pY2, float pLineWidth) : base(pX1, pY1) { this.mX2 = pX2; this.mY2 = pY2; this.mLineWidth = pLineWidth; this.mLineVertexBuffer = new LineVertexBuffer(GL11Consts.GlStaticDraw); BufferObjectManager.GetActiveInstance().LoadBufferObject(this.mLineVertexBuffer); this.UpdateVertexBuffer(); float width = this.GetWidth(); float height = this.GetHeight(); this.mRotationCenterX = width * 0.5f; this.mRotationCenterY = height * 0.5f; this.mScaleCenterX = this.mRotationCenterX; this.mScaleCenterY = this.mRotationCenterY; }