コード例 #1
0
ファイル: shader_cg.c プロジェクト: AreaScout/retro
static void gl_cg_reset_attrib(void)
{
   unsigned i;
   for (i = 0; i < cg_attrib_index; i++)
      cgGLDisableClientState(cg_attribs[i]);
   cg_attrib_index = 0;
}
コード例 #2
0
	void	IOGLBaseShader::UnbindParameter(const CString& strParam){
		auto uParam = this->GetParameter(strParam);

		cgGLDisableClientState(uParam);
		uint32 uIndex = 0;
		if(Collection::TryFind(this->m_uVaryingParams, uParam, uIndex)){
			this->m_uVaryingParams.Remove(uIndex);
		}
	}
コード例 #3
0
ファイル: shader_gl_cg.c プロジェクト: XavierMoon/RetroArch
static void gl_cg_reset_attrib(void *data)
{
   unsigned i;
   cg_shader_data_t *cg_data = (cg_shader_data_t*)data;

   /* Add sanity check that we did not overflow. */
   retro_assert(cg_data->cg_attrib_idx <= ARRAY_SIZE(cg_data->cg_attribs));

   for (i = 0; i < cg_data->cg_attrib_idx; i++)
      cgGLDisableClientState(cg_data->cg_attribs[i]);
   cg_data->cg_attrib_idx = 0;
}
コード例 #4
0
ファイル: shader_gl_cg.c プロジェクト: Markko/RetroArch
static void gl_cg_reset_attrib(cg_shader_data_t *cg)
{
   unsigned i;
   if (!cg)
      return;

   /* Add sanity check that we did not overflow. */
   rarch_assert(cg->cg_attrib_idx <= ARRAY_SIZE(cg->cg_attribs));

   for (i = 0; i < cg->cg_attrib_idx; i++)
      cgGLDisableClientState(cg->cg_attribs[i]);
   cg->cg_attrib_idx = 0;
}
コード例 #5
0
ファイル: Cluster.cpp プロジェクト: kuro/fyreware
void Cluster::draw ()
{
    glColor3fv(d->color);

    cgGLEnableClientState(d->shader.v0);
    cgGLSetParameter1f(d->shader.t, d->age);
    cgGLSetParameter1f(d->shader.nt, d->age/d->lifetime);
    cgGLSetParameterPointer(d->shader.v0, 3, GL_FLOAT, sizeof(btVector3),
                            d->initialVelocities[0]);
    cgGLSetParameter3fv(d->shader.origin, d->origin);
    cgGLSetParameter3fv(d->shader.eye, scene->camera()->position());
    glDrawArrays(GL_POINTS, 0, d->starCount);
    cgGLDisableClientState(d->shader.v0);
}
コード例 #6
0
	void VertexArrayCg::disableOpenGLVertexAttribArrays()
	{
		// No previous bound OpenGL element array buffer restore, there's not really a point in it

		// Loop through all Cg parameters
		const CGparameter *cgParameter    = mCgParameters;
		const CGparameter *cgParameterEnd = mCgParameters + mNumberOfAttributes;
		for (; cgParameter < cgParameterEnd; ++cgParameter)
		{
			// Is the Cg parameter valid?
			if (nullptr != cgParameter)
			{
				// Disable OpenGL Cg vertex attribute array
				cgGLDisableClientState(*cgParameter);
			}
		}
	}
コード例 #7
0
ファイル: CGLCG.cpp プロジェクト: RedGuyyyy/snes9x
void CGLCG::resetAttribParams()
{
	for(int i=0;i<cgAttribParams.size();i++)
		cgGLDisableClientState(cgAttribParams[i]);
	cgAttribParams.clear();
}
コード例 #8
0
	void	IOGLBaseShader::UnbindParameters(){
		for(uint32 uIndex = 0; uIndex < this->m_uVaryingParams.GetLength(); uIndex++){
			cgGLDisableClientState(this->m_uVaryingParams[uIndex]);
		}
		this->m_uVaryingParams.Clear();
	}