StrawberryShader
Declaration
public class Strawberry.Graphics.StrawberryShader
A helper class for compiling and managing platform shaders
Inherits: Strawberry.Base
Implements: System.IDisposable
Constructors
StrawberryShader
void StrawberryShader(IGraphicsContext context)
Parameters:
| Name | Type | Description |
|---|---|---|
context |
Strawberry.Graphics.IGraphicsContext |
Properties
BaseShader
Shader BaseShader { get }
VsEntryPoint
string VsEntryPoint { get }
PsEntryPoint
string PsEntryPoint { get }
GraphicsContext
IGraphicsContext GraphicsContext { get }
Methods
Initialize
Initialize the shader with a vertex and pixel shader code
void Initialize(string vsCode, string psCode, string vsEntryPoint, string psEntryPoint, VertexElementContainer elements, ShaderLanguage lang = 1)
Parameters:
| Name | Type | Description |
|---|---|---|
vsCode |
System.String |
Vertex shader code |
psCode |
System.String |
Pixel shader code |
vsEntryPoint |
System.String |
Entry point for the vertex shader |
psEntryPoint |
System.String |
Entry point for the pixel shader |
elements |
Strawberry.Graphics.VertexElementContainer |
Shader input elements |
lang |
Strawberry.Graphics.ShaderLanguage = 1 |
Shader language. HLSL is not supported right now. |
Activate virtual
Activates the shader for rendering
void Activate()
CleanManaged protected override
void CleanManaged()