InitGeometry() private method

private InitGeometry ( IntPtr hWnd, [ fileName, IntPtr &inputVal ) : Int32
hWnd System.IntPtr
fileName [
inputVal System.IntPtr
return System.Int32
示例#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();
            }
        }