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; }
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); }
public bool RenderSkyDomeShader(DeviceContext deviceContext, int indexCount, Matrix worldMatrix, Matrix viewMatrix, Matrix projectionMatrix, Vector4 apexColour, Vector4 centerColor) { var result = SkyDomeShader.Render(deviceContext, indexCount, worldMatrix, viewMatrix, projectionMatrix, apexColour, centerColor); return(result); }