glFramebufferRenderbuffer - OpenGL 4 Reference Pages
文章推薦指數: 80 %
glFramebufferRenderbuffer and glNamedFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the specified framebuffer object. Name glFramebufferRenderbuffer,glNamedFramebufferRenderbuffer—attacharenderbufferasalogicalbufferofaframebufferobject CSpecification voidglFramebufferRenderbuffer( GLenumtarget, GLenumattachment, GLenumrenderbuffertarget, GLuintrenderbuffer); voidglNamedFramebufferRenderbuffer( GLuintframebuffer, GLenumattachment, GLenumrenderbuffertarget, GLuintrenderbuffer); Parameters target Specifiesthetargettowhichtheframebufferisbound forglFramebufferRenderbuffer. framebuffer Specifiesthenameoftheframebufferobjectfor glNamedFramebufferRenderbuffer. attachment Specifiestheattachmentpointoftheframebuffer. renderbuffertarget Specifiestherenderbuffertarget.Mustbe GL_RENDERBUFFER. renderbuffer Specifiesthenameofanexistingrenderbufferobjectof typerenderbuffertargetto attach. Description glFramebufferRenderbufferand glNamedFramebufferRenderbufferattachesa renderbufferasoneofthelogicalbuffersofthespecified framebufferobject.Renderbufferscannotbeattachedtothe defaultdrawandreadframebuffer,sotheyarenotvalidtargets ofthesecommands. ForglFramebufferRenderbuffer, theframebufferobjectisthatboundto target,whichmustbe GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFERor GL_FRAMEBUFFER. GL_FRAMEBUFFERisequivalentto GL_DRAW_FRAMEBUFFER. ForglNamedFramebufferRenderbuffer, framebufferisthenameofthe framebufferobject. renderbuffertargetmustbe GL_RENDERBUFFER. renderbuffermustbezeroorthenameof anexistingrenderbufferobjectoftype renderbuffertarget.If renderbufferisnotzero,thenthe specifiedrenderbufferwillbeusedasthelogicalbuffer identifiedbyattachmentofthespecified framebufferobject.Ifrenderbufferis zero,thenthevalueof renderbuffertargetisignored. attachmentspecifiesthelogical attachmentoftheframebufferandmustbe GL_COLOR_ATTACHMENTi, GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENTor GL_DEPTH_STENCIL_ATTACHMENT. iinmayrangefromzerotothevalueof GL_MAX_COLOR_ATTACHMENTSminusone. Settingattachmenttothevalue GL_DEPTH_STENCIL_ATTACHMENTisaspecial casecausingboththedepthandstencilattachmentsofthe specifiedframebufferobjecttobesetto renderbuffer,whichshouldhavethebase internalformatGL_DEPTH_STENCIL. Thevalueof GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPEfor thespecifiedattachmentpointissetto GL_RENDERBUFFERandthevalueof GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAMEis settorenderbuffer.Allotherstate valuesofspecifiedattachmentpointaresettotheirdefault values.Nochangeismadetothestateoftherenderbuuffer objectandanypreviousattachmenttothe attachmentlogicalbufferofthe specifiedframebufferobjectisbroken. Ifrenderbufferiszero,thesecommands willdetachtheimage,ifany,identifiedbythespecified attachmentpointofthespecifiedframebufferobject.Allstate valuesoftheattachmentpointaresettotheirdefaultvalues. Errors GL_INVALID_ENUMisgeneratedby glFramebufferRenderbufferif targetisnotoneoftheaccepted framebuffertargets. GL_INVALID_OPERATIONisgeneratedby glFramebufferRenderbufferifzeroisbound totarget. GL_INVALID_OPERATIONisgeneratedby glNamedFramebufferRenderbufferif framebufferisnotthenameofan existingframebufferobject. GL_INVALID_ENUMisgeneratedif attachmentisnotoneoftheaccepted attachmentpoints. GL_INVALID_ENUMisgeneratedif renderbuffertargetisnot GL_RENDERBUFFER. GL_INVALID_OPERATIONisgeneratedif renderbuffertargetisnotzeroorthe nameofanexistingrenderbufferobjectoftype GL_RENDERBUFFER. 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 glFramebufferRenderbuffer - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ glNamedFramebufferRenderbuffer - - - - - - - - - - - ✔ SeeAlso glGenFramebuffers, glBindFramebuffer, glGenRenderbuffers, glFramebufferTexture, glFramebufferTexture1D, glFramebufferTexture2D, glFramebufferTexture3D Copyright Copyright©2010-2014KhronosGroup. Thismaterialmaybedistributedsubjecttothetermsandconditionssetforthin theOpenPublicationLicense,v1.0,8June1999. http://opencontent.org/openpub/.
延伸文章資訊
- 1glFramebufferRenderbuffer - OpenGL ES 3 Reference Pages
glFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the currently ...
- 2C++ (Cpp) glFramebufferRenderbuffer Examples - HotExamples
C++ (Cpp) glFramebufferRenderbuffer - 30 examples found. These are the top rated real world C++ (...
- 3android.opengl.GLES20.glFramebufferRenderbuffer java ...
public void glFramebufferRenderbufferEXT(int param1, int param2, int param3, int param4) { GLES20...
- 4创建一个帧缓冲 - LearnOpenGL-CN
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo);. 在帧...
- 5GLES2.0中文API-glFramebufferRenderbuffer - CSDN
名称glFramebufferRenderbuffer- 将renderbuffer对象附加到framebuffer对象C规范void glFramebufferRenderbuffer(GLe...