Package com.jme.scene.state

Examples of com.jme.scene.state.GLSLShaderObjectsState.load()


            public void commit() {
                try {
                    RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
                    GLSLShaderObjectsState shaderState = (GLSLShaderObjectsState)rm.createRendererState(StateType.GLSLShaderObjects);
                    shaderState.setEnabled(true);
                    shaderState.load(vertex, fragment);

                    if (binder != null) {
                        binder.bind(shaderState);
                    }
View Full Code Here


       return TextureManager.loadTexture(clazz.getResource(path), MinificationFilter.Trilinear, MagnificationFilter.Bilinear);
    }

    public static RenderState createXRayShader() {
        GLSLShaderObjectsState xray = DisplaySystem.getDisplaySystem().getRenderer().createGLSLShaderObjectsState();
        xray.load(clazz.getClassLoader().getResource("shader/xray/xray.vert"), clazz.getClassLoader().getResource("shader/xray/xray.frag"));
        xray.setEnabled(true);
        xray.setUniform("edgefalloff", 1f);
        return xray;
    }
   
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.