PDA

View Full Version : error when compilling rtPack tools



johnst
07-07-2011, 06:04 PM
Hi, I am using clan-lib-2.2.9 to compile rtPack tools,however, it shows me this error:

Texturepacker.cpp ->
p_data[y*(pixBuff.get_pitch()/(pixBuff.get_format().get_depth()/8))+ (x)] = CL_Color(0,0,0,0).color;
get_format() which is a CL_TextureFormat enum but it calling get_depth(), so it throws me an error.

so questions are:
1.
so is there a way to get_depth() again from CL_pixelBuffer ? or how to get an CL_PixelFormat from CL_PixelBuffer,so that I can use get_depth(), or is there some other tricks to do that? I checked the api
this works from version 2.0.0 but a lot has changed,when I try to compile with 2.0.0,I get even more errors.

2. which one is the official version of clanlib to compile with RTpack tools?

thanks

Seth
07-08-2011, 12:42 AM
RTPack requires Clanlib 1.X to compile, latest version should be ok.

I've just updated the readme to say this, before it was saying 2.x which is incorrect.

johnst
07-08-2011, 03:32 AM
thanks,problem solved,however the converted image from png (40k) to rttex (1MB) , is that normal?

ps: however I did notice that when I compress that rttex to a zip, the size return to around 40k,:O, so if this doesn't hurt the apk file size,should I just leave it like that?

Seth
07-08-2011, 07:30 AM
When RTPack.exe is used to convert textures to rttex, it doesn't also automatically pack the finished product - you'll have to run rtpack TWICE to get what you want. So after converting, run rtpack.exe <filename.rttex> (without any other parms) and it will pack it. (using zlib and a special header)

You can actually "pack" any kind of file, and Proton FileManager commands will transparently decompress it automatically, no matter the filename.


ps: however I did notice that when I compress that rttex to a zip, the size return to around 40k,:O, so if this doesn't hurt the apk file size,should I just leave it like that?

If this is for Android only, yeah, you really don't need to pack it twice, waste of processor time. (Proton can load it either way)

But to be more ready for other platforms, I use rtpack, then I tell the ant android packer to NOT compress .rttex files when creating the final jar. (I think all the examples do this)

This way, it doesn't get double compressed.