On Mon, Sep 26, 2011 at 12:46 AM, claudio canepa <[email protected]>wrote:
> > > On Sun, Sep 25, 2011 at 7:43 PM, claudio canepa <[email protected]>wrote: > >> >> >> On Mon, Sep 19, 2011 at 8:31 AM, Ivo Fokkema <[email protected]>wrote: >> >>> >>> I have confirmed the issue also here at my work computer, Linux/Ubuntu >>> 10.10 having an Intel 82Q963 Q965 graphics card, cocos2d o.5rc0, pyglet >>> 1.1.2. I also see the horizontal black lines. At home I have Ubuntu 11.04 >>> with an ATi card with new drivers. and I also remember seeing the horizontal >>> black lines. So I guess it's not related to the graphics card... >>> >>> Thanks again! >>> >>> Ivo >>> >> >> I think the problem is: >> When the particle image is taken from pyglet.resource the image is into an >> atlas, thus the texture has extra images. >> But nowhere in the cocos particle code we set texture coords, so with >> enough size we see the extra images. >> >> It is not clear to me how to set texture coords for point sprites, need to >> look for some info on this. >> >> Workaround: >> In your ParticleSytem subclass use pyglet.image.load to get the image >> instead of pyglet resource, by example: >> >> >> class JetSteam( ParticleSystem ): >> total_particles = 1000 >> # [snipped] >> >> #workaround issue 168 >> from pyglet import image >> pic = image.load('fire.png') # adjust the path !!! >> texture = pic.get_texture() >> >> In the issue tracker , >> >> http://code.google.com/p/los-cocos/issues/detail?id=168 >> >> I uploaded the bugdemo scripts with the workaround applied (the ones named >> *_workaround.py ) >> Would you mind to confirm if they look good in your platform ? >> > Perfect, that indeed fixes it! I also noticed another difference: the size of the particle is now actually how it's set. I've opened the original fire.png (128px), scaled it down to 120px and then measured the cloud: should be about 95 pixels. In the workaround code, this is the case. However, in the original code that had the sprite showing up also, the cloud was only 45 pixels on the screen. So this workaround fixed two bugs :) Thanks, Ivo -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
