OGLWireFrameShader.kl¶
Types¶
OGLWireFrameShader (object)¶
バージョン 1.12.0 で追加.
The OGLWireFrameShader inherits the OGLInlineShader. It encapsulates any other InlineShader (interface), while setting the polygon mode to lines.
/*
** Example: OGLWireFrameShader
*/
require InlineDrawing;
operator entry() {
InlineDrawing draw = OGLInlineDrawing();
OGLWireFrameShader shader = draw.registerShader(OGLWireFrameShader('wireframe', OGLSurfaceShader()));
shader.setPolygonOffset(-1.0); // draw as overlay
InlineMaterial mat = shader.getOrCreateMaterial('blue');
mat.setUniform('u_diffuseColor', Color(0.0, 0.0, 1.0));
}
/*
** Output:
*/