/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Need to support post-pixel processing (for stencil operations) if (!Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, Usage.RenderTarget | Usage.QueryPostPixelShaderBlending, ResourceType.Surface, backBufferFormat)) { return(false); } if (vertexProcessingType == VertexProcessingType.PureHardware) { return(false); // GetTransform doesn't work on PUREDEVICE } // Make sure device supports directional lights if ((vertexProcessingType == VertexProcessingType.Hardware) || (vertexProcessingType == VertexProcessingType.Mixed)) { if (!caps.VertexProcessingCaps.SupportsDirectionalLights) { return(false); } if (caps.MaxUserClipPlanes < 1) { return(false); } } return(true); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Need to support post-pixel processing (for alpha blending) if (!Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, Usage.RenderTarget | Usage.QueryPostPixelShaderBlending, ResourceType.Surface, backBufferFormat)) { return(false); } // Make sure device can do ONE:ONE alphablending if (!caps.SourceBlendCaps.SupportsOne) { return(false); } if (!caps.DestinationBlendCaps.SupportsOne) { return(false); } // Make sure HW TnL devices can do point sprites if ((vertexProcessingType == VertexProcessingType.Hardware) || (vertexProcessingType == VertexProcessingType.Mixed)) { if (caps.MaxPointSize <= 1.0f) { return(false); } } return(true); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Need to support post-pixel processing (for alpha blending) if (!Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, Usage.RenderTarget | Usage.QueryPostPixelShaderBlending, ResourceType.Surface, backBufferFormat)) { return(false); } if (vertexProcessingType == VertexProcessingType.PureHardware) { return(false); // GetTransform doesn't work on PUREDEVICE } // This sample uses alpha textures and/or straight alpha. Make sure the // device supports them if (caps.TextureCaps.SupportsAlphaPalette) { return(true); } if (caps.TextureCaps.SupportsAlpha) { return(true); } return(false); }
private bool OnConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format backBufferFormat) { if (ConfirmDevice != null) { return(ConfirmDevice(caps, vertexProcessingType, backBufferFormat)); } else { return(true); } }
/// <summary> /// Called during device initialization, this code checks the device for /// some minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { if ((vertexProcessingType == VertexProcessingType.PureHardware) && (!caps.DeviceCaps.SupportsNPatches) && (caps.DeviceCaps.SupportsRtPatches)) { return(false); } return(true); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { if (!caps.TextureOperationCaps.SupportsBumpEnvironmentMap) { return(false); } return(Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, 0, ResourceType.Textures, Format.V8U8)); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Device must be able to do bumpmapping if (!caps.TextureOperationCaps.SupportsBumpEnvironmentMap) { return(false); } // Accept devices that can create Format.V8U8 textures return(Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, 0, ResourceType.Textures, Format.V8U8)); }
/// <summary> /// Called during device initialization, this code checks the device for some minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Make sure this device can support software vertex processing, // and vertex shaders of at least v1.0 if ((vertexProcessingType == VertexProcessingType.Software) || (caps.VertexShaderVersion.Major >= 1)) { return(true); } // Otherwise, return false return(false); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { if ((vertexProcessingType == VertexProcessingType.Hardware) || (vertexProcessingType == VertexProcessingType.PureHardware) || (vertexProcessingType == VertexProcessingType.Mixed)) { if (caps.VertexShaderVersion.Major < 1) { return(false); } } return(true); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { if (vertexProcessingType == VertexProcessingType.PureHardware) { return(false); // GetTransform doesn't work on PUREDEVICE } if (!caps.TextureOperationCaps.SupportsBumpEnvironmentMap) { return(false); } return(Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, 0, ResourceType.Textures, Format.V8U8)); }
/// <summary> /// Called during device initialization, this code checks the device /// for some minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Make sure this device can support cube textures, software vertex processing, // and vertex shaders of at least v1.0 if ((!caps.TextureCaps.SupportsCubeMap) && (vertexProcessingType != VertexProcessingType.Software) && (caps.VertexShaderVersion.Major < 1)) { return(false); } // Check that we can create a cube texture that we can render into return(true); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // This sample uses the ADDSIGNED texture blending mode if (!caps.TextureOperationCaps.SupportsAddSigned) { return(false); } if (caps.MaxTextureBlendStages < 2) { return(false); } return(true); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { if (vertexProcessingType == VertexProcessingType.PureHardware) { return(false); // GetTransform doesn't work on PUREDEVICE } // Check that the device supports at least one of the two techniques // used in this sample: either a vertex shader, or at least two blend // matrices and a directional light. if ((vertexProcessingType == VertexProcessingType.Hardware) || (vertexProcessingType == VertexProcessingType.Mixed)) { if (caps.VertexShaderVersion.Major >= 1) { return(true); } } else { // Software vertex processing always supports vertex shaders return(true); } // Check that the device can blend vertices with at least two matrices // (Software can always do up to 4 blend matrices) if (caps.MaxVertexBlendMatrices < 2) { return(false); } // If this is a TnL device, make sure it supports directional lights if ((vertexProcessingType == VertexProcessingType.Hardware) || (vertexProcessingType == VertexProcessingType.Mixed)) { if (!caps.VertexProcessingCaps.SupportsDirectionalLights) { return(false); } } return(true); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Need to support post-pixel processing (for alpha blending) if (!Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, Usage.RenderTarget | Usage.QueryPostPixelShaderBlending, ResourceType.Surface, backBufferFormat)) { return(false); } // Device should support at least both VS.1.1 and PS.1.1 if (caps.VertexShaderVersion >= new Version(1, 1) && caps.PixelShaderVersion >= new Version(1, 1)) { return(true); } return(false); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Need to support post-pixel processing (for alpha blending) if (!Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, Usage.RenderTarget | Usage.QueryPostPixelShaderBlending, ResourceType.Surface, backBufferFormat)) { return(false); } if ((vertexProcessingType == VertexProcessingType.Hardware) || (vertexProcessingType == VertexProcessingType.PureHardware) || (vertexProcessingType == VertexProcessingType.Mixed)) { if (caps.MaxUserClipPlanes < 4) { return(false); } } return(true); }
/// <summary> /// Called during device initialization, this code checks the /// device for some minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // GetTransform doesn't work on PUREDEVICE if (vertexProcessingType == VertexProcessingType.PureHardware) { return(false); } // Check for cubemapping devices if (!caps.TextureCaps.SupportsCubeMap) { return(false); } // Check that we can create a cube texture that we can render into if (!Manager.CheckDeviceFormat(caps.AdapterOrdinal, caps.DeviceType, adapterFormat, Usage.RenderTarget, ResourceType.CubeTexture, backBufferFormat)) { return(false); } return(true); }
protected virtual bool ConfirmDevice(Capabilities caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { return(true); }
/// <summary> /// /// </summary> /// <param name="caps"></param> /// <param name="vertexProcessingType"></param> /// <param name="adapterFormat"></param> /// <param name="backBufferFormat"></param> /// <returns></returns> private static bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { return true; }
protected virtual bool ConfirmDevice(Capabilities caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { return true; }
/// <summary> /// Called during device initialization, this code checks the device for /// some minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // Make sure we can do a volume map, that's all we care about return(caps.TextureCaps.SupportsVolumeMap); }
/// <summary> /// Called during device initialization, this code checks the device for some /// minimum set of capabilities /// </summary> protected override bool ConfirmDevice(Caps caps, VertexProcessingType vertexProcessingType, Format adapterFormat, Format backBufferFormat) { // All we need is the DotProduct texture operation return(caps.TextureOperationCaps.SupportsDotProduct3); }
protected virtual bool ConfirmDevice(Microsoft.DirectX.Direct3D.Capabilities caps, VertexProcessingType processingType, Format format) { return(true); }