Drawing with OpenGL ES
OpenGL ES or just GLES is the trimmed down mobile version of OpenGL. OpenGL is a low-level and powerful 2D and 3D drawing API similar to DirectX. Since it is a low-level library, it does require significant knowledge of 2D/3D maths. Again, for our purposes, we will avoid most of the nasty math and just modify some of the drawing code to change the way the sample app functions. What we will do is modify the sample app to change the way objects are drawn. Load up Android Studio with the sample project and let's get started:
- Scroll down to the bottom of
PointCloudRenderer.java
and look at the following section of code identified in the following screen excerpt:
PointCloudRenderer.java open on the draw method
- Now the code is straightforward, but a lot of what is going on assumes that the developer has a good foundation in 3D maths and graphic rendering. We don't have time to go through every step, but, essentially, all that the code is doing is drawing the identified point...