Ritchie's Abstractions 0.2
Platform abstractions that make Toolbox work
Loading...
Searching...
No Matches
Ritchie.Graphics Namespace Reference

Classes

struct  BlendState
 Structure defining how the GPU should perform blending when outputting pixels onto a surface. More...
 
class  CacheState
 An object that can be used to track the state of a cache. More...
 
class  CastHelpers
 
struct  Color
 A structure representing a single RGB color with an alpha channel, one byte per channel. More...
 
class  ConstantBuffer
 An area of GPU memory to store shader constants (in other words, material parameters). More...
 
struct  DepthStencilState
 A structure defining how a GPU should perform depth testing and stencil testing. More...
 
class  FrameBuffer
 A graphics frame buffer. This is a 2-dimensional surface that can both be used as a texture and used as a destination for rendering. More...
 
class  GraphicsDevice
 Abstraction of a 3D graphics rendering backend. More...
 
class  GraphicsObject
 Base class for all graphics-related objects. These objects, when constructed, are bound to the GraphicsDevice.Current. Therefore, do not create these when no device is current. More...
 
struct  HsvColor
 A color expressed in hue-saturation-value format. More...
 
interface  IGraphicsContext
 Interface representing a graphics display. More...
 
class  IndexBuffer< TElement >
 A graphics buffer containing vertex indices. More...
 
interface  IPlatformResource< TFrontFacing >
 
interface  IResourceHandle
 Interface for all platform resources. More...
 
class  MathHelper
 Static class containing various mathematical constants and functions. More...
 
class  Platform
 The base class for the foundation on which all life sits atop. More...
 
class  PlatformConstantBuffer
 
class  PlatformFrameBuffer
 
class  PlatformIndexBuffer< TIndex >
 
class  PlatformShader
 
class  PlatformShaderPipeline
 
class  PlatformTexture
 
class  PlatformTexture2D
 
class  PlatformVertexBuffer< TElementType >
 
struct  Point
 Structure representing a point in 2D space, usually expressed as pixel values. More...
 
struct  RasterizerState
 Structure containing settings for a graphics device's rasterization stage. More...
 
struct  Rectangle
 Structure representing a 2D axis-aligned bounding rectangle. More...
 
class  ResourceCollection
 A class containing a collection of unmanaged resources.
 
struct  SamplerState
 Structure containing settings for a texture sampler. More...
 
class  Shader
 Class representing a single stage within a shader pipeline (such as a single vertex shader). More...
 
class  ShaderPipeline
 A class representing an entire shader pipeline. More...
 
class  Texture
 Class representing a graphics texture. More...
 
class  Texture2D
 Class representing a 2D image. More...
 
struct  VertexAttribute
 Structure that contains information about how a graphics device should interpret a vertex type's fields. More...
 
class  VertexBuffer< TElement >
 A buffer of graphics memory containing structured vertex data. More...
 
class  VertexFieldUsageAttribute
 An attribute that can be applied to fields of a vertex structure in order to explicitly state how a graphics device should treat the field. More...
 
class  VertexLayout
 

Enumerations

enum  BlendFactor {
  Zero , One , SourceColor , OneMinusSourceColor ,
  DestinationColor , OneMinusDestinationColor , SourceAlpha , OneMinusSourceAlpha ,
  DestinationAlpha , OneMinusDestinationAlpha , ConstantColor , OneMinusConstantColor ,
  ConstantAlpha , OneMinusConstantAlpha
}
 
enum  BlendFunction {
  Add , Subtract , ReverseSubtract , Min ,
  Max
}
 Enum indicating how the channels of two images are to be blended together. More...
 
enum  BufferUsage { Static , Dynamic , Stream }
 Enum indicating how a graphics buffer should be treated by the graphics backend. More...
 
enum  CullMode { None , Clockwise , CounterClockwise }
 Enum representing how a graphics device should cull geometry. More...
 
enum  DepthStencilFormat {
  None , Depth16 , Depth24 , Depth32 ,
  Depth32F , Stencil8 , Depth24Stencil8 , Depth32FStencil8
}
 There's a reason there's a multi-page joke here instead of an actual summary. More...
 
enum  DepthStencilFunction {
  Always , Never , Less , Equal ,
  LessOrEqual , Greater , GreaterOrEqual , NotEqual
}
 Enum defining different kinds of depth/stencil buffer tests. More...
 
enum  GraphicsPlatform { OpenGL , Vulkan , Metal , DirectX }
 Enum representing different graphics APIs. More...
 
enum  PixelFormat {
  None , Rgba , Red , RedGreen ,
  Rgb , Bgr , Bgra , Alpha ,
  Luminance , LuminanceAlpha , RedInteger , RedGreenInteger ,
  RgbInteger , RgbaInteger , BgraInteger , DepthComponent ,
  StencilIndex , DepthStencil
}
 No. No I'm not documenting this. Just no. I'm too blind for understanding half of this shit. :)
 
enum  PrimitiveType {
  Points , LineList , LineStrip , TriangleList ,
  TriangleStrip , TriangleFan
}
 Enum specifying a type of graphics primitive to draw. More...
 
enum  ShaderStage {
  Vertex , Geometry , Hull , Domain ,
  Fragment
}
 Enum defining different pipeline stages within a graphics shader pipeline. More...
 
enum  StencilOperation {
  Keep , Zero , Replace , Increase ,
  IncreaseWrapped , Decrease , DecreaseWrapped , Invert
}
 Enum representing operations that can be performed during a stencil test. More...
 
enum  SurfaceFormat {
  None , Color , Bgr , Rgb10A2 ,
  Rgba16F , Rgba32F , Rgb565 , Srgb8Alpha8 ,
  Alpha8 , R8 , Rg8 , R16F ,
  Rg16F , R32F , Rg32F , Rgb16F ,
  Rgba8UnsignedInt , Rgba8Int , R32UnsignedInt , Depth16 ,
  Depth24 , Depth32 , Depth32F , Stencil8 ,
  Depth24Stencil8 , Depth32FStencil8
}
 Remember what I said in the PixelFormat enum's summary? Yeah. That.
 
enum  TextureFilter { PointClamp , PointWrap , LinearClamp , LinearWrap }
 Enum representing texture filtering types. More...
 
enum  TextureType { Texture1D , Texture2D , Texture3D , TextureCube }
 Enum specifying diffeent types of textures. More...
 
enum  VertexAttributeType { Position , Color , TextureCoordinate }
 Enum representing different types of attributes that a vertex structure may have. More...
 

Enumeration Type Documentation

◆ BlendFactor

See also
BlendState
Enumerator
Zero 

Use a constant value of zero.

One 

Use a cojnstant value of one.

SourceColor 

Use the source image's color.

OneMinusSourceColor 

Invert the source image's color, and use that.

DestinationColor 

Use the destination image's color.

OneMinusDestinationColor 

Invert the destination image's color, and use that.

SourceAlpha 

Use the alpha channel of the source image.

OneMinusSourceAlpha 

Invert the source image's alpha channel, and use that.

DestinationAlpha 

Use the destination image's alpha channel.

OneMinusDestinationAlpha 

Invert the destination image's alpha channel, and use that.

ConstantColor 

Use a constant color value.

OneMinusConstantColor 

Use a constant color value, but invert it first.

ConstantAlpha 

Use a constant alpha channel value.

OneMinusConstantAlpha 

Use a constant alpha channel value, but invert it first.

◆ BlendFunction

Enum indicating how the channels of two images are to be blended together.

See also
BlendState
Enumerator
Add 

Add the two images together.

Subtract 

Subtract the source image from its destination.

ReverseSubtract 

Subtract the destination image from its source? Maybe? No idea.

Min 

Take the minimum value between the two channels and use that.

Max 

Take the maximum value between two channels and use that.

◆ BufferUsage

Enum indicating how a graphics buffer should be treated by the graphics backend.

Enumerator
Static 

The buffer may be written to once or very rarely, and used during rendering.

Dynamic 

The buffer may be written to frequently.

Stream 

There probably isn't a modern use case for this.

◆ CullMode

enum CullMode

Enum representing how a graphics device should cull geometry.

Enumerator
None 

Do not cull geometry. Draw both sides of the face.

Clockwise 

Cull any geometry whose vertices are arranged in clockwise order.

CounterClockwise 

Cull any geometry whose vertices are arranged in counter-clockwise order.

◆ DepthStencilFormat

There's a reason there's a multi-page joke here instead of an actual summary.

See also
SurfaceFormat, PixelFormat

◆ DepthStencilFunction

Enum defining different kinds of depth/stencil buffer tests.

Enumerator
Always 

The test should always pass.

Never 

The test should always fail.

Less 

The test must pass a less-than check.

Equal 

The test must pass an equality check.

LessOrEqual 

The test must pass a less-or-equal check.

Greater 

The test must pass a greater-than check.

GreaterOrEqual 

The test must pass a greater-or-equal check.

NotEqual 

The test must fail an equality check.

◆ GraphicsPlatform

Enum representing different graphics APIs.

Enumerator
OpenGL 

Value indicating OpenGL.

Vulkan 

Value representing Vulkan.

Metal 

Value representing that thing that isn't plasma.

DirectX 

Work is never done on Windows systems.

◆ PrimitiveType

Enum specifying a type of graphics primitive to draw.

Enumerator
Points 

Represents a list of points. Each primitive has one vertex.

LineList 

Represents a list of lines. Each primitive has two vertices, representing the start and end of each line.

LineStrip 

Represents a strip of connected lines. Each vertex represents a connection between two lines.

TriangleList 

Represents a list of separate triangles. Each primitive has three vertices.

TriangleStrip 

Represents a strip of connected triangles.

TriangleFan 

Ritchies are not a fan of documenting this.

◆ ShaderStage

Enum defining different pipeline stages within a graphics shader pipeline.

Enumerator
Vertex 

Value representing the vertex shader stage.

Geometry 

Value representing the geometry shader stage.

Hull 

Value representing the hull sharer stage. Also known as the tesselation control stage.

Domain 

` Value representing the domain shader stage. Also known as the tesselation evaluation stage.

Fragment 

Value representing the fragment shader stage. Also known as the pixel shader stage.

◆ StencilOperation

Enum representing operations that can be performed during a stencil test.

Enumerator
Keep 

Keep it!

Zero 

Zero it!

Replace 

Replace it!

Increase 

Increase it!

IncreaseWrapped 

Increase it! Wrap it!

Decrease 

Decrease it!

DecreaseWrapped 

Decrease it! Wrap it!

Invert 

Invert it!

Bop it!

◆ TextureFilter

Enum representing texture filtering types.

Enumerator
PointClamp 

When sampling a texture, always sample the nearest pixel.

PointWrap 

When sampling a texture, wrap coordinates within the texture's bounds and then sample the nearest pixel.

LinearClamp 

When sampling a texture, clamp the coordinates within the bounds of the texture. If the coordinates don't land exactly on a pixel, use linear interpolation based on nearby pixels.

LinearWrap 

When sampling a texture, wrap the coordinates within the bounds of the texture. If the coordinates don't land exactly on a pixel, use linear interpolation based on nearby pixels.

◆ TextureType

Enum specifying diffeent types of textures.

Enumerator
Texture1D 

A one-dimensional single-level-deep buffe of memory usable as a texture.

Texture2D 

A two-dimensional single-level-deep image surface with a width and height.

Texture3D 

A multi-layer texture comprised of several 2D images with consistent width and height.

TextureCube 

An arrangement of 6 two-dimensional surfaces folded together to form a cube.

◆ VertexAttributeType

Enum representing different types of attributes that a vertex structure may have.

Enumerator
Position 

Specifies that a field is that of a position in space.

Color 

Specifies that a field within a vertex structure represents color information.

TextureCoordinate 

Specifies that a field within a vertex represents texture coordinates (UVs)