Can I keep the link to GL10 safe?

In my Android application, I get a reference to a GL10 object in the methods: onSurfaceCreated, onSurfaceChanged and onDrawFrame. Is it safe to hold this link?

+3
source share
1 answer

Do not save the link from your pointer GL10.

It is only valid for three overridden methods: onSurfaceChanged(), onSurfaceCreated()and onDrawFrame(). OpenGL ES uses state change, and therefore the context of OpenGL ES is valid only in these methods.

, , onDrawFrame() GL, OpenGL ES "" .

+5

Source: https://habr.com/ru/post/1778549/


All Articles