PyOpenGL -- The Python OpenGL Binding

文章推薦指數: 80 %
投票人數:10人

PyOpenGL is the most common cross platform Python binding to OpenGL and related APIs. The binding is created using the standard ctypes library, ... AboutPyOpenGL PyOpenGListhemostcommoncrossplatformPython bindingtoOpenGLandrelated APIs.Thebindingiscreatedusingthestandardctypeslibrary,andis providedunderanextremelyliberalBSD-styleOpen-Sourcelicense. PyOpenGLSupports OpenGLv1.1to4.4 GLES1to3.1(Experimental) GLU EGL,WGL,GLX GLUT,FreeGLUT GLE3(GLExtrusionLibrary) hundredsofextensionstoGL,GLES,EGL,WGLandGLX PyOpenGLisinteroperablewithalargenumberofexternalGUIlibraries forPythonincluding(butnotlimitedto): wxPython PyGame PyQt andPySide PyGTK RawXLib OSMesa RaspberryPiBCM Tkinter(ifyouhaveinstalledtheToglwidgetforTk) PyOpenGL3.xrunson: Python3.3+(3.2supportislikelytowork,butuntested) Python2.7(recommended) Python2.6(forcompatibilitywitholdersoftwareandsystems) PyPy(experimental) Sub-Packages ThePyOpenGLprojectincludesanumberofsub-projects: PyOpenGL,the"OpenGL"packagewheninstalled,providesGL,GLES1, GLES2,GLES3,GLUT,GLU,GLE,WGL,EGLandGLXsubpackages OpenGL_accelerate,acythoncodedacceleratormoduleforPyOpenGL, optional,butrecommendedwhereavailable ThecodeforOpenGL_accelerateisinthecorePyOpenGLrepository, butisdistributedasaseparatePythonpackageandinstallsas OpenGL_accelerate PyOpenGL-Demo,acollectionofsmallstand-alonedemos Younormallywanttorunthesefromthesourcedistribution,as there'snothinginstalledbythepackage OpenGLContext,ateachingand testinglibrarybuiltontopofPyOpenGL(andalotofother libraries) YoudoNOTneedOpenGLContexttousePyOpenGL DownloadingandInstallation TheeasiestwaytoinstallPyOpenGLisusingpip $pipinstallPyOpenGLPyOpenGL_accelerate Youcanalsomanuallydownloadthepackages: PyOpenGL PyOpenGL_accelerate PyOpenGLDemo OpenGLContext unpackthemintotemporarydirectories,changetothosedirectoriesandrun: pythonsetup.py Detailedinstallationinstructionsareavailable. Documentation Thedocumentationcollection providesreferencedocumentation,supportandfeedbackinformationand pointerstomorein-depthdocumentation. SourceCode YoucanworkwithlatestversionofPyOpenGLusingthebzr distributedsourcecodecontroltoolontheLaunchPad code-hostingplatform: bzrbranchlp:pyopenglbzrbranchlp:pyopengl-demobzrbranchlp:openglcontext Contributionsandpatchesareverywelcome. Youcaneither requestamergeviaLaunchPadorsendapatch-setviaemailusing"bzr send"[email protected]. Support BugsandgeneralquestionsarebestreportedandansweredonthePyOpenGL mailinglist. Thelistisfairlylow-traffic. OtherLibraries Therearequiteafew3D-relatedlibrariesavailableforusewith Python,manyofthemeitherbasedon,orextensiblewithPyOpenGL.  PyOpenGL'sauthorcollectspointerstothemonhis site. ThereisanothercommonlyusedbindingofOpenGLfor PythonwhichispartofthePyglet gamedevelopmentenvironment.



請為這篇文章評分?