de.jreality.tutorial.app
Class PointShaderExample

java.lang.Object
  extended by de.jreality.tutorial.app.PointShaderExample

public class PointShaderExample
extends java.lang.Object


Constructor Summary
PointShaderExample()
           
 
Method Summary
static void main(java.lang.String[] args)
          Features shown: flat (points) 1.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointShaderExample

public PointShaderExample()
Method Detail

main

public static void main(java.lang.String[] args)
Features shown: flat (points) 1. with a sphere sprite 2. with a text sprite with true spheres 3. color from appearance, opaque 4. color from appearance, transparency enabled 5. color from vertices of point set 6. ditto, with relative radii allowing varying sizes of spheres Notes: 1. These examples do not use point attenuation (see DefaultPointShader.setAttenuatePointSize(Boolean). When this is set to true, the sprites appear more realistic, but it is more difficult to control and in this example, I didn't have time to fine tube it. 2. Size of points (Examples 1 and 2) and spheres (the rest) are set independently since the Attributes POINT_SIZE and POINT_RADIUS are specified in different coordinate systems. The former is in screen pixels, and the latter in object coordinates. This is obviously inconvenient. A good reliable solution is welcome. 3. Colors specified in the shader are ALWAYS RGB values; alpha (transparency) values must be set using the separate TRANSPARENCY attribute. Vertex colors however, are RGBA values -- see Example 5. 4. This example program has been tested on the JOGL backend; other backends may not yield the same behavior, particularly where rendering hints are involved.