Gambas文档
编译和安装
错误消息
代码片段
翻译
废弃的组件
教程
开发环境文档
开发者文档
名词解释
如何操作
说明
维基手册
维基搜索
维基许可协议
文档
应用程序仓库
语言概览
语言索引
主题
组件
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.x11
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.qt
gb.gui.qt.ext
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.highlight
gb.image
gb.image.effect
gb.image.io
gb.inotify
gb.logging
gb.map
gb.media
gb.media.form
gb.mime
gb.mongodb
gb.mysql
gb.ncurses
gb.net
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.opengl
Gl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webview
gb.qt6
gb.qt6.ext
gb.qt6.opengl
gb.qt6.webview
gb.report
gb.report2
gb.sdl
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
最近的修改

Gl.EvalCoord1f (gb.opengl)

Static Sub EvalCoord1f ( U As Float )

Evaluate enabled one- and two-dimensional maps.

Parameters

u

Specifies a value that is the domain coordinate u to the basis function defined in a previous Gl.Map1 or Gl.Map2 command.
v

Specifies a value that is the domain coordinate v to the basis function defined in a previous Gl.Map2 command. This argument is not present in a Gl.EvalCoord1 command.

Parameters

u

Specifies a pointer to an array containing either one or two domain coordinates. The first coordinate is u. The second coordinate is v, which is present only in Gl.EvalCoord2 versions.

Description

Gl.EvalCoord1 evaluates enabled one-dimensional maps at argument u. Gl.EvalCoord2 does the same for two-dimensional maps using two domain values, u and v. To define a map, call Gl.Map1 and Gl.Map2; to enable and disable it, call Gl.Enable and Gl.Disable.

When one of the Gl.EvalCoord commands is issued, all currently enabled maps of the indicated dimension are evaluated. Then, for each enabled map, it is as if the corresponding GL command had been issued with the computed value. That is, if Gl.MAP1_INDEX or Gl.MAP2_INDEX is enabled, a Gl.Index command is simulated. If Gl.MAP1_COLOR_4 or Gl.MAP2_COLOR_4 is enabled, a Gl.Color command is simulated. If Gl.MAP1_NORMAL or Gl.MAP2_NORMAL is enabled, a normal vector is produced, and if any of Gl.MAP1_TEXTURE_COORD_1, Gl.MAP1_TEXTURE_COORD_2, Gl.MAP1_TEXTURE_COORD_3, Gl.MAP1_TEXTURE_COORD_4, Gl.MAP2_TEXTURE_COORD_1, Gl.MAP2_TEXTURE_COORD_2, Gl.MAP2_TEXTURE_COORD_3, or Gl.MAP2_TEXTURE_COORD_4 is enabled, then an appropriate Gl.TexCoord command is simulated.

For color, color index, normal, and texture coordinates the GL uses evaluated values instead of current values for those evaluations that are enabled, and current values otherwise, However, the evaluated values do not update the current values. Thus, if Gl.Vertex commands are interspersed with Gl.EvalCoord commands, the color, normal, and texture coordinates associated with the Gl.Vertex commands are not affected by the values generated by the Gl.EvalCoord commands, but only by the most recent Gl.Color, Gl.Index, Gl.Normal, and Gl.TexCoord commands.

No commands are issued for maps that are not enabled. If more than one texture evaluation is enabled for a particular dimension (for example, Gl.MAP2_TEXTURE_COORD_1 and Gl.MAP2_TEXTURE_COORD_2), then only the evaluation of the map that produces the larger number of coordinates (in this case, Gl.MAP2_TEXTURE_COORD_2) is carried out. Gl.MAP1_VERTEX_4 overrides Gl.MAP1_VERTEX_3, and Gl.MAP2_VERTEX_4 overrides Gl.MAP2_VERTEX_3, in the same manner. If neither a three- nor a four-component vertex map is enabled for the specified dimension, the Gl.EvalCoord command is ignored.

If you have enabled automatic normal generation, by calling Gl.Enable with argument Gl.AUTO_NORMAL, Gl.EvalCoord2 generates surface normals analytically, regardless of the contents or enabling of the Gl.MAP2_NORMAL map. Let

m p u × p v

Then the generated normal n is n m m

If automatic normal generation is disabled, the corresponding normal map Gl.MAP2_NORMAL, if enabled, is used to produce a normal. If neither automatic normal generation nor a normal map is enabled, no normal is generated for Gl.EvalCoord2 commands.

Associated Gets

Gl.IsEnabled with argument Gl.MAP1_VERTEX_3

Gl.IsEnabled with argument Gl.MAP1_VERTEX_4

Gl.IsEnabled with argument Gl.MAP1_INDEX

Gl.IsEnabled with argument Gl.MAP1_COLOR_4

Gl.IsEnabled with argument Gl.MAP1_NORMAL

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_1

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_2

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_3

Gl.IsEnabled with argument Gl.MAP1_TEXTURE_COORD_4

Gl.IsEnabled with argument Gl.MAP2_VERTEX_3

Gl.IsEnabled with argument Gl.MAP2_VERTEX_4

Gl.IsEnabled with argument Gl.MAP2_INDEX

Gl.IsEnabled with argument Gl.MAP2_COLOR_4

Gl.IsEnabled with argument Gl.MAP2_NORMAL

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_1

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_2

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_3

Gl.IsEnabled with argument Gl.MAP2_TEXTURE_COORD_4

Gl.IsEnabled with argument Gl.AUTO_NORMAL

Gl.GetMap

See also

Gl.Begin, Gl.Enable, Gl.EvalMesh, Gl.EvalPoint, Gl.Index, Gl.Map1, Gl.Map2, Gl.MapGrid, Gl.Normal, Gl.TexCoord, Gl.Vertex

See original documentation on OpenGL website