Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to use two two BitmapTextureAtlases in AndEngine?

How to use two two BitmapTextureAtlases in AndEngine?

Problems with Canvas, OpenGL, etc...

How to use two two BitmapTextureAtlases in AndEngine?

Postby uncle Lem » Mon Jul 16, 2012 11:03 am

I have to work with big textures in my project so I can't put all the textures into the one BitmapTextureAtlas. I tried to put them into two atlases:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. textureAtlas  = new BitmapTextureAtlas(2048, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
  2. textureAtlas2 = new BitmapTextureAtlas(1024, 2048, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
  3. foo = BitmapTextureAtlasTextureRegionFactory.createFromAsset(textureAtlas ,this,"foo.png",0,0);
  4. bar = BitmapTextureAtlasTextureRegionFactory.createFromAsset(textureAtlas2,this,"bar.png",0,0);
Parsed in 0.011 seconds, using GeSHi 1.0.8.4

But when I try to use bar this way:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Sprite sBar = new Sprite(0,0,bar);
  2. scene.attachChild(sBar);
Parsed in 0.009 seconds, using GeSHi 1.0.8.4

the only thing I can see is the white rectangle instead of my image. And I have no idea what is wrong here.
uncle Lem
Freshman
Freshman
 
Posts: 2
Joined: Mon Jul 16, 2012 10:57 am

Top

Re: How to use two two BitmapTextureAtlases in AndEngine?

Postby uncle Lem » Mon Jul 16, 2012 11:20 am

OK, I got it. I just forgot about this:

getEngine().getTextureManager().loadTexture(textureAtlas2);
uncle Lem
Freshman
Freshman
 
Posts: 2
Joined: Mon Jul 16, 2012 10:57 am

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 2 guests