pub struct IDirect3DDevice9(/* private fields */);

Implementations§

§

impl IDirect3DDevice9

pub unsafe fn TestCooperativeLevel(&self) -> Result<()>

pub unsafe fn GetAvailableTextureMem(&self) -> u32

pub unsafe fn EvictManagedResources(&self) -> Result<()>

pub unsafe fn GetDirect3D(&self) -> Result<IDirect3D9>

pub unsafe fn GetDeviceCaps(&self, pcaps: *mut D3DCAPS9) -> Result<()>

pub unsafe fn GetDisplayMode( &self, iswapchain: u32, pmode: *mut D3DDISPLAYMODE ) -> Result<()>

pub unsafe fn GetCreationParameters( &self, pparameters: *mut D3DDEVICE_CREATION_PARAMETERS ) -> Result<()>

pub unsafe fn SetCursorProperties<P0>( &self, xhotspot: u32, yhotspot: u32, pcursorbitmap: P0 ) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>,

pub unsafe fn SetCursorPosition(&self, x: i32, y: i32, flags: u32)

pub unsafe fn ShowCursor<P0>(&self, bshow: P0) -> BOOL
where P0: IntoParam<BOOL>,

pub unsafe fn CreateAdditionalSwapChain( &self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pswapchain: *mut Option<IDirect3DSwapChain9> ) -> Result<()>

pub unsafe fn GetSwapChain( &self, iswapchain: u32 ) -> Result<IDirect3DSwapChain9>

pub unsafe fn GetNumberOfSwapChains(&self) -> u32

pub unsafe fn Reset( &self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS ) -> Result<()>

pub unsafe fn Present<P0>( &self, psourcerect: *const RECT, pdestrect: *const RECT, hdestwindowoverride: P0, pdirtyregion: *const RGNDATA ) -> Result<()>
where P0: IntoParam<HWND>,

pub unsafe fn GetBackBuffer( &self, iswapchain: u32, ibackbuffer: u32, type: D3DBACKBUFFER_TYPE ) -> Result<IDirect3DSurface9>

pub unsafe fn GetRasterStatus( &self, iswapchain: u32, prasterstatus: *mut D3DRASTER_STATUS ) -> Result<()>

pub unsafe fn SetDialogBoxMode<P0>(&self, benabledialogs: P0) -> Result<()>
where P0: IntoParam<BOOL>,

pub unsafe fn SetGammaRamp( &self, iswapchain: u32, flags: u32, pramp: *const D3DGAMMARAMP )

pub unsafe fn GetGammaRamp(&self, iswapchain: u32, pramp: *mut D3DGAMMARAMP)

pub unsafe fn CreateTexture( &self, width: u32, height: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, pptexture: *mut Option<IDirect3DTexture9>, psharedhandle: *mut HANDLE ) -> Result<()>

pub unsafe fn CreateVolumeTexture( &self, width: u32, height: u32, depth: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppvolumetexture: *mut Option<IDirect3DVolumeTexture9>, psharedhandle: *mut HANDLE ) -> Result<()>

pub unsafe fn CreateCubeTexture( &self, edgelength: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppcubetexture: *mut Option<IDirect3DCubeTexture9>, psharedhandle: *mut HANDLE ) -> Result<()>

pub unsafe fn CreateVertexBuffer( &self, length: u32, usage: u32, fvf: u32, pool: D3DPOOL, ppvertexbuffer: *mut Option<IDirect3DVertexBuffer9>, psharedhandle: *mut HANDLE ) -> Result<()>

pub unsafe fn CreateIndexBuffer( &self, length: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppindexbuffer: *mut Option<IDirect3DIndexBuffer9>, psharedhandle: *mut HANDLE ) -> Result<()>

pub unsafe fn CreateRenderTarget<P0>( &self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: P0, ppsurface: *mut Option<IDirect3DSurface9>, psharedhandle: *mut HANDLE ) -> Result<()>
where P0: IntoParam<BOOL>,

pub unsafe fn CreateDepthStencilSurface<P0>( &self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: P0, ppsurface: *mut Option<IDirect3DSurface9>, psharedhandle: *mut HANDLE ) -> Result<()>
where P0: IntoParam<BOOL>,

pub unsafe fn UpdateSurface<P0, P1>( &self, psourcesurface: P0, psourcerect: *const RECT, pdestinationsurface: P1, pdestpoint: *const POINT ) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>, P1: IntoParam<IDirect3DSurface9>,

pub unsafe fn UpdateTexture<P0, P1>( &self, psourcetexture: P0, pdestinationtexture: P1 ) -> Result<()>
where P0: IntoParam<IDirect3DBaseTexture9>, P1: IntoParam<IDirect3DBaseTexture9>,

pub unsafe fn GetRenderTargetData<P0, P1>( &self, prendertarget: P0, pdestsurface: P1 ) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>, P1: IntoParam<IDirect3DSurface9>,

pub unsafe fn GetFrontBufferData<P0>( &self, iswapchain: u32, pdestsurface: P0 ) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>,

pub unsafe fn StretchRect<P0, P1>( &self, psourcesurface: P0, psourcerect: *const RECT, pdestsurface: P1, pdestrect: *const RECT, filter: D3DTEXTUREFILTERTYPE ) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>, P1: IntoParam<IDirect3DSurface9>,

pub unsafe fn ColorFill<P0>( &self, psurface: P0, prect: *const RECT, color: u32 ) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>,

pub unsafe fn CreateOffscreenPlainSurface( &self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: *mut Option<IDirect3DSurface9>, psharedhandle: *mut HANDLE ) -> Result<()>

pub unsafe fn SetRenderTarget<P0>( &self, rendertargetindex: u32, prendertarget: P0 ) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>,

pub unsafe fn GetRenderTarget( &self, rendertargetindex: u32 ) -> Result<IDirect3DSurface9>

pub unsafe fn SetDepthStencilSurface<P0>(&self, pnewzstencil: P0) -> Result<()>
where P0: IntoParam<IDirect3DSurface9>,

pub unsafe fn GetDepthStencilSurface(&self) -> Result<IDirect3DSurface9>

pub unsafe fn BeginScene(&self) -> Result<()>

pub unsafe fn EndScene(&self) -> Result<()>

pub unsafe fn Clear( &self, count: u32, prects: *const D3DRECT, flags: u32, color: u32, z: f32, stencil: u32 ) -> Result<()>

pub unsafe fn SetTransform( &self, state: D3DTRANSFORMSTATETYPE, pmatrix: *const Matrix4x4 ) -> Result<()>

pub unsafe fn GetTransform( &self, state: D3DTRANSFORMSTATETYPE, pmatrix: *mut Matrix4x4 ) -> Result<()>

pub unsafe fn MultiplyTransform( &self, param0: D3DTRANSFORMSTATETYPE, param1: *const Matrix4x4 ) -> Result<()>

pub unsafe fn SetViewport(&self, pviewport: *const D3DVIEWPORT9) -> Result<()>

pub unsafe fn GetViewport(&self, pviewport: *mut D3DVIEWPORT9) -> Result<()>

pub unsafe fn SetMaterial(&self, pmaterial: *const D3DMATERIAL9) -> Result<()>

pub unsafe fn GetMaterial(&self, pmaterial: *mut D3DMATERIAL9) -> Result<()>

pub unsafe fn SetLight( &self, index: u32, param1: *const D3DLIGHT9 ) -> Result<()>

pub unsafe fn GetLight(&self, index: u32, param1: *mut D3DLIGHT9) -> Result<()>

pub unsafe fn LightEnable<P0>(&self, index: u32, enable: P0) -> Result<()>
where P0: IntoParam<BOOL>,

pub unsafe fn GetLightEnable( &self, index: u32, penable: *mut BOOL ) -> Result<()>

pub unsafe fn SetClipPlane(&self, index: u32, pplane: *const f32) -> Result<()>

pub unsafe fn GetClipPlane(&self, index: u32, pplane: *mut f32) -> Result<()>

pub unsafe fn SetRenderState( &self, state: D3DRENDERSTATETYPE, value: u32 ) -> Result<()>

pub unsafe fn GetRenderState( &self, state: D3DRENDERSTATETYPE, pvalue: *mut u32 ) -> Result<()>

pub unsafe fn CreateStateBlock( &self, type: D3DSTATEBLOCKTYPE ) -> Result<IDirect3DStateBlock9>

pub unsafe fn BeginStateBlock(&self) -> Result<()>

pub unsafe fn EndStateBlock(&self) -> Result<IDirect3DStateBlock9>

pub unsafe fn SetClipStatus( &self, pclipstatus: *const D3DCLIPSTATUS9 ) -> Result<()>

pub unsafe fn GetClipStatus( &self, pclipstatus: *mut D3DCLIPSTATUS9 ) -> Result<()>

pub unsafe fn GetTexture(&self, stage: u32) -> Result<IDirect3DBaseTexture9>

pub unsafe fn SetTexture<P0>(&self, stage: u32, ptexture: P0) -> Result<()>
where P0: IntoParam<IDirect3DBaseTexture9>,

pub unsafe fn GetTextureStageState( &self, stage: u32, type: D3DTEXTURESTAGESTATETYPE, pvalue: *mut u32 ) -> Result<()>

pub unsafe fn SetTextureStageState( &self, stage: u32, type: D3DTEXTURESTAGESTATETYPE, value: u32 ) -> Result<()>

pub unsafe fn GetSamplerState( &self, sampler: u32, type: D3DSAMPLERSTATETYPE, pvalue: *mut u32 ) -> Result<()>

pub unsafe fn SetSamplerState( &self, sampler: u32, type: D3DSAMPLERSTATETYPE, value: u32 ) -> Result<()>

pub unsafe fn ValidateDevice(&self, pnumpasses: *mut u32) -> Result<()>

pub unsafe fn SetPaletteEntries( &self, palettenumber: u32, pentries: *const PALETTEENTRY ) -> Result<()>

pub unsafe fn GetPaletteEntries( &self, palettenumber: u32, pentries: *mut PALETTEENTRY ) -> Result<()>

pub unsafe fn SetCurrentTexturePalette(&self, palettenumber: u32) -> Result<()>

pub unsafe fn GetCurrentTexturePalette( &self, palettenumber: *mut u32 ) -> Result<()>

pub unsafe fn SetScissorRect(&self, prect: *const RECT) -> Result<()>

pub unsafe fn GetScissorRect(&self, prect: *mut RECT) -> Result<()>

pub unsafe fn SetSoftwareVertexProcessing<P0>( &self, bsoftware: P0 ) -> Result<()>
where P0: IntoParam<BOOL>,

pub unsafe fn GetSoftwareVertexProcessing(&self) -> BOOL

pub unsafe fn SetNPatchMode(&self, nsegments: f32) -> Result<()>

pub unsafe fn GetNPatchMode(&self) -> f32

pub unsafe fn DrawPrimitive( &self, primitivetype: D3DPRIMITIVETYPE, startvertex: u32, primitivecount: u32 ) -> Result<()>

pub unsafe fn DrawIndexedPrimitive( &self, param0: D3DPRIMITIVETYPE, basevertexindex: i32, minvertexindex: u32, numvertices: u32, startindex: u32, primcount: u32 ) -> Result<()>

pub unsafe fn DrawPrimitiveUP( &self, primitivetype: D3DPRIMITIVETYPE, primitivecount: u32, pvertexstreamzerodata: *const c_void, vertexstreamzerostride: u32 ) -> Result<()>

pub unsafe fn DrawIndexedPrimitiveUP( &self, primitivetype: D3DPRIMITIVETYPE, minvertexindex: u32, numvertices: u32, primitivecount: u32, pindexdata: *const c_void, indexdataformat: D3DFORMAT, pvertexstreamzerodata: *const c_void, vertexstreamzerostride: u32 ) -> Result<()>

pub unsafe fn ProcessVertices<P0, P1>( &self, srcstartindex: u32, destindex: u32, vertexcount: u32, pdestbuffer: P0, pvertexdecl: P1, flags: u32 ) -> Result<()>
where P0: IntoParam<IDirect3DVertexBuffer9>, P1: IntoParam<IDirect3DVertexDeclaration9>,

pub unsafe fn CreateVertexDeclaration( &self, pvertexelements: *const D3DVERTEXELEMENT9 ) -> Result<IDirect3DVertexDeclaration9>

pub unsafe fn SetVertexDeclaration<P0>(&self, pdecl: P0) -> Result<()>
where P0: IntoParam<IDirect3DVertexDeclaration9>,

pub unsafe fn GetVertexDeclaration(&self) -> Result<IDirect3DVertexDeclaration9>

pub unsafe fn SetFVF(&self, fvf: u32) -> Result<()>

pub unsafe fn GetFVF(&self, pfvf: *mut u32) -> Result<()>

pub unsafe fn CreateVertexShader( &self, pfunction: *const u32 ) -> Result<IDirect3DVertexShader9>

pub unsafe fn SetVertexShader<P0>(&self, pshader: P0) -> Result<()>
where P0: IntoParam<IDirect3DVertexShader9>,

pub unsafe fn GetVertexShader(&self) -> Result<IDirect3DVertexShader9>

pub unsafe fn SetVertexShaderConstantF( &self, startregister: u32, pconstantdata: *const f32, vector4fcount: u32 ) -> Result<()>

pub unsafe fn GetVertexShaderConstantF( &self, startregister: u32, pconstantdata: *mut f32, vector4fcount: u32 ) -> Result<()>

pub unsafe fn SetVertexShaderConstantI( &self, startregister: u32, pconstantdata: *const i32, vector4icount: u32 ) -> Result<()>

pub unsafe fn GetVertexShaderConstantI( &self, startregister: u32, pconstantdata: *mut i32, vector4icount: u32 ) -> Result<()>

pub unsafe fn SetVertexShaderConstantB( &self, startregister: u32, pconstantdata: *const BOOL, boolcount: u32 ) -> Result<()>

pub unsafe fn GetVertexShaderConstantB( &self, startregister: u32, pconstantdata: *mut BOOL, boolcount: u32 ) -> Result<()>

pub unsafe fn SetStreamSource<P0>( &self, streamnumber: u32, pstreamdata: P0, offsetinbytes: u32, stride: u32 ) -> Result<()>
where P0: IntoParam<IDirect3DVertexBuffer9>,

pub unsafe fn GetStreamSource( &self, streamnumber: u32, ppstreamdata: *mut Option<IDirect3DVertexBuffer9>, poffsetinbytes: *mut u32, pstride: *mut u32 ) -> Result<()>

pub unsafe fn SetStreamSourceFreq( &self, streamnumber: u32, setting: u32 ) -> Result<()>

pub unsafe fn GetStreamSourceFreq( &self, streamnumber: u32, psetting: *mut u32 ) -> Result<()>

pub unsafe fn SetIndices<P0>(&self, pindexdata: P0) -> Result<()>
where P0: IntoParam<IDirect3DIndexBuffer9>,

pub unsafe fn GetIndices(&self) -> Result<IDirect3DIndexBuffer9>

pub unsafe fn CreatePixelShader( &self, pfunction: *const u32 ) -> Result<IDirect3DPixelShader9>

pub unsafe fn SetPixelShader<P0>(&self, pshader: P0) -> Result<()>
where P0: IntoParam<IDirect3DPixelShader9>,

pub unsafe fn GetPixelShader(&self) -> Result<IDirect3DPixelShader9>

pub unsafe fn SetPixelShaderConstantF( &self, startregister: u32, pconstantdata: *const f32, vector4fcount: u32 ) -> Result<()>

pub unsafe fn GetPixelShaderConstantF( &self, startregister: u32, pconstantdata: *mut f32, vector4fcount: u32 ) -> Result<()>

pub unsafe fn SetPixelShaderConstantI( &self, startregister: u32, pconstantdata: *const i32, vector4icount: u32 ) -> Result<()>

pub unsafe fn GetPixelShaderConstantI( &self, startregister: u32, pconstantdata: *mut i32, vector4icount: u32 ) -> Result<()>

pub unsafe fn SetPixelShaderConstantB( &self, startregister: u32, pconstantdata: *const BOOL, boolcount: u32 ) -> Result<()>

pub unsafe fn GetPixelShaderConstantB( &self, startregister: u32, pconstantdata: *mut BOOL, boolcount: u32 ) -> Result<()>

pub unsafe fn DrawRectPatch( &self, handle: u32, pnumsegs: *const f32, prectpatchinfo: *const D3DRECTPATCH_INFO ) -> Result<()>

pub unsafe fn DrawTriPatch( &self, handle: u32, pnumsegs: *const f32, ptripatchinfo: *const D3DTRIPATCH_INFO ) -> Result<()>

pub unsafe fn DeletePatch(&self, handle: u32) -> Result<()>

pub unsafe fn CreateQuery(&self, type: D3DQUERYTYPE) -> Result<IDirect3DQuery9>

Trait Implementations§

§

impl Clone for IDirect3DDevice9

§

fn clone(&self) -> IDirect3DDevice9

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for IDirect3DDevice9

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl From<&IDirect3DDevice9> for &IUnknown

§

fn from(value: &IDirect3DDevice9) -> Self

Converts to this type from the input type.
§

impl From<&IDirect3DDevice9Ex> for &IDirect3DDevice9

§

fn from(value: &IDirect3DDevice9Ex) -> Self

Converts to this type from the input type.
§

impl From<IDirect3DDevice9> for IUnknown

§

fn from(value: IDirect3DDevice9) -> Self

Converts to this type from the input type.
§

impl From<IDirect3DDevice9Ex> for IDirect3DDevice9

§

fn from(value: IDirect3DDevice9Ex) -> Self

Converts to this type from the input type.
§

impl Interface for IDirect3DDevice9

§

fn as_raw(&self) -> *mut c_void

Returns the raw COM interface pointer. The resulting pointer continues to be owned by the Interface implementation.
§

fn into_raw(self) -> *mut c_void

Returns the raw COM interface pointer and releases ownership. It the caller’s responsibility to release the COM interface pointer.
§

unsafe fn from_raw(raw: *mut c_void) -> Self

Creates an Interface by taking ownership of the raw COM interface pointer. Read more
§

unsafe fn from_raw_borrowed(raw: &*mut c_void) -> Option<&Self>

Creates an Interface that is valid so long as the raw COM interface pointer is valid. Read more
§

fn cast<T>(&self) -> Result<T, Error>
where T: Interface,

Attempts to cast the current interface to another interface using QueryInterface. Read more
§

fn downgrade(&self) -> Result<Weak<Self>, Error>

Attempts to create a Weak reference to this object.
§

unsafe fn query(&self, iid: *const GUID, interface: *mut *mut c_void) -> HRESULT

Call QueryInterface on this interface Read more
§

impl PartialEq for IDirect3DDevice9

§

fn eq(&self, other: &IDirect3DDevice9) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for IDirect3DDevice9

§

impl StructuralPartialEq for IDirect3DDevice9

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.