Пример #1
0
vd::i32
Shader::GetAttributeSlot(
	Symbol name)
{
	vd::uid key = name.GetKey();
	if(m_AttributeSlots.count(key))
		return m_AttributeSlots[key];
	return Shader::InvalidSlot;
}
Пример #2
0
vd::status
Shader::UnbindAttribute(
	Symbol name,
	vd::i32 texture)
{
	vd::uid key = name.GetKey();
	if(m_AttributeSlots.count(key))
	{
		m_AttributeSlots.erase(key);
		return Status::Code::Success;
	}
	return Status::Code::InvalidSlot;
}
Пример #3
0
vd::status
Shader::UnbindTexture(
	Symbol name,
	vd::i32 texture)
{
	vd::uid key = name.GetKey();
	if(m_SamplerSlots.count(key))
	{
		m_SamplerBindings.erase(key);
		return Status::Code::Success;
	}
	return Status::Code::InvalidSlot;
}