When using WebGL you have to do a lot of array buffering. The thing is
that in GWT hosted mode, the following Java code has to be used, since
arrays can not directly be passed to a JavaScript call like "new
Int32Array(array);":

"
public static JsArrayNumber wrapArray(double[] srcArray) {
                JsArrayNumber result = JavaScriptObject.createArray().cast();
                for (int i = 0; i < srcArray.length; i++) {
                        result.set(i, srcArray[i]);
                }
                return result;
        }
"

The problem is that even for small arrays this call is so damn
inefficient, that is renders the entire approach unusable! Once the
code gets compiled there is no issue at all (since now the array
doesn't need to be converted), only in hosted mode it is a problem.
But most of the time I am doing hosted mode debugging so always
compiling the thing is not a solution... A workaround would be to use
GWT.isScript() to omit geometry batching in hosted mode but that can't
be a solution either...

So how can I speed up this conversion in GWT hosted mode?

Thanks for your help...
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to