I did a quick example of how to use render texture and added it to the project in SVN.. It's basically the beginning of a paint program using Render Texture as the Canvas. There's obviously a lot of things you can do with Render Texture, but hopefully this will give some people an idea of how it works and how to use it.
Render Texture example added to project..
(10 posts) (7 voices)-
Posted 2 years ago #
-
Excellent - questions about RenderTexture are very common.
Posted 2 years ago # -
Hi,
thanks a lot, slipster216. I have found your RenderTextureTest-files, added them to the big project that came with cocos2d 0.8.1 (with all the demos).What do I have to do to run your example?
I tried to build a new target with the same name as your class (RenderTextureTest), then I selected the RenderTextureTest.m file, I selected the target as "active target" and set the little check mark to tell Xcode that the .m file belongs to the target. But that doesn´t seem to be enough. Would somebody please be so kind as to tell me how to do this correctly?
Thanks a lot in advance.
MarcoPosted 2 years ago # -
@splister :
Thank you for taking the time to add an example of how to use your RenderTexture class. I think something went wrong with SVN because there's a problem with some Info.plist files Three of them appear in red in Xcode (they're missing) and one of them (RenderTextureTest-Info.plist) seems to be necessary to compile the RenderTexture test.To make things right :
- remove these 3 missing plist files from the xcode project
- select the RenderTextureTest target, "get info" on it, go to the "Build" tab and replace the entry for "Info.plist File" (under Packaging) with "Resources/Info.plist"Posted 2 years ago # -
gah, missed ad. Will fix tonight..
Posted 2 years ago # -
ok, fixed..
marco - if you sync to the project file it will show up already created. Simply creating a target isn't enough, since the target contains information about which files are included in the bundle, which libraries are used, etc..
Posted 2 years ago # -
It's fixed in debug but not in release. It's no big deal making the small change though.
Posted 2 years ago # -
i have downloaded the latest build from svn, and when trying to run the rendertexturetest i get an error while linking: library not found for -lcocos2d
Any idea how to solve this? if i choose any other target it compiles fine... Thansk!Posted 2 years ago # -
I think it's missing cocos2d as a direct dependancy, Just add that to the target.
Posted 2 years ago # -
Hi slipster216,
How do I get the image saved in your example to use it in another scene?
Thanks a lot!
Posted 6 months ago #
Reply
You must log in to post.