Examples of TechniqueDef


Examples of com.jme3.material.TechniqueDef

        if(technique == null){
            throw new UnsupportedOperationException("The shaderGenerator was not properly initialized, call initialize(Technique) before any generation");
        }

        DefineList defines = technique.getAllDefines();
        TechniqueDef def = technique.getDef();
        ShaderGenerationInfo info = def.getShaderGenerationInfo();

        String vertexSource = buildShader(def.getShaderNodes(), info, ShaderType.Vertex);
        String fragmentSource = buildShader(def.getShaderNodes(), info, ShaderType.Fragment);

        Shader shader = new Shader();
        shader.initialize();
        shader.addSource(Shader.ShaderType.Vertex, technique.getDef().getName() + ".vert", vertexSource, defines.getCompiled(), getLanguageAndVersion(ShaderType.Vertex));
        shader.addSource(Shader.ShaderType.Fragment, technique.getDef().getName() + ".frag", fragmentSource, defines.getCompiled(), getLanguageAndVersion(ShaderType.Fragment));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.