Why is glCheckFramebufferStatus always 36054 for ...
文章推薦指數: 80 %
But on my Smartphone with OpenGL ES 3.1+ I always get for the depth via glCheckFramebufferStatus(GL_FRAMEBUFFER) the status = 36054 . 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 WhyisglCheckFramebufferStatusalways36054forGL_DEPTH_COMPONENTonOpenGLES3.1+? AskQuestion Asked 2years,6monthsago Modified 2years,6monthsago Viewed 821times 0 Irenderthecolor(GL_COLOR_ATTACHMENT0)anddepth(GL_DEPTH_ATTACHMENT)ofmysceneintoaFBO,whichworksfineonPCwithOpenGL4+. ButonmySmartphonewithOpenGLES3.1+IalwaysgetforthedepthviaglCheckFramebufferStatus(GL_FRAMEBUFFER)thestatus=36054. glGenTextures(1,&m_textCol); glBindTexture(GL_TEXTURE_2D,m_textCol); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,wth,hgt,0,GL_RGBA,GL_UNSIGNED_BYTE,NULL); glBindTexture(GL_TEXTURE_2D,0); glGenTextures(1,&m_textDepth); glBindTexture(GL_TEXTURE_2D,m_textDepth); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT,wth,hgt,0,GL_DEPTH_COMPONENT,GL_FLOAT,NULL); glBindTexture(GL_TEXTURE_2D,0); GLuintframebuffer; glGenFramebuffers(1,&framebuffer); glBindFramebuffer(GL_FRAMEBUFFER,framebuffer); glFramebufferTexture2D(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,m_textCol,0); GLenumstatus=glCheckFramebufferStatus(GL_FRAMEBUFFER);always36053->ok glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,m_textDepth,0); status=glCheckFramebufferStatus(GL_FRAMEBUFFER);//always36054->notok Itrieditalsowith glTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT,wth,hgt,0,GL_DEPTH_COMPONENT,GL_UNSIGNED_BYTE,NULL); butnochange. HasmaybesomeoneanideawhatI'mdoingwrong?Thanks. c++qtopengl-es Share Follow editedNov17,2019at22:56 HamidYusifli 8,07522goldbadges2020silverbadges4545bronzebadges askedNov15,2019at19:06 PowerNowPowerNow 21922silverbadges1212bronzebadges 5 2 Section9.4oftheOpenGLES3.1specificationdiscussesdepthbuffercompleteness.Itlinkstoatableonpage156thatstateswhichinternaltextureformats(thirdparametertoglTexImage2D)areallowablefordepthattachments.TheseareGL_DEPTH_COMPONENT16,GL_DEPTH_COMPONENT24andGL_DEPTH_COMPONENT32F. – Botje Nov15,2019at22:52 ThxsBotjeforyourinfos!Itrieditnowwithdifferentsmartphonesandsettingsforthethirdparameter(GL_DEPTH_COMPONENT16,GL_DEPTH_COMPONENT24,GL_DEPTH_COMPONENT32F)ofglTexImage2D,butitonlyworksonhalf,althoughallofthemhaveopengles3.0+.SoIwilltryitnowwithasecondcolorbuffer,whichwillhopefullyworksmoresave. – PowerNow Nov18,2019at16:08 1 Don'tforgettotrythecombineddepth+stencilformatstoo.Evenifyoudon'tneedthestencilpart. – Botje Nov18,2019at16:09 yeah,thatwasthereason,nowitworks!(internalformat:GL_DEPTH24_STENCIL8,Format:GL_DEPTH_STENCIL,Type:GL_UNSIGNED_INT_24_8khronos.org/registry/OpenGL-Refpages/es3.0/html/… – PowerNow Nov19,2019at8:43 Alright,goodtoknow.Letmewritethatupasananswersootherpeoplecanfinditaswell. – Botje Nov19,2019at8:59 Addacomment | 1Answer 1 Sortedby: Resettodefault Highestscore(default) Datemodified(newestfirst) Datecreated(oldestfirst) 1 Status36054isGL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT. IfwelookatSection9.4oftheOpenGLES3.1specification,itliststhefollowingvalidinternalFormatvaluesfordepthattachments: DEPTH_COMPONENT16 DEPTH_COMPONENT24 DEPTH_COMPONENT32F DEPTH24_STENCIL8 DEPTH32F_STENCIL8 Notethatthelasttwoalsocontainastencilpart.Youcanusetheseforthedepthcomponentandignorethestencilattachmentifyoudonotneedit.EspeciallyDEPTH24_STENCIL8hasagoodchanceofbeingwidelysupported. Share Follow answeredNov19,2019at9:04 BotjeBotje 21.2k33goldbadges2727silverbadges3838bronzebadges 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?Browseotherquestionstaggedc++qtopengl-esoraskyourownquestion. TheOverflowBlog Makeyouropen-sourceprojectpublicbeforeyou’reready(Ep.444) Thescienceofinterviewingdevelopers FeaturedonMeta AnnouncingthearrivalofValuedAssociate#1214:Dalmarus Improvementstositestatusandincidentcommunication RetiringOurCommunity-SpecificClosureReasonsforServerFaultandSuperUser Temporarilypausingthesitesatisfactionsurvey StagingGround:ReviewerMotivation,Scaling,andOpenQuestions Related 2080 Whycantemplatesonlybeimplementedintheheaderfile? 4 Whydoesn'tglCopyTexSubImage2Dcopymysquarecorrectly? 3118 Whyis"usingnamespacestd;"consideredbadpractice? 2358 Whatarethebasicrulesandidiomsforoperatoroverloading? 4 Whycan'tmyfragmentshaderreadalphainformationwhenIswitchtoanalpha-only(A8)pixelFormat? 2376 Whyareelementwiseadditionsmuchfasterinseparateloopsthaninacombinedloop? 26397 Whyisprocessingasortedarrayfasterthanprocessinganunsortedarray? 3 MipmappinginOpenGL 0 Openglseamlesstexture 0 glCheckFrameBufferStatus()alwaysreturns36054 HotNetworkQuestions Tryingtouseacaralternatorforapowersource(notforcar) Alphaparticlemovingfasterthanthespeedoflight? 'Mapping'thevaluesofalisttovariable Mybosssayshe'sjealouswhenItellhimaboutaworkachievement GAMmodelwarningmessage:stepfailureinthetaestimation Using\textsc{}manuallyinsection GameinJamesBondfilm"FromRussiawithlove" Provingarecursiveformulaisindeedafunction WhatdoesGandalftheWhitemeanbyhisstrangespeechaboutBoromir? WhyisMIDIgainbasedonafactorof40? IsitOKtousemixedDNSservers? Whatisthemostecologicallysustainablewaytohandleragscoveredinchaingrease? GN:Howtopassaninstancer'slocalizedtexturecolortoitsinstances? Whyaren'tnegativefrequenciesfoldedinreconstructionofthealiasedsignal? OutputofaHubDynamomeasuredwithanOscilloscope Whyishavingbloatedinterfacesanantipattern? Meaningofclappingattheendofmass WhatproblemscouldE6introducewhenusedforDungeonsandDragonsFifthedition? Mymodelhasnotfinishedevaluatinginmorethanadaysocan'ttestifitworks,whatiswrongwithit? Audiosplitterwithoutbufferpossible? GenerateAll8Knight'sMoves Arethereany/manyUSairports(withinstrumentapproaches)stillwithoutRNAVapproaches? HowcanaverbalreasoningquestionbesolvedwithMathematica? StarWars:R2D2connectedtomainframe morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. lang-cpp Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings
延伸文章資訊
- 1GLES2.0中文API-glCheckFramebufferStatus - CSDN博客
名称glCheckFramebufferStatus - 返回帧缓冲区对象的帧缓冲区完整性状态C规范GLenum glCheckFramebufferStatus(GLenum target);...
- 2glCheckFramebufferStatus - OpenGL 4 Reference Pages
glCheckFramebufferStatus and glCheckNamedFramebufferStatus return the completeness status of a fr...
- 3Python GL.glCheckFramebufferStatus方法代碼示例- 純淨天空
本文整理匯總了Python中OpenGL.GL.glCheckFramebufferStatus方法的典型用法代碼示例。如果您正苦於以下問題:Python GL.glCheckFramebuff...
- 4glCheckFramebufferStatus - OpenGL ES 3 Reference Pages
glCheckFramebufferStatus queries the completeness status of the framebuffer object currently boun...
- 5glCheckFramebufferStatus - OpenGL ES 2 - docs.gl
glCheckFramebufferStatus returns a symbolic constant that identifies whether or not the currently...