The Renderer class provides methods for performing basic 3D drawing.
sealed class
|
Renderer
|
extends
|
Disposable
|
||
implements
|
IBeginEnd
|
The screen bounds of this renderer object on the render target of the graphics context.
public
property
|
Bounds
{
get
set
}
|
||
type
|
Box2I
|
||
value
|
The screen bounds. |
Returns the lifecycle state of this object.
public
virtual
property
|
LifecycleState
{
get
}
|
||
type
|
LifecycleState
|
||
value
|
The lifecycle state. | ||
inherited
|
Disposable.LifecycleState
|
The origin point to use for rendering 3D primitives.
public
property
|
Origin
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
Coordinates of the origin point. |
Remarks:
The configured origin point is only honored when Begin is called, and is retained afterwards.
Defaults to Zero
The shader effect camera state.
public
property
|
StateCamera
{
get
}
|
||
type
|
CameraState
|
||
value
|
|
The state wrapper. |
Creates a new instance of Renderer.
public
constructor
|
Renderer
([Owner]
IGraphicsContext context)
|
||
params
|
context
|
[not-null]
|
The graphics context to use. |
Remarks:
The
shader
effect
'Tinman.Renderer'
must
have
been
registered
with
the
given
graphics
context
before
a
Renderer
object
can
be
created.
Acquires a strong reference to this disposable object.
[OwnerReturn, ThreadSafe]
|
||||
public
method
|
AcquireTry
()
|
|||
type
|
IDisposable
|
|||
returns
|
this
if
a
new
strong
reference
has
been
acquired,
null
if
this
object
is
already
being
disposed.
|
|||
inherited
|
Disposable.AcquireTry
|
Remarks:
The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.
This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.
Begins an access to this object.
public
method
|
Begin
()
|
||
implements
|
IBeginEnd.Begin
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndReleases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.
[Dispose, OwnerThis, ThreadSafe]
|
||||
public
method
|
Dispose
()
|
|||
inherited
|
Disposable.Dispose
|
Remarks:
The Dispose method silently returns if the object has already been disposed.
Begins to render a 3D primitive.
[BeginEnd]
|
||||
public
method
|
DrawPrimitiveBegin
(Primitive primitive)
|
|||
params
|
primitive
|
The primitive to render. |
See also:
DrawPrimitiveEndFinishes rendering of the current 3D primitive.
[BeginEnd]
|
||||
public
method
|
DrawPrimitiveEnd
()
|
See also:
DrawPrimitiveBeginSpecifies the next vertex for the current 3D primitive.
[BeginEnd]
|
||||
public
method
|
DrawPrimitiveVertex
(Vec3D v,
int64 color = Colors.White)
|
|||
params
|
v
|
Coordinate of vertex, in world-space. | ||
color
|
The vertex color. |
See also:
DrawPrimitiveBeginSpecifies the next vertex for the current 3D primitive.
[BeginEnd]
|
||||
public
method
|
DrawPrimitiveVertex
(Vec3F v,
int64 color = Colors.White)
|
|||
params
|
v
|
Coordinate of vertex, in world-space. | ||
color
|
The vertex color. |
See also:
DrawPrimitiveBeginSpecifies the next vertex for the current 3D primitive.
[BeginEnd]
|
||||
public
method
|
DrawPrimitiveVertex
(float64 x,
float64 y,
float64 z,
int64 color = Colors.White)
|
|||
params
|
x
|
X-coordinate of vertex, in world-space. | ||
y
|
Y-coordinate of vertex, in world-space. | |||
z
|
Z-coordinate of vertex, in world-space. | |||
color
|
The vertex color. |
See also:
DrawPrimitiveBeginEnds the current access to this object.
public
method
|
End
()
|
||
implements
|
IBeginEnd.End
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndSets the Bounds of this Renderer object to full-screen (i.e. the size of the current render target, see Size).
public
method
|
Fullscreen
()
|
||
type
|
Renderer
|
||
returns
|
|
this |