def __init__(self, share_group, _ns_pixel_format): GGLContext.__init__(self, share_group) shared_context = self._get_shared_context() if shared_context: ns_share = shared_context._ns_context else: ns_share = None ns_context = NSOpenGLContext.alloc().initWithFormat_shareContext_(_ns_pixel_format, ns_share) self._ns_context = ns_context
def __init__(self, share_group, _ns_pixel_format): GGLContext.__init__(self, share_group) shared_context = self._get_shared_context() if shared_context: ns_share = shared_context._ns_context else: ns_share = None ns_context = NSOpenGLContext.alloc().initWithFormat_shareContext_( _ns_pixel_format, ns_share) self._ns_context = ns_context
def __init__(self, share_group, config, hdc, mode): #print "GLContext: mode =", mode ### GGLContext.__init__(self, share_group) self._config = config self._mode = mode self._win_contexts = {} self._win_contxt = None self._win_context = self._get_cur_win_context(hdc) self._win_dblbuf = True#actpf.dwFlags & wgl.PFD_DOUBLEBUFFER != 0
def __init__(self, share_group, config, hdc, mode): print "GLContext: mode =", mode ### GGLContext.__init__(self, share_group) shared_context = self._get_shared_context() if shared_context: share_ctx = shared_context._win_context else: share_ctx = None ipf, actpf = config._win_supported_pixelformat(hdc, mode) config._check_win_pixelformat(actpf, mode) print "GLContext: Setting pixel format", ipf, "for hdc", hdc ### wgl.SetPixelFormat(hdc, ipf, actpf) print "GLContext: Creating context for hdc", hdc ### ctx = wgl.wglCreateContext(hdc) if share_ctx: wgl.wglShareLists(share_ctx, ctx) self._win_context = ctx self._win_dblbuf = actpf.dwFlags & wgl.PFD_DOUBLEBUFFER != 0
def __init__(self, share_group, config, hdc, mode): print("GLContext: mode =", mode) ### GGLContext.__init__(self, share_group) shared_context = self._get_shared_context() if shared_context: share_ctx = shared_context._win_context else: share_ctx = None ipf, act_attrs = config._win_supported_pixelformat(hdc, mode) if ipf is None: raise GLConfigError #config._check_win_pixelattrs(act_attrs, mode) print("GLContext: Setting pixel format", ipf, "for hdc", hdc) ### WGL.SetPixelFormat(hdc, ipfs) ctx = wgl.wglCreateContext(hdc) if share_ctx: wgl.wglShareLists(share_ctx, ctx) self._win_context = ctx self._win_dblbuf = actpf.dwFlags & wgl.PFD_DOUBLEBUFFER != 0
def __init__(self, share_group, config, kwds): GGLContext.__init__(self, share_group) self._gl_config = config._gtk_get_config()