glRenderbufferStorage, glNamedRenderbufferStorage

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

glRenderbufferStorage is equivalent to calling glRenderbufferStorageMultisample() with the samples set to zero, and glNamedRenderbufferStorage is equivalent to ... Providedby:opengl-4-man-doc_1.0~svn31251-1build1_all NAME glRenderbufferStorage,glNamedRenderbufferStorage-establishdatastorage,formatand dimensionsofarenderbufferobject'simage CSPECIFICATION voidglRenderbufferStorage(GLenumtarget,GLenuminternalformat,GLsizeiwidth, GLsizeiheight); voidglNamedRenderbufferStorage(GLuintrenderbuffer,GLenuminternalformat,GLsizeiwidth, GLsizeiheight); PARAMETERS target SpecifiesabindingtargetoftheallocationforglRenderbufferStoragefunction.Must beGL_RENDERBUFFER. renderbuffer SpecifiesthenameoftherenderbufferobjectforglNamedRenderbufferStoragefunction. internalformat Specifiestheinternalformattousefortherenderbufferobject'simage. width Specifiesthewidthoftherenderbuffer,inpixels. height Specifiestheheightoftherenderbuffer,inpixels. DESCRIPTION glRenderbufferStorageisequivalenttocallingglRenderbufferStorageMultisample()withthe samplessettozero,andglNamedRenderbufferStorageisequivalenttocalling glNamedRenderbufferStorageMultisamplewiththesamplessettozero. ForglRenderbufferStorage,thetargetoftheoperation,specifiedbytargetmustbe GL_RENDERBUFFER.ForglNamedRenderbufferStorage,renderbuffermustbeanameofan existingrenderbufferobject.internalformatspecifiestheinternalformattobeusedfor therenderbufferobject'sstorageandmustbeacolor-renderable,depth-renderable,or stencil-renderableformat.widthandheightarethedimensions,inpixels,ofthe renderbuffer.Bothwidthandheightmustbelessthanorequaltothevalueof GL_MAX_RENDERBUFFER_SIZE. Uponsuccess,glRenderbufferStorageandglNamedRenderbufferStoragedeleteanyexisting datastorefortherenderbufferimageandthecontentsofthedatastoreaftercalling glRenderbufferStorageareundefined. ERRORS GL_INVALID_ENUMisgeneratedbyglRenderbufferStorageiftargetisnotGL_RENDERBUFFER. GL_INVALID_OPERATIONisgeneratedbyglNamedRenderbufferStorageifrenderbufferisnotthe nameofanexistingrenderbufferobject. GL_INVALID_VALUEisgeneratedifeitherofwidthorheightisnegative,orgreaterthan thevalueofGL_MAX_RENDERBUFFER_SIZE. GL_INVALID_ENUMisgeneratedifinternalformatisnotacolor-renderable, depth-renderable,orstencil-renderableformat. GL_OUT_OF_MEMORYisgeneratediftheGLisunabletocreateadatastoreoftherequested size. VERSIONSUPPORT ┌───────────────────────────┬───────────────────────────────────────────────────────────────────────┐ ││OpenGLVersion│ ├───────────────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤ │Function│2.0│2.1│3.0│3.1│3.2│3.3│4.0│4.1│4.2│4.3│4.4│4.5│ │/│││││││││││││ │Feature│││││││││││││ │Name│││││││││││││ ├───────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │glNamedRenderbufferStorage│-│-│-│-│-│-│-│-│-│-│-│✔│ ├───────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │glRenderbufferStorage│-│-│✔│✔│✔│✔│✔│✔│✔│✔│✔│✔│ └───────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ SEEALSO glGenRenderbuffers(),glBindRenderbuffer(),glNamedRenderbufferStorageMultisample(), glRenderbufferStorageMultisample(),glFramebufferRenderbuffer(),glDeleteRenderbuffers() COPYRIGHT Copyright©2010-2014KhronosGroup.Thismaterialmaybedistributedsubjecttotheterms andconditionssetforthintheOpenPublicationLicense,v1.0,8June1999. http://opencontent.org/openpub/. COPYRIGHT Copyright©2010-2014KhronosGroup [FIXME:source]07/22/2015GLRENDERBUFFERSTORAG(3G)



請為這篇文章評分?