/** * Binds this instance's {@link Texture} to the <code>GLContext</code> if the texture has been * created, otherwise initiates image source retrieval and texture creation in a separate thread. * * @param dc the current draw context. * @return true if the texture was bound, otherwise false. */ public boolean bind(DrawContext dc) { if (this.isTextureInitializationFailed()) return false; if (dc == null) { String message = Logging.getMessage("nullValue.DrawContextIsNull"); Logging.logger().severe(message); throw new IllegalStateException(message); } Texture texture = this.getTexture(dc); if (texture == null) texture = this.requestTexture(dc); if (texture != null) { texture.bind(); return true; } else { return false; } }