Class Bindable

    • Field Detail

      • m_kInfoArray

        protected java.util.Vector<Bindable.Info> m_kInfoArray
        Resource information.
      • m_bShared

        protected boolean m_bShared
    • Constructor Detail

      • Bindable

        public Bindable()
        Default constructor:
    • Method Detail

      • GetIdentifier

        public ResourceIdentifier GetIdentifier​(int i,
                                                Renderer pkUser)
        Use these functions when the resource has multiple representations in VRAM (vertex buffers).
        Parameters:
        i - index.
        pkUser - Renderer
        Returns:
        the resource id if it is bound to the renderer, null otherwise.
      • GetIdentifier

        public ResourceIdentifier GetIdentifier​(Renderer pkUser)
        Use this function when the resource has a unique representation in VRAM (all resources except for vertex buffers).
        Parameters:
        pkUser - Renderer
        Returns:
        the resource id if it is bound to the renderer, null otherwise.
      • GetInfoQuantity

        public int GetInfoQuantity()
        Get number of bound resources.
      • GetShared

        public boolean GetShared()
      • OnLoad

        public void OnLoad​(Renderer pkUser,
                           ReleaseFunction oRelease,
                           ResourceIdentifier pkID)
        Called when the resource is loaded, creates the Info object to contain the resource.
        Parameters:
        pkUser - Renderer the resources are bound to.
        oRelease - the release function to call.
        pkID - the resource identifier ID.
      • Release

        public void Release​(Renderer pkUser)
        Release the resource from this renderer.
        Parameters:
        pkUser - Renderer.
      • Remove

        public void Remove()
        Delete memory
      • IsReload

        public boolean IsReload​(Renderer pkUser)
        Get reload flag.
        Returns:
        reload flag.
      • IsReload

        public boolean IsReload()
        Get reload flag.
        Returns:
        reload flag.
      • Reload

        public void Reload​(boolean bReload)
        Set to true to reload the texture data to the GPU
        Parameters:
        bReload - set to true to reload the texture data to the GPU
      • Reload

        public void Reload​(Renderer pkUser,
                           boolean bReload)
      • SetShared

        public void SetShared​(boolean bShared)
      • OnRelease

        protected void OnRelease​(Renderer pkUser,
                                 ResourceIdentifier pkID)
        Called when the resouce is released. Removes Info from array.
        Parameters:
        pkUser - Renderer the resources are bound to.
        pkID - the resource identifier ID.
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • GetVisibleSet

        protected void GetVisibleSet​(Culler rkCuller,
                                     boolean bNoCull)
        Description copied from class: Spatial
        Get visible set.
        Specified by:
        GetVisibleSet in class Spatial
        Parameters:
        rkCuller - Culler
        bNoCull - when true set to no-cull.
      • UpdateState

        protected void UpdateState​(java.util.Vector<java.util.Vector<GlobalState>> akGStack,
                                   java.util.Vector<Light> pkLStack)
        Description copied from class: Spatial
        Update state.
        Specified by:
        UpdateState in class Spatial
        Parameters:
        akGStack - global states.
      • UpdateWorldBound

        protected void UpdateWorldBound()
        Description copied from class: Spatial
        Update world bound.
        Specified by:
        UpdateWorldBound in class Spatial