public final class MaterialManager extends Object
| Constructor | Description |
|---|---|
MaterialManager(GraphicEngine graphicEngine) |
Full constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
Material |
createBlendMaterial(String name,
String path,
String path2) |
Create a blended material with 2 files.
|
FragmentShader |
createFragmentShader(String name,
String file) |
Create a new fragment (pixel) shader with 'main' as entry point and 'PS_1_1', 'ARBFP1' as profiles.
|
FragmentShader |
createFragmentShader(String name,
String file,
String entry,
Shader.FragmentProfileList profile) |
Create a new fragment (pixel) shader.
|
Material |
createGuiMaterial(String path) |
Build a simple GUI material, with alpha transparency and light disabled.
|
Material |
createMaterial(Color color) |
Create a new Material with a given color to set as ambient and with a
random unique name.
|
Material |
createMaterial(Color color,
String name) |
Create a new Material with a given color to set as ambient.
|
Material |
createMaterial(String name) |
Create a new Material.
|
VertexShader |
createVertexShader(String name,
String file) |
Create a new vertex shader with 'main' as entry point and 'VS_1_1', 'ARBVP1' as profiles.
|
VertexShader |
createVertexShader(String name,
String file,
String entry,
Shader.VertexProfileList profile) |
Create a new vertex shader.
|
Material |
loadSimpleTexture(String path) |
Create and load a simple Material with a random name.
|
Material |
loadSimpleTexture(String path,
MaterialPass.Transparency transparent) |
Create and load a simple Material with a transparent image and a random
name.
|
Material |
loadSimpleTexture(String name,
String path) |
Create and load a simple Material with a given name.
|
Material |
loadSimpleTexture(String name,
String path,
MaterialPass.Transparency transparent) |
Create and load a simple Material with a transparent image and a given
name.
|
public MaterialManager(GraphicEngine graphicEngine)
graphicEngine - Engine used to create materials.public Material createMaterial(String name)
name - Material name, must be unique.public Material createMaterial(Color color)
color - Color to set as ambient in the fist pass of the first
technique.public Material createMaterial(Color color, String name)
color - Color to set as ambient in the fist pass of the first
technique.name - Material name, must be unique.public Material loadSimpleTexture(String path)
path - File used as image for the texture.public Material createBlendMaterial(String name, String path, String path2)
name - Material name, must be unique.path - First file.path2 - Second file.public Material loadSimpleTexture(String name, String path)
name - Material unique name.path - File used as image for the texture.public Material loadSimpleTexture(String path, MaterialPass.Transparency transparent)
path - File used as image for the texture.transparent - Transparency type.public Material loadSimpleTexture(String name, String path, MaterialPass.Transparency transparent)
name - Material unique name.path - File used as image for the texture.transparent - Transparency type.public Material createGuiMaterial(String path)
path - Texture file path.public FragmentShader createFragmentShader(String name, String file)
name - Shader name.file - File containing the shader code.public VertexShader createVertexShader(String name, String file)
name - Shader name.file - File containing the shader code.public FragmentShader createFragmentShader(String name, String file, String entry, Shader.FragmentProfileList profile)
name - Shader name.file - File containing the shader code.entry - Main function name.profile - Profiles to set.public VertexShader createVertexShader(String name, String file, String entry, Shader.VertexProfileList profile)
name - Shader name.file - File containing the shader code.entry - Main function name.profile - Profiles to set.Copyright © 2014–2018. All rights reserved.