示例#1
0
 public static bool ConstructorOGL(Int32 resW, Int32 resH, string strStartUpScriptFile, string luaResDir, LoadMatrices func)
 {
     return(Constructor(resW, resH, IntPtr.Zero, IntPtr.Zero, strStartUpScriptFile, luaResDir, func));
 }
示例#2
0
 public static bool ConstructorD3D11(Int32 resW, Int32 resH, IntPtr d3dDevice, IntPtr d3dDeviceContext, string strStartUpScriptFile, string luaResDir, LoadMatrices func)
 {
     return(Constructor(resW, resH, d3dDevice, d3dDeviceContext, strStartUpScriptFile, luaResDir, func));
 }
示例#3
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);
            }