PyOpenGL Installation - SourceForge

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

Most users of PyOpenGL should use pip to install PyOpenGL automatically. It can be installed either to the system Python or a Virtualenv. MostusersofPyOpenGLshouldusepip toinstallPyOpenGLautomatically.Itcanbeinstalledeithertothe systemPythonoraVirtualenv. $pipinstallPyOpenGLPyOpenGL_accelerate ManualInstallation Ifyoucannot,orwouldprefernotto,usepip,youcan downloadthepackagefromPyPI. PyOpenGL PyOpenGL_accelerate PyOpenGLDemo ThepackageusesSetuptools foritsinstallation. $tar-zxvfPyOpenGL-3.1.0.tar.gz $cdPyOpenGL-3.1.0 $pythonsetup.pyinstall Ifyouwouldlikethe(optional)PyOpenGL-acceleratepackage,downloadit fromthePyOpenGL_accelerate PyPIpage andfollowthesamebasicsteps: NotethatyouwillrequireaworkingCcompilerto compilethePyOpenGL-acceleratepackage.Pre-builtpackagesareavailable forMSWindows32andMSWindows64users. $tar-zxvfPyOpenGL-accelerate-3.1.0.tar.gz $cdPyOpenGL-accelerate-3.1.0 $pythonsetup.pyinstall RecommendedEnhancementsforPyOpenGL Numpy GLUTorFreeGLUT Availableasanrpm/deb/ebuildformostmodernLinuxmachines TheWin32andWin64binaryinstallersforPyOpenGLincludeacopy ofGLUT Python ImagingLibrary(PIL)anyrecentversion  GLE TheGLExtrusionlibrary,availableonmostLinuxdistributions (libgle3) TheWin32packageofPyOpenGLincludesacopyofGLEcompiledasa DLL NotethatToglsupportisdeprecated, it'sthereforlegacycode(onceyoucompileTogl),butyoushould chooseaGUIlibrarythathasOpenGLsupportbuilt-inforany newdevelopment. Toglsupporthasbeendroppedduetothe complexityofcompilationandtheheadacheofmaintenance. There areprojectswhichattempttoprovideToglsupport,feelfreeto installthoseintoyourPython'sTkinstallationifyouneedToglunder Python. OpenGLContextInstallation OpenGLContextisaverylargepackagethatdependsonalargenumber ofotherpackagestofunction.YoudoNOTneed OpenGLContexttoworkwithPyOpenGL. BasicinstallationofOpenGLContextisasfollows(notethatyoumust explicitlyspecifytheOpenGLContextandPyVRML97releasesastheyarenot currentlyinfinal/productionreleasesonPyPI): $virtualenvoglc-env $sourceoglc-env/bin/activate (oglc-env)$pipinstallPyOpenGLPyOpenGL_accelerate"PyVRML97==2.3.0a4"simpleparsenumpy"OpenGLContext==2.2.0a3"pydispatcherpillow Onceyouhavethedependencies,youcaninstallOpenGLContextitself $pipinstallPyDispatcherPyVRML97OpenGLContext RecommendedEnhancementsforOpenGLContext TTFQuery and FontTools ProvideaccesstoTrueTypefontsstoredinthefilesystem, usedbythe"toolsfont"and"pygamefont"modulesinthe scenegraph/text package. Withoutthesemodules,youwillnothaveaccessto extrudedfonts(toolsfont)orantialiasedbitmapfonts(pygamefont) wxPython and/or  PyGame  Additionalcontexts/windowingenvironments,onlyGLUTcontexts areavailableotherwise. PyGamealsoprovidesantialiasedbitmapfonts,whilewxPython canprovidealiasedbitmapfontsifnecessary win32all  win32uiandwin32conprovidesupportforWGL-basedpolygonal text,onlyavailableforWin32systemsofcourse. TheWGL polygonaltextisnotusedbythescenegraphengine,soitisnot requiredforanythingsaveplayingwiththeWGLpolygonaltext demonstrationmodule. BZR(Developer)Install IfyouwouldliketocontributetoPyOpenGLdevelopmentorjustneed toridethebleedingedge,youwilllikelywanttoworkwitha source-codecheckout. Youwillneedthe Bazaar (bzr)tooltoworkwiththerepository: $bzrbranchlp:pyopengl $cdpyopengl $pythonsetup.pydevelop--user $cdOpenGL_accelerate $pythonsetup.pydevelop--user $cd../../ TocontributetoOpenGLContextdevelopment(ortorunthetests,for instance): $bzrbranchlp:pyvrml97 $cdpyvrml97 $pythonsetup.pydevelop--user $cd../ $bzrbranchlp:openglcontext $cdopenglcontext $pythonsetup.pydevelop--user Tocontributeyourchangesback,eitherpublish yourbranchpublicly(forinstanceonLaunchPad)orcreatea"merge directive"[email protected]: bzrsend-omy-changes.diff Notethatyou'llneedtosubscribetopyopengl-devel topostchangestoit. IfyoupreferyoucansendthemtoMike Fletcherinstead. BuildingDocumentation ThedocumentationbuildsystemiscompletelyrewrittenforPyOpenGL 3.xandisfareasiertouseandfaster (atleastacoupleof ordersofmagnitude)thantheoldJava-baseddocbookprocessor. bzrbranchlp:~mcfletch/pyopengl/directdocscddirectdocs./samples.py./references.py./generate.py./upload.py The lastcommandwillnotworkunlessyouhappentobeme.Youneedthe lxml.etreeandkidpackagesinstalledtorunthegenerator(alsobzr, svn,PyOpenGL,cvs,etceteras).



請為這篇文章評分?