Class ShaderBytecode
Represents a compiled Shader bytecode.
[DataContract]
public class ShaderBytecode
- Inheritance
-
objectShaderBytecode
- Extension Methods
Constructors
ShaderBytecode()
Initializes a new instance of the ShaderBytecode class.
public ShaderBytecode()
ShaderBytecode(ObjectId, byte[])
Initializes a new instance of the ShaderBytecode class.
public ShaderBytecode(ObjectId id, byte[] data)
Parameters
idObjectIdAn unique identifier for the compiled Shader bytecode data.
databyte[]The compiled Shader bytecode data.
Fields
Stage
The stage of this Shader bytecode.
public ShaderStage Stage
Field Value
Properties
Data
Gets or sets the compiled Shader bytecode data that should be used to create the Shader.
public byte[] Data { get; set; }
Property Value
- byte[]
Id
Gets or sets an unique identifier for the Shader bytecode.
public ObjectId Id { get; set; }
Property Value
Methods
Clone()
Creates a shallow copy of the current ShaderBytecode.
public ShaderBytecode Clone()
Returns
- ShaderBytecode
A shallow copy of the current instance.
GetDataAsString()
Gets the Shader data as a string. In some platforms (e.g. OpenGL), the data represents the GLSL source code, instead of compiled bytecode.
public string GetDataAsString()
Returns
- string
The Shader data as GLSL source code.
Operators
implicit operator byte[](ShaderBytecode)
Performs an implicit conversion from ShaderBytecode to byte[], returning the compiled Shader data.
public static implicit operator byte[](ShaderBytecode shaderBytecode)
Parameters
shaderBytecodeShaderBytecodeThe compiled Shader bytecode.
Returns
- byte[]
The compiled Shader bytecode data converted to a byte array.