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

            Client client = Client.getInstance();

            FormObjectDetail form   = new FormObjectDetail();
            UcProgram        ucProg = new UcProgram(textBoxServer.Text, int.Parse(textBoxPort.Text));

            form.Controls.Add(ucProg);

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

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

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

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

            form.Show(this);
        }
Beispiel #2
0
        private void listViewTextures_ItemActivate(object sender, EventArgs e)
        {
            string texId = listViewTextures.FocusedItem.Text;

            //Utils.gc();

            Client client = Client.getInstance();

            FormObjectDetail form = new FormObjectDetail();

            UcTexture ucTexture = new UcTexture();

            form.Controls.Add(ucTexture);

            Texture tex = client.CurrentStateMachine.getTextureById(uint.Parse(texId));

            form.Text = "Texture :: id = " + (tex == null ? "ZERO" : tex.Id.ToString());
            ucTexture.applyTex(tex);
            form.Show(this);
        }