Class AbstractGLRenderer

    • Constructor Detail

      • AbstractGLRenderer

        public AbstractGLRenderer()
    • Method Detail

      • prepareAndExecuteDraw

        public final void prepareAndExecuteDraw​(DrawableCombiner dc,
                                                Primitive primitive,
                                                java.lang.Object obj,
                                                ViewportJOGL vp)
        Prepares the object for rendering to a JOGL viewport
        Specified by:
        prepareAndExecuteDraw in interface IGLRenderer
        Parameters:
        dc - the DrawableCombiner drawing the object
        primitive - the primitive being drawn
        obj - the object being drawn
        vp - the viewport
      • setupMatrix

        protected boolean setupMatrix​(DrawableCombiner dc,
                                      Primitive primitive,
                                      java.lang.Object obj,
                                      javax.media.opengl.GL gl,
                                      IViewport vp)
        Sets up the transformation matrix before drawing.
        Parameters:
        obj - object being drawn
        g - graphics context
        Returns:
        true, if the setup was successful
      • setupDCMatrix

        public static final boolean setupDCMatrix​(DrawableCombiner dc,
                                                  java.lang.Object obj,
                                                  boolean enablePos,
                                                  boolean enableSize,
                                                  boolean enableRot,
                                                  ViewportJOGL vp)
        Sets the basic matrix for the combiner, call can be skipped if alternative draw method is required.
        Parameters:
        obj - object being drawn
        gl - the viewport context
        enablePos - enables position setup
        enableSize - enables size setup
        enableRot - enables rotation setup
      • draw

        public abstract void draw​(DrawableCombiner dc,
                                  Primitive primitive,
                                  java.lang.Object obj,
                                  ViewportJOGL vp)
        Draws the primitive.
        Specified by:
        draw in interface IGLRenderer
        Parameters:
        dc - the DrawableCombiner drawing the object
        primitive - the primitive being drawn
        obj - the object being drawn
        vp - the viewport