code: 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;
          }
      }
docs: Throws an exception if the current thread is not a GL thread.
  
  @since 1.6.5