def _create_gc(self, size, pix_format=None): """ Create a GraphicsContext instance. """ from pyglet.gl import Context gc = GraphicsContext((size[0] + 1, size[1] + 1)) self._pyglet_gl_context = Context() gc.gl_init() gc.translate_ctm(0.5, 0.5) return gc
def _create_gc(self, size, pix_format=None): """ Create a GraphicsContext instance. """ gc = GraphicsContext( (size[0] + 1, size[1] + 1), base_pixel_scale=self.base_pixel_scale, ) self._fake_pyglet_context = FakePygletContext() gc.gl_init() gc.translate_ctm(0.5, 0.5) return gc