When binding an fbo do you need to call ...
文章推薦指數: 80 %
The attachment bindings are part of the FBO state. You only need to call glFramebufferTexture2D() once, while the FBO is bound. 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 WhenbindinganfbodoyouneedtocallglFramebufferTexture2Deveryframe? AskQuestion Asked 6years,11monthsago Modified 6years,11monthsago Viewed 3ktimes 1 OneachdrawframewhenIbindanFBOamIsupposedtocall GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0,GLES20.GL_TEXTURE_2D, ResourceManager.windowTex[0],0); Areyouonlysupposedtocallthiswhenyouinitializeyourframebufferoreveryframe?Itdoesn'tdrawformeunlessIcallitafterglBindFramebuffer. androidiosopengl-es Share Follow editedMay31,2015at6:00 mas4 90911goldbadge88silverbadges1919bronzebadges askedMay31,2015at4:55 NJGUYNJGUY 1,97533goldbadges2222silverbadges3939bronzebadges Addacomment | 1Answer 1 Sortedby: Resettodefault Highestscore(default) Datemodified(newestfirst) Datecreated(oldestfirst) 3 TheattachmentbindingsarepartoftheFBOstate.YouonlyneedtocallglFramebufferTexture2D()once,whiletheFBOisbound.ThosesametextureswillstillbeattachedwhenyoulaterbindthesameFBOagain. OnepossibletrapisthatthetextureobjectmusthavebeencreatedbeforeitcanbeattachedtoanFBO.Generatingthenamealoneisnotenough,itneedstobeboundatleastoncetocreatetheactualtextureobject.Forexample,thefollowingwouldbeanerror: GLuinttexId=0; glGenTextures(1,&texId); GLuintfboId=0; glGenFramebuffers(1,&fboId); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,texId,0); glBindTexture(GL_TEXTURE_2D,texId); glTexImage2D(...); ThetextureobjectwasnotcreatedinthiscasebeforebeingattachedtotheFBO.Thefollowingontheotherhandisvalid: GLuinttexId=0; glGenTextures(1,&texId); glBindTexture(GL_TEXTURE_2D,texId); glBindTexture(GL_TEXTURE_2D,0); GLuintfboId=0; glGenFramebuffers(1,&fboId); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,texId,0); glBindTexture(GL_TEXTURE_2D,texId); glTexImage2D(...); NotethatthetexturedoesnothavetobecurrentlyboundwhenglFramebufferTexture2D()iscalled,andit'salsonotnecessaryfortexturedatatohavebeenspecifiedatthatpoint.Itjustneedstohavebeenboundatleastoncetotriggercreationofthetextureobject. Share Follow answeredMay31,2015at5:16 RetoKoradiRetoKoradi 51.4k88goldbadges8383silverbadges123123bronzebadges 0 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?Browseotherquestionstaggedandroidiosopengl-esoraskyourownquestion. TheOverflowBlog Makeyouropen-sourceprojectpublicbeforeyou’reready(Ep.444) Thescienceofinterviewingdevelopers FeaturedonMeta AnnouncingthearrivalofValuedAssociate#1214:Dalmarus Improvementstositestatusandincidentcommunication RetiringOurCommunity-SpecificClosureReasonsforServerFaultandSuperUser Temporarilypausingthesitesatisfactionsurvey StagingGround:ReviewerMotivation,Scaling,andOpenQuestions Related 1230 Isquittinganapplicationfrownedupon? 12 HowtocreateaFBOwithstencilbufferinOpenGLES2.0? 14 GettingdefaultframebufferidfromGLKView/GLKit 2 iOSRendertoTexture:WhyitisClear 10 WhywouldglBindFramebuffer(GL_FRAMEBUFFER,0)resultinblankscreenincocos2D-iphone? 1 OpenGLES2.0-Reducingmemcopieswhenrenderingtotextures 1151 YouneedtouseaTheme.AppCompattheme(ordescendant)withthisactivity 11 HowtoemulateanaccumulationbufferinOpenGLes2.0(TrailingParticlesEffect) 0 glCheckFrameBufferStatus()alwaysreturns36054 HotNetworkQuestions Astronautisdeludedintotakinghishelmetoff(anddies) Howcanaprivatekeybeimportedtoadescriptorwallet? Whatdoyoucalladesperateattemptunlikelytosucceed? IsitallowedtocopycodeundertheUnityReference-OnlyLicense? Doesgravitationreallyexistattheparticlelevel? HowdoIprepareaslidetalkpresentationforconferenceinmathematics? IsitOKtousemixedDNSservers? AquestionregardingisomorphismincohomologyformodulispaceofstablebundlesoveracompactRiemannsurface DifferencebetweenfirewallandACL Isitdangeroustoconsume30mgofZinc(asZincPicolinate)perday? Whyisacapacitortogroundalowfrequencypole,insteadofahighfrequencyzero? Whatdoestheidiomaticphrase"erronthesideof"mean? 'Mapping'thevaluesofalisttovariable HowcanIcreateaLocalewithaspecificscriptcode? Isthissinkfaucetremovable? Using\textsc{}manuallyinsection Didmyprofessoractunethicallybypublishingapaperwithafigurefrommythesiswithoutanyacknowledgement? IntheU.S.,whyisn'tturnoutandactivismproportionaltoinfluence? Whatdoesthisyumpackageversionmean? Meaningofclappingattheendofmass MostcommoncommandtocompileaLaTeXdocument? Whatdisadvantagesaretheretoencryptinganentireharddriveorahomedirectory? Whyaren'tnegativefrequenciesfoldedinreconstructionofthealiasedsignal? Iwant8bitsforeverycharacter! morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. default Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings
延伸文章資訊
- 1openGL API glFramebufferTexture2D详解_妙为的博客
glFramebufferTexture2D — attach a texture image to a framebuffer object. C Specification void glF...
- 2Java GLES20.glFramebufferTexture2D方法代碼示例- 純淨天空
本文整理匯總了Java中android.opengl.GLES20.glFramebufferTexture2D方法的典型用法代碼示例。如果您正苦於以下問題:Java GLES20.glFram...
- 3glFramebufferTexture2D | Apple Developer Documentation
Declaration. void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLui...
- 4When binding an fbo do you need to call ...
The attachment bindings are part of the FBO state. You only need to call glFramebufferTexture2D()...
- 5org.lwjgl.opengl.GL30.glFramebufferTexture2D java code ...
public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int l...