コード例 #1
0
ファイル: Material.cs プロジェクト: rGovers/Erde-Engine
        public void BindObject(int a_binding, IMaterialBindable a_object)
        {
            Binding bind = null;

            for (int i = 0; i < m_bindings.Count; ++i)
            {
                bind = m_bindings[i];
                if (bind.Handle == a_binding)
                {
                    bind.Target = a_object;

                    return;
                }
            }

            while (!m_shader.Initialized)
            {
                Thread.Yield();
            }

            bind = new Binding(a_binding, a_object, m_shader);

            m_bindings.Add(bind);
        }
コード例 #2
0
 public Binding(int a_binding, IMaterialBindable a_object, Program a_program)
 {
     m_bindingIndex = a_binding;
     m_program      = a_program;
     m_object       = a_object;
 }