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. 2017 ACM-ICPC 西安网络赛 F.Trig Function Chebyshev多项式

    自己太菜,数学基础太差,这场比赛做的很糟糕.本来想吐槽出题人怎么都出很数学的题,现在回过头来想还是因为自己太垃圾,竞赛就是要多了解点东西. 找$f(cos(x))=cos(nx)$中$x^m$的系数模 ...

  2. Css Sprite 图片等比缩放图片大小

    图片大小80*40,即每张图片大小40*40,如何以20*20显示图片?1. 首先看下如何以40*40显示第二张图片: 正常显示css代码 .sprite { background-image: ur ...

  3. Centos7系统环境下Solr之Java实战(一)搭建solr服务器

    搭建步骤 1.分别上传tomcat.sorl到指定文件夹并解压 2.把solr部署到Tomcat下 通过命令 cp apache-tomcat-7.0.47 /usr/local/sorl/tomca ...

  4. 《JavaScript 实战》:JavaScript 图片滑动切换效果

    看到alibaba的一个图片切换效果,感觉不错,想拿来用用.但代码一大堆的,看着昏,还是自己来吧.由于有了做图片滑动展示效果的经验,做这个就容易得多了. 效果预览 仿淘宝/alibaba图片切换: 默 ...

  5. styled-components真的好吗?

    最近在学习react,然后遇到react中css该怎么写这个问题,上知乎上看了好多大牛都说styled-components好用是大势所趋. 但我自己用了感觉体验却很差,我在这里说说我为啥觉得styl ...

  6. Hbuilder连接第3方模拟器(夜神)

    http://www.bcty365.com/content-146-5148-1.html

  7. iOS中响应者链条-触摸事件,hitTest方法坐标转换

    总体来说,分2个步骤: 一,从上到下寻找合适的控件来处理这个触摸事件.如下图,如果点击了黄色4,则UIApplication -> UIWindow -> 1白色 -> 2橙色 -& ...

  8. Deep Learning基础--机器翻译BLEU与Perplexity详解

    前言 近年来,在自然语言研究领域中,评测问题越来越受到广泛的重视,可以说,评测是整个自然语言领域最核心和关键的部分.而机器翻译评价对于机器翻译的研究和发展具有重要意义:机器翻译系统的开发者可以通过评测 ...

  9. 开源介绍:Google Guava、Google Guice、Joda-Time

    一.Guava 是一个 Google 的基于java1.6的类库集合的扩展项目,包括 collections, caching, primitives support, concurrency lib ...

  10. sshd_config OpenSSH SSH 进程配置文件配置说明

    名称 sshd_config – OpenSSH SSH 服务器守护进程配置文件 大纲 /etc/ssh/sshd_config 描述sshd 默认从 /etc/ssh/sshd_config 文件( ...