C# Class Aiv.Fast2D.Mesh

Inheritance: IDisposable
Show file Open project: aiv01/aiv-fast2d Class Usage Examples

Public Properties

Property Type Description
Camera Camera
hasVertexColors bool
noMatrix bool
pivot System.Vector2
position System.Vector2
scale System.Vector2
shader Shader
uv float[]
v float[]
vc float[]

Protected Properties

Property Type Description
instances int
requireUseTexture bool
shaderSetupHook ShaderSetupHook

Public Methods

Method Description
Bind ( ) : void
Dispose ( ) : void
Draw ( ShaderSetupHook hook = null ) : void
DrawColor ( float r, float g, float b, float a = 1 ) : void
DrawColor ( int r, int g, int b, int a = 255 ) : void
DrawTexture ( Texture tex ) : void
DrawTexture ( int textureId ) : void
DrawWireframe ( float r, float g, float b, float a = 1, float tickness = 0.02f ) : void
DrawWireframe ( int r, int g, int b, int a = 255, float tickness = 0.02f ) : void
Mesh ( Shader shader = null ) : OpenTK.Graphics.OpenGL
NewVAO ( ) : int
NewVBO ( ) : int
Update ( ) : void
UpdateUV ( ) : void
UpdateVertex ( ) : void
UpdateVertexColor ( ) : void

Protected Methods

Method Description
NewFloatBuffer ( int attribArrayId, int elementSize, float data, int divisor ) : int
UpdateFloatBuffer ( int bufferId, float data, int offset ) : void

Private Methods

Method Description
ApplyMatrix ( ) : void

Method Details

Bind() public method

public Bind ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Draw() public method

public Draw ( ShaderSetupHook hook = null ) : void
hook ShaderSetupHook
return void

DrawColor() public method

public DrawColor ( float r, float g, float b, float a = 1 ) : void
r float
g float
b float
a float
return void

DrawColor() public method

public DrawColor ( int r, int g, int b, int a = 255 ) : void
r int
g int
b int
a int
return void

DrawTexture() public method

public DrawTexture ( Texture tex ) : void
tex Texture
return void

DrawTexture() public method

public DrawTexture ( int textureId ) : void
textureId int
return void

DrawWireframe() public method

public DrawWireframe ( float r, float g, float b, float a = 1, float tickness = 0.02f ) : void
r float
g float
b float
a float
tickness float
return void

DrawWireframe() public method

public DrawWireframe ( int r, int g, int b, int a = 255, float tickness = 0.02f ) : void
r int
g int
b int
a int
tickness float
return void

Mesh() public method

public Mesh ( Shader shader = null ) : OpenTK.Graphics.OpenGL
shader Shader
return OpenTK.Graphics.OpenGL

NewFloatBuffer() protected method

protected NewFloatBuffer ( int attribArrayId, int elementSize, float data, int divisor ) : int
attribArrayId int
elementSize int
data float
divisor int
return int

NewVAO() public method

public NewVAO ( ) : int
return int

NewVBO() public method

public NewVBO ( ) : int
return int

Update() public method

public Update ( ) : void
return void

UpdateFloatBuffer() protected method

protected UpdateFloatBuffer ( int bufferId, float data, int offset ) : void
bufferId int
data float
offset int
return void

UpdateUV() public method

public UpdateUV ( ) : void
return void

UpdateVertex() public method

public UpdateVertex ( ) : void
return void

UpdateVertexColor() public method

public UpdateVertexColor ( ) : void
return void

Property Details

Camera public property

public Camera,Aiv.Fast2D Camera
return Camera

hasVertexColors public property

public bool hasVertexColors
return bool

instances protected property

protected int instances
return int

noMatrix public property

public bool noMatrix
return bool

pivot public property

public Vector2,System pivot
return System.Vector2

position public property

public Vector2,System position
return System.Vector2

requireUseTexture protected property

protected bool requireUseTexture
return bool

scale public property

public Vector2,System scale
return System.Vector2

shader public property

public Shader,Aiv.Fast2D shader
return Shader

shaderSetupHook protected property

protected ShaderSetupHook shaderSetupHook
return ShaderSetupHook

uv public property

public float[] uv
return float[]

v public property

public float[] v
return float[]

vc public property

public float[] vc
return float[]