Compressed Texture support (ETC1, PVR)

  ... information about changes and new features of AndEngine,

Compressed Texture support (ETC1, PVR)

Postby Nicolas Gramlich » Fri Jul 15, 2011 11:18 pm

Hello Community,

the past days I've been implementing support for compressed Textures to AndEngine. During that change some refactoring was necessary. For you nothing will change besides a couple of renaming with anything that deals with Textures.

I.e. what was previously simply called 'Texture' is now called BitmapTextureAtlas, what represents its actual purpose a lot better.

On the 'new feature' front there are now ETC1Textures and PVRTextures (Also PVRGZTextures. Soon PVRCCZTextures), which have a few benefits, when compared to PNGs.

More on all that tomorrow. :-)

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Compressed Texture support (ETC1, PVR)

Postby dorasoft » Sat Jul 16, 2011 1:36 am

Actually, a lot of rename :D By the way, Find & Replace will do that, but I believe new amazing feature will be on soon :)
dorasoft
 
Posts: 87
Joined: Sat Jun 18, 2011 4:06 pm

Re: Compressed Texture support (ETC1, PVR)

Postby tajny » Sat Jul 16, 2011 2:39 am

Great news, most important to me are PVR Textures.

Regards
Paul

Paweł P.

--------------------------------------
Portfolio

Run Santa Run Link
Xelorians Link
User avatar
tajny
 
Posts: 216
Joined: Mon May 30, 2011 10:23 pm
Location: Poland

Re: Compressed Texture support (ETC1, PVR)

Postby Nicolas Gramlich » Sat Jul 16, 2011 11:52 am

tajny wrote:Great news, most important to me are PVR Textures.

Regards
Paul


Note: It's not PVR-"TC" as this is not the TextureCompression to go for on Android :!: PVR is just a container format, that contains Texture-Dumps, which are loaded quicker than PNGs, which need to be decoded first and possibly converted first.

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Compressed Texture support (ETC1, PVR)

Postby muchos.hornos » Wed Jul 20, 2011 5:30 pm

Hi Nicolas,

I just spent half a day trying to figure out how to pass my code through compilation with the new Andengine version:)

I agree that the necessary changes in code were trivial, but only if you are familiar enough with the framework. Hence it seems very important to sustain backward compatibility.
Think about all those Andengine tutorials on the web that use "new Texture(...)" and now are useless for beginners.
Andengine is poorly documented and changing basic API makes it much harder to understand how to work with it.

What do you think?
muchos.hornos
 
Posts: 1
Joined: Wed Jul 20, 2011 2:48 pm

Re: Compressed Texture support (ETC1, PVR)

Postby Duiker101 » Wed Jul 20, 2011 6:47 pm

"I do not agree with what you have to say, but I'll defend to the death your right to say it." Voltaire
Duiker101
 
Posts: 264
Joined: Tue Feb 01, 2011 11:28 am
Location: Italy

Re: Compressed Texture support (ETC1, PVR)

Postby natypc » Thu Jul 21, 2011 2:20 am

Great update! thanks!

I'm trying to use the new PVRTexture and loads perfectly but the color components are swapped in my Nexus One.

I'm doing something wrong?

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 try {
  2.                         mSprTexture = new PVRTexture(PVRTextureFormat.RGBA_8888) {
  3.                                 @Override
  4.                                 protected InputStream getInputStream() throws IOException {
  5.                                         return getAssets().open("sprites.pvr");
  6.                                 }
  7.                         };
  8.                 } catch (Exception e) {}
  9.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


I'm using TexturePacker to create the PVR file. Any other suggestion to test other PVR makers?
natypc
 
Posts: 18
Joined: Thu Jul 21, 2011 2:04 am

Re: Compressed Texture support (ETC1, PVR)

Postby vertti » Sun Jul 31, 2011 6:03 pm

Aaagh, even if it's more precise, on what planet BitmapTextureAtlasTextureRegion is a good name for a class :D
Catch me on Twitter and our development blog.
Check out our game SCAWAR Space Combat and it's trailer.
Image
vertti
 
Posts: 82
Joined: Fri Jul 08, 2011 11:19 am
Location: Finland

Re: Compressed Texture support (ETC1, PVR)

Postby Nicolas Gramlich » Mon Aug 01, 2011 7:29 am

vertti wrote:Aaagh, even if it's more precise, on what planet BitmapTextureAtlasTextureRegion is a good name for a class :D

There is no such class as "BitmapTextureAtlasTextureRegion", it does not even make sense :)
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: Compressed Texture support (ETC1, PVR)

Postby Nicolas Gramlich » Mon Aug 01, 2011 7:30 am

Btw, PVRCCZ is now also supported.
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Next

Return to Updates

Who is online

Users browsing this forum: No registered users and 4 guests