Code Knight

Programming is so cool
随笔 - 52, 文章 - 0, 评论 - 14, 引用 - 0
数据加载中……

OGRE小记

1,entity是没有getPosition的
2,node的默认position是原点
3,材质脚本中定义的程序段中的source文件名后缀必须与定义的shader文件类型匹配。
如:
vertex_program Ogre/CelShadingVP1 hlsl
{
    source Example_CelShading1.hlsl
    entry_point main_vp
    target vs_2_0
}
注意target是hlsl中独占,cg中是profile,且参数不同
4,Plugin_CgProgramManager_d.dll 插件一定要有cg.dll配合
5,OGRE不支持的中文路径用下面解决:
setlocale(LC_ALL, "chinese-simplified");
记得读取完资源要还原
6,    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups()一定要在rendersystem初始化完毕才能调用。也就是在root的createRenderWindow 之后
7,想要你的OIS中的mouse何keboard响应你得记得在frameStarted 中每次去capture;
记得在           
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
之后
mMouse->setEventCallback(this);
mKeyboard->setEventCallback(this);




posted on 2009-12-28 23:15 Code Knight 阅读(428) 评论(0)  编辑 收藏 引用 所属分类: OGRE跬步千里


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理