Show Posts

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.


Messages - Yerst

Pages: 1 2 [3]
31
Support / Re: Out of Memory Exception while loading Textures
« on: July 15, 2013, 05:11:44 pm »
Thx, that worked great!

32
Support / Re: Out of Memory Exception while loading Textures
« on: July 14, 2013, 11:05:26 pm »
So, it works when i use 512x512 textures, but my problem now is (and i don't know if i should open another topic for that) that i need to call the BitmapHelper
Code: [Select]
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.
If i don't rescale it i get a "Unsupported Texture Width: 768" exception.
So i scaled down my texture (in paint) to 341x341 without resizing it with the BitmapHelper  and it worked.
How can i still use my 512x512 textures?

33
Support / Re: Out of Memory Exception while loading Textures
« on: July 13, 2013, 11:32:31 pm »
1024*1024*24, but isn't there a way of getting more memory?
I think i can't write a whole game with such hard memory limits.
I will need much more models and textures...

34
Support / Re: Out of Memory Exception while loading Textures
« on: July 13, 2013, 11:23:30 pm »
So, how can i still load the images?

35
Support / Out of Memory Exception while loading Textures
« on: July 13, 2013, 09:20:36 pm »
Hey!
I'm trying to set up a SkyBox, but when i try to load the textures (tm.addTexture("left",new Texture(this.context.getResources().getDrawable(R.drawable.left)));) the program crashes with an out of memory exception after 4 textures (of 6).
One texture has a size between 150 and 300 KB, all textures have 1.32 MB.
I don't know why i get a out of memory at already 1.32 MB, but does anybody know a workaround?

36
Support / Re: How to bring a Texture on the Model?
« on: July 11, 2013, 09:34:05 pm »
Hey!
Thanks for your help!
I forget to unwrap the model in blender  :-[
The second problem was that i used BitmapHelper.rescale, withouth needing it.
I don't know why, but i had problem by choosing other measurements than 64x64.
Looks fine now!

37
Support / Re: How to bring a Texture on the Model?
« on: July 09, 2013, 05:40:18 pm »
Code: [Select]
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...

38
Support / How to bring a Texture on the Model?
« on: July 09, 2013, 04:53:10 pm »
Hey!
I'm new to jpct and i don't get how to allocate a texure to a Object3D.
I'm working with blender, and want to use the texture mapping blender applies to the model.
This is where i'm currently stuck:

Code: [Select]
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 ;)

Pages: 1 2 [3]