Added compile/release and resize of GL objects to ShaderAttribute.

Removed the StateAttribute::compose() method.

Fixed the default type value in ShaderAttribute
This commit is contained in:
Robert Osfield
2010-07-06 12:19:26 +00:00
parent 74ae526bb5
commit 46b221a832
7 changed files with 76 additions and 16 deletions

View File

@@ -66,6 +66,38 @@ void ShaderComponent::removeShader(unsigned int i)
_shaders.erase(_shaders.begin()+i);
}
void ShaderComponent::compileGLObjects(State& state) const
{
for(Shaders::const_iterator itr = _shaders.begin();
itr != _shaders.end();
++itr)
{
(*itr)->compileShader(state);
}
}
void ShaderComponent::resizeGLObjectBuffers(unsigned int maxSize)
{
for(Shaders::const_iterator itr = _shaders.begin();
itr != _shaders.end();
++itr)
{
(*itr)->resizeGLObjectBuffers(maxSize);
}
}
void ShaderComponent::releaseGLObjects(State* state) const
{
for(Shaders::const_iterator itr = _shaders.begin();
itr != _shaders.end();
++itr)
{
(*itr)->releaseGLObjects(state);
}
}
///////////////////////////////////////////////////////////////////////////////////
//
// ShaderBinary