指定された一連のレンダリング操作を実行します。
説明
構文
{render-primitive
p[:Primitive],
type=
on do
}
{render-primitive
type= ,
p[:Primitive]
on do
}
注意事項
例
例: render-primitive の使用 | |
![]() | |
{import * from CURL.GRAPHICS.RENDERER3D} {Renderer3dGraphic width = 3in, height = 2.6in, repaint-handler = {proc {graphic:Renderer3dGraphic, renderer:Renderer3d, area:#RectangleSet}:void let drawable:Drawable = {non-null graphic.drawable} let vertices:{Array-of Distance2d} = {{Array-of Distance2d} {Distance2d 0.0in, 0.1in}, {Distance2d 0.1in, 2.2in}, {Distance2d 1.5in, 0.7in}, {Distance2d 1.3in, 2.5in}, {Distance2d 3.0in, 0.1in}, {Distance2d 2.9in, 2.2in} } let colors:{Array-of Fraction3d} = {{Array-of Fraction3d} {Fraction3d 1.0, 0.0, 0.0}, || red {Fraction3d 1.0, 0.0, 0.0}, {Fraction3d 0.0, 0.0, 1.0}, || blue {Fraction3d 0.0, 0.0, 1.0}, || blue {Fraction3d 0.0, 1.0, 0.0}, || green {Fraction3d 0.7, 0.0, 1.0} || purple } || clear the drawable {renderer.clear} || render a polygon {render-primitive primitive:Primitive, type = "triangle-strip" on renderer do {for idx:int = 0 below vertices.size do {primitive.color3v colors[idx]} {primitive.vertex2v vertices[idx]} } } } } |