资源描述:
《opengl红宝书【fifth】--error》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、OpenGLProgrammingGuideErrata-FifthEditionIfyou'vefoundsomethingyoubelieveisinerror,pleasesendusanoteusingthislink.Youcanfinderratasforpreviousversionshere.·page87-Thethirdparameter,stride,intheglColorPointer()andglVertexPointer()callsisincorrectlyspecifi
2、edas3*sizeof(GLfloat).Thecorrectspecificationis6*sizeof(GLfloat).(reportedbyRichardChaney)·page377-Theparagraphbeginning"Thewidthandheightparametersgivethedimensionsofthetextureimage;..."lacksadiscussionofnon-power-of-twotextures.Theparagraphshouldread(w
3、ithtextadditionspresentedinred):Thewidthandheightparametersgivethedimesionsofthetextureimage;borderindicatesthewidthoftheborder,whichiseither0(noborder)or1.Bothwidthandheightmusthavetheform2m+2b,wheremisanon-negativeinteger(whichcanhaveadifferentvaluefor
4、widththanforheight)andbisthevalueofborder.ThemaximumsizeofatexturemapdependsontheimplementationofOpenGL,butitmustbeatleast64 × 64(or66 × 66withborders).ForOpenGL2.0implementations,thepower-of-twodimensionrequirementhasbeeneliminated.Thesameclarifications
5、houldalsobeaddedtotheotherglCopyTexImage2D()(page379),glTexImage1D()(page385),glCopyTexImage1D()(page386),glTexImage3D()(page388)functiondescriptions,aswellasfortheglCompressedTexImage1D(),glCompressedTexImage2D(),andtheglCompressedTexImage3D()functionde
6、scriptions(page393).(reportedbyPaulMartz)·page627-Inthefirstparagraphofthe"VertexProcessing"section,thesecondsentenceshouldread:Theshaderareaindicatesthefunctionsofthevertexprocessingpipelinethatarereplacedbythevertexshader.(reportedbyKouichiMatsuda)·pag
7、e637-IntheshadedboxforglDeleteShader(),thedescriptionshouldread:Deletesshader.Ifshaderiscurrentlylinkedtooneormoreactiveshaderprograms,theobjectistaggedfordeletion,andonlydeletedoncetheshaderobjectisnolongerusedbyanyshaderprograms.·pages636-637-Example15
8、-3usestheARB_shader_objectextension,ascomparedtoOpenGL2.0routines.Additionally,thecodingstyleusingforthedeclarationofshaderSrcintheoriginalexamplecouldleadtoconfusion†,andhasbeenwrittenmorecleanlyinthefollowingcode.(report