這期內(nèi)容當(dāng)中小編將會(huì)給大家?guī)碛嘘P(guān)OpenGL庫函數(shù)有哪些,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
創(chuàng)新互聯(lián)公司主營溧水網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,成都app軟件開發(fā),溧水h5成都微信小程序搭建,溧水網(wǎng)站營銷推廣歡迎溧水等地區(qū)企業(yè)咨詢OpenGL函數(shù)庫相關(guān)的API有核心庫(gl)、實(shí)用庫(glu)、輔助庫(aux)、實(shí)用工具庫(glut)、窗口庫(glx、agl、wgl)和擴(kuò)展函數(shù)庫等。從圖可以看出,gl是核心,glu是對(duì)gl的部分封裝。glx、agl、wgl 是針對(duì)不同窗口系統(tǒng)的函數(shù)。glut是為跨平臺(tái)的OpenGL程序的工具包,比aux功能強(qiáng)大。擴(kuò)展函數(shù)庫是硬件廠商為實(shí)現(xiàn)硬件更新利用OpenGL的擴(kuò)展機(jī)制開發(fā)的函數(shù)。
目前OpenGL的函數(shù)主要包含在3個(gè)庫中:GL 函數(shù)庫、GLU 函數(shù)庫、GLUT 函數(shù)庫
顏色編輯 | glShadeModel,glColor,glColorPointer,glIndex,glIndexPointer,glColorTableEXT,glColorSubTableEXT |
繪制幾何圖形 | glVertex,glVertexPointer,glArrayElement,glBegin , glEnd,glEdgeFlag , glEdgeFlagv,glPointSize,glLineWidth,glLineStipple,glPolygonMode,glFrontFace,glPolygonStipple,glDrawElements,glRect |
坐標(biāo)轉(zhuǎn)換 | glTranslate,glRotate,glScale,glViewPoint,glFrustum,glOrtho,glClipPlane |
堆棧操作 | glLoadMatrix,glMultMatrix,glMatrixMode,glPushMatrix , glPopMatrix,glPushAttrib , glPopAttrib,glPushName , glPopName,glInitName ,glLoadName |
顯示列表 | glNewList , glEndList,glCallList,glCallLists,glGenLists,glDeleteLists, |
使用光照和材質(zhì) | glNormal,glNormalPointer,glLight,glLightModel,glMaterial,glColorMaterial, |
像素操作 | glRasterPos,glBitmap,glReadPixels,glDrawPixels,glCopyPixels,glCopyTexImage1D,glCopyTexImage2D,glCopyTexSubImage1D,glCopyTexSubImage2D,glPixelZoom,glPixelStore,glPixelTransfer,glPixelMap |
紋理映射 | glTexImage1D,glTexImage2D,glTexParameter,glTexSubImage1D,glTexSubImage2D,glTexEnv,glTexCoord,glTexGen,glTexCoordPointer,glDeleteTextures, |
特效操作 | glBlendFunc,glHint,glFog |
幀緩存操作 | glClear,glClearAccum,glClearColor,glClearDepth,glClearIndex,glClearStencil,glDrawBuffer,glIndexMask,glColorMask,glDepthMask,glStencilMask,glAlphaFunc,glStencilFunc,glStencilOp,glDepthFunc,glDepthRange,glLogicOp,glAccum, |
曲線或曲面繪制 | glEvalCoord,glMap1,glMap2,glMapGrid,glEvalMesh,glEvalPoint, |
查詢函數(shù) | glGet,glGetClipPlane,glGetColorTableEXT,glGetColorTableParameterfvEXT , glGetColorTableParameterivEXT,glGetError,glGetLight,glGetMap,glGetMaterial,glGetPixelMap,glGetPointerv,glGetPolygonStipple,glGetString,glGetTexEnv,glGetTexImage,glGetTexLevelParameter,glGetTexParameter, |
包含有43個(gè)函數(shù),函數(shù)名的前綴為glu。OpenGL提供了強(qiáng)大的但是為數(shù)不多的繪圖命令,所有較復(fù)雜的繪圖都必須從點(diǎn)、線、面開始。Glu 為了減輕繁重的編程工作,封裝了OpenGL函數(shù),Glu函數(shù)通過調(diào)用核心庫的函數(shù),為開發(fā)者提供相對(duì)簡(jiǎn)單的用法,實(shí)現(xiàn)一些較為復(fù)雜的操作。此函數(shù)由glu.dll來負(fù)責(zé)解釋執(zhí)行。OpenGL中的核心庫和實(shí)用庫可以在所有的OpenGL平臺(tái)上運(yùn)行。
繪制 NURBS 曲線和曲面 | gluNewNurbsRenderer,gluNurbsProperty,gluNurbsCallback,gluBeginCurve , gluEndCurve,gluNurbsCurve,gluDeleteNurbsRenderer,gluBeginSurface , gluEndSurface,gluNurbsSurface,gluBeginTrim , gluEndTrim,gluPwlCurve,gluBeginPolygon , gluEndPolygon,gluPickMatrix |
繪制二次幾何物體 | gluNewQuadric,gluQuadricDrawStyle,gluQuadricNormals,gluQuadricOrientation,gluCylinder,gluSphere,gluDisk,gluPartialDisk,gluDeleteQuadric,gluQuadricTexture,gluQuadricCallback |
網(wǎng)格化 | gluNewTess,gluTessVertex,gluTessCallback,gluTessBeginPolygon , gluTessEndPolygon,gluTessBeginContour , gluTessBeginContour,gluTessProperty,gluNextContour,gluTessNormal,gluDeleteTess |
坐標(biāo)轉(zhuǎn)換 | gluOrtho2D,gluPerspective,gluLookAt,gluProject,gluUnProject |
多重映射 | gluBuild1DMipmaps,gluBuild2DMipmaps,gluScaleImage |
查詢函數(shù) | gluErrorString,gluGetNurbsProperty,gluGetString,gluGetTessProperty |
包含大約30多個(gè)函數(shù),函數(shù)名前綴為glut。glut是不依賴于窗口平臺(tái)的OpenGL工具包,由Mark KLilgrad在SGI編寫(現(xiàn)在在Nvidia),目的是隱藏不同窗口平臺(tái)API的復(fù)雜度。 函數(shù)以glut開頭,它們作為aux庫功能更強(qiáng)的替代品,提供更為復(fù)雜的繪制功能,此函數(shù)由glut.dll來負(fù)責(zé)解釋執(zhí)行。由于glut中的窗口管理函數(shù)是不依賴于運(yùn)行環(huán)境的,因此OpenGL中的工具庫可以在X-Window, Windows NT, OS/2等系統(tǒng)下運(yùn)行,特別適合于開發(fā)不需要復(fù)雜界面的OpenGL示例程序。對(duì)于有經(jīng)驗(yàn)的程序員來說,一般先用glut理順3D圖形代碼,然后再集成為完整的應(yīng)用程序。
初始化和啟動(dòng)事件處理 | glutInit,glutInitWindowPosition,glutInitWindowSize,glutInitDisplayMode,glutMainLoop, |
窗口管理 | glutCreateWindow,glutCreateSubWindow,glutHideWindow,glutShowWindow,glutSetWindowTitle,glutPostRedisplay,glutSwapBuffers,glutFullScreen,glutPositionWindow,glutReshapeWindow,glutSetWindow,glutGetWindow,glutPopWindow,glutPushWindow,glutDestroyWindow,glutIconifyWindow,glutSetCursor, |
重疊層管理 | glutEstablishOverlay,glutUseLayer,glutRemoveOverlay,glutPostOverlayRedisplay,glutShowOverlay,glutHideOverlay, |
菜單管理 | glutCreateMenu,glutAddMenuEntry,glutAddSubMenu,glutAttachMenu,glutGetMenu,glutSetMenu,glutDestroyMenu,glutChangeToMenuEntry,glutChangeToSubMenu,glutRemoveMenuItem,glutDetachMenu, |
注冊(cè)回調(diào)函數(shù) | glutDisplayFunc,glutReshapeFunc,glutMouseFunc,glutMotionFunc,glutIdleFunc,glutVisibilityFunc,glutKeyboardFunc,glutSpecialFunc,glutOverlayDisplayFunc,glutPassiveMotionFunc,glutEntryFunc,glutSpaceballMotionFunc,glutSpaceballRotateFunc,glutSpaceballButtonFunc,glutButtonBoxFunc,glutDialsFunc,glutTableMotionFunc,glutTableButtonFunc,glutMenuStatusFunc,glutTimerFunc |
顏色索引映射表管理 | glutSetColor,glutGetColor,glutCopyColormap, |
狀態(tài)檢索 | glutGet,glutLayerGet,glutDeviceGet,glutGetModifiers,glutExtensionSupported, |
字體繪制 | glutBitmapCharacter,glutBitmapWidth,glutStrokeCharacter,glutStrokeWidth, |
幾何圖形繪制 | glutSolidSphere , glutWireSphere,glutSolidCube , glutWireCube,glutSolidCone , glutWireCone,glutSolidTorus , glutWireTorus,glutSolidDodecahedron , glutWireDodecahedron,glutSolidOctahedron , glutWireOctahedron,glutSolidTetrahedron , glutWireTetrahedron,glutSolieIcosahedron , glutWireIcosahedron,glutSolidTeapot , glutWireTeapot, |
上述就是小編為大家分享的OpenGL庫函數(shù)有哪些了,如果剛好有類似的疑惑,不妨參照上述分析進(jìn)行理解。如果想知道更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
網(wǎng)頁名稱:OpenGL庫函數(shù)有哪些-創(chuàng)新互聯(lián)
當(dāng)前地址:http://aaarwkj.com/article16/hoedg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站內(nèi)鏈、品牌網(wǎng)站建設(shè)、關(guān)鍵詞優(yōu)化、響應(yīng)式網(wǎng)站、網(wǎng)站策劃、網(wǎng)站設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容