Ejemplo n.º 1
0
 def __del__(self):
     if self._text_dlist:
         glDeleteLists(self._text_dlist, 1)
         self._text_dlist=0
     self._current_font_display_lists=None
     self._text_document._free()
     del self._text_document
Ejemplo n.º 2
0
 def __del__(self):
     if self._text_dlist:
         glDeleteLists(self._text_dlist, 1)
         self._text_dlist = 0
     self._current_font_display_lists = None
     self._text_document._free()
     del self._text_document
Ejemplo n.º 3
0
 def __del__(self):
     try:
         self._text_document._free()
         del self._text_document
         if self._text_dlist:
             glDeleteLists(self._text_dlist, 1)
             self._text_dlist = 0
         self._current_font_display_lists = None
     except (ModuleNotFoundError, ImportError):
         pass
Ejemplo n.º 4
0
 def __del__(self):
     self._face=None
     if self.atlas.texid:
         glDeleteTextures(1, self.atlas.texid)
         self.atlas.texid=None
         self.atlas=None
     if self.charcode2displaylist:
         for dl in self.charcode2displaylist.values():
             glDeleteLists(dl, 1)
         self.charcode2displaylist.clear()
     self.charcode2displaylist=None
     if self.charcode2glyph:
         self.charcode2glyph.clear()
         self.charcode2glyph=None
     if self.charcode2unichr:
         self.charcode2unichr.clear()
         self.charcode2unichr=None
Ejemplo n.º 5
0
 def __del__(self):
     self._face=None
     if self.atlas.texid:
         glDeleteTextures(1, self.atlas.texid)
         self.atlas.texid=None
         self.atlas=None
     if self.charcode2displaylist:
         for dl in self.charcode2displaylist.values():
             glDeleteLists(dl, 1)
         self.charcode2displaylist.clear()
     self.charcode2displaylist=None
     if self.charcode2glyph:
         self.charcode2glyph.clear()
         self.charcode2glyph=None
     if self.charcode2unichr:
         self.charcode2unichr.clear()
         self.charcode2unichr=None
Ejemplo n.º 6
0
 def _deleteGridLinesDL(self):
     if self._gridlines_dlist:
         glDeleteLists(self._gridlines_dlist, 1)
         self._gridlines_dlist = None
Ejemplo n.º 7
0
 def _deleteTextDL(self):
     if self._text_dlist:
         glDeleteLists(self._text_dlist, 1)
         self._text_dlist = 0
Ejemplo n.º 8
0
 def __del__(self):
     from pyglet import gl
     try:
         gl.glDeleteLists(self._list_id, 1)
     except:
         pass
Ejemplo n.º 9
0
 def __del__(self):
     from pyglet import gl
     try:
         gl.glDeleteLists(self._list_id, 1)
     except:
         pass
Ejemplo n.º 10
0
 def _deleteGridLinesDL(self):
     if self._gridlines_dlist:
         glDeleteLists(self._gridlines_dlist, 1)
         self._gridlines_dlist=None
Ejemplo n.º 11
0
 def _deleteTextDL(self):
     if self._text_dlist:
         glDeleteLists(self._text_dlist, 1)
         self._text_dlist=0
Ejemplo n.º 12
0
 def free(self):
     if self.atlas:
         self.atlas.free()
     if self.charcode2displaylist:
         for dl in self.charcode2displaylist.values():
             glDeleteLists(dl, 1)
Ejemplo n.º 13
0
 def __del__(self):
     if gl.gl_info.have_context():
         try:
             gl.glDeleteLists(self.id, 1)
         except:
             pass