C# Class Vector.Gpu.Device

Abstract class Device.

Contains Standard Rendering Methods and State Management.

Inheritance: IDisposable
Exibir arquivo Open project: sinclairzx81/vector-cs Class Usage Examples

Protected Properties

Property Type Description
indexBuffer IndexBuffer
state State
textures Vector.Gpu.TextureBase[]
vertexDeclaration VertexDeclaration

Public Methods

Method Description
Clear ( ClearFlags flags, float red, float green, float blue, float alpha, float depth, int stencil ) : void

Clears the FrameBuffer.

Clear ( Color color ) : void

Clears the FrameBuffer

Clear ( float red, float green, float blue, float alpha ) : void

Clears the FrameBuffer.

(Automatically Clears the Depth Buffer Bit, Stencil Color Bit and the Color Bit)

Device ( ) : System
Dispose ( ) : void

Disposes this Object

Draw ( Topology topology ) : void

Draws the currently bound source objects associated with this device.

A valid VertexDeclaration, VertexBuffer, IndexBuffer and Optional Texture must be bound before calling this method.

DrawInstanced ( Topology topology, int primitiveCount ) : void

Only Availible on NVidia 8800's (Time of writing).

Draws buffers as instanced. Primitive Count refers to the amount of times the object is drawn. inside a shader. The instance can be looked up via the gl_InstanceId sematic.

GetExtensions ( ) : string[]
Present ( ) : void

Presents the Current OpenGL framebuffer to the drawing surface

SetVertexBuffer ( int streamIndex, VertexBuffer vertexBuffer ) : void

Sets the Vertex Buffer for a given rendering pass.

Protected Methods

Method Description
Create ( ) : void

Private Methods

Method Description
DisableTextures ( ) : void
DisableVertexDeclaration ( ) : void
EnableStates ( ) : void
EnableTextures ( ) : void
EnableVertexDeclaration ( ) : void

Method Details

Clear() public method

Clears the FrameBuffer.
public Clear ( ClearFlags flags, float red, float green, float blue, float alpha, float depth, int stencil ) : void
flags ClearFlags
red float
green float
blue float
alpha float
depth float
stencil int
return void

Clear() public method

Clears the FrameBuffer
public Clear ( Color color ) : void
color Color
return void

Clear() public method

Clears the FrameBuffer.

(Automatically Clears the Depth Buffer Bit, Stencil Color Bit and the Color Bit)

public Clear ( float red, float green, float blue, float alpha ) : void
red float
green float
blue float
alpha float
return void

Create() protected abstract method

protected abstract Create ( ) : void
return void

Device() public method

public Device ( ) : System
return System

Dispose() public abstract method

Disposes this Object
public abstract Dispose ( ) : void
return void

Draw() public method

Draws the currently bound source objects associated with this device.

A valid VertexDeclaration, VertexBuffer, IndexBuffer and Optional Texture must be bound before calling this method.

public Draw ( Topology topology ) : void
topology Topology
return void

DrawInstanced() public method

Only Availible on NVidia 8800's (Time of writing).

Draws buffers as instanced. Primitive Count refers to the amount of times the object is drawn. inside a shader. The instance can be looked up via the gl_InstanceId sematic.

public DrawInstanced ( Topology topology, int primitiveCount ) : void
topology Topology
primitiveCount int
return void

GetExtensions() public method

public GetExtensions ( ) : string[]
return string[]

Present() public abstract method

Presents the Current OpenGL framebuffer to the drawing surface
public abstract Present ( ) : void
return void

SetVertexBuffer() public method

Sets the Vertex Buffer for a given rendering pass.
public SetVertexBuffer ( int streamIndex, VertexBuffer vertexBuffer ) : void
streamIndex int
vertexBuffer VertexBuffer
return void

Property Details

indexBuffer protected_oe property

protected IndexBuffer,Vector.Gpu indexBuffer
return IndexBuffer

state protected_oe property

protected State,Vector.Gpu state
return State

textures protected_oe property

protected TextureBase[],Vector.Gpu textures
return Vector.Gpu.TextureBase[]

vertexDeclaration protected_oe property

protected VertexDeclaration,Vector.Gpu vertexDeclaration
return VertexDeclaration