glRenderbufferStorage - OpenGL 4 Reference Pages

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

glRenderbufferStorage is equivalent to calling glRenderbufferStorageMultisample with the samples set to zero, and glNamedRenderbufferStorage is equivalent to ... Name glRenderbufferStorage,glNamedRenderbufferStorage—establishdatastorage,formatanddimensionsofa renderbufferobject'simage CSpecification voidglRenderbufferStorage( GLenumtarget,   GLenuminternalformat,   GLsizeiwidth,   GLsizeiheight);   voidglNamedRenderbufferStorage( GLuintrenderbuffer,   GLenuminternalformat,   GLsizeiwidth,   GLsizeiheight);   Parameters target Specifiesabindingtargetoftheallocationfor glRenderbufferStoragefunction.Mustbe GL_RENDERBUFFER. renderbuffer Specifiesthenameoftherenderbufferobjectfor glNamedRenderbufferStoragefunction. internalformat Specifiestheinternalformattousefortherenderbuffer object'simage. width Specifiesthewidthoftherenderbuffer,inpixels. height Specifiestheheightoftherenderbuffer,inpixels. Description glRenderbufferStorageisequivalenttocalling glRenderbufferStorageMultisample withthesamplessettozero,and glNamedRenderbufferStorageisequivalenttocalling glNamedRenderbufferStorageMultisamplewiththe samplessettozero. ForglRenderbufferStorage,thetargetofthe operation,specifiedbytargetmustbe GL_RENDERBUFFER.For glNamedRenderbufferStorage, renderbuffermustbeanameofanexisting renderbufferobject.internalformatspecifiesthe internalformattobeusedfortherenderbufferobject'sstorageandmust beacolor-renderable,depth-renderable,orstencil-renderableformat. widthandheightarethe dimensions,inpixels,oftherenderbuffer.Both widthandheightmustbe lessthanorequaltothevalueof GL_MAX_RENDERBUFFER_SIZE. Uponsuccess,glRenderbufferStorageand glNamedRenderbufferStoragedeleteanyexistingdata storefortherenderbufferimageandthecontentsofthedatastoreafter callingglRenderbufferStorageareundefined. Errors GL_INVALID_ENUMisgeneratedby glRenderbufferStorageif targetisnot GL_RENDERBUFFER. GL_INVALID_OPERATIONisgeneratedby glNamedRenderbufferStorageifrenderbufferisnot thenameofanexistingrenderbufferobject. GL_INVALID_VALUEisgeneratedifeitherof widthorheightisnegative, orgreaterthanthevalueof GL_MAX_RENDERBUFFER_SIZE. GL_INVALID_ENUMisgeneratedif internalformatisnotacolor-renderable, depth-renderable,orstencil-renderableformat. GL_OUT_OF_MEMORYisgeneratediftheGLis unabletocreateadatastoreoftherequestedsize. 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 glNamedRenderbufferStorage - - - - - - - - - - - ✔ glRenderbufferStorage - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ SeeAlso glGenRenderbuffers, glBindRenderbuffer, glNamedRenderbufferStorageMultisample, glRenderbufferStorageMultisample, glFramebufferRenderbuffer, glDeleteRenderbuffers Copyright Copyright©2010-2014KhronosGroup. Thismaterialmaybedistributedsubjecttothetermsandconditionssetforthin theOpenPublicationLicense,v1.0,8June1999. http://opencontent.org/openpub/.



請為這篇文章評分?