예제 #1
0
        private void listViewPrograms_ItemActivate(object sender, EventArgs e)
        {
            string progId = listViewPrograms.FocusedItem.Text;
            //Utils.gc();

            KPClient client = KPClient.getInstance();

            FormObjectDetail form   = new FormObjectDetail();
            UCProgram        ucProg = new UCProgram();

            form.Controls.Add(ucProg);

            KPProgram prog = client.CurrentStateMachine.getProgramById(uint.Parse(progId));

            if (prog != null)
            {
                KPShader vs       = client.CurrentStateMachine.getShaderById(prog.VsId);
                string   vsSource = vs == null ? "" : vs.Source;

                KPShader fs       = client.CurrentStateMachine.getShaderById(prog.FsId);
                string   fsSource = fs == null ? "" : fs.Source;

                ucProg.applyProg(prog, vsSource, fsSource);
            }

            form.Show(this);
        }
예제 #2
0
 public void copyFrom(KPShader shader)
 {
     m_id     = shader.Id;
     m_type   = shader.Type;
     m_source = shader.Source;
 }