跳转到内容

User:A2569875/GLUT:修订间差异

维基百科,自由的百科全书
删除的内容 添加的内容
无编辑摘要
(编辑摘要已移除)
标签清空
 
第1行: 第1行:
== setting ==
;{{Anchor|gl.glEnable}}gl.glEnable(target)
:see https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glEnable.xml

;{{Anchor|gl.glDisable}}gl.glDisable(target)
:see https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glEnable.xml

;{{Anchor|gl.glIsEnabled}}gl.glIsEnabled(target) => bool

;{{Anchor|gl.isDisabled}}gl.isDisabled(target) => bool

;{{Anchor|gl.Get}}gl.Get(target) => value
::別名:gl.glGet
:取得特定[[#glget_target|glget_target]]的設定值

;{{Anchor|glget_target}}glget_target
:;{{Anchor|gl.CURRENT_NORMAL}}gl.CURRENT_NORMAL
:;{{Anchor|gl.CURRENT_FOG_COORD}}gl.CURRENT_FOG_COORD
:;{{Anchor|gl.CURRENT_COLOR}}gl.CURRENT_COLOR
:;{{Anchor|gl.CURRENT_PROGRAM}}gl.CURRENT_PROGRAM
:;{{Anchor|gl.CURRENT_TEXTURE_COORDS}}gl.CURRENT_TEXTURE_COORDS
:;{{Anchor|other}}other
::see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParameter

;{{Anchor|gl.getGlu}}glu = gl.getGlu()

;{{Anchor|gl.getGlut}}glut = gl.getGlut()

;{{Anchor|gl.getGLEnumName}}gl.getGLEnumName(target)

== Attribute ==
;{{Anchor|gl.VertexAttrib}}gl.VertexAttrib(attrib_name, type, value1, value2...)

;{{Anchor|gl.enableVertexAttrib}}gl.enableVertexAttrib(ptr);

== rendering ==
;{{Anchor|gl.drawElementsWithMode}}gl.drawElementsWithMode(draw_mode, count, datatype, offset)
:將作用中的Buffer已指定的[[#draw_mode|draw_mode]]繪製。

;{{Anchor|gl.drawArraysVertex}}gl.drawArraysVertex(draw_mode, first, count)
:將作用中的Buffer已指定的[[#draw_mode|draw_mode]]繪製。

;{{Anchor|gl.drawElementsVertex}}gl.drawElementsVertex(draw_mode, vertex_list, indices, dim, count, datatype, offset, cw)
:將作用中的Buffer已指定的[[#draw_mode|draw_mode]]繪製。

;{{Anchor|gl.ShadeModel}}gl.ShadeModel(shade_mode)
:設定[[#shade_mode|著色模式]]

;{{Anchor|gl.getShadeModel}}gl.getShadeModel()
:取得目前的[[#shade_mode|著色模式]]

;{{Anchor|shade_mode}}shade_mode
:;{{Anchor|gl.FLAT}}gl.FLAT
:;{{Anchor|gl.BLINN}}gl.BLINN
:;{{Anchor|gl.SMOOTH}}gl.SMOOTH

;{{Anchor|gl.Begin}}gl.Begin(draw_mode)
:在呼叫gl.Begin與[[#gl.End|gl.End()]]區間內可使用[[#gl.Vertex|gl.Vertex()]]來定義幾何結構的頂點,每個頂點都可以用[[#gl.Normal|gl.Normal]]、[[#gl.Color|gl.Color]]、[[#gl.FogCoord|gl.FogCoord]]、[[#gl.TexCoord|gl.TexCoord]]來調整其屬性。亦可以使用[[#gl.IndexArray|gl.IndexArray]]來指定頂點的排列順序。也可以使用[[#gl.SetHole|gl.SetHole]]來將特定頂點標記為孔洞。

;{{Anchor|gl.End}}gl.End(draw_mode)
:see https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glBegin.xml

;{{Anchor|draw_mode}}draw_mode
:;{{Anchor|gl.POINTS}}gl.POINTS
::Treats each vertex as a single point. Vertex n defines point n. N points are drawn.
:;{{Anchor|gl.LINES}}gl.LINES
::Treats each pair of vertices as an independent line segment. Vertices 2 ⁢ n - 1 and 2 ⁢ n define line n. N 2 lines are drawn.
:;{{Anchor|gl.LINE_STRIP}}gl.LINE_STRIP
::Draws a connected group of line segments from the first vertex to the last. Vertices n and n + 1 define line n. N - 1 lines are drawn.
:;{{Anchor|gl.LINE_LOOP}}gl.LINE_LOOP
::Draws a connected group of line segments from the first vertex to the last, then back to the first. Vertices n and n + 1 define line n. The last line, however, is defined by vertices N and 1 . N lines are drawn.
:;{{Anchor|gl.TRIANGLES}}gl.TRIANGLES
::Treats each triplet of vertices as an independent triangle. Vertices 3 ⁢ n - 2 , 3 ⁢ n - 1 , and 3 ⁢ n define triangle n. N 3 triangles are drawn.
:;{{Anchor|gl.TRIANGLE_STRIP}}gl.TRIANGLE_STRIP
::Draws a connected group of triangles. One triangle is defined for each vertex presented after the first two vertices. For odd n, vertices n, n + 1 , and n + 2 define triangle n. For even n, vertices n + 1 , n, and n + 2 define triangle n. N - 2 triangles are drawn.
:;{{Anchor|gl.TRIANGLE_FAN}}gl.TRIANGLE_FAN
::Draws a connected group of triangles. One triangle is defined for each vertex presented after the first two vertices. Vertices 1 , n + 1 , and n + 2 define triangle n. N - 2 triangles are drawn.
:;{{Anchor|gl.QUADS}}gl.QUADS
::Treats each group of four vertices as an independent quadrilateral. Vertices 4 ⁢ n - 3 , 4 ⁢ n - 2 , 4 ⁢ n - 1 , and 4 ⁢ n define quadrilateral n. N 4 quadrilaterals are drawn.
:;{{Anchor|gl.QUAD_STRIP}}gl.QUAD_STRIP
::Draws a connected group of quadrilaterals. One quadrilateral is defined for each pair of vertices presented after the first pair. Vertices 2 ⁢ n - 1 , 2 ⁢ n , 2 ⁢ n + 2 , and 2 ⁢ n + 1 define quadrilateral n. N/2 - 1 quadrilaterals are drawn. Note that the order in which vertices are used to construct a quadrilateral from strip data is different from that used with independent data.
:;{{Anchor|gl.POLYGON}}gl.POLYGON
::Draws a single, convex polygon. Vertices 1 through N define this polygon.
:;{{Anchor|gl.CONCAVE_POLYGON}}gl.CONCAVE_POLYGON
::Draws a single, concave polygon. Vertices 1 through N define this polygon. Complex polygon can not be currect.
:;{{Anchor|gl.POLYGON_STRIP}}gl.POLYGON_STRIP
::Draws a connected group of polygons. One polygonal is defined for each set of vertices presented after the first set. Vertices k n + 1, k n + 2, ..., k n + k, k n, k n - 1 define polygonal n. N/k - 1 polygons are drawn. where k = side - 2. Note that the order in which vertices are used to construct a polygonal from strip data is different from that used with independent data.
:;{{Anchor|gl.POLYHEDRON}}gl.POLYHEDRON
::Draws a single, convex polyhedron. Convex hull of vertices 1 through N define this polyhedron.
:;{{Anchor|gl.HTML}}gl.HTML
::Draws HTML elements in current modelview space.

;{{Anchor|gl.IndexArray}}gl.IndexArray(index1, index2...)
:指定頂點的相連方式

;{{Anchor|gl.Vertex}}gl.Vertex(x,y,z,w)
:指定頂點的座標位置

;{{Anchor|gl.Normal}}gl.Normal(x,y,z)
:指定頂點的法向量

;{{Anchor|gl.Color}}gl.Color(r,g,b,a)
:指定頂點的顏色

;{{Anchor|gl.ColorSpace}}gl.ColorSpace(colorspace)
:指定頂點顏色的[[#colorspace|色彩空間]]

;{{Anchor|colorspace}}colorspace
:;{{Anchor|gl.RGB}}gl.RGB
:;{{Anchor|gl.RGBA}}gl.RGBA
:;{{Anchor|gl.CMYK}}gl.CMYK
:;{{Anchor|gl.HSV}}gl.HSV

;{{Anchor|gl.VertexAttrib}}gl.VertexAttrib(attrib_name, type, value1, value2...)
:指定頂點的特定attribute的值

;{{Anchor|gl.FogCoord}}gl.FogCoord(fogCoord)
:指定頂點的起霧座標

;{{Anchor|gl.TexCoord}}gl.TexCoord(s,t,p,q)
:指定頂點的貼圖座標

;{{Anchor|gl.Html}}gl.Html(HTMLElement, width, height)
:指定一個HTML物件以便繪製於場景

;{{Anchor|gl.SetHole}}gl.SetHole()
:將目前頂點指定為孔洞

;{{Anchor|gl.PolygonMode}}gl.PolygonMode(fill_mode)
:設定[[#fill_mode|填滿模式]]

;{{Anchor|gl.getPolygonMode}}gl.getPolygonMode() => fill_mode
:取得目前的[[#fill_mode|填滿模式]]

;{{Anchor|fill_mode}}fill_mode
:;{{Anchor|gl.FILL}}gl.FILL
:;{{Anchor|gl.LINE}}gl.LINE
:;{{Anchor|gl.TRIANGLE}}gl.TRIANGLE
:;{{Anchor|gl.POINT}}gl.POINT

;{{Anchor|gl.PointSize}}gl.PointSize(size)
:設定頂點大小

;{{Anchor|gl.utBitmapCharacters}}gl.utBitmapCharacters(font, characters, charHeight, charColour, mWidth, resm)
:以點陣圖方式繪製文字

;{{Anchor|gl.AlphaFunc}}gl.AlphaFunc(alpha_func, ref)
:設定繪製時[[#alpha_func|透明度的處理策略]]

;{{Anchor|alpha_func}}alpha_func
:;{{Anchor|gl.NEVER}}gl.NEVER
:;{{Anchor|gl.LESS:}}gl.LESS:
:;{{Anchor|gl.EQUAL:}}gl.EQUAL:
:;{{Anchor|gl.LEQUAL:}}gl.LEQUAL:
:;{{Anchor|gl.GREATER:}}gl.GREATER:
:;{{Anchor|gl.NOTEQUAL:}}gl.NOTEQUAL:
:;{{Anchor|gl.GEQUAL:}}gl.GEQUAL:
:;{{Anchor|gl.ALWAYS:}}gl.ALWAYS:

== geometry ==
;{{Anchor|gl.uCreateObj}}gl.uCreateObj()
:產生儲存obj的Buffer

;{{Anchor|gl.uLoadObj}}gl.uLoadObj(obj_obj, file_name, mtl)
:讀入obj檔案到指定的obj的Buffer

;{{Anchor|gl.uSolidObj}}gl.uSolidObj(obj_obj)
:根據指定的obj的Buffer將當中所存的obj 3D模型繪製出來

;{{Anchor|gl.utSolidTeapot}}gl.utSolidTeapot(radius)
:繪製一個指定半徑的[[猶他茶壺]]

;{{Anchor|gl.uSphere}}gl.uSphere(radius, slices, stacks, start, sweep)
:繪製一個指定半徑的球體

;{{Anchor|gl.uCylinder}}gl.uCylinder(base, top, height, slices, stacks, start, sweep)
:繪製一個指定半徑和高的圓柱體

;{{Anchor|gl.uPartialDisk}}gl.uPartialDisk(inner, outer, slices, loops, start, sweep)
:繪製一個局部的圓盤

;{{Anchor|gl.uDisk}}gl.uDisk(inner, outer, slices, loops, start, sweep)
:繪製一個圓盤

;{{Anchor|gl.utSolidCone}}gl.utSolidCone(base, height, slices, stacks)
:繪製一個圓錐

;{{Anchor|gl.utSolidTorus}}gl.utSolidTorus(innerRadius,outerRadius,nsides,rings)
:繪製一個環面

;{{Anchor|gl.utSolidCube}}gl.utSolidCube()
:繪製一個單位立方體

;{{Anchor|gl.utWireCube}}gl.utWireCube()
:繪製一個單位立方體的線框

;{{Anchor|gl.utSolidDodecahedron}}gl.utSolidDodecahedron()
:繪製一個單位正十二面體

;{{Anchor|gl.utWireDodecahedron}}gl.utWireDodecahedron()
:繪製一個單位正十二面體的線框

;{{Anchor|gl.utSolidOctahedron}}gl.utSolidOctahedron()
:繪製一個單位正八面體

;{{Anchor|gl.utWireOctahedron}}gl.utWireOctahedron()
:繪製一個單位正八面體的線框

;{{Anchor|gl.utSolidTetrahedron}}gl.utSolidTetrahedron()
:繪製一個單位正四面體(正三角錐)

;{{Anchor|gl.utWireTetrahedron}}gl.utWireTetrahedron()
:繪製一個單位正四面體(正三角錐)的線框

;{{Anchor|gl.utSolidIcosahedron}}gl.utSolidIcosahedron()
:繪製一個單位正二十面體

;{{Anchor|gl.utWireIcosahedron}}gl.utWireIcosahedron()
:繪製一個單位正二十面體的線框

;{{Anchor|gl.uRegularPolyhedron}}gl.uRegularPolyhedron(shape_name, is_wire)
:繪製一個指定的形狀,可以視[[#shape_name|shape_name]]的任何一種形狀

;{{Anchor|shape_name}}shape_name
:;"Tetrahedron"
:;"Cube"
:;"Octahedron"
:;"Dodecahedron"
:;"Icosahedron"
:;"TruncatedTetrahedron"
:;"TriakisTetrahedron"
:;"Cuboctahedron"
:;"RhombicDodecahedron"
:;"TruncatedOctahedron"
:;"TetrakisHexahedron"
:;"TruncatedCube"
:;"TriakisOctahedron"
:;"Rhombicuboctahedron"
:;"DeltoidalIcositetrahedron"
:;"SnubCube"
:;"PentagonalIcositetrahedron"
:;"Icosidodecahedron"
:;"RhombicTriacontahedron"
:;"TruncatedCuboctahedron"
:;"DisdyakisDodecahedron"
:;"TruncatedIcosahedron"
:;"PentakisDodecahedron"
:;"TruncatedDodecahedron"
:;"TriakisIcosahedron"
:;"Rhombicosidodecahedron"
:;"DeltoidalHexecontahedron"
:;"SnubDodecahedron"
:;"PentagonalHexecontahedron"
:;"TruncatedIcosidodecahedron"
:;"DisdyakisTriacontahedron"

;{{Anchor|gl.uGetRegularPolyhedrons}}gl.uGetRegularPolyhedrons() => string[]
:取得gluRegularPolyhedron支援繪製的形狀列表

== transformation ==
;{{Anchor|gl.degToRad}}gl.degToRad(degrees)

;{{Anchor|gl.radToDeg}}gl.radToDeg(rad)

;{{Anchor|matrix_mode}}matrix_mode
:;"model"
:;"view"
:;"projection"
:;"color"
:;"texture"
:;"modelview" (readOnly)
:;"modelviewprojection" (readOnly)
:;"modelprojection" (readOnly)
:;"viewprojection" (readOnly)
:;"normal" (readOnly)
:;"identity" (const)
:;"zero" (const)
:;"one" (const)
:;"register"

;{{Anchor|gl.CleanMatrixStack}}gl.CleanMatrixStack(matrix_mode)
:清除矩陣堆疊
;{{Anchor|gl.checkMatrix}}gl.checkMatrix(matrix_mode)
:檢查特定[[#matrix_mode|matrix_mode]]的矩陣可否使用
;{{Anchor|gl.PushMatrix}}gl.PushMatrix(matrix_mode)
:將特定[[#matrix_mode|matrix_mode]]的矩陣推入堆疊
;{{Anchor|gl.PopMatrix}}gl.PopMatrix(matrix_mode)
:移除特定[[#matrix_mode|matrix_mode]]的矩陣回退為上一步驟的矩陣
;{{Anchor|gl.defineMatrix4f}}gl.defineMatrix4f(new_matrix_mode, glsl_var_name)
:定義新的矩陣堆疊
;{{Anchor|gl.Rotate}}gl.Rotate(matrix_mode,angle,axis)
:將目前作用中的矩陣套用旋轉變換
;{{Anchor|gl.Translate}}gl.Translate(matrix_mode, x, y, z);
:將目前作用中的矩陣套用平移變換
;{{Anchor|gl.Scale}}gl.Scale(matrix_mode, x, y, z, w);
:將目前作用中的矩陣套用縮放變換
;{{Anchor|gl.LoadIdentity}}gl.LoadIdentity(matrix_mode, matrix)
:將目前作用中的矩陣設定為單位矩陣
;{{Anchor|gl.MultMatrix}}gl.MultMatrix(matrix_mode, matrix)
:將目前作用中的矩陣與特定的矩陣相乘
;{{Anchor|gl.LoadMatrix}}gl.LoadMatrix(matrix_mode, matrix)
:將目前作用中的矩陣設定為特定的矩陣
;{{Anchor|gl.getMatrix}}gl.getMatrix(matrix_mode) => mat4 matrix
:取得目前作用中的矩陣
;{{Anchor|gl.uLookAt}}gl.uLookAt(matrix_mode, eye, center, up)
:將目前作用中的矩陣套用眼睛坐標系變換
;{{Anchor|gl.uPerspective}}gl.uPerspective(matrix_mode, fovy, aspect, zNear, zFar)
:將目前作用中的矩陣套用透視投影變換
;{{Anchor|gl.uOrtho2D}}gl.uOrtho2D(matrix_mode, left, right, bottom, top)
:將目前作用中的矩陣套用2D平行投影變換
;{{Anchor|gl.uOrtho}}gl.uOrtho(matrix_mode, left, right, bottom, top, nearVal, farVal)
:將目前作用中的矩陣套用平行投影變換

== shaders ==
;{{Anchor|gl.INIT_GLSL_PROGRAM}}gl.INIT_GLSL_PROGRAM
:預設的著色器程式物件 (WebGLProgram)

;{{Anchor|gl.compileShaderWithSource}}gl.compileShaderWithSource(WebGLShader, code)
:給定原始碼並編譯為著色器

;{{Anchor|gl.compileAndLinkProgram}}gl.compileAndLinkProgram(WebGLProgram, vert_code, frag_code)
:給定原始碼並編譯為著色器,並將著色器與著色器程式連結為可執行的著色器程式物件

;{{Anchor|gl.createProgram}}gl.createProgram() => WebGLProgram
:建立一個著色器程式物件

;{{Anchor|gl.createShader}}gl.createShader(shader_type) => WebGLShader
:建立一個著色器物件

;{{Anchor|shader_type}}shader_type
:;{{Anchor|gl.VERTEX_SHADER}}gl.VERTEX_SHADER
:;{{Anchor|gl.FRAGMENT_SHADER}}gl.FRAGMENT_SHADER

;{{Anchor|gl.uniform...}}gl.uniform...
:傳入uniform變數。有以下幾種變體
:;{{Anchor|gl.uniform1b}}gl.uniform1b(location, bool_value)
:;{{Anchor|gl.uniform1f}}gl.uniform1f(location, v0)
:;{{Anchor|gl.uniform1fv}}gl.uniform1fv(location, arr_value)
:;{{Anchor|gl.uniform1i}}gl.uniform1i(location, v0)
:;{{Anchor|gl.uniform1iv}}gl.uniform1iv(location, arr_value)
:;{{Anchor|gl.uniform2f}}gl.uniform2f(location, v0, v1)
:;{{Anchor|gl.uniform2fv}}gl.uniform2fv(location, arr_value)
:;{{Anchor|gl.uniform2i}}gl.uniform2i(location, v0, v1)
:;{{Anchor|gl.uniform2iv}}gl.uniform2iv(location, arr_value)
:;{{Anchor|gl.uniform3f}}gl.uniform3f(location, v0, v1, v2)
:;{{Anchor|gl.uniform3fv}}gl.uniform3fv(location, arr_value)
:;{{Anchor|gl.uniform3i}}gl.uniform3i(location, v0, v1, v2)
:;{{Anchor|gl.uniform3iv}}gl.uniform3iv(location, arr_value)
:;{{Anchor|gl.uniform4f}}gl.uniform4f(location, v0, v1, v2, v3)
:;{{Anchor|gl.uniform4fv}}gl.uniform4fv(location, arr_value)
:;{{Anchor|gl.uniform4i}}gl.uniform4i(location, v0, v1, v2, v3)
:;{{Anchor|gl.uniform4iv}}gl.uniform4iv(location, arr_value)

;{{Anchor|gl.setMatrixUniforms}}gl.setMatrixUniforms(WebGLProgram)
:將矩陣堆疊的矩陣傳入指定的著色器程式

;{{Anchor|gl.defineMatrix4f}}gl.defineMatrix4f(matrix_mode, uniform)
:定義一個矩陣堆疊矩陣,並連結到著色器程式

== texture mapping ==
;{{Anchor|gl.enableTexture2D}}gl.enableTexture2D()

;{{Anchor|gl.disableTexture2D}}gl.disableTexture2D()

;{{Anchor|gl.isEnabledTexture2D}}gl.isEnabledTexture2D()

;{{Anchor|gl.bindSpecularMap}}gl.bindSpecularMap(texture_id)

;{{Anchor|gl.bindShinessMap}}gl.bindShinessMap(texture_id)

;{{Anchor|gl.bindBumpMap}}gl.bindBumpMap(texture_id)

;{{Anchor|gl.bindParallaxMap}}gl.bindParallaxMap(texture_id, ParallaxStep, DepthScale)

;{{Anchor|gl.bindEmissionMap}}gl.bindEmissionMap(texture_id)

== lighting ==
;{{Anchor|gl.enableLight}}gl.enableLight(param)

;{{Anchor|gl.disableLight}}gl.disableLight(param)

;{{Anchor|gl.Light=function}}gl.Light=function(light_id, light_attrib, param)

;{{Anchor|light_attrib}}light_attrib
:;{{Anchor|gl.AMBIENT}}gl.AMBIENT
:;{{Anchor|gl.DIFFUSE}}gl.DIFFUSE
:;{{Anchor|gl.SPECULAR}}gl.SPECULAR
:;{{Anchor|gl.POSITION}}gl.POSITION
:;{{Anchor|gl.DIRECTION}}gl.DIRECTION
:;{{Anchor|gl.SPOT_CUTOFF}}gl.SPOT_CUTOFF
:;{{Anchor|gl.SPOT_DIRECTION}}gl.SPOT_DIRECTION
:;{{Anchor|gl.SPOT_EXPONENT}}gl.SPOT_EXPONENT
:;{{Anchor|gl.CONSTANT_ATTENUATION}}gl.CONSTANT_ATTENUATION
:;{{Anchor|gl.LINEAR_ATTENUATION}}gl.LINEAR_ATTENUATION
:;{{Anchor|gl.QUADRATIC_ATTENUATION}}gl.QUADRATIC_ATTENUATION

;{{Anchor|gl.Material}}gl.Material(material_attrib, param)

;{{Anchor|material_attrib}}material_attrib
:;{{Anchor|gl.AMBIENT}}gl.AMBIENT
:;{{Anchor|gl.DIFFUSE}}gl.DIFFUSE
:;{{Anchor|gl.SPECULAR}}gl.SPECULAR
:;{{Anchor|gl.EMISSION}}gl.EMISSION
:;{{Anchor|gl.SHININESS}}gl.SHININESS

== foggy effect ==
;{{Anchor|gl.Fog}}gl.Fog(fog_attrib, param)

;{{Anchor|fog_attrib}}fog_attrib
:;{{Anchor|gl.FOG_MODE}}gl.FOG_MODE
:;{{Anchor|gl.FOG_DENSITY}}gl.FOG_DENSITY
:;{{Anchor|gl.FOG_START}}gl.FOG_START
:;{{Anchor|gl.FOG_END}}gl.FOG_END
:;{{Anchor|gl.FOG_DEPTH_MODE}}gl.FOG_DEPTH_MODE
:;{{Anchor|gl.FOG_COLOR}}gl.FOG_COLOR
:;{{Anchor|gl.FOG_COORD_SRC}}gl.FOG_COORD_SRC

;{{Anchor|gl.FOG_MODE}}gl.FOG_MODE
:;{{Anchor|gl.LINEAR}}gl.LINEAR
:;{{Anchor|gl.EXP}}gl.EXP
:;{{Anchor|gl.EXP2}}gl.EXP2

;{{Anchor|gl.enableFog}}gl.enableFog()

;{{Anchor|gl.disableFog}}gl.disableFog()

== Events ==
;{{Anchor|gl.utTimerFunc}}gl.utTimerFunc(time, callback_func(elapsed))
:綁定時鐘事件
;{{Anchor|gl.utDisplayFunc}}gl.utDisplayFunc(callback_func(void))
:綁定繪製事件
;{{Anchor|gl.utIdleFunc}}gl.utIdleFunc(callback_func(void))
:綁定閒置事件
;{{Anchor|gl.utReshapeFunc}}gl.utReshapeFunc(callback_func(width, height))
:綁定形變事件
;{{Anchor|gl.utVisibilityFunc}}gl.utVisibilityFunc(callback_func(visible_state))
:綁定可見性變更事件
;{{Anchor|visible_state}}visible_state
:;{{Anchor|gl.UT_NOT_VISIBLE}}gl.UT_NOT_VISIBLE
:;{{Anchor|gl.UT_VISIBLE}}gl.UT_VISIBLE

;{{Anchor|gl.utPassiveMotionFunc}}gl.utPassiveMotionFunc(callback_func(x, y))
:綁定滑鼠移動事件
;{{Anchor|gl.utMotionFunc}}gl.utMotionFunc(callback_func(x, y, dx, dy))
:綁定滑鼠拖曳事件
;{{Anchor|gl.utMouseFunc}}gl.utMouseFunc(callback_func(eventData, mouse_state, x, y))
:綁定滑鼠點擊事件
;{{Anchor|mouse_state}}mouse_state
:;{{Anchor|gl.UT_UP}}gl.UT_UP
:;{{Anchor|gl.UT_DOWN}}gl.UT_DOWN

== Other ==
;{{Anchor|gl.utGetFPS}}gl.utGetFPS() => int
:取得目前畫面更新率
;{{Anchor|gl.utPostRedisplay}}gl.utPostRedisplay()
:觸發重新繪圖事件
;{{Anchor|gl.utMainLoop}}gl.utMainLoop()
:啟動繪圖流程主迴圈
:see [https://www.opengl.org/resources/libraries/glut/spec3/node14.html]
;{{Anchor|gl.utIsMainLoopRunning}}gl.utIsMainLoopRunning()
:檢查繪圖流程主迴圈是否正在運作
;{{Anchor|gl.utStopMainLoop}}gl.utStopMainLoop()
:停止繪圖流程主迴圈
;{{Anchor|gl.colorToRGBA}}gl.colorToRGBA(color)

;{{Anchor|gl.console_log}}gl.console_log(message1, message2...)

2025年6月12日 (四) 01:17的最新版本