J'essaie de créer une fenêtre avec une glutte dans Python et d'avoir le code suivant:
int glutCreateWindow(char *name);
4 Réponses :
Je viens de rencontrer exactement le même problème et j'ai trouvé cette entrée de blog: p>
http://codeyarns.com/2012/04/27/pyopengl-glut- CTTYPES-ERROR / P>
Fondamentalement, vous devez spécifier que vous passez des données d'octets qui passent plutôt qu'une chaîne utilisant le titre B'Window ' code> p> p>
sur Windows 7 64 bits avec Intel Core Duo
installé: Python-3.4.0.amd64.exe P>
python -m pip --upgrade pip pip install image pip install numpy pip install PyOpenGL-3.1.1-cp34-cp34m-win_amd64.whl pip install PyOpenGL_accelerate-3.1.1-cp34-cp34m-win_amd64.whl
En dehors de Ajouter un B code> Avant la chaîne:
bytes("MyWindow","ascii")
def glutCreateWindow(title): """Create window with given title This is the Win32-specific version that handles registration of an exit-function handler """ return __glutCreateWindowWithExit(bytes(title,"ascii"), _exitfunc)