本文整理匯總了Java中com.jme3.shader.ShaderKey類的典型用法代碼示例。如果您正苦於以下問題:Java ShaderKey類的具體用法?Java ShaderKey怎麽用?Java ShaderKey使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ShaderKey類屬於com.jme3.shader包,在下文中一共展示了ShaderKey類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadShader
import com.jme3.shader.ShaderKey; //導入依賴的package包/類
private void loadShader(AssetManager manager) {
// recompute define list
DefineList allDefines = new DefineList();
allDefines.addFrom(def.getShaderPresetDefines());
allDefines.addFrom(defines);
ShaderKey key = new ShaderKey(def.getVertexShaderName(),
def.getFragmentShaderName(),
allDefines,
def.getShaderLanguage());
shader = manager.loadShader(key);
if (shader == null) {
logger.warning("Failed to reload shader!");
return;
}
// refresh the uniform links
//owner.updateUniformLinks();
// register the world bound uniforms
worldBindUniforms.clear();
for (UniformBinding binding : def.getWorldBindings()) {
Uniform uniform = shader.getUniform("g_" + binding.name());
uniform.setBinding(binding);
if (uniform != null) {
worldBindUniforms.add(uniform);
}
}
needReload = false;
}
示例2: loadShader
import com.jme3.shader.ShaderKey; //導入依賴的package包/類
@Override
public Shader loadShader(ShaderKey key) {return wraps.loadShader(key);}
示例3: loadShader
import com.jme3.shader.ShaderKey; //導入依賴的package包/類
/**
* Loads shader file(s), shouldn't be used by end-user in most cases.
*
* @see AssetManager#loadAsset(com.jme3.asset.AssetKey)
*/
public Shader loadShader(ShaderKey key);