Ejemplo n.º 1
0
 def __init__(self, width, height, config=None, share_group=None, **kwds):
     #print "GLPixmap:", width, height, kwds ###
     config = GLConfig._from_args(config, kwds)
     dc0 = win_none.GetDC()
     dc = dc0.CreateCompatibleDC(dc0)
     bm = ui.CreateBitmap()
     bm.CreateCompatibleBitmap(dc0, width, height)
     win_none.ReleaseDC(dc0)
     dc.SelectObject(bm)
     self._win_dc = dc
     self._win_bm = bm
     hdc = dc.GetSafeHdc()
     win_dump_bitmap(bm)  ###
     GLContext.__init__(self, share_group, config, hdc, 'pixmap')
     self._with_context(hdc, self._init_context)
Ejemplo n.º 2
0
def _get_win_ppi():
    dc = win_none.GetDC()
    ppi = dc.GetDeviceCaps(wc.LOGPIXELSY)
    win_none.ReleaseDC(dc)
    return ppi
Ejemplo n.º 3
0
 def supported(self, mode='both'):
     dc = win_none.GetDC()
     hdc = dc.GetSafeHdc()
     ipf, actpf = self._win_supported_pixelformat(hdc, mode)
     win_none.ReleaseDC(dc)
     return GLConfig._from_win_pixelformat(actpf)