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; }
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); } }
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; }
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; }
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); }
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); } } }
void CGLCG::resetAttribParams() { for(int i=0;i<cgAttribParams.size();i++) cgGLDisableClientState(cgAttribParams[i]); cgAttribParams.clear(); }
void IOGLBaseShader::UnbindParameters(){ for(uint32 uIndex = 0; uIndex < this->m_uVaryingParams.GetLength(); uIndex++){ cgGLDisableClientState(this->m_uVaryingParams[uIndex]); } this->m_uVaryingParams.Clear(); }