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:


*/

Methods

  OGLWireFrameShader ( in OGLInlineShader shader )
  OGLWireFrameShader ( in OGLWireFrameShader other )
  OGLWireFrameShader ( in String name, in OGLInlineShader shader )
  OGLWireFrameShader ()
Boolean bindUniformToLocation ! ( io DrawContext context, in InlineUniform uniform, in Integer location )
OGLWireFrameShader clone ? ()
  defineAttribute ! ( in String name, in String attributeType )
  defineUniform ! ( in InlineUniform uniform )
Size getAttributeCount ? ()
Integer getAttributeID ? ( in String name )
String getAttributeName ? ( in Index index )
String getAttributeType ? ( in Index index )
InlineMaterial getMaterial ? ( in Index index )
Size getMaterialCount ? ()
String getName ? ()
InlineMaterial getOrCreateMaterial ! ( in String name )
Boolean hasAttribute ? ( in String name )
Boolean hasMaterial ? ( in String name )
Boolean hasUniform ? ( in String name )
  init ! ( in String name, in OGLInlineShader shader )
  setPolygonOffset ! ( in Scalar offset )
  setUniform ! ( in InlineUniform uniform )
  setWireFrame ! ( in Boolean enabled )