public override void Dispose() { if (_vbo != null) { _vbo.Dispose(); _vbo = null; } base.Dispose(); }
internal DrawingGL.VertexBufferObject GetVbo() { if (_vbo != null) { return(_vbo); } _vbo = new VertexBufferObject(); _vbo.CreateBuffers(this.VertexCoords, this.IndexArray); return(_vbo); }
public void DrawString(GLRenderVxFormattedString renderVx, double x, double y) { _pcx.LoadTexture(_glBmp); _pcx.FontFillColor = _painter.FontFillColor; DrawingGL.GLRenderVxFormattedString renderVxString1 = (DrawingGL.GLRenderVxFormattedString)renderVx; DrawingGL.VertexBufferObject vbo = renderVxString1.GetVbo(); vbo.Bind(); _pcx.DrawGlyphImageWithSubPixelRenderingTechnique4_FromLoadedVBO(renderVxString1.IndexArrayCount, (float)x, (float)y); vbo.UnBind(); }
internal void DisposeVbo() { //dispose only VBO //and we can create the vbo again //from VertexCoord and IndexArray if (_vbo != null) { _vbo.Dispose(); _vbo = null; } }