What's the possible usage of glFramebufferRenderbuffer ...
文章推薦指數: 80 %
OpenGL glFramebufferRenderbuffer() get error - Stack Overflow 2022DeveloperSurveyisopen!Takesurvey. Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore What'sthepossibleusageofglFramebufferRenderbufferunderGLES2? AskQuestion Asked 5years,1monthago Modified 5years,1monthago Viewed 1ktimes 2 I'mtryingtogetmyopenglframeworktorunonaraspberrypi3,usingGLES2. Onthecoreprofile,Idothis: glGenRenderbuffers(1,&ColorBufferGLID); glBindRenderbuffer(GL_RENDERBUFFER,ColorBufferGLID); glRenderbufferStorage(GL_RENDERBUFFER,GL_RGBA,Dimensions.x,Dimensions.y); glFramebufferRenderbuffer(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_RENDERBUFFER,ColorBufferGLID); glGenRenderbuffers(1,&DepthBufferGLID); glBindRenderbuffer(GL_RENDERBUFFER,DepthBufferGLID); glRenderbufferStorage(GL_RENDERBUFFER,GL_DEPTH_COMPONENT32F,Dimensions.x,Dimensions.y); glFramebufferRenderbuffer(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_RENDERBUFFER,DepthBufferGLID); glBindFramebuffer(GL_READ_FRAMEBUFFER,OpenGLID); glBindFramebuffer(GL_DRAW_FRAMEBUFFER,0); glBlitFramebuffer(In_LowerLeft.x,In_LowerLeft.y,In_UpperRight.x,In_UpperRight.y, In_LowerLeft.x,In_LowerLeft.y,In_UpperRight.x,In_UpperRight.y, GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT, GL_NEAREST); AndunderGLES2,Idothesame,butwithdifferentenums,butlateron,thereisnoglBlitFramebuffer,soIcannotdisplayit. IknowIcandothesamewithatextureinsteadofarenderbuffer,usingglFramebufferTexture2D,butthenI'dhavetodrawascreen-sizedquadjusttoshowit. IfIcannotblitorreadfromtherenderbuffer,what'sthepointofit?Howcanitbeused?HowelsecanIadaptthispieceofcodetoGLES2? opengl-esopengl-es-2.0 Share Follow editedMar31,2017at15:23 genpfault 49.3k1010goldbadges7979silverbadges128128bronzebadges askedMar31,2017at15:19 JoaoPinchoJoaoPincho 86911goldbadge1111silverbadges2525bronzebadges Addacomment | 1Answer 1 Sortedby: Resettodefault Highestscore(default) Datemodified(newestfirst) Datecreated(oldestfirst) 0 AsnotedbythedocumentationforRenderbufferObjectsontheOpenGLWiki, theonlywaytousearenderbufferobjectistoattachittoa FramebufferObject.AfteryoubindthatFBOtothecontext,andsetup thedraworreadbuffersappropriately,youcanusepixeltransfer operationstoreadandwritetoit. So,youcanusepixeltransferoperationstoread/writeto/fromit(eg.glReadPixels/glDrawPixels).It'salsousefulifyoudon'tneeddirectaccesstothebuffer,butrequireitforrendering.Forexample,adepthbuffer,usedtorenderanoffscreentarget,butwhichisneverdirectlysampleditself. Toyourquestionofhowtoportthecode-glBlitFramebufferisavailableinOpenGLES3.0.IfyoumusttargetOpenGL2.0,yoursuggestionofdrawingascreen-sizedquadisareasonablesolution.Althoughpossible,IwouldnotsuggestusingglReadPixelsandglDrawPixels,asthisrequiresalldatabedownloadedintosystemmemory,whichwillbeveryslow. Share Follow answeredApr7,2017at13:21 MuertoExcobitoMuertoExcobito 9,26822goldbadges3333silverbadges7171bronzebadges Addacomment | YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedopengl-esopengl-es-2.0oraskyourownquestion. TheOverflowBlog Makeyouropen-sourceprojectpublicbeforeyou’reready(Ep.444) Thescienceofinterviewingdevelopers FeaturedonMeta AnnouncingthearrivalofValuedAssociate#1214:Dalmarus Improvementstositestatusandincidentcommunication RetiringOurCommunity-SpecificClosureReasonsforServerFaultandSuperUser Temporarilypausingthesitesatisfactionsurvey StagingGround:ReviewerMotivation,Scaling,andOpenQuestions Related 7 OpenGLESrendertotexture,thendrawtexture 12 HowtocreateaFBOwithstencilbufferinOpenGLES2.0? 15 AndroidOpenGLESFramebufferobjects-renderingdepth-buffertotexture 0 iPhoneDev:RenderDepthBuffertoTextureresultsinblacktexture 2 Howtocorrectlyload/unloadtexturesfromvideomemory? 0 HowtodrawRenderbufferasTexturebufferinFBO? 11 HowtoemulateanaccumulationbufferinOpenGLes2.0(TrailingParticlesEffect) 9 HowtorestoreaGL_RENDERBUFFER? 0 FreeType-TextureAtlas-Whyismytextrenderingasquad? HotNetworkQuestions Meaningofclappingattheendofmass HowcanItellwhich3rdpartyflashesarecompatiblewithCanon'sSL3missingpinhotshoemount? Canarunascendinglistbemade? GapsincardinalitiesofMADfamilies Tryingtouseacaralternatorforapowersource(notforcar) Astronautisdeludedintotakinghishelmetoff(anddies) Alphaparticlemovingfasterthanthespeedoflight? USAssistantProfsalarynegotiationwithcounterofferbeforegoingupfortenure Colourina5by5grid,withevolutionrules,sothatthestartinggridisthesameastheoutputgrid Softwareforcreatinghand-writtenslidesthatarerevealedgradually UnabletomountaLinuxRAIDarray Wouldn'tMiller'splanetbefriedbyblueshiftedradiation? Whatdoyoucalladesperateattemptunlikelytosucceed? WhattapeformatdidtheNintendoFamicomDataRecorderuse? Can'tmultiplywidthin\newcommandforincludegraphics AquestionregardingisomorphismincohomologyformodulispaceofstablebundlesoveracompactRiemannsurface Isitillegaltorideadrunkhorse? HowcanIcreateaLocalewithaspecificscriptcode? GameinJamesBondfilm"FromRussiawithlove" DifferencebetweenfirewallandACL Longestgeometricprogressionofprimes CovidTestRequirementforDubaiTransitFromIrelandtoIndonesia WhatwasthereasonforextendingNATOinthe90s? Arethereany/manyUSairports(withinstrumentapproaches)stillwithoutRNAVapproaches? morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings
延伸文章資訊
- 1android.opengl.GLES20.glFramebufferRenderbuffer java ...
public void glFramebufferRenderbufferEXT(int param1, int param2, int param3, int param4) { GLES20...
- 2glFramebufferRenderbuffer - OpenGL ES 3 Reference Pages
glFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the currently ...
- 3org.lwjgl.opengl.GL30C.glFramebufferRenderbuffer java code ...
public static void glFramebufferRenderbuffer(@NativeType("GLenum") int ... glFramebufferRenderbuf...
- 4What's the possible usage of glFramebufferRenderbuffer ...
OpenGL glFramebufferRenderbuffer() get error - Stack Overflow
- 5创建一个帧缓冲 - LearnOpenGL-CN
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo);. 在帧...