title: java glSurfaceView vs Native-Activity when using openGL ES from jni
body: <p>I have a Android Project where i use JNI to render on gpu (openGL ES 2). </p>
  
  <p>Currently i do this by creating a <code>glSurfaceView</code> in Java, and than use the <code>onDrawFrame</code> to invoke my JNI code that will execute the GLES commands. While this is working, the render speed is not good.</p>
  
  <p>I was wondering if i could get better performance if i stopped using the java glSurfaceView to handle the context creation, but instead try to use a Native-Activity and do everything in cpp.</p>
  
  <p>I think this way i can not use any java code anymore, so i most certainly will get into other troubles because my app needs to talk to some java android apis.</p>
  
  <p>I can imagine that under the hood the Native-Activity (which i think is still wrapped by some java code) uses the same <code>glSurfaceView</code>, so there would be nothing to gain.</p>
  
  <p>I am thankful for any infos on this topic. </p>
  
  <p>All my drawing on GPU is done using <code>glDrawArray</code>. Maybe thats just not the fastest way to go on openGL ES ?</p>