Examples of RenderManager


Examples of org.jdesktop.mtgame.RenderManager

        super(name);

        // Create the root node of the cell and the render component to attach
        // to the Entity with the node
        rootNode = new Node();
        RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
        RenderComponent rc = rm.createRenderComponent(rootNode);
        this.addComponent(RenderComponent.class, rc);
    }
View Full Code Here

Examples of org.jdesktop.mtgame.RenderManager

     * Adds an Entity with its root node to the scene graph, using the super-
     * class Entity as the parent
     */
    protected void addSubEntity(Entity subEntity, Node subNode) {
        // Create the render component that associates the node with the Entity
        RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();
        RenderComponent thisRC = rm.createRenderComponent(subNode);
        subEntity.addComponent(RenderComponent.class, thisRC);

        // Add this Entity to the parent Entity
        RenderComponent parentRC = this.getComponent(RenderComponent.class);
        thisRC.setAttachPoint(parentRC.getSceneRoot());
View Full Code Here

Examples of org.jdesktop.mtgame.RenderManager

        rootBG.attachChild(modelBG);

        WorldManager wm = ClientContextJME.getWorldManager();

        RenderManager renderManager = wm.getRenderManager();
        ZBufferState buf = (ZBufferState) renderManager.createRendererState(
                RenderState.RS_ZBUFFER);
        buf.setEnabled(true);
        buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);

        MaterialState matState =
                (MaterialState) renderManager.createRendererState(
                RenderState.RS_MATERIAL);
//        matState.setDiffuse(color);
        rootBG.setRenderState(matState);
        rootBG.setRenderState(buf);

        Entity entity = new Entity(loadedModel.getWonderlandName());
        RenderComponent scene = renderManager.createRenderComponent(rootBG);
        entity.addComponent(RenderComponent.class, scene);

        scene.setLightingEnabled(loadedModel.getImportSettings().isLightingEnabled());

        entity.addComponent(TransformProcessorComponent.class,
View Full Code Here

Examples of org.jdesktop.mtgame.RenderManager

        JScene js = character.getJScene();

        Node attachNode =
                js.getExternalKidsRoot(ExternalKidsType.UNTRANSFORMED);

        RenderManager rm = ClientContextJME.getWorldManager().getRenderManager();

        RenderComponent rc = rm.createRenderComponent(this);
        rc.setAttachPoint(attachNode);
        e.addComponent(RenderComponent.class, rc);

        JMECollisionSystem collisionSystem = (JMECollisionSystem) ClientContextJME.getWorldManager().
                getCollisionManager().loadCollisionSystem(JMECollisionSystem.class);
View Full Code Here

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

Examples of org.jdesktop.mtgame.RenderManager

  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

Examples of org.jdesktop.mtgame.RenderManager

        }
        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

Examples of org.jdesktop.mtgame.RenderManager

        } 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

Examples of org.locationtech.udig.project.internal.render.RenderManager

     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetRenderManagerInternal(RenderManager newRenderManagerInternal,
            NotificationChain msgs) {
        RenderManager oldRenderManagerInternal = renderManagerInternal;
        renderManagerInternal = newRenderManagerInternal;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    RenderPackage.VIEWPORT_MODEL__RENDER_MANAGER_INTERNAL,
                    oldRenderManagerInternal, newRenderManagerInternal);
View Full Code Here

Examples of org.locationtech.udig.project.internal.render.RenderManager

    public double getScaleDenominator() {
        if (!validState()) {
            return -1;
        }
        RenderManager renderManager = getRenderManagerInternal();
        ReferencedEnvelope bounds2 = getBounds();
        if (renderManager == null || renderManager.getMapDisplay() == null)
            return -1;

        IMapDisplay display = renderManager.getMapDisplay();
        return ScaleUtils.calculateScaleDenominator(bounds2, display.getDisplaySize(),
                display.getDPI());

    }
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.