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。

OpenGL的一些重要函数记录的更多相关文章

  1. OpenGL的GLUT初始化函数[转]

    OpenGL的GLUT初始化函数 void glutInit(int* argc,char** argv) 初始化GLUT库.对应main函数的形式应是:int main(int argc,char* ...

  2. 《ORACLE数据库管理与开发》第三章学习之常用函数记录

    <ORACLE数据库管理与开发>第三章学习之常用函数记录 注:文章中的*代表所要操作的列名 1.lower(*)/upper(*),将此列下的值转为小写/大写 2.initcap(*):把 ...

  3. OpenGL(三)——函数大全

    概述 根据自己写的小程序对各个函数进行解释 OpenGL函数 1. 颜色 1.1  glShadeModel 绘制指定两点间其他点颜色的过渡模式 没试 1.2  glColor 设置当前颜色:可以派生 ...

  4. OpenGL(二)——函数库简述

    简述 1. OpenGL用到的库分为OpenGL核心库.OpenGL实用库.OpenGL辅助库和OpenGL工具库(不是必须) 2. OpenGL核心库 核心库包含有115个函数,函数名的前缀为gl ...

  5. OpenGL的glOrtho平行投影函数详解[转]

    glortho函数可以将当前的可视空间设置为正投影空间.基参数的意义如图,如果绘制的图空间本身就是二维的,可以使gluOrtho2D.他的使用类似于glOrtho 原型是: void glOrtho( ...

  6. OpenGL ES之glUniform函数

    函数名: glUniform 功能: 为当前程序对象指定Uniform变量的值.(译者注:注意,由于OpenGL ES由C语言编写,但是C语言不支持函数的重载,所以会有很多名字相同后缀不同的函数版本存 ...

  7. Swift中关于集合计算的几种函数记录(intersect、symmetricDifference、union、subtract)

    很久之前用过一次,后来就忘了...扎心,现在记录一下 PS:这几种函数其实不限于swift内的,在JavaScript.python.DB等其他语言,应该也有类似用法,这里我只简单讲了在swift内的 ...

  8. Opengl中的gluProject函数认识

    1. 从官方说明如下 https://www.opengl.org/sdk/docs/man2/xhtml/gluProject.xml Name gluProject — map object co ...

  9. OpenGL中常用的函数

    OPengl的官方文档如下:https://www.opengl.org/sdk/docs/man4/ void glGetIntegerv(   GLenum pname,      GLint * ...

随机推荐

  1. 优美的代码:do...while(0)

    1.背景 最近再看一个开源代码的时候,看到很多宏经常这么写的: #define XXX do{\ ...\ }) 一眼看到的时候就知道这一份代码执行一次,那么do...while还有什么意义呢?在查阅 ...

  2. docker使用host模式启动nginx

    mkdir -p /root/nginx-docker-demo/html docker run --network=host --rm --name mynginx --volume /root/n ...

  3. GridControl详解(二)表格的列名配置

    点击Run Designer控件上的按钮,弹出视图设计窗口: 列配置: 我们配置完列名后,会发现设计视图发生了变化:

  4. 【Hadoop】用web查看hadoop运行状态

    博文已转移,请借一步说话.http://www.daniubiji.cn/archives/621 上一篇文章(去博客园),我们安装完hadoop,下面我们从视觉上看看hadoop怎么玩的. 我们可以 ...

  5. 【51NOD】1135 原根

    [题意]给定p,求p的原根g.3<=p<=10^9. [算法]数学 [题解]p-1= p1^a1 * p2^a2 * pk^ak,g是p的原根当且仅当对于所有的pi满足g^[ (p-1)/ ...

  6. 零基础讲解JavaScript函数

    一 JavaScript函数1 什么是函数  函数是一组代码(指令)的集合,通常用来完成某个单一的功能.(书的目录和章节,电视剧剧集的名称等)2 为什么要使用函数  2.1 把复杂程序划分成不同的功能 ...

  7. 去除IE10+上文本框巨丑无比的删除图标以及显示密码图标

    去除IE10+上文本框巨丑无比的删除图标以及显示密码图标 IE浏览器总是让人喜欢让人厌,在最新的IE浏览器(IE10+)上使用表单时,文本框内后面会出现很巨丑无比的“删除图标”以及“显示密码图标”,如 ...

  8. Linux下文件目录权限和对应命令的总结

    Linux下的权限有rwx三种,分别对应读,写,执行三种,在对文件和目录时,分别是下列含义: 对应权限的命令为: 文件: r-- cat, more, head, tail w-- echo, vi ...

  9. device tree --- #address-cells and #size-cells property

    device tree source Example1 / { #address-cells = <0x1>; // 在 root node 下使用 1 個 u32 來代表 address ...

  10. 架构师必须搞懂DNS【转】

    DNS,全称Domain Name System,即域名系统,搞清楚,它不是DNF地下城与勇士. DNS是怎么来的,我们知道要访问一个服务器的资源可以通过IP的形式访问,但IP地址比较难记,也不方便读 ...