def tkCreateContext(self): self.__window = GetDC(self.winfo_id()) pixelformat = ChoosePixelFormat(self.__window, pfd) SetPixelFormat(self.__window, pixelformat, pfd) self.__context = wglCreateContext(self.__window) wglMakeCurrent(self.__window, self.__context)
def tkMakeCurrent(self): if self.winfo_ismapped(): wglMakeCurrent(self.__window, self.__context)
def OpenGLActiveContext(self): wglMakeCurrent(self.hdc, self.hrc)