Comments (16)
Micah,
That's great!
I think having a separate branch for GLES 2.0 would be fine (that's how the Cocos2D repo is setup, they don't support both ES 1.0 and ES 2.0). I'm not likely going to have much time to work on this right away, so if you want to fork CCSVG, I think that's a good plan :-)
A bit off topic, but... We're using Cocos2D 2.0 for everything these days. When we ran into the ES 2.0 compatibility issue, I kind of did an end-run around the problem. If you look at my fork of MonkVG, I added a code path for dumping all the vertices in a batch just before they get submitted to OpenGL (1). We're using the OS X version of MonkSVG and MonkVG to dump the vertices to a binary file in an offline preprocess step, then loading the binary file and dumping the data directly into OpenGL. This is super fast (since there's no tesselation at run time), it gives us a better idea of memory footprint (size of file on disk == size of file in memory), and it's compatible with ES 1.0 and ES 2.0 to boot.
Luke
from ccsvg.
So I forked CCSVG and got it all working with Cocos2d 2.0. I spent a bunch of wasted time chasing down some crazy phantom issues with Xcode so I probably changed more things then was necessary. I rebuilt the Xcode workspace and sub-projects, and now CCSVG is not even a project but just a source code copy. Also, the git submodules now point to my versions of MonkVG and MonkSVG. Sorry if that messes you up too much. Would you still be interested in a "pull request" on my fork?
from ccsvg.
Micah - Can you share your modifications? I'm struggling with getting CCSVG to work with Cocos2d 2.0
from ccsvg.
Clone my fork of CCSVG to get it to work on Cocos2D 2.x
On May 31, 2013, at 5:46 PM, W1ngy [email protected] wrote:
Micah - Can you share your modifications? I'm struggling with getting CCSVG to work with Cocos2d 2.0
—
Reply to this email directly or view it on GitHub.
from ccsvg.
Awesome! Thanks Micah.
I was able to run the example project successfully but when I add a CCSVG to a layer in my project the entire screen goes white :(
from ccsvg.
Hmmm. Perhaps the MonkVG shaders aren't being loaded? I'm not in front of the code so I can't tell you off the top of my head where to check but it should be somewhat obvious.
~~
Micah Pearlman
[email protected]
415-637-6986
http://www.linkedin.com/pub/micah-pearlman/16/7b6/193
~~
On Jun 1, 2013, at 9:20 AM, W1ngy [email protected] wrote:
Awesome! Thanks Micah.
I was able to run the example project successfully but when I add a CCSVG to a layer in my project the entire screen goes white :(—
Reply to this email directly or view it on GitHub.
from ccsvg.
After further investigation I noticed that its my regular CCSprites that are turning white.
from ccsvg.
Can you render an SVG image with CCSVG?
On Jun 1, 2013, at 9:35 AM, W1ngy [email protected] wrote:
After further investigation I noticed that its my regular CCSprites that are turning white.
—
Reply to this email directly or view it on GitHub.
from ccsvg.
Yeah. The svg renders but the other sprites turn white. When I remove the CCSVGSprite then they turn back to their normal colors.
from ccsvg.
Its only happening to the CCSprites that have a Z order higher than the CCSVGSprite.
from ccsvg.
Can you set up an example project with the bug? I'm guessing the GL state isn't being properly restored after an SVG image is being rendered. Do you have any GL state optimizations in the Cocos side turned on or something?
On Jun 1, 2013, at 10:22 AM, W1ngy [email protected] wrote:
Its only happening to the CCSprites that have a Z order higher than the CCSVGSprite.
—
Reply to this email directly or view it on GitHub.
from ccsvg.
Yeah you're right. Its using one of the colors from the svg and painting everything else with that color.
from ccsvg.
I tried making a demo app but can't reproduce the problem. I haven't made any changes to any of the cocos2d files in my project.
from ccsvg.
I replaced all the libraries in my project with fresh copies and now everything works :D
from ccsvg.
Yay!
On Jun 1, 2013, at 6:40 PM, W1ngy [email protected] wrote:
I replaced all the libraries in my project with fresh copies and now everything works :D
—
Reply to this email directly or view it on GitHub.
from ccsvg.
The regex in mkSVG for finding the bounds info ignores anything with decimals. So it finds 512 but not 512.12 or 512.00
I fixed using - regex numberWithUnitPattern( "^(-?\d+(\.\d+)?)(px)?$" );
from ccsvg.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ccsvg.