How to use opengl on a raspberry pi 3? - Reddit

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

There is some sample c code on raspbian last I checked. This even shows how to use opengl without x windows. Foundtheinternet!7Howtouseopenglonaraspberrypi3? Close7Postedby3yearsagoHowtouseopenglonaraspberrypi3? 16commentssharesavehidereport82%UpvotedLoginorsignuptoleaveacommentLogInSignUpSortby:best level1·3yr.agoTryatutorial.3ReplyShareReportSaveFollowlevel2Op·3yr.agoSorry,butImeanthowtoprogramonopenglusingraspberrypi.Ihavefollowedmanytutorialsonline,butmostIcoulddoisopenawindow.I'mnewtoopenglandaLinuxenvironment.Anyhelpisappreciated.1ReplyShareReportSaveFollowContinuethisthread level1·3yr.agoThereissomesampleccodeonraspbianlastIchecked.Thisevenshowshowtouseopenglwithoutxwindows.2ReplyShareReportSaveFollowlevel2·3yr.agoYep.Under/opt/vc/src/hello_pihello_triangleisagoodstart.AlsotheseexamplesuseEGL,soyoudon'thavetomuckaroundwithGlx1ReplyShareReportSaveFollowlevel1·3yr.agoYoucancheckOpenGLexamplesmyrepohere:https://github.com/mmozeiko/rpiItcontainsexamplecodeforusingOpenGLES2.0andalsoregularOpenGL2.1.Notethatinstructionsthereassumecross-compilationfromdesktop,butthatisnotmandatory,youcanalsocompiledirectlyonRPi.2ReplyShareReportSaveFollowlevel1·3yr.agoYourbestbetwouldbetohavealookatthesamplesprovidedbyBroadcom.Theyliveunder/opt/vc/src/hello_pi.I'dsuggestthehello_triangleexample.Justcdintothehello_triangledirandrunmake.Youshouldbegettingahello_triangle.binfilewhichyoucanrun.Ifyou'reabletogetthesamplerunning,thenhopintothesourcecodeandexperimentaway.PMmeifyou'restuckanywherewhengettingthesamplesupandrunning2ReplyShareReportSaveFollowlevel2Op·3yr.agoThatworked!Iactuallyknewaboutthecodeandthisfolderbutdidn'tknowhowtorunthecode.Butnowit'supandrunning.Goingtomesswiththecodenow.Thankyou!:)2ReplyShareReportSaveFollowlevel1·3yr.agoHaveyoucheckedouthttps://learnopengl.com?It'sagreatincrementalwayoflearningfromscratch.TheauthorusesmodernOpenGLconcepts(Ibelieve3.3specifically).Itwillspareyoufromlearningthelegacywayofdoingthings.TheauthorusesWindowsbutleverageslibrariesavailableonLinux-basedOSstoo.HTH.2ReplyShareReportSaveFollowlevel2·3yr.agoTheproblemwith3.3andaboveisitisnotsupportedbyaRaspberryPi.It'stoobadhehasn'tgivenusanycontext.2ReplyShareReportSaveFollowContinuethisthread level2·3yr.agoI'mnottoosurebutdoesn'ttheVideocoreGPUnotsupportGLES3orgreater?IfyouwantGPUacceleratedOGLonrPiGLES2istheonlywayafaik.ThemesadriverssupportdesktopGLbuttheyrunontheCPUifI'mnotwrong.AnyonewhohasmoreknowledgeofGLonRaspberryPicouldchimeinIguess1ReplyShareReportSaveFollowlevel1·3yr.agoCheckoutglslViewerhttps://github.com/patriciogonzalezvivo/glslViewerIsasmallshaderViewerforlivecoding.Itusesglfwandyoucanseehowtosetuptheenviromentetc.1ReplyShareReportSaveFollowr/openglNews,informationanddiscussionaboutOpenGLdevelopment.20.0kMembers30OnlineCreatedJun6,2009JoinToppostsjanuary1st2019,Toppostsofjanuary,2019,Topposts2019,helpRedditcoinsRedditpremiumaboutcareerspressadvertiseblogTermsContentpolicyPrivacypolicyModpolicyRedditInc©2022.AllrightsreservedBacktoTop Advertisement



請為這篇文章評分?