Пример #1
0
        private void LoadProgram(SHARCFB.ShaderProgram program)
        {
            string programXML = Sharc2XML.WriteProgram(program);

            textEditor1.FillEditor(programXML);
            textEditor1.IsXML = true;
        }
Пример #2
0
        public void FillEditor(SHARCFB.ShaderProgram program, SHARCFB.Header header)
        {
            LoadProgram(program);

            var binary = header.BinaryDatas[program.Index];

            if (binary.Type == SHARCFB.BinaryData.ShaderType.GX2VertexShader)
            {
                hexVertexData.LoadData(header.BinaryDatas[program.Index].Data);
            }
            if (binary.Type == SHARCFB.BinaryData.ShaderType.GX2PixelShader)
            {
                hexPixelData.LoadData(header.BinaryDatas[program.Index].Data);
            }
            if (binary.Type == SHARCFB.BinaryData.ShaderType.GX2GeometryShader)
            {
                hexGeomData.LoadData(header.BinaryDatas[program.Index].Data);
            }
        }