Esempio n. 1
0
        public void Dispose()
        {
            FoliageShader?.Dispose();
            FoliageShader = null;

            FontShader?.Dispose();
            FontShader = null;

            TextureShader?.Dispose();
            TextureShader = null;

            TerrainShader?.Dispose();
            TerrainShader = null;

            SkyDomeShader?.ShutDown();
            SkyDomeShader = null;

            SkyPlaneShader?.ShutDown();
            SkyPlaneShader = null;
        }
Esempio n. 2
0
        public bool Initialise(DirectX directXDevice, IntPtr windowHandle)
        {
            TextureShader = new TextureShader();
            var result = TextureShader.Initialise(directXDevice.Device, windowHandle);

            FontShader = new FontShader();
            result    &= FontShader.Initialise(directXDevice.Device, windowHandle);

            FoliageShader = new FoliageShader();
            result       &= FoliageShader.Initialise(directXDevice.Device, windowHandle);

            TerrainShader = new TerrainShader();
            result       &= TerrainShader.Initialise(directXDevice.Device, windowHandle);

            SkyDomeShader = new SkyDomeShader();
            result       &= SkyDomeShader.Initialize(directXDevice.Device, windowHandle);

            SkyPlaneShader = new SkyPlaneShader();
            result        &= SkyPlaneShader.Initialize(directXDevice.Device, windowHandle);

            return(result);
        }
Esempio n. 3
0
        public bool RenderFoliageShader(DeviceContext deviceContext, int vertexCount, int instanceCount, Matrix viewMatrix, Matrix projectionMatrix, ShaderResourceView texture)
        {
            var result = FoliageShader.Render(deviceContext, vertexCount, instanceCount, viewMatrix, projectionMatrix, texture);

            return(result);
        }