glFramebufferRenderbuffer - OpenGL ES 3 Reference Pages

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

glFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the currently bound framebuffer object. renderbuffer is the name of the ... Name glFramebufferRenderbuffer—attacharenderbufferasalogicalbuffertothecurrentlyboundframebufferobject CSpecification voidglFramebufferRenderbuffer( GLenumtarget,   GLenumattachment,   GLenumrenderbuffertarget,   GLuintrenderbuffer);   Parameters target Specifiestheframebuffertarget.targetmustbeGL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER,orGL_FRAMEBUFFER.GL_FRAMEBUFFER isequivalenttoGL_DRAW_FRAMEBUFFER. attachment Specifiestheattachmentpointoftheframebuffer. renderbuffertarget SpecifiestherenderbuffertargetandmustbeGL_RENDERBUFFER. renderbuffer Specifiesthenameofanexistingrenderbufferobjectoftyperenderbuffertargettoattach. Description glFramebufferRenderbufferattachesarenderbufferasoneofthelogicalbuffersofthe currentlyboundframebufferobject.renderbufferisthenameoftherenderbufferobject toattachandmustbeeitherzero,orthenameofanexistingrenderbufferobjectoftyperenderbuffertarget. IfrenderbufferisnotzeroandifglFramebufferRenderbufferis successful,thentherenderbuffernamerenderbufferwillbeusedasthelogicalbuffer identifiedbyattachmentoftheframebuffercurrentlyboundtotarget. ThevalueofGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPEforthespecifiedattachmentpointis settoGL_RENDERBUFFERandthevalueofGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME issettorenderbuffer.Allotherstatevaluesoftheattachmentpointspecifiedby attachmentaresettotheirdefaultvalues.Nochangeismadetothestateoftherenderbuuffer objectandanypreviousattachmenttotheattachmentlogicalbufferoftheframebuffer targetisbroken. CallingglFramebufferRenderbufferwiththerenderbuffernamezerowilldetachtheimage,ifany, identifiedbyattachment,intheframebuffercurrentlyboundtotarget. Allstatevaluesoftheattachmentpointspecifiedbyattachmentintheobjectboundtotargetaresettotheirdefaultvalues. SettingattachmenttothevalueGL_DEPTH_STENCIL_ATTACHMENTisaspecial casecausingboththedepthandstencilattachmentsoftheframebufferobjecttobesettorenderbuffer, whichshouldhavethebaseinternalformatGL_DEPTH_STENCIL. Errors GL_INVALID_ENUMisgeneratediftargetisnotoneoftheacceptedtokens. GL_INVALID_ENUMisgeneratedifrenderbuffertargetisnotGL_RENDERBUFFER. GL_INVALID_OPERATIONisgeneratedifzeroisboundtotarget. APIVersionSupport OpenGLESAPIVersion FunctionName 2.0 3.0 glFramebufferRenderbuffer ✔ ✔ SeeAlso glGenFramebuffers, glBindFramebuffer, glGenRenderbuffers, glFramebufferTexture, glFramebufferTexture2D, glFramebufferTextureLayer Copyright Copyright©2010-2014KhronosGroup. Thismaterialmaybedistributedsubjecttothetermsandconditionssetforthin theOpenPublicationLicense,v1.0,8June1999. http://opencontent.org/openpub/.



請為這篇文章評分?