没有合适的资源?快使用搜索试试~ 我知道了~
首页OpenGL 4.5 完整参考手册:核心功能与兼容性指南
OpenGL 4.5 完整参考手册:核心功能与兼容性指南
需积分: 18 7 下载量 175 浏览量
更新于2024-07-15
收藏 118.49MB PDF 举报
"OpenGL4.5 Reference Pages.pdf" 是一份全面的OpenGL图形学参考资料,专为学习和理解OpenGL 4.5版本设计。这份文档详细地列出了所有命令和函数的使用指南,包括参数描述、返回值、错误处理、相关命令和函数,以及版本兼容性信息。它提供两种类型的索引供用户选择:传统的扁平索引,将API命令和GLSL函数合并在一起;以及折叠式索引,分别针对命令和函数进行分组,方便查找。 核心功能部分专门关注OpenGL 4.5的核心特性,对于兼容性上下文的功能,文档建议查阅OpenGL 2.1 Reference Pages,或者参考感兴趣的特定扩展规范。在技术实现上,这些参考页面是用HTML5格式编写的,并嵌入了MathML支持数学公式,以确保更精确和清晰的表述。然而,由于其依赖现代浏览器的技术特性,如IE8及更早版本可能无法正常显示某些页面,推荐使用支持HTML5的现代浏览器,如IE9及以上版本来获取最佳阅读体验。 在学习过程中,这份文档是深入掌握OpenGL编程的宝贵资源,无论是初学者还是高级开发者,都能从中找到所需的信息,进行高效和精确的编程实践。对于图形渲染、3D图形处理、GPU编程等方面的研究,它是不可或缺的参考资料。同时,了解文档中的错误条件和版本兼容性信息,有助于开发者在实际项目中避免潜在问题,确保程序的稳定性和跨平台性能。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/13722388/bg10.jpg)
target
is GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN,
index
must be less than
the value of GL_MAX_VERTEX_STREAMS.
If
target
is GL_TIME_ELAPSED,
id
must be an unused name, or the name of an
existing timer query object previously bound to the GL_TIME_ELAPSED query
binding. When glBeginQueryIndexed is executed, the query object's time
counter is reset to 0. When glEndQueryIndexed is executed, the elapsed server
time that has passed since the call to glBeginQueryIndexed is written into the
query object's time counter. This value can be queried by calling glGetQueryObject
with
pname
GL_QUERY_RESULT. When
target
is GL_TIME_ELAPSED,
index
must be zero.
Querying the GL_QUERY_RESULT implicitly flushes the GL pipeline until the rendering
delimited by the query object has completed and the result is available.
GL_QUERY_RESULT_AVAILABLE can be queried to determine if the result is
immediately available or if the rendering is not yet complete.
Notes
If the query target's count exceeds the maximum value representable in the
number of available bits, as reported by glGetQueryiv with
target
set to the
appropriate query target and
pname
GL_QUERY_COUNTER_BITS, the count becomes
undefined.
An implementation may support 0 bits in its counter, in which case query results
are always undefined and essentially useless.
When GL_SAMPLE_BUFFERS is 0, the samples-passed counter of an occlusion query
will increment once for each fragment that passes the depth test. When
GL_SAMPLE_BUFFERS is 1, an implementation may either increment the samples-
passed counter individually for each sample of a fragment that passes the depth
test, or it may choose to increment the counter for all samples of a fragment if any
one of them passes the depth test.
Calling glBeginQuery or glEndQuery is equivalent to calling glBeginQueryIndexed
or glEndQueryIndexed with
index
set to zero, respectively.
Errors
GL_INVALID_ENUM is generated if
target
is not one of the accepted tokens.
GL_INVALID_VALUE is generated if
index
is greater than the query target-specific
maximum.
GL_INVALID_OPERATION is generated if glBeginQueryIndexed is executed while a
query object of the same
target
is already active.
GL_INVALID_OPERATION is generated if glEndQueryIndexed is executed when a
query object of the same
target
is not active.
GL_INVALID_OPERATION is generated if
id
is 0.
GL_INVALID_OPERATION is generated if
id
is the name of an already active query
object.
GL_INVALID_OPERATION is generated if
id
refers to an existing query object whose
type does not does not match
target
.
Version Support
![](https://csdnimg.cn/release/download_crawler_static/13722388/bg11.jpg)
OpenGL Version
Function / Feature Name
2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5
OpenGL Version
Function / Feature Name
2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5
glBeginQueryIndexed - - - - - - ✔ ✔ ✔ ✔ ✔ ✔
glEndQueryIndexed - - - - - - ✔ ✔ ✔ ✔ ✔ ✔
See Also
glBeginQuery, glDeleteQueries, glEndQuery, glGenQueries, glGetQueryObject,
glGetQueryiv, glIsQuery
Copyright
Copyright © 2010-2014 Khronos Group. This material may be distributed subject
to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June
1999. http://opencontent.org/openpub/.
![](https://csdnimg.cn/release/download_crawler_static/13722388/bg12.jpg)
Name
glBeginTransformFeedback — start transform feedback operation
C Specification
void glBeginTransformFeedback( GLenum primitiveMode);
void glEndTransformFeedback( void);
Parameters for glBeginTransformFeedback
primitiveMode
Specify the output type of the primitives that will be recorded into the buffer
objects that are bound for transform feedback.
Description
Transform feedback mode captures the values of varying variables written by the
vertex shader (or, if active, the geometry shader). Transform feedback is said to be
active after a call to glBeginTransformFeedback until a subsequent call to
glEndTransformFeedback. Transform feedback commands must be paired.
If no geometry shader is present, while transform feedback is active the
mode
parameter to glDrawArrays must match those specified in the following table:
Transform
Feedback
primitiveMode
Allowed Render Primitive
modes
GL_POINTS GL_POINTS
GL_LINES GL_LINES, GL_LINE_LOOP, GL_LINE_STRIP,
GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY
GL_TRIANGLES GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN,
GL_TRIANGLES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY
If a geometry shader is present, the output primitive type from the geometry
shader must match those provided in the following table:
Transform Feedback
primitiveMode
Allowed Geometry Shader Output Primitive
Type
GL_POINTS points
GL_LINES line_strip
GL_TRIANGLES triangle_strip
![](https://csdnimg.cn/release/download_crawler_static/13722388/bg13.jpg)
Notes
Geometry shaders, and the GL_TRIANGLES_ADJACENCY,
GL_TRIANGLE_STRIP_ADJACENCY, GL_LINES_ADJACENCY and
GL_LINE_STRIP_ADJACENCY primtive modes are available only if the GL version is
3.2 or greater.
Errors
GL_INVALID_OPERATION is generated if glBeginTransformFeedback is executed
while transform feedback is active.
GL_INVALID_OPERATION is generated if glEndTransformFeedback is executed
while transform feedback is not active.
GL_INVALID_OPERATION is generated by glDrawArrays if no geometry shader is
present, transform feedback is active and
mode
is not one of the allowed modes.
GL_INVALID_OPERATION is generated by glDrawArrays if a geometry shader is
present, transform feedback is active and the output primitive type of the
geometry shader does not match the transform feedback
primitiveMode
.
GL_INVALID_OPERATION is generated by glBeginTransformFeedback if any
binding point used in transform feedback mode does not have a buffer object
bound.
GL_INVALID_OPERATION is generated by glBeginTransformFeedback if no
binding points would be used, either because no program object is active of
because the active program object has specified no varying variables to record.
Version Support
OpenGL Version
Function / Feature Name
2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5
glBeginTransformFeedback - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
glEndTransformFeedback - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
See Also
Copyright
Copyright © 2010-2014 Khronos Group. This material may be distributed subject
to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June
1999. http://opencontent.org/openpub/.
![](https://csdnimg.cn/release/download_crawler_static/13722388/bg14.jpg)
Name
glBindAttribLocation — Associates a generic vertex attribute index with a named
attribute variable
C Specification
void glBindAttribLocation( GLuint program,
GLuint index,
const GLchar *name);
Parameters
program
Specifies the handle of the program object in which the association is to be
made.
index
Specifies the index of the generic vertex attribute to be bound.
name
Specifies a null terminated string containing the name of the vertex shader
attribute variable to which
index
is to be bound.
Description
glBindAttribLocation is used to associate a user-defined attribute variable in the
program object specified by
program
with a generic vertex attribute index. The name
of the user-defined attribute variable is passed as a null terminated string in
name
.
The generic vertex attribute index to be bound to this variable is specified by
index
.
When
program
is made part of current state, values provided via the generic vertex
attribute
index
will modify the value of the user-defined attribute variable specified
by
name
.
If
name
refers to a matrix attribute variable,
index
refers to the first column of the
matrix. Other matrix columns are then automatically bound to locations
index+1
for
a matrix of type mat2;
index+1
and
index+2
for a matrix of type mat3; and
index+1
,
index+2
, and
index+3
for a matrix of type mat4.
This command makes it possible for vertex shaders to use descriptive names for
attribute variables rather than generic variables that are numbered from zero to
the value of GL_MAX_VERTEX_ATTRIBS minus one. The values sent to each generic
attribute index are part of current state. If a different program object is made
current by calling glUseProgram, the generic vertex attributes are tracked in such a
way that the same values will be observed by attributes in the new program object
that are also bound to
index
.
Attribute variable name-to-generic attribute index bindings for a program object
can be explicitly assigned at any time by calling glBindAttribLocation. Attribute
bindings do not go into effect until glLinkProgram is called. After a program object
剩余3503页未读,继续阅读
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/70e8bb5e70a144b28bcbdd1c8116c811_weixin_43555932.jpg!1)
优然悠哉
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 计算机人脸表情动画技术发展综述
- 关系数据库的关键字搜索技术综述:模型、架构与未来趋势
- 迭代自适应逆滤波在语音情感识别中的应用
- 概念知识树在旅游领域智能分析中的应用
- 构建is-a层次与OWL本体集成:理论与算法
- 基于语义元的相似度计算方法研究:改进与有效性验证
- 网格梯度多密度聚类算法:去噪与高效聚类
- 网格服务工作流动态调度算法PGSWA研究
- 突发事件连锁反应网络模型与应急预警分析
- BA网络上的病毒营销与网站推广仿真研究
- 离散HSMM故障预测模型:有效提升系统状态预测
- 煤矿安全评价:信息融合与可拓理论的应用
- 多维度Petri网工作流模型MD_WFN:统一建模与应用研究
- 面向过程追踪的知识安全描述方法
- 基于收益的软件过程资源调度优化策略
- 多核环境下基于数据流Java的Web服务器优化实现提升性能
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)