I have some problems animating a loaded COLLADA Model. I've written my own parser and now I also want to write my own draw routine as well. The problem ist, that as soon as I enable the animation on my model, the hands, legs and the head is stretched away from the origin of the model. (The loader is implemented based on the tutorial here: COLLADA Tutorial)
The first thing I do in my draw function of the model …
当我想用我的C++代码中的JNI调用来改变我的Android-Application的Activity时,我遇到了很大的问题.该应用程序使用cocos2d-x进行渲染.具体情况是我想使用这个非常小的函数在Java中打开OpenFeint-Dashboard:
void launchOpenFeintDashboard() {
Dashboard.open();
}
Run Code Online (Sandbox Code Playgroud)
然后使用简单的JNI调用从C++调用此函数:
void
OFWrapper::launchDashboard() {
// init openfeint
CCLog("CPP Init OpenFeint Dashboard");
CCDirector::sharedDirector()->pause();
jmethodID javamethod = JNIManager::env()->GetMethodID(JNIManager::mainActivity(), "launchOpenFeintDashboard", "()V");
if (javamethod == 0)
return;
JNIManager::env()->CallVoidMethod( JNIManager::mainActivityObj(), javamethod );
CCLog("CPP Init OpenFeint Dashboard done");
}
Run Code Online (Sandbox Code Playgroud)
JNIManager类的实现也非常简单和基本:
#include "JNIManager.h"
#include <cstdlib>
static JNIEnv* sJavaEnvironment = NULL;
static jobject sMainActivityObject = NULL;
static jclass sMainActivity = NULL;
extern "C" {
JNIEXPORT void JNICALL Java_net_plazz_mainzelapp_mainzelapp_sendJavaEnvironment(JNIEnv* env, jobject obj);
};
// this function is called from JAVA at startup to …Run Code Online (Sandbox Code Playgroud) 我想在使用 googleapis 包的 nodejs webapp 中开始使用 Google 身份验证。安装后我需要这个包的那一刻,我立即收到以下错误:
protocol sync?8d88:2 Uncaught Error: Cannot find module './framer'
at webpackEmptyContext (eval at ./node_modules/http2/lib/protocol sync recursive (app.js:1053), <anonymous>:2:10)
at Array.map (<anonymous>)
at eval (index.js?1fa7:46)
at Object../node_modules/http2/lib/protocol/index.js (chunk-vendors.js:7788)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at Object.eval (http.js?4679:136)
at eval (http.js:1264)
at Object../node_modules/http2/lib/http.js (chunk-vendors.js:7711)
at __webpack_require__ (app.js:854)
Run Code Online (Sandbox Code Playgroud)
我在这里查看了来源:
var modules = ['./framer', './compressor', './flow', './connection', './stream', './endpoint'];
modules.map(require).forEach(function(module) {
for (module.serializers 中的变量名) {
export.serializers[name] = module.serializers[name];
}
});
并确认这些文件存在:
我已经尝试重新安装软件包(http2 和 googleapis),但没有任何变化。为什么那些相对的 require 语句会失败?文件清晰可见。
我的 …