glViewport — set the viewport

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glViewport.xhtml

glQueryCounter — 在所有以前的命令到达GL服务器但还没有执行的情况下,将GL时间记录到查询对象中。

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glQueryCounter.xhtml

glOrtho — glOrtho函数将当前矩阵乘以一个正投影矩阵。

https://msdn.microsoft.com/en-us/library/windows/desktop/dd373965(v=vs.85).aspx

glGetUniformLocation — Returns the location of a uniform variable

Parameters

  • program
    Specifies the program object to be queried.

  • name
    Points to a null terminated string containing the name of the uniform variable whose location is to be queried.

glGetUniformLocation返回一个整数,表示程序对象内特定统一变量的位置。名称必须是不包含空格的空终止字符串。名称必须是程序中的活动统一变量名称,该名称不是结构,结构数组或矩阵或矢量的子组件。如果名称与程序中的活动统一变量不一致,如果名称以保留前缀“gl_”开头,或者名称与原子计数器或命名统一块相关联,则此函数返回-1。

可以通过为结构中的每个字段调用glGetUniformLocation来查询结构或结构数组的统一变量。数组元素运算符“[]”和结构字段运算符“。”可以用于名称以便选择阵列内的元素或结构内的字段。使用这些运算符的结果不允许是另一种结构,一组结构或矢量或矩阵的子组件。除非名称的最后部分表示统一变量数组,否则可以使用数组名称或通过使用“[0]”附加的名称来检索数组第一个元素的位置。

在程序对象成功链接之前,分配给统一变量的实际位置是未知的。发生链接后,可以使用命令glGetUniformLocation来获取统一变量的位置。然后可以将此位置值传递给glUniform以设置统一变量的值或glGetUniform以查询统一变量的当前值。程序对象成功链接后,统一变量的索引值保持固定,直到发生下一个链接命令。如果链接成功,则只能在链接后查询统一的变量位置和值。

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetUniformLocation.xhtml

glUniform — Specify the value of a uniform variable for the current program object

Parameters

  • location
    Specifies the location of the uniform variable to be modified.

  • count
    For the vector (glUniformv) commands, specifies the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array.
    For the matrix (glUniformMatrix
    ) commands, specifies the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices.

  • transpose
    For the matrix commands, specifies whether to transpose the matrix as the values are loaded into the uniform variable.

  • v0, v1, v2, v3
    For the scalar commands, specifies the new values to be used for the specified uniform variable.

  • value
    For the vector and matrix commands, specifies a pointer to an array of count values that will be used to update the specified uniform variable.

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetUniformLocation.xhtml

glGetQueryObject — return parameters of a query object

Parameters

  • id
    Specifies the name of a query object.

  • pname
    Specifies the symbolic name of a query object parameter. Accepted values are GL_QUERY_RESULT or GL_QUERY_RESULT_AVAILABLE.

  • params
    If a buffer is bound to the GL_QUERY_RESULT_BUFFER target, then params is treated as an offset to a location within that buffer's data store to receive the result of the query. If no buffer is bound to GL_QUERY_RESULT_BUFFER, then params is treated as an address in client memory of a variable to receive the resulting data.

描述

glGetQueryObject以params方式返回由id指定的查询对象的选定参数。

pname命名一个特定的查询对象参数。 pname可以如下所示:

GL_QUERY_RESULT
params返回查询对象的传递采样计数器的值。 初始值为0。

GL_QUERY_RESULT_NO_WAIT
如果查询结果可用(即,GL_QUERY_RESULT_AVAILABLE的查询将返回非零值),则params将返回查询对象的传递样本计数器的值,否则,不会修改由params引用的数据。 初始值为0。

GL_QUERY_RESULT_AVAILABLE
params返回传递的样本计数器是否立即可用。 如果发生延迟等待查询结果,则返回GL_FALSE。 否则,返回GL_TRUE,这也表示前面所有查询的结果也可用。

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetQueryObject.xhtml

glFramebufferTexture2D — attach a texture image to a framebuffer object

Parameters
  • target
    Specifies the framebuffer target. The symbolic constant must be GL_FRAMEBUFFER.

  • attachment
    Specifies the attachment point to which an image from texture should be attached. Must be one of the following symbolic constants: GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, or GL_STENCIL_ATTACHMENT.

  • textarget
    Specifies the texture target. Must be one of the following symbolic constants: GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.

  • texture
    Specifies the texture object whose image is to be attached.

  • level
    Specifies the mipmap level of the texture image to be attached, which must be 0.

Description
glFramebufferTexture2D将texture和level指定的纹理图像作为当前绑定帧缓冲区对象的逻辑缓冲区之一。附件指定纹理图像是否应附加到帧缓冲区对象的颜色,深度或模板缓冲区。纹理图像可能不会附加到默认帧缓冲区对象名称0。

如果纹理不为0,则指定连接点的GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE值设置为GL_TEXTURE,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME的值设置为纹理,并且GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL的值设置为级别。如果纹理是立方体贴图纹理,则将GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE的值设置为textarget;否则将其设置为默认值GL_TEXTURE_CUBE_MAP_POSITIVE_X。当前绑定的帧缓冲区对象的附件逻辑缓冲区的任何先前附件都被破坏。

如果纹理为0,则将当前图像(如果有)连接到当前绑定的帧缓冲区对象的附件逻辑缓冲区。 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE的值被设置为GL_NONE。 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME的值被设置为0. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL和GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE分别被设置为默认值0和GL_TEXTURE_CUBE_MAP_POSITIVE_X。
posted on 2018-04-21 09:05  yoyo_sincerely  阅读(356)  评论(0编辑  收藏  举报