本文整理汇总了Java中com.beyondar.android.world.BeyondarObject.setTexture方法的典型用法代码示例。如果您正苦于以下问题:Java BeyondarObject.setTexture方法的具体用法?Java BeyondarObject.setTexture怎么用?Java BeyondarObject.setTexture使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.beyondar.android.world.BeyondarObject
的用法示例。
在下文中一共展示了BeyondarObject.setTexture方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadBeyondarObjectTexture
import com.beyondar.android.world.BeyondarObject; //导入方法依赖的package包/类
/**
* Load the textures of the specified geoObject.
*
* @param gl
* @param geoObject
* The object to load the textures.
*/
public void loadBeyondarObjectTexture(GL10 gl, BeyondarObject geoObject) {
Texture texture = getTexture(geoObject.getImageUri());
if (texture == null) {
Bitmap btm = mWorld.getBitmapCache().getBitmap(geoObject.getImageUri());
texture = loadBitmapTexture(gl, btm, geoObject.getImageUri());
if (texture == null || !texture.isLoaded()) {
sPendingTextureObjects.addObject(geoObject.getImageUri(), geoObject);
}
if (btm == null) {
if (Logger.DEBUG_OPENGL) {
Logger.e(TAG, "ERROR: the resource " + geoObject.getImageUri()
+ " has not been loaded. Object Name: " + geoObject.getName());
}
}
}
geoObject.setTexture(texture);
}
示例2: setAllTextures
import com.beyondar.android.world.BeyondarObject; //导入方法依赖的package包/类
private synchronized void setAllTextures(GL10 gl, String uri, Bitmap btm,
PendingBitmapsToBeLoaded<BeyondarObject> pendingList) {
if (uri == null) {
return;
}
ArrayList<BeyondarObject> list = pendingList.getPendingList(uri);
if (list == null) {
return;
}
Texture texture = loadBitmapTexture(gl, btm, uri);
for (int i = 0; i < list.size() && texture.isLoaded(); i++) {
BeyondarObject object = list.get(i);
object.setTexture(texture);
}
pendingList.removePendingList(uri);
}