31
Support / Re: Out of Memory Exception while loading Textures
« on: July 15, 2013, 05:11:44 pm »
Thx, that worked great!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
tm.addTexture("left",new Texture(BitmapHelper.rescale(BitmapHelper.convert(this.context.getResources().getDrawable(R.raw.left)), 512, 512)));
and rescale my texture to 512x512. The crazy thing is that it is already 512x512. TextureManager tm = TextureManager.getInstance();
tm.addTexture("sand",new Texture(BitmapHelper.rescale(BitmapHelper.convert(this.context.getResources().getDrawable(R.drawable.img1348666104)), 64, 64)));
InputStream dsStream = manager.open("untitled.3ds");
cube = Loader.load3DS(dsStream, 1);
for (int i = 0;i<cube.length;i++)
{
cube[i].setTexture("sand");
}
world.addObjects(cube);
nothing changed...
TextureManager tm = TextureManager.getInstance();
tm.addTexture("sand",new Texture(BitmapHelper.rescale(BitmapHelper.convert(this.context.getResources().getDrawable(R.drawable.img1348666104)), 64, 64)));
InputStream dsStream = manager.open("untitled.3ds");
cube = Loader.load3DS(dsStream, 1);
world.addObjects(cube);
As expected it only shows a grey object, not my beautiful sand