コード例 #1
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
 /// <summary>	
 /// <p>Retrieves the gamma correction ramp for the swap chain.</p>	
 /// </summary>	
 /// <param name="iSwapChain"><dd>  <p>An unsigned integer specifying the swap chain.</p> </dd></param>	
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3DDevice9::GetGammaRamp']/*"/>	
 /// <msdn-id>bb174390</msdn-id>	
 /// <unmanaged>void IDirect3DDevice9::GetGammaRamp([In] unsigned int iSwapChain,[Out] D3DGAMMARAMP* pRamp)</unmanaged>	
 /// <unmanaged-short>IDirect3DDevice9::GetGammaRamp</unmanaged-short>	
 public SharpDX.Direct3D9.GammaRamp GetGammaRamp(int iSwapChain) {
     unsafe {
         SharpDX.Direct3D9.GammaRamp rampRef;
         var rampRef_ = new SharpDX.Direct3D9.GammaRamp.__Native();
         SharpDX.Direct3D9.LocalInterop.Callivoid(_nativePointer, iSwapChain, &rampRef_,((void**)(*(void**)_nativePointer))[22]);		
         rampRef = new SharpDX.Direct3D9.GammaRamp();
         rampRef.__MarshalFrom(ref rampRef_);
         return rampRef;
     }
 }
コード例 #2
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
 /// <summary>	
 /// <p>Sets the gamma correction ramp for the implicit swap chain. This method will affect the entire screen (not just the active window if you are running in windowed mode).</p>	
 /// </summary>	
 /// <param name="iSwapChain"><dd>  <p>Unsigned integer specifying the swap chain.</p> </dd></param>	
 /// <param name="flags"><dd>  <p>Indicates whether correction should be applied. Gamma correction results in a more consistent display, but can incur processing overhead and should not be used frequently. Short-duration effects, such as flashing the whole screen red, should not be calibrated, but long-duration gamma changes should be calibrated. One of the following values can be set: </p> <p></p> <table> <tr><th>Item</th><th>Description</th></tr> <tr><td> <p>D3DSGR_CALIBRATE</p> </td><td> <p>If a gamma calibrator is installed, the ramp will be modified before being sent to the device to account for the system and monitor response curves. If a calibrator is not installed, the ramp will be passed directly to the device.</p> </td></tr> <tr><td> <p>D3DSGR_NO_CALIBRATION</p> </td><td> <p>No gamma correction is applied. The supplied gamma table is transferred directly to the device.</p> </td></tr> </table> <p>?</p> </dd></param>	
 /// <param name="rampRef"><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.GammaRamp"/></strong> structure, representing the gamma correction ramp to be set for the implicit swap chain. </p> </dd></param>	
 /// <remarks>	
 /// <p>There is always at least one swap chain (the implicit swap chain) for each device, because Direct3D 9 has one swap chain as a property of the device. The gamma ramp takes effect immediately; there is no wait for a vertical sync.</p><p>If the device does not support gamma ramps in the swap chain's current presentation mode (full-screen or windowed), no error return is given. Applications can check the <see cref="SharpDX.Direct3D9.Caps2.FullScreenGamma"/> and <see cref="SharpDX.Direct3D9.Caps2.CanCalibrateGamma"/> capability bits in the Caps2 member of the <see cref="SharpDX.Direct3D9.Capabilities"/> structure to determine the capabilities of the device and whether a calibrator is installed.</p><p>For windowed gamma correction presentation, use <strong><see cref="SharpDX.Direct3D9.SwapChain.Present"/></strong> if the hardware supports the feature. In DirectX 8, SetGammaRamp will set the gamma ramp only on a full-screen mode application. For more information about gamma correction, see Gamma (Direct3D 9).</p>	
 /// </remarks>	
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirect3DDevice9::SetGammaRamp']/*"/>	
 /// <msdn-id>bb174434</msdn-id>	
 /// <unmanaged>void IDirect3DDevice9::SetGammaRamp([In] unsigned int iSwapChain,[In] unsigned int Flags,[In] const D3DGAMMARAMP* pRamp)</unmanaged>	
 /// <unmanaged-short>IDirect3DDevice9::SetGammaRamp</unmanaged-short>	
 internal void SetGammaRamp(int iSwapChain, int flags, ref SharpDX.Direct3D9.GammaRamp rampRef) {
     unsafe {
         var rampRef_ = new SharpDX.Direct3D9.GammaRamp.__Native();
         rampRef.__MarshalTo(ref rampRef_);
         SharpDX.Direct3D9.LocalInterop.Callivoid(_nativePointer, iSwapChain, flags, &rampRef_,((void**)(*(void**)_nativePointer))[21]);		
         rampRef.__MarshalFree(ref rampRef_);
     }
 }