<div dir="ltr"><div><div>If you look at KiwiGLSurfaceView.java, you'll see that the native rendering code is invoked like this:<br><br>public void onDrawFrame(GL10 gl) {<br>    boolean result = KiwiNative.render();<br>

    ...<br>}<br><br></div>As long as the native rendering is called from inside the onDrawFrame method of the GLSurfaceView's Renderer then everything works.  The GLSurfaceView will ensure its Renderer's GL context is active prior to calling onDrawFrame.  If you need to make other GL calls, like creating textures, you should do those calls by queuing a runnable to execute on the Renderer's thread.  You'll see examples of that in KiwiGLSurfaceView.java.<br>

<br></div>If you create a second GLSurfaceView, you won't be able to render the same data in each view, you'll have to create new VBOs for each context.  If you're using vesKiwiDataRepresentation objects, then you'll need to create two of those.<br>

<div><br>Pat<br><div><br><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 10:33 AM, David López <span dir="ltr"><<a href="mailto:davidestebanlopez@gmail.com" target="_blank">davidestebanlopez@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everybody,<br><br>I wanted to know how the native rendering part of the application knows in which GLSurfaceView it should draw. For instance, if I had two GLSurfaceViews how could I use them to render different the data from different points of view?<br>


<br>Thank you all,<br><br>David.<br></div>
<br>_______________________________________________<br>
Ves mailing list<br>
<a href="mailto:Ves@public.kitware.com">Ves@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
<br></blockquote></div><br></div>