当前位置: 首页>>代码示例>>C++>>正文


C++ IsLinked函数代码示例

本文整理汇总了C++中IsLinked函数的典型用法代码示例。如果您正苦于以下问题:C++ IsLinked函数的具体用法?C++ IsLinked怎么用?C++ IsLinked使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IsLinked函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DisconnectLink

void eFBCTunerManager::Unlink(eDVBRegisteredFrontend *fe) const
{
	eDVBRegisteredFrontend *simul_fe;
	bool simulate;

	simulate = fe->m_frontend->is_simulate();

	if (IsRootFE(fe) || IsFEUsed(fe, simulate) || IsSCR(fe) || !IsLinked(fe))
		return;

	//PrintLinks(fe);

	DisconnectLink(fe, FrontendGetLinkPtr(fe, link_prev), FrontendGetLinkPtr(fe, link_next), simulate);
	fe->m_frontend->setEnabled(false);

	if(!simulate) // also act on the simulation frontends
	{
		if((simul_fe = GetSimulFE(fe)) && !IsRootFE(simul_fe) && !IsFEUsed(simul_fe, true) &&
				!IsSCR(simul_fe) && IsLinked(simul_fe))
		{
			DisconnectLink(simul_fe, FrontendGetLinkPtr(simul_fe, link_prev), FrontendGetLinkPtr(simul_fe, link_next), true);
			simul_fe->m_frontend->setEnabled(false);
		}
	}

	//PrintLinks(fe);

	//setDefaultFBCID(link_fe);
	UpdateLNBSlotMask(FESlotID(fe), FESlotID(GetHead(fe)), /*remove*/true);
}
开发者ID:Antonio-Team,项目名称:enigma2,代码行数:30,代码来源:fbc.cpp

示例2: LinkInfo

already_AddRefed<WebGLActiveInfo>
WebGLProgram::GetTransformFeedbackVarying(GLuint index)
{
    // No docs in the WebGL 2 spec for this function. Taking the language for
    // getActiveAttrib, which states that the function returns null on any error.
    if (!IsLinked()) {
        mContext->ErrorInvalidOperation("getTransformFeedbackVarying: `program` must be "
                                        "linked.");
        return nullptr;
    }

    if (index >= mTransformFeedbackVaryings.size()) {
        mContext->ErrorInvalidValue("getTransformFeedbackVarying: `index` is greater or "
                                    "equal to TRANSFORM_FEEDBACK_VARYINGS.");
        return nullptr;
    }

    const nsCString& varyingUserName = mTransformFeedbackVaryings[index];

    WebGLActiveInfo* info;
    LinkInfo()->FindAttrib(varyingUserName, (const WebGLActiveInfo**) &info);
    MOZ_ASSERT(info);

    RefPtr<WebGLActiveInfo> ret(info);
    return ret.forget();
}
开发者ID:MozCloudStorage,项目名称:gecko-dev,代码行数:26,代码来源:WebGLProgram.cpp

示例3: RemovalTime

CampaignTime SimPersistantClass::RemovalTime (void)
{
	if (IsLinked())
		return 0xffffffff;
	else
		return unionData.removeTime;
}
开发者ID:FreeFalcon,项目名称:freefalcon-central,代码行数:7,代码来源:persist.cpp

示例4: Uninitialize

bool BaseProgramRenderPass::Initialize()
{
	if (mProgramState->Program()!=0)
	{
		Uninitialize();
	}

	uint newProgram=Render::Instance().CreateProgram();
	RETURN_FALSE_IF_ZERO(newProgram);
	mProgramState->SetProgram(newProgram);
	if (mVertexShader!=nullptr)
	{
		Render::Instance().AttachShader(newProgram,mVertexShader->Shader());
	}

	if (mPixelShader!=nullptr)
	{
		Render::Instance().AttachShader(newProgram,mPixelShader->Shader());
	}

	if (!IsLinked())
	{
		Link();
	}

	return true;	
}
开发者ID:fjz13,项目名称:Medusa,代码行数:27,代码来源:BaseProgramRenderPass.cpp

示例5: ADDTOCALLSTACK

bool CResourceLink::ResourceLock( CResourceLock &s )
{
    ADDTOCALLSTACK("CResourceLink::ResourceLock");
    // Find the definition of this item in the scripts.
    // Open a locked copy of this script
    // NOTE: How can we tell the file has changed since last open ?
    // RETURN: true = found it.
    if ( !IsLinked() )	// has already failed previously.
        return false;

    ASSERT(m_pScript);

    //	Give several tryes to lock the script while multithreading
    int iRet = s.OpenLock( m_pScript, m_Context );
    if ( ! iRet )
        return true;

    s.AttachObj( this );

    // ret = -2 or -3
    lpctstr pszName = GetResourceName();
    DEBUG_ERR(("ResourceLock '%s':%d id=%s FAILED\n", s.GetFilePath(), m_Context.m_iOffset, pszName));

    return false;
}
开发者ID:Sphereserver,项目名称:Source2,代码行数:25,代码来源:CResourceLink.cpp

示例6: glDetachShader

bool ShaderProgram::Link()
{
    if(mVertexShader != NULL && mFragmentShader != NULL)
    {
        if(mProgramId != 0)
        {
            glDetachShader(ProgramId(),mVertexShader->ShaderId());
            glDetachShader(ProgramId(),mFragmentShader->ShaderId());

            glDeleteProgram(ProgramId());
        }

        //Create the shader program and attach the two shaders to it.
        mProgramId = glCreateProgram();
        glAttachShader(ProgramId(),mVertexShader->ShaderId());
        glAttachShader(ProgramId(),mFragmentShader->ShaderId());

        //Link the shader program
        glLinkProgram(ProgramId());        

        return IsLinked();
    }
    else
    {
        return false;
    } 
}
开发者ID:theomission,项目名称:3D-Rendering,代码行数:27,代码来源:ShaderProgram.cpp

示例7: LinkInfo

void
WebGLProgram::UniformBlockBinding(GLuint uniformBlockIndex,
                                  GLuint uniformBlockBinding) const
{
    const char funcName[] = "getActiveUniformBlockName";
    if (!IsLinked()) {
        mContext->ErrorInvalidOperation("%s: `program` must be linked.", funcName);
        return;
    }

    const auto& uniformBlocks = LinkInfo()->uniformBlocks;
    if (uniformBlockIndex >= uniformBlocks.size()) {
        mContext->ErrorInvalidValue("%s: Index %u invalid.", funcName, uniformBlockIndex);
        return;
    }
    const auto& uniformBlock = uniformBlocks[uniformBlockIndex];

    const auto& indexedBindings = mContext->mIndexedUniformBufferBindings;
    if (uniformBlockBinding >= indexedBindings.size()) {
        mContext->ErrorInvalidValue("%s: Binding %u invalid.", funcName,
                                    uniformBlockBinding);
        return;
    }
    const auto& indexedBinding = indexedBindings[uniformBlockBinding];

    ////

    gl::GLContext* gl = mContext->GL();
    gl->MakeCurrent();
    gl->fUniformBlockBinding(mGLName, uniformBlockIndex, uniformBlockBinding);

    ////

    uniformBlock->mBinding = &indexedBinding;
}
开发者ID:mephisto41,项目名称:gecko-dev,代码行数:35,代码来源:WebGLProgram.cpp

示例8: NullValue

JS::Value
WebGLProgram::GetActiveUniformBlockParam(GLuint uniformBlockIndex, GLenum pname) const
{
    if (!IsLinked()) {
        mContext->ErrorInvalidOperation("getActiveUniformBlockParameter: `program` must be linked.");
        return JS::NullValue();
    }

    const webgl::LinkedProgramInfo* linkInfo = LinkInfo();
    GLuint uniformBlockCount = (GLuint)linkInfo->uniformBlocks.size();
    if (uniformBlockIndex >= uniformBlockCount) {
        mContext->ErrorInvalidValue("getActiveUniformBlockParameter: index %u invalid.", uniformBlockIndex);
        return JS::NullValue();
    }

    gl::GLContext* gl = mContext->GL();
    GLint param = 0;

    switch (pname) {
    case LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:
    case LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:
        gl->fGetActiveUniformBlockiv(mGLName, uniformBlockIndex, pname, &param);
        return JS::BooleanValue(bool(param));

    case LOCAL_GL_UNIFORM_BLOCK_BINDING:
    case LOCAL_GL_UNIFORM_BLOCK_DATA_SIZE:
    case LOCAL_GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS:
        gl->fGetActiveUniformBlockiv(mGLName, uniformBlockIndex, pname, &param);
        return JS::NumberValue(param);

    default:
        MOZ_CRASH("bad `pname`.");
    }
}
开发者ID:mephisto41,项目名称:gecko-dev,代码行数:34,代码来源:WebGLProgram.cpp

示例9: LinkInfo

void
WebGLProgram::GetActiveUniformBlockParam(GLuint uniformBlockIndex, GLenum pname,
                                         dom::Nullable<dom::OwningUnsignedLongOrUint32ArrayOrBoolean>& retval) const
{
    retval.SetNull();
    if (!IsLinked()) {
        mContext->ErrorInvalidOperation("getActiveUniformBlockParameter: `program` must be linked.");
        return;
    }

    const webgl::LinkedProgramInfo* linkInfo = LinkInfo();
    GLuint uniformBlockCount = (GLuint)linkInfo->uniformBlocks.size();
    if (uniformBlockIndex >= uniformBlockCount) {
        mContext->ErrorInvalidValue("getActiveUniformBlockParameter: index %u invalid.", uniformBlockIndex);
        return;
    }

    gl::GLContext* gl = mContext->GL();
    GLint param = 0;

    switch (pname) {
    case LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:
    case LOCAL_GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:
        gl->fGetActiveUniformBlockiv(mGLName, uniformBlockIndex, pname, &param);
        retval.SetValue().SetAsBoolean() = (param != 0);
        return;

    case LOCAL_GL_UNIFORM_BLOCK_BINDING:
    case LOCAL_GL_UNIFORM_BLOCK_DATA_SIZE:
    case LOCAL_GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS:
        gl->fGetActiveUniformBlockiv(mGLName, uniformBlockIndex, pname, &param);
        retval.SetValue().SetAsUnsignedLong() = param;
        return;
    }
}
开发者ID:Danielzac,项目名称:gecko-dev,代码行数:35,代码来源:WebGLProgram.cpp

示例10: GetOpenGLESProgram

bool ProgramGLSL::IsValid()
{
	// Get the OpenGL ES program - this also ensures that the program is linked
	GetOpenGLESProgram();

	// Is the OpenGL ES program linked?
	return IsLinked();
}
开发者ID:ByeDream,项目名称:pixellight,代码行数:8,代码来源:ProgramGLSL.cpp

示例11: IsCompatibleWith

int eFBCTunerManager::IsCompatibleWith(ePtr<iDVBFrontendParameters> &feparm, eDVBRegisteredFrontend *link_fe, eDVBRegisteredFrontend *&fbc_fe, bool simulate) const
{
	eSmartPtrList<eDVBRegisteredFrontend> &frontends = simulate ? m_res_mgr->m_simulate_frontend : m_res_mgr->m_frontend;
	eDVBRegisteredFrontend *fe_insert_point;
	int best_score, new_score;

	best_score = 0;

	for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(frontends.begin()); it != frontends.end(); ++it)
	{
		if (!it->m_frontend->is_FBCTuner())
			continue;

		if (!IsRootFE(*it))
			continue;

		if(!it->m_frontend->getEnabled())
			continue;

		if(!IsSameFBCSet(FESlotID(link_fe), FESlotID(it)))
			continue;

		if(it->m_inuse == 0)
			continue;

		if(IsLinked(*it))
			continue;

		if(IsSCR(*it))
			continue;

		// temporarily add this leaf to the current "linked" chain, at the tail

		fe_insert_point = GetTail(*it);
		ConnectLink(link_fe, /*prev_fe*/fe_insert_point, /*next_fe*/(eDVBRegisteredFrontend *)0, simulate);
		link_fe->m_frontend->setEnabled(true);
		UpdateLNBSlotMask(FESlotID(link_fe), FESlotID(*it), false);

		// get score when leaf is added

		new_score = link_fe->m_frontend->isCompatibleWith(feparm);

		if (new_score > best_score)
		{
			best_score = new_score;
			fbc_fe = *it;
		}

		// now remove the leaf tuner again

		DisconnectLink(link_fe, /*prev_fe*/fe_insert_point, /*next_fe*/(eDVBRegisteredFrontend *)0, simulate);
		link_fe->m_frontend->setEnabled(false);
		UpdateLNBSlotMask(FESlotID(link_fe), FESlotID(*it), true);
	}

	return best_score;
}
开发者ID:Antonio-Team,项目名称:enigma2,代码行数:57,代码来源:fbc.cpp

示例12: assert

void Program::Use() const
{
	assert(IsLinked());
	if (msCurrentlyInUse != mProgram)
	{
		msCurrentlyInUse = mProgram;
		glUseProgram(mProgram);
	}
}
开发者ID:shadept,项目名称:AVT,代码行数:9,代码来源:Shader.cpp

示例13: FindNextLowestCeiling

//
// P_FindNextLowestCeiling()
//
// Passed a sector and a ceiling height, returns the fixed point value
// of the largest ceiling height in a surrounding sector smaller than
// the ceiling height passed. If no such height exists the ceiling height
// passed is returned.
//
// jff 02/03/98 Twiddled Lee's P_FindNextHighestFloor to make this
//
fixed_t sector_t::FindNextLowestCeiling (vertex_t **v) const
{
	fixed_t height;
	fixed_t heightdiff;
	fixed_t oceil, ceil;
	sector_t *other;
	vertex_t *spot;
	line_t *check;
	int i;


	if (linecount == 0) return GetPlaneTexZ(sector_t::ceiling);

	spot = lines[0]->v1;
	height = ceilingplane.ZatPoint (spot);
	heightdiff = FIXED_MAX;

	for (i = 0; i < linecount; i++)
	{
		check = lines[i];
		if (NULL != (other = getNextSector (check, this)))
		{
			oceil = other->ceilingplane.ZatPoint (check->v1);
			ceil = ceilingplane.ZatPoint (check->v1);
			if (oceil < ceil && ceil - oceil < heightdiff && !IsLinked(other, true))
			{
				heightdiff = ceil - oceil;
				height = oceil;
				spot = check->v1;
			}
			oceil = other->ceilingplane.ZatPoint (check->v2);
			ceil = ceilingplane.ZatPoint (check->v2);
			if (oceil < ceil && ceil - oceil < heightdiff && !IsLinked(other, true))
			{
				heightdiff = ceil - oceil;
				height = oceil;
				spot = check->v2;
			}
		}
	}
	if (v != NULL)
		*v = spot;
	return height;
}
开发者ID:AkumaKing,项目名称:Xeu,代码行数:54,代码来源:p_sectors.cpp

示例14: NS_ENSURE_ARG_POINTER

NS_IMETHODIMP
nsHTMLLinkAccessible::GetNumActions(PRUint8 *aNumActions)
{
  NS_ENSURE_ARG_POINTER(aNumActions);

  if (!IsLinked())
    return nsHyperTextAccessible::GetNumActions(aNumActions);

  *aNumActions = 1;
  return NS_OK;
}
开发者ID:nikhilm,项目名称:v8monkey,代码行数:11,代码来源:nsHTMLLinkAccessible.cpp

示例15: ASSERT

/*
 * Add a node after this node.
 */
void CListNode::AddAfter(CListNode &lnToAdd)
{
  ASSERT(IsLinked() && !lnToAdd.IsLinked());

  CListNode &succ = IterationSucc();
  CListNode &pred = *this;

  succ.ln_Pred = &lnToAdd;
  pred.ln_Succ = &lnToAdd;
  lnToAdd.ln_Succ = &succ;
  lnToAdd.ln_Pred = &pred;
}
开发者ID:ArcticPheenix,项目名称:Serious-Engine,代码行数:15,代码来源:Lists.cpp


注:本文中的IsLinked函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。