public void assertGLThread ( ) { if ( Thread . currentThread ( ) . getId ( ) != mGLThreadID ) { RuntimeException e = new RuntimeException ( "Should not run GL functions from a non-GL thread!" ) ; e . printStackTrace ( ) ; throw e ; } }
Throws an exception if the current thread is not a GL thread .