glCheckFramebufferStatus - OpenGL 4 Reference Pages

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

glCheckFramebufferStatus and glCheckNamedFramebufferStatus return the completeness status of a framebuffer object when treated as a read or draw framebuffer ... Name glCheckFramebufferStatus,glCheckNamedFramebufferStatus—checkthecompletenessstatusofaframebuffer CSpecification GLenumglCheckFramebufferStatus( GLenumtarget);   GLenumglCheckNamedFramebufferStatus( GLuintframebuffer,   GLenumtarget);   Parameters target Specifythetargettowhichtheframebufferisboundfor glCheckFramebufferStatus,andthe targetagainstwhichframebuffercompletenessof framebufferischeckedfor glCheckNamedFramebufferStatus. framebuffer Specifiesthenameoftheframebufferobject forglCheckNamedFramebufferStatus Description glCheckFramebufferStatusand glCheckNamedFramebufferStatusreturnthe completenessstatusofaframebufferobjectwhentreatedasa readordrawframebuffer,dependingonthevalueof target. ForglCheckFramebufferStatus,the framebuffercheckedisthatboundto target,whichmustbe GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFERor GL_FRAMEBUFFER. GL_FRAMEBUFFERisequivalentto GL_DRAW_FRAMEBUFFER. ForglCheckNamedFramebufferStatus, framebufferiszeroorthenameofthe framebufferobjecttocheck.If framebufferiszero,thenthestatusof thedefaultreadordrawframebuffer,asdeterminedby target,isreturned. ThereturnvalueisGL_FRAMEBUFFER_COMPLETE ifthespecifiedframebufferiscomplete.Otherwise,thereturn valueisdeterminedasfollows: GL_FRAMEBUFFER_UNDEFINEDis returnedifthespecifiedframebufferisthedefault readordrawframebuffer,butthedefault framebufferdoesnotexist. GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT isreturnedifanyoftheframebufferattachment pointsareframebufferincomplete. GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT isreturnediftheframebufferdoesnothaveat leastoneimageattachedtoit. GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER isreturnedifthevalueof GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE isGL_NONEforanycolor attachmentpoint(s)namedby GL_DRAW_BUFFERi. GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER isreturnedifGL_READ_BUFFER isnotGL_NONEandthevalueof GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE isGL_NONEforthecolor attachmentpointnamedby GL_READ_BUFFER. GL_FRAMEBUFFER_UNSUPPORTEDis returnedifthecombinationofinternalformatsof theattachedimagesviolatesan implementation-dependentsetofrestrictions. GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE isreturnedifthevalueof GL_RENDERBUFFER_SAMPLESisnot thesameforallattachedrenderbuffers;ifthe valueofGL_TEXTURE_SAMPLESis thenotsameforallattachedtextures;or,ifthe attachedimagesareamixofrenderbuffersand textures,thevalueof GL_RENDERBUFFER_SAMPLESdoes notmatchthevalueof GL_TEXTURE_SAMPLES. GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE isalsoreturnedifthevalueof GL_TEXTURE_FIXED_SAMPLE_LOCATIONS isnotthesameforallattachedtextures;or,if theattachedimagesareamixofrenderbuffersand textures,thevalueof GL_TEXTURE_FIXED_SAMPLE_LOCATIONS isnotGL_TRUEforallattached textures. GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS isreturnedifanyframebufferattachmentis layered,andanypopulatedattachmentisnot layered,orifallpopulatedcolorattachmentsare notfromtexturesofthesametarget. Additionally,ifanerroroccurs,zeroisreturned. Errors GL_INVALID_ENUMisgeneratedif targetisnot GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFERor GL_FRAMEBUFFER. GL_INVALID_OPERATIONisgeneratedby glCheckNamedFramebufferStatusif framebufferisnotzeroorthenameofan existingframebufferobject. VersionSupport OpenGLVersion Function/FeatureName 2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 glCheckFramebufferStatus - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ glCheckNamedFramebufferStatus - - - - - - - - - - - ✔ SeeAlso glGenFramebuffers, glDeleteFramebuffers glBindFramebuffer Copyright Copyright©2010-2014KhronosGroup. Thismaterialmaybedistributedsubjecttothetermsandconditionssetforthin theOpenPublicationLicense,v1.0,8June1999. http://opencontent.org/openpub/.



請為這篇文章評分?