diff --git a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp index d29b239b3f..7fbcfba505 100644 --- a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp +++ b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp @@ -12,6 +12,8 @@ #include "cocos2d_specifics.hpp" #include "js_bindings_ccbreader.h" #include "js_bindings_system_registration.h" +#include "js_bindings_chipmunk_registration.h" +#include "jsb_opengl_registration.h" USING_NS_CC; using namespace CocosDenshion; @@ -122,6 +124,8 @@ bool AppDelegate::applicationDidFinishLaunching() sc->addRegisterCallback(register_all_cocos2dx_extension_manual); sc->addRegisterCallback(register_CCBuilderReader); sc->addRegisterCallback(jsb_register_system); + sc->addRegisterCallback(JSB_register_opengl); + sc->addRegisterCallback(jsb_register_chipmunk); sc->start(); diff --git a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp index 1e65bf4734..c0eb0d54cc 100644 --- a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp +++ b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp @@ -9,6 +9,8 @@ #include "cocos2d_specifics.hpp" #include "js_bindings_ccbreader.h" #include "js_bindings_system_registration.h" +#include "js_bindings_chipmunk_registration.h" +#include "jsb_opengl_registration.h" USING_NS_CC; using namespace CocosDenshion; @@ -101,9 +103,11 @@ bool AppDelegate::applicationDidFinishLaunching() sc->addRegisterCallback(register_all_cocos2dx); sc->addRegisterCallback(register_all_cocos2dx_extension); sc->addRegisterCallback(register_cocos2dx_js_extensions); + sc->addRegisterCallback(jsb_register_chipmunk); sc->addRegisterCallback(register_all_cocos2dx_extension_manual); sc->addRegisterCallback(register_CCBuilderReader); sc->addRegisterCallback(jsb_register_system); + sc->addRegisterCallback(JSB_register_opengl); sc->start(); diff --git a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp index a453ce4363..4299a95179 100644 --- a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp @@ -4,7 +4,13 @@ #include "SimpleAudioEngine.h" #include "ScriptingCore.h" #include "generated/jsb_cocos2dx_auto.hpp" +#include "generated/jsb_cocos2dx_extension_auto.hpp" +#include "jsb_cocos2dx_extension_manual.h" #include "cocos2d_specifics.hpp" +#include "js_bindings_ccbreader.h" +#include "js_bindings_system_registration.h" +#include "js_bindings_chipmunk_registration.h" +#include "jsb_opengl_registration.h" USING_NS_CC; using namespace CocosDenshion; @@ -36,7 +42,14 @@ bool AppDelegate::applicationDidFinishLaunching() ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); + sc->addRegisterCallback(register_all_cocos2dx_extension); sc->addRegisterCallback(register_cocos2dx_js_extensions); + sc->addRegisterCallback(jsb_register_chipmunk); + sc->addRegisterCallback(register_all_cocos2dx_extension_manual); + sc->addRegisterCallback(register_CCBuilderReader); + sc->addRegisterCallback(jsb_register_system); + sc->addRegisterCallback(JSB_register_opengl); + sc->start(); ScriptEngineProtocol *pEngine = ScriptingCore::getInstance();