Class Program

    • Field Detail

      • VERTEX

        public static int VERTEX
      • PIXEL

        public static int PIXEL
      • m_kProgramType

        private java.lang.String m_kProgramType
        The type of program, from file extension.
      • m_kProgramText

        private java.lang.String m_kProgramText
        The program as a text string.
      • m_bCompiled

        private boolean m_bCompiled
        Flag indicating if the program is compiled or not.
      • m_bParsed

        private boolean m_bParsed
        Flag indicating if the program was parsed or not.
      • m_iShaderID

        private int m_iShaderID
        The shader ID for compiling programs.
      • m_iProgramID

        private int m_iProgramID
        The shader ID for compiling programs.
      • m_kRendererConstants

        private java.util.Vector<RendererConstant> m_kRendererConstants
        The renderer constants required by the shader program.
      • m_kUserConstants

        private java.util.Vector<UserConstant> m_kUserConstants
        The user constants required by the shader program. These are set by the applications as needed.
      • m_kSamplerInformation

        private java.util.Vector<SamplerInformation> m_kSamplerInformation
        Information about the sampler units required by a shader program.
      • ms_kSampler1DStr

        protected static final java.lang.String ms_kSampler1DStr
        For use by the constructor for loading and parsing a shader program.
      • ms_kSampler2DStr

        protected static final java.lang.String ms_kSampler2DStr
      • ms_kSampler3DStr

        protected static final java.lang.String ms_kSampler3DStr
      • ms_kSamplerCubeStr

        protected static final java.lang.String ms_kSamplerCubeStr
      • ms_kSamplerProjStr

        protected static final java.lang.String ms_kSamplerProjStr
      • ms_kPositionStr

        protected static final java.lang.String ms_kPositionStr
      • ms_kNormalStr

        protected static final java.lang.String ms_kNormalStr
      • ms_kColorStr

        protected static final java.lang.String ms_kColorStr
      • ms_kColor0Str

        protected static final java.lang.String ms_kColor0Str
      • ms_kColor1Str

        protected static final java.lang.String ms_kColor1Str
      • ms_kTexCoordStr

        protected static final java.lang.String ms_kTexCoordStr
      • ms_kInStr

        protected static final java.lang.String ms_kInStr
      • ms_kEOL

        protected static final java.lang.String ms_kEOL
      • ms_kTexUnitString

        protected static final java.lang.String ms_kTexUnitString
      • ms_kUserString

        protected static final java.lang.String ms_kUserString
    • Constructor Detail

      • Program

        public Program()
    • Method Detail

      • AddRendererConstant

        public void AddRendererConstant​(RendererConstant kRC)
        Access to renderer constants.
        Parameters:
        kRC -
      • AddSamplerInformation

        public void AddSamplerInformation​(SamplerInformation kSI)
        Access to Sampler Information.
        Parameters:
        kSI -
      • AddUserConstant

        public void AddUserConstant​(UserConstant kUC)
        Access to user constants.
        Parameters:
        kUC -
      • GetDiskUsed

        public int GetDiskUsed​(StreamVersion rkVersion)
        Returns the size of this object and it's children on disk for the current StreamVersion parameter.
        Specified by:
        GetDiskUsed in interface StreamInterface
        Overrides:
        GetDiskUsed in class Spatial
        Parameters:
        rkVersion - the current version of the Stream file being created.
        Returns:
        the size of this object on disk.
      • GetProgramID

        public int GetProgramID()
      • GetProgramText

        public final java.lang.String GetProgramText()
        Return the program text.
        Returns:
        the program text.
      • GetProgramType

        public final java.lang.String GetProgramType()
        Return the program type string, its extension.
        Returns:
        the program type.
      • GetRC

        public RendererConstant GetRC​(int i)
        Access to renderer constants.
        Parameters:
        i - RendererConstant to return.
        Returns:
        RendererConstant at position i.
      • GetRC

        public RendererConstant GetRC​(RendererConstant.Type eType)
        Access to renderer constants.
        Parameters:
        eType - type of RendererConstant to return.
        Returns:
        RendererConstant matching input type.
      • GetRCQuantity

        public final int GetRCQuantity()
        Access to renderer constants.
        Returns:
        number of renderer constants.
      • GetShaderID

        public int GetShaderID()
      • GetSI

        public SamplerInformation GetSI​(int i)
        Access to samplers.
        Parameters:
        i - sampler to return
        Returns:
        Sampler at position i.
      • GetSI

        public SamplerInformation GetSI​(java.lang.String rkName)
        Access to samplers.
        Parameters:
        rkName - name of sampler to return
        Returns:
        Sampler with input name.
      • GetSIQuantity

        public final int GetSIQuantity()
        Access to samplers.
        Returns:
        number of samplers.
      • GetUC

        public UserConstant GetUC​(int i)
        Access to user constants.
        Parameters:
        i - UserConstant to return.
        Returns:
        UserConstant at position i.
      • GetUC

        public UserConstant GetUC​(java.lang.String rkName)
        Access to user constants.
        Parameters:
        rkName - name of the UserConstant to return.
        Returns:
        UserConstant with the input name.
      • GetUCQuantity

        public final int GetUCQuantity()
        Access to user constants.
        Returns:
        number of use constants.
      • IsCompiled

        public boolean IsCompiled()
      • IsParsed

        public boolean IsParsed()
      • Link

        public void Link​(Stream rkStream,
                         Stream.Link pkLink)
        Copies this objects children objects from the input Stream's HashTable, based on the LinkID of the child stored in the pkLink parameter.
        Specified by:
        Link in interface StreamInterface
        Overrides:
        Link in class Spatial
        Parameters:
        rkStream - the Stream where the child objects are stored.
        pkLink - the Link class from which the child object IDs are read.
      • Load

        public void Load​(Stream rkStream,
                         Stream.Link pkLink)
        Loads this object from the input parameter rkStream, using the input Stream.Link to store the IDs of children objects of this object for linking after all objects are loaded from the Stream.
        Specified by:
        Load in interface StreamInterface
        Overrides:
        Load in class Spatial
        Parameters:
        rkStream - the Stream from which this object is being read.
        pkLink - the Link class for storing the IDs of this object's children objects.
      • Register

        public boolean Register​(Stream rkStream)
        Registers this object with the input Stream parameter. All objects streamed to disk are registered with the Stream so that a unique list of objects is maintained.
        Specified by:
        Register in interface StreamInterface
        Overrides:
        Register in class Spatial
        Parameters:
        rkStream - the Stream where the child objects are stored.
        Returns:
        true if this object is registered, false if the object has already been registered.
      • Remove

        public void Remove()
        Delete memory.
        Overrides:
        Remove in class Bindable
      • Reset

        public void Reset()
      • Save

        public void Save​(Stream rkStream)
        Write this object and all it's children to the Stream.
        Specified by:
        Save in interface StreamInterface
        Overrides:
        Save in class Spatial
        Parameters:
        rkStream - the Stream where the child objects are stored.
      • SaveStrings

        public StringTree SaveStrings​(java.lang.String acTitle)
        Write this object into a StringTree for the scene-graph visualization.
        Specified by:
        SaveStrings in interface StreamInterface
        Overrides:
        SaveStrings in class Spatial
        Parameters:
        acTitle - the header for this object in the StringTree.
        Returns:
        StringTree containing a String-based representation of this object and it's children.
      • SetCompiled

        public void SetCompiled​(boolean bFlag)
      • SetParsed

        public void SetParsed()
      • SetProgramID

        public void SetProgramID​(int iID)
      • SetProgramText

        public final void SetProgramText​(java.lang.String kText)
        Set the program text. param the program text.
      • SetProgramType

        public final void SetProgramType​(java.lang.String kType)
        Return the program type string, its extension.
      • SetShaderID

        public void SetShaderID​(int iID)