[PyOpenGL-Devel] Extension functions in Python3 on Win32
Brought to you by:
mcfletch
From: Rob R. <r.r...@sc...> - 2012-04-27 11:07:04
|
Hi, We noted that extension functions do not work properly in Py3 on Win32. The problem is that the function name is passed as a (unicode) str to Win32Platform.getExtensionProcedure (which is a static method referring to OpenGL.wglGetProcAddress), which is called from BasePlatform.constructFunction The solution is of course to encode the the name, the question is where to do this? I expect that all platforms that use getExtensionProcedure (those that have self.EXTENSIONS_USE_BASE_FUNCTIONS==False, i.e. Win32, GLX, OSMESA) have a function that expects bytes, not str. So I would propose to put pointer = self.getExtensionProcedure( as_8_bit(functionName) ) in BasePlatform.constructFunction. Should I go ahead and implement this and create a pull request, or should this be implemented somewhere else? Rob --------------------------------------------- Rob Reilink, M.Sc Science Applied phone: +31 6 187 26562 e-mail: r.r...@sc... --------------------------------------------- |