Esempio n. 1
0
 public void ShutDown()
 {
     // Release the sky dome shader object.
     SkyDomeShader.ShutDown();
     SkyDomeShader = null;
     // Release the Terrain Shader ibject.
     TerrainShader?.ShutDown();
     TerrainShader = null;
     // Release the font shader object.
     FontShader?.Shuddown();
     FontShader = null;
     // Release the texture shader object.
     ColorShader?.ShutDown();
     ColorShader = null;
 }
Esempio n. 2
0
        // Methodsb
        public bool Initilize(DDX11 D3DDevice, IntPtr windowsHandle)
        {
            // Create the texture shader object.
            ColorShader = new DColorShader();

            // Initialize the texture shader object.
            if (!ColorShader.Initialize(D3DDevice.Device, windowsHandle))
            {
                return(false);
            }

            // Create the font shader object.
            FontShader = new DFontShader();

            // Initialize the font shader object.
            if (!FontShader.Initialize(D3DDevice.Device, windowsHandle))
            {
                return(false);
            }

            // Create the sky dome shader object.
            SkyDomeShader = new DSkyDomeShader();

            // Initialize the sky dome shader object.
            if (!SkyDomeShader.Initialize(D3DDevice.Device, windowsHandle))
            {
                return(false);
            }

            // Create the terrain shader object.
            TerrainShader = new DTerrainShader();

            // Initialize the terrain shader object.
            if (!TerrainShader.Initialize(D3DDevice.Device, windowsHandle))
            {
                return(false);
            }

            return(true);
        }