PlanetCute Images

General discussion about the R.U.B.E editor
Post Reply
gOzaru
Posts: 16
Joined: Wed May 27, 2015 6:33 am

PlanetCute Images

Post by gOzaru »

Hi, I am sorry for asking a question again.
I tested PlanetCute on Lumia 535 and I found out that the images which are used for all background and platform are jaggies. It is not antialiased and frame rate below 30 FPS.
In cocos2d-x 3.8 I have to use the power of two in all images I want to apply anti aliasing.
My question is can I apply antialias in all images exported through json file?
If so, how can I do it?
Should I import images with power of two in Rube scene before exporting it to json?
Or any other ideas?
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: PlanetCute Images

Post by iforce2d »

I think this is a question for the cocos2d-x forums... are the images displaying correctly in RUBE?
gOzaru
Posts: 16
Joined: Wed May 27, 2015 6:33 am

Re: PlanetCute Images

Post by gOzaru »

I think I've just known how to solve it.
It is actually related to RUBELayer.cpp.

So at the beginning when we want to make rube scene, we have to import images which resolution has power of two. Then once we imported the json in cocos2d-x, we apply the antialising to sprite inside RUBELayer::afterLoadProcessing(b2Json *json) there.....

Code: Select all

Texture2D::TexParams params = { GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE };
sprite->getTexture()->setTexParameters(params);
sprite->getTexture()->setAntiAliasTexParameters();
Edit:
It doesn't work.....
I think this question is related to Rube since the images are processed there.
The images are loaded but they are all jaggies.
I wonder where I got wrong....
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: PlanetCute Images

Post by iforce2d »

How do you mean the images are processed in RUBE? The only thing RUBE does is output a text file (.json export). Anything that happens in your own program after loading the RUBE scene is handled by cocos2d-x features.
gOzaru
Posts: 16
Joined: Wed May 27, 2015 6:33 am

Re: PlanetCute Images

Post by gOzaru »

yup.
I was wrong.
Sorry. I should ask this in cocos2d-x forum.
Thank you.
Post Reply