I don't exactly understand what the purpose of this method is. In the android documentation, they say that this is when the size of the screen is changed. Does this mean the size of the viewport, or what exactly does it mean? What opengl calls should I make in the method.
The method is called when the size of the viewport is changed or first created. This function is the first place where you will know exactly how many pixels your GlSurfaceView occupies.
In this method it would be appropriate to set the viewport, and perhaps to setup the projection matrix.
For example if the screen rotates from vertical to horizontal, the size of the viewport may change, so you should reset your viewport and projection matrices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With