Ctrl+K

BasicShader

Declaration

public class Strawberry.Graphics.BasicShader

Represents a basic shader that can be used for sprites and simple geometry. It only supports position, texture coordinates and colors as inputs

Inherits: Strawberry.Graphics.StrawberryShader

Constructors

BasicShader

void BasicShader(IGraphicsContext context, VertexElementContainer elements)

Parameters:

Name Type Description
context Strawberry.Graphics.IGraphicsContext
elements Strawberry.Graphics.VertexElementContainer

BasicShader protected

void BasicShader(IGraphicsContext context, VertexElementContainer elements, string vs, string ps, string vse, string pse)

Parameters:

Name Type Description
context Strawberry.Graphics.IGraphicsContext
elements Strawberry.Graphics.VertexElementContainer
vs System.String
ps System.String
vse System.String
pse System.String

Properties

VertexShader protected virtual

string VertexShader { get }

PixelShader protected virtual

string PixelShader { get }

VertexShaderEntry protected virtual

string VertexShaderEntry { get }

PixelShaderEntry protected virtual

string PixelShaderEntry { get }

Projection

Gets or sets the projection matrix

Matrix4 Projection { get set }

Methods

SetTexture

Sets the texture used by the shader

void SetTexture(Texture tex)

Parameters:

Name Type Description
tex Strawberry.Graphics.Texture The texture