Ejemplo n.º 1
0
        public static int cppSetInput_Texture(IntPtr graphHandle, string pInputName, int format, int mipCount, int width, int height, IntPtr pixels)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(-2);
            }

            cppSetInput_TextureDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppSetInput_TextureDelegate)) as cppSetInput_TextureDelegate;

            return((int)function.Invoke(graphHandle, pInputName, format, mipCount, width, height, pixels));
        }
Ejemplo n.º 2
0
        public static int cppComputeOldFileID(string pCharArray, int pTypeConstant)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppGetOldFileIdDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetOldFileIdDelegate)) as cppGetOldFileIdDelegate;

            return((int)function.Invoke(pCharArray, pTypeConstant));
        }
Ejemplo n.º 3
0
        public static IntPtr cppGetInput_String(IntPtr graphHandle, string pInputName)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(IntPtr.Zero);
            }

            cppGetInput_StringDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetInput_StringDelegate)) as cppGetInput_StringDelegate;

            return((IntPtr)function.Invoke(graphHandle, pInputName));
        }
Ejemplo n.º 4
0
        public static uint cppRenderSubstances(bool bAsync, IntPtr preComputeCallback)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppRenderSubstancesDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppRenderSubstancesDelegate)) as cppRenderSubstancesDelegate;

            return((uint)function.Invoke(bAsync, preComputeCallback));
        }
Ejemplo n.º 5
0
        public static bool cppIsRendererBusy(uint runid)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(false);
            }

            cppIsRendererBusyDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppIsRendererBusyDelegate)) as cppIsRendererBusyDelegate;

            return((bool)function.Invoke(runid));
        }
        public static IntPtr cppGetOutputChannelStrFromHash(string pAssetPath, UInt32 outputHash)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(IntPtr.Zero);
            }

            cppGetOutputChannelStrFromHashDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetOutputChannelStrFromHashDelegate)) as cppGetOutputChannelStrFromHashDelegate;

            return((IntPtr)function.Invoke(pAssetPath, outputHash));
        }
        public static void cppRemoveGraphInstance(IntPtr graphHandle)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppRemoveGraphInstanceDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppRemoveGraphInstanceDelegate)) as cppRemoveGraphInstanceDelegate;

            function.Invoke(graphHandle);
        }
Ejemplo n.º 8
0
        public static void cppFreeMemory(IntPtr pointer)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppFreeMemoryDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppFreeMemoryDelegate)) as cppFreeMemoryDelegate;

            function.Invoke(pointer);
        }
Ejemplo n.º 9
0
        public static void cppSetCreateSubstanceGraphCallbackEditorPtr(IntPtr fp)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppSetCreateSubstanceGraphCallbackEditorPtrDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppSetCreateSubstanceGraphCallbackEditorPtrDelegate)) as cppSetCreateSubstanceGraphCallbackEditorPtrDelegate;

            function.Invoke(fp);
        }
Ejemplo n.º 10
0
        public static IntPtr cppListAssets()
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(IntPtr.Zero);
            }

            cppListAssetsDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppListAssetsDelegate)) as cppListAssetsDelegate;

            return((IntPtr)function.Invoke());
        }
Ejemplo n.º 11
0
        public static int cppGetNumMainTextures(IntPtr graphHandle)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppGetNumMainTexturesDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetNumMainTexturesDelegate)) as cppGetNumMainTexturesDelegate;

            return((int)function.Invoke(graphHandle));
        }
Ejemplo n.º 12
0
        public static void cppApplyPreset(IntPtr graphHandle, string presetStr)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppApplyPresetDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppApplyPresetDelegate)) as cppApplyPresetDelegate;

            function.Invoke(graphHandle, presetStr);
        }
Ejemplo n.º 13
0
        public static bool cppCheckDimensions(IntPtr pGraphHandle)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(false);
            }

            cppCheckDimensionsDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppCheckDimensionsDelegate)) as cppCheckDimensionsDelegate;

            return(function.Invoke(pGraphHandle));
        }
Ejemplo n.º 14
0
        public static void cppSetCallbacks(IntPtr log, IntPtr texture, IntPtr numerical, IntPtr graphInitialized)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppSetCallbacksDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppSetCallbacksDelegate)) as cppSetCallbacksDelegate;

            function.Invoke(log, texture, numerical, graphInitialized);
        }
        public static int cppProcessQueuedOutputs()
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppProcessQueuedOutputsDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppProcessQueuedOutputsDelegate)) as cppProcessQueuedOutputsDelegate;

            return((int)function.Invoke());
        }
Ejemplo n.º 16
0
        public static IntPtr cppGetOutputsDesc(IntPtr graphHandle, ref int pNumOutputs)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(IntPtr.Zero);
            }

            cppGetOutputsDescDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetOutputsDescDelegate)) as cppGetOutputsDescDelegate;

            return((IntPtr)function.Invoke(graphHandle, ref pNumOutputs));
        }
        public static bool cppIsImageOutputFromHash(string pAssetPath, UInt32 outputHash)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(false);
            }

            cppIsImageOutputFromHashDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppIsImageOutputFromHashDelegate)) as cppIsImageOutputFromHashDelegate;

            return((bool)function.Invoke(pAssetPath, outputHash));
        }
Ejemplo n.º 18
0
        public static int cppMoveAsset(string pFromAssetPath, string pToAssetPath)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppMoveAssetDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppMoveAssetDelegate)) as cppMoveAssetDelegate;

            return((int)function.Invoke(pFromAssetPath, pToAssetPath));
        }
        public static void cppOnGenerateMipMapsChanged(IntPtr graphHandle, bool bGenerateMipMaps)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppOnGenerateMipMapsChangedDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppOnGenerateMipMapsChangedDelegate)) as cppOnGenerateMipMapsChangedDelegate;

            function.Invoke(graphHandle, bGenerateMipMaps);
        }
Ejemplo n.º 20
0
        public static void cppSetInput_Int(IntPtr graphHandle, string pInputName, int[] values, UInt32 numValues)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppSetInput_IntDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppSetInput_IntDelegate)) as cppSetInput_IntDelegate;

            function.Invoke(graphHandle, pInputName, values, numValues);
        }
Ejemplo n.º 21
0
        public static uint cppGetOutputHash(IntPtr graphHandle, int pOutputIndex)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppGetOutputHashDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetOutputHashDelegate)) as cppGetOutputHashDelegate;

            return((uint)function.Invoke(graphHandle, pOutputIndex));
        }
Ejemplo n.º 22
0
        public static IntPtr cppGetMComboBoxItems(IntPtr graphHandle, string pIdentifier, out int pNumValues)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                pNumValues = 0;
                return(IntPtr.Zero);
            }

            cppGetMComboBoxItemsDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetMComboBoxItemsDelegate)) as cppGetMComboBoxItemsDelegate;

            return((IntPtr)function.Invoke(graphHandle, pIdentifier, out pNumValues));
        }
Ejemplo n.º 23
0
        public static void cppInitSubstance(string applicationDataPath)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            DLLHelpers.LoadDLL(applicationDataPath);
            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppInitSubstanceDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppInitSubstanceDelegate)) as cppInitSubstanceDelegate;

            function.Invoke(applicationDataPath);
        }
Ejemplo n.º 24
0
        public static void cppGetTextureDimensions(IntPtr graphHandle, out int pWidth, out int pHeight)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                pWidth  = 256;
                pHeight = 256;
                return;
            }

            cppGetTextureDimensionsDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppGetTextureDimensionsDelegate)) as cppGetTextureDimensionsDelegate;

            function.Invoke(graphHandle, out pWidth, out pHeight);
        }
Ejemplo n.º 25
0
        public static int cppShutdownSubstance()
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppShutdownSubstanceDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppShutdownSubstanceDelegate)) as cppShutdownSubstanceDelegate;
            int result = (int)function.Invoke();

            DLLHelpers.UnloadDLL();

            return(result);
        }
Ejemplo n.º 26
0
        public static int cppLoadSubstance(string pAssetPath, IntPtr array, Int32 size, IntPtr assetCtx, IntPtr substanceObject,
                                           UInt32[] graphIndices, string[] graphPrototypeNames, string[] graphLabels,
                                           int[] graphFormats, int[] normalFormats, UInt32 numGraphIndices,
                                           int rawOverride, int projectContext)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return(0);
            }

            cppLoadSubstanceDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppLoadSubstanceDelegate)) as cppLoadSubstanceDelegate;

            return((int)function.Invoke(pAssetPath, array, size, assetCtx, substanceObject,
                                        graphIndices, graphPrototypeNames, graphLabels,
                                        graphFormats, normalFormats, numGraphIndices,
                                        rawOverride, projectContext));
        }
Ejemplo n.º 27
0
        public static void cppModifyTexturePacking(IntPtr graphHandle,
                                                   string pSourceNames, int[] pSourceComponents,
                                                   string pTargetName, int[] pTargetComponents,
                                                   int pNumComponents)
        {
            string myName = System.Reflection.MethodBase.GetCurrentMethod().Name;

            if (DLLHelpers.DllHandle == IntPtr.Zero)
            {
                return;
            }

            cppModifyTexturePackingDelegate function = DLLHelpers.GetFunction(
                myName, typeof(cppModifyTexturePackingDelegate)) as cppModifyTexturePackingDelegate;

            function.Invoke(graphHandle,
                            pSourceNames, pSourceComponents,
                            pTargetName, pTargetComponents,
                            pNumComponents);
        }