Click or drag to resize
AB4D logo

OnePixelTexture Class

OnePixelTexture class creates a ShaderResourceView with a 1x1 texture (one pixel) with the specified color. The class also provides easy updating of the color. When you do not need to update the color of the texture, then you can also use a static CreateOnePixelTexture(Device, Color4, Format) method. User needs to dispose the created OnePixelTexture to prevent resources leaking.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXDeviceResource
        Ab3d.DirectXOnePixelTexture

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class OnePixelTexture : SharedDXDeviceResource

The OnePixelTexture type exposes the following members.

Constructors
 NameDescription
Public methodOnePixelTexture(Color4, DXDevice, String) Constructor with default texture format (B8G8R8A8_UNorm)
Public methodOnePixelTexture(Color4, Format, DXDevice, String) Constructor
Top
Properties
 NameDescription
Public propertyPixelColor Gets or sets the Color4 of the pixel. When setting the color, it is converted into BGRA byte values and written to texture memory.
Public propertyShaderResourceView Gets the ShaderResourceView that represents a CubeMap and can be used in DirectX.
Top
Methods
 NameDescription
Public methodStatic memberCreateOnePixelTexture CreateOnePixelTexture creates a 1 x 1 texture with the specified color (color is converted into BGRA byte values) and returns the texture as ShaderResourceView.
Top
See Also