Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am a newbie to cocos2d. I would like make user to draw similar to what a painting brush would do. I am using CCSprite for that. I almost implemented the velocity, color and opacity factors for that tool, but I couldn't get the Sprite to be as clear as it should be. I can draw only in the below image http://i.imgur.com/KBe0L.png

which has blunt edges. But I want it to be harder / clear outside edges as in http://i.stack.imgur.com/GrFlv.png.

I am getting no idea to make it clear edged. The piece of code Im using is

  glEnable(GL_BLEND);
  [brush.texture setAliasTexParameters];
  [brush setBlendFunc:(ccBlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}];
  [brush visit];

I suspect the problem would be on blending mode. I tried some blending modes, but with no expected results. I am trying this for the past five days and so confused. Can some one help me sort this out?

Thanks in advance.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.