[Paraview-developers] WebGL in Paraview/Web 4.1

kyr akyrieleis at gmail.com
Mon Nov 25 06:49:38 EST 2013


Hi,

I have set up a new application using paraview/Web 4.1 by deriving a class
from ParaViewWebProtocol and exporting my own python functions to the client
using  exportRpc(..) .

The session is started using:

   if (!pv.connection) {
                 $(this).addClass("session_started");                    
	        var serviceURL = location.protocol + "//" + location.hostname +
                     ":" + location.port + "/paraview";
              
                 var config = {
                            sessionManagerURL: serviceURL,
                            name: "Live Articles",
                            description: "3D visualization with
ParaView/Web",
                            application: "visualizer",
	                    file: pvsm
                  };

                  // Start a new ParaView/Web instance.
                  vtkWeb.start(config, 
                      function (conn) {
                          setupConnection(conn);
                      },
                      function (err) {
                          var conn = {
                            sessionURL: "ws://" + location.hostname + ":" +
location.port + "/ws"
                            };
                      setupConnection(conn);
                      }
                   );


function setupConnection(connection) {
                    if(location.protocol == "http:") {
                        connection.sessionURL =
connection.sessionURL.replace("wss:","ws:");
                    }
                 vtkWeb.connect(connection,
                    function(conn) {
                        pv.connection = conn;
                        pv.viewport =
vtkWeb.createViewport({session:conn.session});
                        pv.viewport.bind("#viewport");
                    },
                    function(code,reason){
                        pv.connection = null;
                        console.log(reason);
                        cleanup();
                    }
				   );		    
}

What are the steps to use WebGl rendering ? Is there any example available ?

Many thanks

kyr.



--
View this message in context: http://the-unofficial-paraview-developers-forum.34153.x6.nabble.com/WebGL-in-Paraview-Web-4-1-tp2669.html
Sent from the The Unofficial ParaView Developers Forum mailing list archive at Nabble.com.


More information about the Paraview-developers mailing list