Class Material.CppProxy

  • All Implemented Interfaces:
    Material
    Enclosing interface:
    Material

    public static final class Material.CppProxy
    extends java.lang.Object
    implements Material
    • Method Detail

      • _djinni_private_destroy

        public void _djinni_private_destroy()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Material
        Returns:
        material name (string)
      • addParameter

        public void addParameter​(Parameter parameter)
        Description copied from interface: Material
        adds shader parameter to parameters list, after what you'll can get access to this parameter in shader by it's name. Type of parameter in shader will match with type of parameter, except int, float, vector2, vector3, this types will be replaces on vec4, which x component will have needed value, other components will be filled by garbage.
        Specified by:
        addParameter in interface Material
        Parameters:
        parameter - (parameter): parameter to add
      • getParameters

        public java.util.ArrayList<Parameter> getParameters()
        Specified by:
        getParameters in interface Material
        Returns:
        list of shader parameters (list)
      • removeParameter

        public void removeParameter​(Parameter parameter)
        Description copied from interface: Material
        removes parameter from list.
        Specified by:
        removeParameter in interface Material
        Parameters:
        parameter - (parameter): parameter to remove
      • findParameter

        public Parameter findParameter​(java.lang.String name)
        Description copied from interface: Material
        find parameter by name
        Specified by:
        findParameter in interface Material
        Parameters:
        name - (string)
        Returns:
        parameter (parameter) or null
      • setTopology

        public void setTopology​(GeometryTopology topology)
        Description copied from interface: Material
        set material geometry topology.
        Specified by:
        setTopology in interface Material
        Parameters:
        topology - (geometry_topology): geometry topology type. Can be triangles_list, lines_list, points_list. Default: triangles_list
      • setState

        public void setState​(State state)
        Description copied from interface: Material
        sets render state (i.e blending mode, color/depth writing, depth testing, etc.)
        Specified by:
        setState in interface Material
        Parameters:
        state - (state) render state
      • getState

        public State getState()
        Specified by:
        getState in interface Material
        Returns:
        render state (state)
      • addImage

        public void addImage​(java.lang.String sampler,
                             Image image)
        Description copied from interface: Material
        add image sampler, after what you'll can get acess to image and sampler in shader by formula: image_index = i * 2. sampler_index = i * 2 + 1. Where i is image index in images list (which you can get by get_images call). Note that you need to declare images samplers in shader manually and sampler name in name must match with sampler name in material.
        Specified by:
        addImage in interface Material
        Parameters:
        sampler - (string): sampler name
        image - (image): sampler image
      • getImages

        public java.util.ArrayList<Image> getImages()
        Specified by:
        getImages in interface Material
        Returns:
        list of samplers images (list)
      • removeImage

        public void removeImage​(java.lang.String sampler)
        Description copied from interface: Material
        removes image from list (if exist). Will be ignored if effect was activated.
        Specified by:
        removeImage in interface Material
        Parameters:
        sampler - (string): sampler name
      • getSamplers

        public java.util.ArrayList<java.lang.String> getSamplers()
        Specified by:
        getSamplers in interface Material
        Returns:
        list of samplers name (list)