當前位置: 首頁>>代碼示例>>C++>>正文


C++ Technique::setNodeBinding方法代碼示例

本文整理匯總了C++中Technique::setNodeBinding方法的典型用法代碼示例。如果您正苦於以下問題:C++ Technique::setNodeBinding方法的具體用法?C++ Technique::setNodeBinding怎麽用?C++ Technique::setNodeBinding使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Technique的用法示例。


在下文中一共展示了Technique::setNodeBinding方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: setMaterialNodeBinding

void Model::setMaterialNodeBinding(Material *material)
{
    GP_ASSERT(material);

    if (_node)
    {
        material->setNodeBinding(_node);

        unsigned int techniqueCount = material->getTechniqueCount();
        for (unsigned int i = 0; i < techniqueCount; ++i)
        {
            Technique* technique = material->getTechniqueByIndex(i);
            GP_ASSERT(technique);
            
            technique->setNodeBinding(_node);

            unsigned int passCount = technique->getPassCount();
            for (unsigned int j = 0; j < passCount; ++j)
            {
                Pass* pass = technique->getPassByIndex(j);
                GP_ASSERT(pass);

                pass->setNodeBinding(_node);
            }
        }
    }
}
開發者ID:Lubee,項目名稱:GamePlay,代碼行數:27,代碼來源:Model.cpp

示例2: lua_Technique_setNodeBinding

static int lua_Technique_setNodeBinding(lua_State* state)
{
    // Get the number of parameters.
    int paramCount = lua_gettop(state);

    // Attempt to match the parameters to a valid binding.
    switch (paramCount)
    {
        case 2:
        {
            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
            {
                // Get parameter 1 off the stack.
                bool param1Valid;
                gameplay::ScriptUtil::LuaArray<Node> param1 = gameplay::ScriptUtil::getObjectPointer<Node>(2, "Node", false, &param1Valid);
                if (!param1Valid)
                {
                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Node'.");
                    lua_error(state);
                }

                Technique* instance = getInstance(state);
                instance->setNodeBinding(param1);
                
                return 0;
            }

            lua_pushstring(state, "lua_Technique_setNodeBinding - Failed to match the given parameters to a valid function signature.");
            lua_error(state);
            break;
        }
        default:
        {
            lua_pushstring(state, "Invalid number of parameters (expected 2).");
            lua_error(state);
            break;
        }
    }
    return 0;
}
開發者ID:03050903,項目名稱:GamePlay,代碼行數:41,代碼來源:lua_Technique.cpp

示例3: setMaterialNodeBinding

void Model::setMaterialNodeBinding(Material *material)
{
    if (_node)
    {
        material->setNodeBinding(_node);

        unsigned int techniqueCount = material->getTechniqueCount();
        for (unsigned int i = 0; i < techniqueCount; ++i)
        {
            Technique* technique = material->getTechnique(i);
            
            technique->setNodeBinding(_node);

            unsigned int passCount = technique->getPassCount();
            for (unsigned int j = 0; j < passCount; ++j)
            {
                Pass* pass = technique->getPass(j);

                pass->setNodeBinding(_node);
            }
        }
    }
}
開發者ID:Jaegermeiste,項目名稱:GamePlay,代碼行數:23,代碼來源:Model.cpp


注:本文中的Technique::setNodeBinding方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。