Package com.jme.scene.state

Examples of com.jme.scene.state.GLSLShaderObjectsState


        SceneWorker.addWorker(new WorkCommit() {
            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);
                    }

                    shaderState.apply();
                } catch (GLException ex) {
                    logger.log(Level.WARNING, "Unable to load avatar sample " +
                               "shader. High quality avatars are not available.",
                               ex);
                    out.value = false;
View Full Code Here


    public static Texture texture(String path){
       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

Related Classes of com.jme.scene.state.GLSLShaderObjectsState

Copyright © 2018 www.massapicom. 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.