0

I'm developing an app that will connect to (my own) oscilloscope, read data via USB and display plots - so just normal oscilloscope.

USB is ok, now I have to draw the graphs.

As you know (or not) in oscilloscope there are really fast-changing signals, so I have to render graphs really fast. So I'm looking for a fast way to do it.

I've read that GLSurfaceView uses OpenGL and GPU so it is used for games, but will I benefit from it in my project? GL is really complicated (to draw a square or just lines, not to mention about text...) while SurfaceView has its Canvas so it's much easier.

I really care for performance, but have not much time and nerver used OpenGL so what do you think?

zupazt3
  • 966
  • 9
  • 30

1 Answers1

0

It is complicated, but you will benefit from GLES when using a SurfaceView.

Canvas on SurfaceView is not hardware-accelerated, so on some devices you'll have trouble hitting 60fps. (See for example the "multi-surface test" in Grafika. Tap the "bounce" button to cause it to animate. On some devices it'll do 60fps, on others it won't hit 30fps.)

One alternative would be to create a custom View. That way the rendering would be accelerated by hardware.

fadden
  • 51,356
  • 5
  • 116
  • 166