Example #1
0
            private static bool Constructor(Int32 resW, Int32 resH, IntPtr ptr1, IntPtr ptr2, string strStartUpScriptFile, string luaResDir, LoadMatrices func)
            {
                if (!OmnimapDLL.IsLoaded())
                {
                    return(true);
                }

                Destructor();

                handle = UG_Constructor(resW, resH, ptr1, ptr2, strStartUpScriptFile, luaResDir);
                if (IsLoaded())
                {
                    int     numChannels     = GetTotalChannels();
                    float[] localViewMatrix = new float[16];
                    float[] localProjMatrix = new float[16];
                    for (int i = 0; i < numChannels; i++)
                    {
                        channelHandle[i] = UG_GetChannelInfo(handle, i, localViewMatrix, localProjMatrix);
                        func(i, localViewMatrix, localProjMatrix);
                    }

                    return(true);
                }

                return(false);
            }
Example #2
0
            public static void Destructor()
            {
                if (!OmnimapDLL.IsLoaded())
                {
                    return;
                }
                if (!IsLoaded())
                {
                    return;
                }

                UG_Destructor(handle);
                handle = IntPtr.Zero;
            }