The Material that provides the WebGLProgram for this AbstractDrawable.
Material is a shareable WebGL resource and so is reference counted.
Consequently, accessing the material property increments the Material instance reference count.
Be sure to call release() on shareable WebGL resources in order to prevent memory leaks.
Determines when this object will be drawn. Transparent objects should be rendered after non-transparent objects.
Determines whether this object will be drawn.
OptionaladdA convenience method for geometry.bind(material).
OptionalcontextCalled to request the consumer to free any WebGL resources acquired and owned. The consumer may assume that its cached context is still valid in order to properly dispose of any cached resources. In the case of shared objects, this method may be called multiple times for what is logically the same context. In such cases the consumer must be idempotent and respond only to the first request.
OptionalcontextOptionalcontextCalled to inform the dependent of a loss of WebGL rendering context. The dependent must assume that any cached context is invalid. The dependent must not try to use and cached context to free resources. The dependent should reset its state to that for which there is no context.
Calls the underlying drawArrays or drawElements method on the WebGLRenderingContext.
OptionalreleaseHigh-Level rendering convenience method equivalent to...
use() bind() setAmbients(ambients) setUniforms() draw() unbind()
A convenience method for geometry.unbind(material).
A convenience method for material.use().
The
Geometrythat provides the buffered vertex attributes for thisAbstractDrawable.Geometry is a shareable WebGL resource and so is reference counted. Consequently, accessing the
geometryproperty increments theGeometryinstance reference count. Be sure to callrelease()on shareable WebGL resources in order to prevent memory leaks.