Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!isRunning)
            {
                isRunning = true;
                info      = new YamangDll.MESHOBJECT();
                infoPtr   = Marshal.AllocHGlobal(Marshal.SizeOf(info));

                Marshal.StructureToPtr(info, infoPtr, false);
                info = (YamangDll.MESHOBJECT)Marshal.PtrToStructure(infoPtr, typeof(YamangDll.MESHOBJECT));

                string filename = "tiger.x";
                YamangDll.InitGeometry(this.Window.Handle, filename, ref infoPtr);
                YamangDll.SetCameraView(0.0f, 1.0f, -10.0f);
                Render();
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!isRunning)
            {
                isRunning = true;
                info = new YamangDll.MESHOBJECT();
                infoPtr = Marshal.AllocHGlobal(Marshal.SizeOf(info));

                Marshal.StructureToPtr(info, infoPtr, false);
                info = (YamangDll.MESHOBJECT)Marshal.PtrToStructure(infoPtr, typeof(YamangDll.MESHOBJECT));

                string filename = "tiger.x";
                YamangDll.InitGeometry(this.Window.Handle, filename, ref infoPtr);
                YamangDll.SetCameraView(0.0f, 1.0f, -10.0f);
                Render();
            }
        }