Package org.jdesktop.mtgame

Examples of org.jdesktop.mtgame.RenderManager


         final String fragment = readShader(fragmentFile);

        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);
View Full Code Here


  if (rootNode != null) {
      dispose();
  }

        rootNode = new Node("Bounds Viewer Node");
        RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
        RenderComponent rc = rm.createRenderComponent(rootNode);
        this.addComponent(RenderComponent.class, rc);

        // Set the Z-buffer state on the root node
        ZBufferState zbuf = (ZBufferState)rm.createRendererState(StateType.ZBuffer);
        zbuf.setEnabled(true);
        zbuf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
        rootNode.setRenderState(zbuf);

        // Set the wireframe state on the root node
        WireframeState wf = (WireframeState)rm.createRendererState(StateType.Wireframe);
        wf.setEnabled(true);
        rootNode.setRenderState(wf);

        // Draw some geometry that mimics the bounds, either a sphere or a
        // box. Add to the scene graph of this Entity.
View Full Code Here

        }
        return null;
    }

    private List<LightNode> getLightsFromRenderer() {
        RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
       
        int numberOfLights = rm.numLights();
        List<LightNode> lights = new ArrayList<LightNode>();
        for(int i = 0; i < numberOfLights; i++) {
            lights.add(rm.getLight(i));
        }
       
        return lights;       
    }
View Full Code Here

        } catch (InterruptedException ie) {
            // ignore
           
        }
       
        RenderManager rm = WorldManager.getDefaultWorldManager().getRenderManager();
        JOGLContextCapabilities cap = rm.getContextCaps();
        out.append("GL_ARB_fragment_program...").append(cap.GL_ARB_fragment_program).append("\n");
        out.append("GL_ARB_fragment_shader...").append(cap.GL_ARB_fragment_shader).append("\n");
        out.append("GL_ARB_shader_objects...").append(cap.GL_ARB_shader_objects).append("\n");
        out.append("GL_ARB_texture_non_power_of_two...").append(cap.GL_ARB_texture_non_power_of_two).append("\n");
        out.append("GL_ARB_vertex_buffer_object...").append(cap.GL_ARB_vertex_buffer_object).append("\n");
View Full Code Here

TOP

Related Classes of org.jdesktop.mtgame.RenderManager

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.