Exemplo n.º 1
0
        public static IDepthStencilStateDesc New(VideoTypes videoType, DepthStencilStateTypes type)
        {
            IDepthStencilStateDesc api = null;

            #if WIN32
            if (videoType == VideoTypes.D3D9) api = new D3D9.DepthStencilStateDesc(type);
            #endif

            #if WIN32 || WINRT || WP8
            if (videoType == VideoTypes.D3D11) api = new D3D11.DepthStencilStateDesc(type);
            #endif

            #if WIN32 || OSX || LINUX || iOS || ANDROID || NaCl
            if (videoType == VideoTypes.OpenGL) api = new OpenGL.DepthStencilStateDesc(type);
            #endif

            #if XNA
            if (videoType == VideoTypes.XNA) api = new XNA.DepthStencilStateDesc(type);
            #endif

            #if VITA
            if (videoType == VideoTypes.Vita) api = new Vita.DepthStencilStateDesc(type);
            #endif

            if (api == null) Debug.ThrowError("DepthStencilStateDescAPI", "Unsuported InputType: " + videoType);
            return api;
        }
Exemplo n.º 2
0
        public static IDepthStencilStateDesc New(VideoTypes videoType, DepthStencilStateTypes type)
        {
            IDepthStencilStateDesc api = null;

                        #if WIN32
            if (videoType == VideoTypes.D3D9)
            {
                api = new D3D9.DepthStencilStateDesc(type);
            }
                        #endif

                        #if WIN32 || WINRT || WP8
            if (videoType == VideoTypes.D3D11)
            {
                api = new D3D11.DepthStencilStateDesc(type);
            }
                        #endif

                        #if WIN32 || OSX || LINUX || iOS || ANDROID || NaCl
            if (videoType == VideoTypes.OpenGL)
            {
                api = new OpenGL.DepthStencilStateDesc(type);
            }
                        #endif

                        #if XNA
            if (videoType == VideoTypes.XNA)
            {
                api = new XNA.DepthStencilStateDesc(type);
            }
                        #endif

                        #if VITA
            if (videoType == VideoTypes.Vita)
            {
                api = new Vita.DepthStencilStateDesc(type);
            }
                        #endif

            if (api == null)
            {
                Debug.ThrowError("DepthStencilStateDescAPI", "Unsuported InputType: " + videoType);
            }
            return(api);
        }