现在的位置: 首页 > 综合 > 正文

OpenGL 4.3 (Core Profile) – August 6, 2012 spec Fundamental 2.5 Objects and the Object Model

2018年05月27日 ⁄ 综合 ⁄ 共 4615字 ⁄ 字号 评论关闭

Generated names do not initially correspond to an instance of an object. Objects
with generated names are created by binding a generated name to the context.
For example, a buffer object is created by calling the command BindBuffer with a
name returned by GenBuffers, which allocates resources for the buffer object and

its state, and associate the name with that object.


If an object is deleted while it is currently in use by a GL context, its name
is immediately marked as unused, and some types of objects are automatically
unbound from binding points in the current context, as described in section 5.1.2.
However, the actual underlying object is not deleted until it is no longer in use.
This situation is discussed in more detail in section 5.1.3

2.5.5 Program Pipeline Objects
Program pipeline objects contain a separate program object binding point for each
programmable stage. They allow a primitive to be processed by independent programs
in each programmable stage, instead of requiring a single program object
for each combination of shader operations. They allow greater flexibility when
combining different shaders in various ways, without requiring a program object
for each such combination.
Program pipeline objects are container objects including references to program
objects, and are not shared
. They are described in detail in chapter 7.

2.5.6 Texture Objects
Texture objects or textures include a collection of texture images built from arrays
of image elements referred to as texels. There are many types of texture objects
varying by dimensionality and structure; the different texture types are described
in detail in the introduction to chapter 8.
Texture objects also include state describing the image parameters of the texture
images, and state describing how sampling is performed when a shader accesses
a texture.
Shaders may sample a texture at a location indicated by specified texture coordinates,
with details of sampling determined by the sampler state of the texture.
The resulting texture samples are typically used to modify a fragment’s color, in
order to map an image onto a geometric primitive being drawn, but may be used
for any purpose in a shader.
Texture objects may be shared. They are described in detail in chapter 8.
2.5.7 Sampler Objects
Sampler objects contain the subset of texture object state controlling how sampling
is performed when a shader accesses a texture. Sampler and texture objects may be
bound together so that the sampler object state is used by shaders when sampling
the texture, overriding equivalent state in the texture object. Separating texture
image data from the method of sampling that data allows reuse of the same sampler
state with many different textures without needing to set the sampler state in each
texture.
Sampler objects may be shared. They are described in detail in chapter 8.

2.5.8 Renderbuffer Objects
Renderbuffer objects contain a single image in a format which can be rendered
to. Renderbuffer objects are attached to framebuffer objects (see below) when
performing off-screen rendering.
Renderbuffer objects may be shared. They are described in detail in chapter 9.

2.5.9 Framebuffer Objects
Framebuffer objects encapsulate the state of a framebuffer, including a collection of
color, depth, and stencil buffers. Each such buffer is represented by a renderbuffer
object or texture object attached to the framebuffer object.
Framebuffer objects are container objects including references to renderbuffer
and/or texture objects, and are not shared. They are described in detail in chapter 9.

2.5.10 Vertex Array Objects
Vertex array objects represent a collection of sets of vertex attributes. Each set
is stored as an array in a buffer object data store, with each element of the array
having a specified format and component count. The attributes of the currently
bound vertex array object are used as inputs to the vertex shader when executing
drawing commands.
Vertex array objects are container objects including references to buffer objects,
and are not shared. They are described in detail in chapter 10.

2.5.11 Transform Feedback Objects
Transform feedback objects are used to capture attributes of the vertices of transformed
primitives passed to the transform feedback stage when transform feedback
mode is active. They include state required for transform feedback together with
references to buffer objects in which attributes are captured.
Transform feedback objects are container objects including references to buffer
objects, and are not shared. They are described in detail in section 13.2.1.

2.5.12 Query Objects
Query objects return information about the processing of a sequence of GL commands,
such as the number of primitives processed by drawing commands; the
number of primitives written to transform feedback buffers; the number of samples
that pass the depth test during fragment processing; and the amount of time
required to process commands.
Query objects are not shared. They are described in detail in section 4.2.

2.5.13 Sync Objects
A sync object acts as a synchronization primitive – a representation of events whose
completion status can be tested or waited upon. Sync objects may be used for synchronization
with operations occuring in the GL state machine or in the graphicspipeline, and for synchronizing between multiple graphics contexts, among other purposes
.

Sync objects may be shared. They are described in detail in section 4.1.

抱歉!评论已关闭.