How to use opengl on a raspberry pi 3? - Reddit
文章推薦指數: 80 %
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
延伸文章資訊
- 1Running OpenGL Shaders on the Raspberry Pi - Antonin ...
So I've accepted the mission to run shaders from Shadertoy, on the Raspberry Pi! The Linux Graphi...
- 2VC4 and V3D OpenGL drivers for Raspberry Pi: an update
The GPU bundled with Raspberry Pi 4 is a VideoCore VI capable of OpenGL ES 3.2, a significant ste...
- 3Raspberry Pi "V3D" OpenGL Driver Improving Performance ...
Raspberry Pi "V3D" OpenGL Driver Improving Performance With On-Disk Shader Cache. Written by Mich...
- 4OpenGl 3.3 on Raspberry Pi 4 8gb
OpenGL is not just a software library, it's a software interface to hardware features of the grap...
- 5Trying out OpenGL on Raspberry Pi 3
Testing the Raspberry Pi 3 with OpenGL drivers on some games that need hardware accelerated graph...