Package com.banuba.sdk.scene
Class Material.CppProxy
java.lang.Object
com.banuba.sdk.scene.Material.CppProxy
- All Implemented Interfaces:
Material
- Enclosing interface:
- Material
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.banuba.sdk.scene.Material
Material.CppProxy
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
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.void
addParameter
(Parameter parameter) adds shader parameter to parameters list, after what you'll can get access to this parameter in shader by it's name.protected void
finalize()
findParameter
(String name) find parameter by namegetName()
getState()
void
removeImage
(String sampler) removes image from list (if exist).void
removeParameter
(Parameter parameter) removes parameter from list.void
sets render state (i.e blending mode, color/depth writing, depth testing, etc.)void
setTopology
(GeometryTopology topology) set material geometry topology.
-
Method Details
-
_djinni_private_destroy
public void _djinni_private_destroy() -
finalize
-
getName
-
addParameter
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 interfaceMaterial
- Parameters:
parameter
- (parameter): parameter to add
-
getParameters
- Specified by:
getParameters
in interfaceMaterial
- Returns:
- list of shader parameters (list
)
-
removeParameter
Description copied from interface:Material
removes parameter from list.- Specified by:
removeParameter
in interfaceMaterial
- Parameters:
parameter
- (parameter): parameter to remove
-
findParameter
Description copied from interface:Material
find parameter by name- Specified by:
findParameter
in interfaceMaterial
- Parameters:
name
- (string)- Returns:
- parameter (parameter) or null
-
setTopology
Description copied from interface:Material
set material geometry topology.- Specified by:
setTopology
in interfaceMaterial
- Parameters:
topology
- (geometry_topology): geometry topology type. Can be triangles_list, lines_list, points_list. Default: triangles_list
-
getCurrentTopology
- Specified by:
getCurrentTopology
in interfaceMaterial
- Returns:
- current geometry topology (geometry_topology)
-
setState
Description copied from interface:Material
sets render state (i.e blending mode, color/depth writing, depth testing, etc.) -
getState
-
addImage
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. -
getImages
-
removeImage
Description copied from interface:Material
removes image from list (if exist). Will be ignored if effect was activated.- Specified by:
removeImage
in interfaceMaterial
- Parameters:
sampler
- (string): sampler name
-
getSamplers
- Specified by:
getSamplers
in interfaceMaterial
- Returns:
- list of samplers name (list
)
-
getShaderSource
- Specified by:
getShaderSource
in interfaceMaterial
- Returns:
- compiled and combined shaders sources
-