Forums » C++ Framework » Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. »
| Alex Maximov | Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|---|---|---|---|---|---|
|
Added by Alex Maximov over 1 year ago
Hi Guys, How about to implement/include some another new features (additionaly to mentioned in http://www.cocos2d-x.org/boards/6/topics/5775)? Thanks, |
||||
| Damiano Mazzella | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Damiano Mazzella about 1 year ago
Hi alex, |
||||
| Damiano Mazzella | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Damiano Mazzella about 1 year ago
Hello everyone, I hope can be useful. PRKit.zip (13.8 kB) |
||||
| Herman Jakobi | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Herman Jakobi 11 months ago
I made a Cocos2d-X 2.0 port of your PRKit code PRKit-Cocos2dX20.zip (14.8 kB) |
||||
| Damiano Mazzella | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Damiano Mazzella 11 months ago
Thanks, you've anticipated my post
|
||||
| tony come | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
awesome, this is what I want !! great work |
||||
| Alex Zhd | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Damiano Mazzella wrote:
Yes, it is a very useful thing, i use it in my project! Good job. But i have one question there - http://www.cocos2d-x.org/boards/6/topics/12325 |
||||
| Chen Tony | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
It's very useful. but I can not download it. |
||||
| kundi jiang | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by kundi jiang 9 months ago
Herman Jakobi wrote:
I used your cocos2d-x 2.0 PRKit code, But it cann't draw the PRFilledPolygon on the layer, following is my test code and I also attach the image file watermelon.png: watermelon.png (4.7 kB) |
||||
| Alex Zhd | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Try this: filledPolygon->setAnchorPoint(ccp(0, 0)); filledPolygon->setPosition(ccp(0,0)); this->addChild(filledPolygon, 1); |
||||
| kundi jiang | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by kundi jiang 9 months ago
I have tried it,but the result all the same. |
||||
| kundi jiang | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by kundi jiang 9 months ago
Maybe my PRKIT code has some bug, I appriciate that you can share the PRKIT code on cocos2d-x you always use. |
||||
| Alex Zhd | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Do you have error when compile program? |
||||
| kundi jiang | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by kundi jiang 9 months ago
Alex Zhd wrote:
No,It built smoothly; |
||||
| Craig McMahon | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Craig McMahon 9 months ago
I'm also trying to get this to work. I'm running a cocos2d-iphone PRKit example alongside it with the same texture, and have confirmed that the polygon is correctly triangulated and all the texture coordinates are the same going into the draw function, but no texture appears on screen. What would be a really great feature for CCDrawingPrimitives would be a ccDrawTexturedPoly(...) =) Craig |
||||
| Damiano Mazzella | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Damiano Mazzella 9 months ago
Hi all, I attach the new version of PRKit for cocos2d-x 2.0. I hope you find it useful, PRKit_cocos2d-2.0-x-2.0.2.zip (14.1 kB) |
||||
| Bojan Drvarek | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Bojan Drvarek 8 months ago
Damiano Mazzella wrote:
The port is buggy on windows (and it crashes), BUT both on Windows and OS X iOS simulator, it doesnt triangulate as it should. I've attached an image to show what I mean. Here's the code: init method: update method: |
||||
| Damiano Mazzella | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Damiano Mazzella 8 months ago
Bojan Drvarek wrote:
Hi, Ciao, |
||||
| Craig McMahon | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Craig McMahon 8 months ago
Damiano Mazzella wrote:
I've been testing it for a while and it seems to work great - thank you! |
||||
| Bojan Drvarek | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Bojan Drvarek 8 months ago
Damiano Mazzella wrote:
Image is POT, I'm sending it as attachment. Does the point list need to be inputted in specific order or does the triangulator sort them out in format compatible with OpenGL? slime_1.png (212.8 kB) |
||||
| artur a | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Very good work Damiano Mazzella, after pulling a lot of hair trying to make another port work - I downloaded your port and it worked great! Thanks |
||||
| Leonardo Gomez | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Leonardo Gomez 6 months ago
Damiano Mazzella wrote:
Hi all! Im newbie in OpenGL and I find this port very usefull. Ive been use it for about a week, doing some tests whithout problems. But when I use this code in a more complicated project, it throws some random bugs. This minors bug where solved when I initialize these variables in class PRFilledPolygon class: int areaTrianglePointCount; To solve it I made a constructor directly in PRFilledPolygon.h:
You can initialize the variables wherever you want. Thanks again! |
||||
| qiujie tian | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by qiujie tian 4 months ago
Hello,sir! i write my code like this: texture = CCTextureCache::sharedTextureCache()->addImage("HelloWorld.png"); void HelloWorld::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent)
{ PRFilledPolygon *temp = PRFilledPolygon::filledPolygonWithPointsAndTexture(vc, texture); @ but the program will crash at
} I don't know why. can you help me ? i use cocos2d-x 2.0.4 Thank you |
||||
| Leonardo Gomez | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by Leonardo Gomez 4 months ago
qiujie tian wrote:
I think this error its beacuse the texture, you load in the cache, was released by cocos2dx in some moment before want to use it in PRFilledPolygon::filledPolygonWithPointsAndTexture(vc, texture);. Cocos2dx release it, but you still have a pointer to that texture, the when PRFilledPolygon wants to release some thing already released, it crash. A possible solution, if it was the case, should be putting CC_SAFE_RETAIN(texture); after the line texture = CCTextureCache::sharedTextureCache()->addImage("HelloWorld.png"); to prevent that cocos2dx dispose. And maybe, somewere, do a CC_SAFE_RELEASE(texture); after you use it or in the destructor of that class. Hope this work. |
||||
| qiujie tian | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by qiujie tian 4 months ago
Leonardo Gomez wrote:
Hello,sir. thank you for your reply. but it also crash at that line , i write this: please help me |
||||
| qiujie tian | RE: Another features request for further releases - FilledPolygon, WrappedText, Clip Node etc. | ||||
|
Added by qiujie tian 4 months ago
can you give me your code .......you said you use it smoothly. thank you |

