Module three_d::core [−][src]
Expand description
Modular abstractions of common graphics concepts such as GPU shader program, buffer (vertex buffer, uniform buffer, element buffer), texture (2D texture, cube texture, ..) and render target. They are higher level than context but lower level than other features.
Structs
BlendParameters | Defines which type of blending to use for a render call. Blending allows combining each color channel of a render call with the color already in the color channels of the render target. This is usually used to simulate transparency. |
ClearState | Defines which channels (red, green, blue, alpha and depth) to clear when starting to write to a
render target or the screen.
If |
ColorTargetTexture2D | A 2D color texture that can be rendered into and read from. |
ColorTargetTexture2DArray | A array of 2D color textures that can be rendered into. |
Context | Contains the graphics API for almost direct calls to OpenGL/WebGL. Used internally in the higher level features and can safely be ignored unless you want more control. |
DepthTargetTexture2D | A 2D depth texture that can be rendered into and read from. See also RenderTarget. |
DepthTargetTexture2DArray | An array of 2D depth textures that can be rendered into and read from. See also RenderTargetArray. |
ElementBuffer | A buffer containing indices for rendering, see for example draw_elements. Also known as an index buffer. |
Program | A shader program consisting of a programmable vertex shader followed by a programmable fragment shader. Functionality includes transferring per vertex data to the vertex shader (see the use_attribute functionality) and transferring uniform data to both shader stages (see the use_uniform and use_texture functionality) and execute the shader program (see the draw functionality). |
RenderStates | A set of render specific states that has to be specified at each render call. |
RenderTarget | Adds additional functionality to write to and copy from both a ColorTargetTexture2D and a DepthTargetTexture2D at the same time. It purely adds functionality, so it can be created each time it is needed, the data is saved in the textures. |
RenderTargetArray | Adds additional functionality to write to and copy from both a ColorTargetTexture2DArray and a DepthTargetTexture2DArray at the same time. It purely adds functionality, so it can be created each time it is needed, the data is saved in the textures. |
Screen | The screen render target which is essential to get something on the screen (see the write function). |
Texture2D | A 2D texture, basically an image that is transferred to the GPU. For a texture that can be rendered into, see ColorTargetTexture2D. |
TextureCubeMap | A texture that covers all 6 sides of a cube. |
UniformBuffer | A buffer for transferring a set of uniform variables to the shader program (see also use_uniform_block). |
VertexBuffer | A buffer containing per vertex data, for example positions, normals, uv coordinates or colors (see also use_attribute, use_attribute_vec2, etc.). |
WriteMask | Defines which channels (red, green, blue, alpha and depth) to write to in a render call. |
Enums
BlendEquationType | How the source and target color or alpha value are combined in blend parameters. |
BlendMultiplierType | Value multiplied with the source or target color or alpha value in blend parameters. |
CopyDestination | The destination of applying a copy. |
CullType | Defines whether the triangles that are backfacing, frontfacing or both should be skipped in a render call. |
DepthFormat | Type of formats for depth render targets (DepthTargetTexture2D and DepthTargetTexture2DArray). |
DepthTestType | Determines whether or not a fragment/pixel from the current render call should be discarded when comparing its depth with the depth of the current fragment/pixel. |
Error | Error in some part of the render engine. |
Format | Possible formats for pixels in a texture. |
Interpolation | Possible modes of interpolation which determines the texture output between texture pixels. |
Wrapping | Possible wrapping modes for a texture which determines how the texture is applied outside of the [0..1] uv coordinate range. |
Traits
Texture | A texture that can be sampled in a fragment shader (see use_texture). |
TextureArray | A texture array that can be sampled in a fragment shader (see use_texture_array). |
TextureCube | A texture cube that can be sampled in a fragment shader (see use_texture_cube). |