C# Class Axiom.RenderSystems.DirectX9.D3DHardwarePixelBuffer

DirectX implementation of HardwarePixelBuffer
Inheritance: Axiom.Graphics.HardwarePixelBuffer
ファイルを表示 Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
HWMipmaps bool
device SlimDX.Direct3D9.Device
doMipmapGen bool
fsaaSurface SlimDX.Direct3D9.Surface
mipTex SlimDX.Direct3D9.BaseTexture
sliceTRT List
surface SlimDX.Direct3D9.Surface
tempSurface SlimDX.Direct3D9.Surface
tempVolume SlimDX.Direct3D9.Volume
volume SlimDX.Direct3D9.Volume

Public Methods

Method Description
Bind ( SlimDX.Direct3D9 device, SlimDX.Direct3D9 surface, bool update ) : void

Call this to associate a D3D surface with this pixel buffer

Blit ( Axiom.Graphics.HardwarePixelBuffer src, BasicBox srcBox, BasicBox dstBox ) : void

Copies a box from another PixelBuffer to a region of the this PixelBuffer.

The source and destination regions dimensions don't have to match, in which case scaling is done. This scaling is generally done using a bilinear filter in hardware, but it is faster to pass the source image in the right dimensions. Only call this function when both buffers are unlocked.

BlitFromMemory ( PixelBox src, BasicBox dstBox ) : void

Copies a region from normal memory to a region of this pixelbuffer. The source image can be in any pixel format supported by Axiom, and in any size.

The source and destination regions dimensions don't have to match, in which case scaling is done. This scaling is generally done using a bilinear filter in hardware, but it is faster to pass the source image in the right dimensions. Only call this function when both buffers are unlocked.

BlitToMemory ( BasicBox srcBox, PixelBox dst ) : void

Copies a region of this pixelbuffer to normal memory.

The source and destination regions don't have to match, in which case scaling is done. Only call this function when the buffer is unlocked.

ClearSliceRTT ( int zoffset ) : void

Notify TextureBuffer of destruction of render target

D3DHardwarePixelBuffer ( BufferUsage usage ) : System
GenMipmaps ( ) : void

Internal function to update mipmaps on update of level 0

GetRenderTarget ( int zoffset ) : RenderTexture

Get rendertarget for z slice

GetSurface ( Device d3D9Device ) : Surface
LockDeviceAccess ( ) : void
SetMipmapping ( bool doMipmapGen, bool HWMipmaps, SlimDX.Direct3D9 mipTex ) : void

Function to set mipmap generation

UnlockDeviceAccess ( ) : void

Protected Methods

Method Description
CreateRenderTextures ( bool update ) : void

Create (or update) render textures for slices

DestroyRenderTextures ( ) : void

Destroy render textures for slices

FromD3DLock ( PixelBox rval, SlimDX rectangle ) : void

Util functions to convert a D3D locked rectangle to a pixel box

LockImpl ( BasicBox lockBox, BufferLocking options ) : PixelBox

Lock a box

ToD3DBox ( BasicBox lockBox ) : SlimDX.Direct3D9.Box

Convert Axiom Box to D3D box

ToD3DBoxExtent ( PixelBox lockBox ) : SlimDX.Direct3D9.Box

Convert Axiom PixelBox extent to D3D box

ToD3DRectangle ( BasicBox lockBox ) : Rectangle

Convert Axiom integer Box to D3D rectangle

ToD3DRectangleExtent ( PixelBox lockBox ) : Rectangle

Convert Axiom PixelBox extent to D3D rectangle

UnlockImpl ( ) : void

Unlock a box

dispose ( bool disposeManagedResources ) : void

Method Details

Bind() public method

Call this to associate a D3D surface with this pixel buffer
public Bind ( SlimDX.Direct3D9 device, SlimDX.Direct3D9 surface, bool update ) : void
device SlimDX.Direct3D9
surface SlimDX.Direct3D9
update bool
return void

Blit() public method

Copies a box from another PixelBuffer to a region of the this PixelBuffer.
The source and destination regions dimensions don't have to match, in which case scaling is done. This scaling is generally done using a bilinear filter in hardware, but it is faster to pass the source image in the right dimensions. Only call this function when both buffers are unlocked.
public Blit ( Axiom.Graphics.HardwarePixelBuffer src, BasicBox srcBox, BasicBox dstBox ) : void
src Axiom.Graphics.HardwarePixelBuffer Source/dest pixel buffer
srcBox Axiom.Media.BasicBox Image.BasicBox describing the source region in this buffer
dstBox Axiom.Media.BasicBox Image.BasicBox describing the destination region in this buffer
return void

BlitFromMemory() public method

Copies a region from normal memory to a region of this pixelbuffer. The source image can be in any pixel format supported by Axiom, and in any size.
The source and destination regions dimensions don't have to match, in which case scaling is done. This scaling is generally done using a bilinear filter in hardware, but it is faster to pass the source image in the right dimensions. Only call this function when both buffers are unlocked.
public BlitFromMemory ( PixelBox src, BasicBox dstBox ) : void
src Axiom.Media.PixelBox PixelBox containing the source pixels and format in memory
dstBox Axiom.Media.BasicBox Image.BasicBox describing the destination region in this buffer
return void

BlitToMemory() public method

Copies a region of this pixelbuffer to normal memory.
The source and destination regions don't have to match, in which case scaling is done. Only call this function when the buffer is unlocked.
public BlitToMemory ( BasicBox srcBox, PixelBox dst ) : void
srcBox Axiom.Media.BasicBox BasicBox describing the source region of this buffer
dst Axiom.Media.PixelBox PixelBox describing the destination pixels and format in memory
return void

ClearSliceRTT() public method

Notify TextureBuffer of destruction of render target
public ClearSliceRTT ( int zoffset ) : void
zoffset int
return void

CreateRenderTextures() protected method

Create (or update) render textures for slices
protected CreateRenderTextures ( bool update ) : void
update bool are we updating an existing texture
return void

D3DHardwarePixelBuffer() public method

public D3DHardwarePixelBuffer ( BufferUsage usage ) : System
usage BufferUsage
return System

DestroyRenderTextures() protected method

Destroy render textures for slices
protected DestroyRenderTextures ( ) : void
return void

FromD3DLock() protected static method

Util functions to convert a D3D locked rectangle to a pixel box
protected static FromD3DLock ( PixelBox rval, SlimDX rectangle ) : void
rval Axiom.Media.PixelBox
rectangle SlimDX
return void

GenMipmaps() public method

Internal function to update mipmaps on update of level 0
public GenMipmaps ( ) : void
return void

GetRenderTarget() public method

Get rendertarget for z slice
public GetRenderTarget ( int zoffset ) : RenderTexture
zoffset int
return Axiom.Graphics.RenderTexture

GetSurface() public method

public GetSurface ( Device d3D9Device ) : Surface
d3D9Device Device
return Surface

LockDeviceAccess() public static method

public static LockDeviceAccess ( ) : void
return void

LockImpl() protected method

Lock a box
protected LockImpl ( BasicBox lockBox, BufferLocking options ) : PixelBox
lockBox Axiom.Media.BasicBox
options BufferLocking
return Axiom.Media.PixelBox

SetMipmapping() public method

Function to set mipmap generation
public SetMipmapping ( bool doMipmapGen, bool HWMipmaps, SlimDX.Direct3D9 mipTex ) : void
doMipmapGen bool
HWMipmaps bool
mipTex SlimDX.Direct3D9
return void

ToD3DBox() protected static method

Convert Axiom Box to D3D box
protected static ToD3DBox ( BasicBox lockBox ) : SlimDX.Direct3D9.Box
lockBox Axiom.Media.BasicBox
return SlimDX.Direct3D9.Box

ToD3DBoxExtent() protected static method

Convert Axiom PixelBox extent to D3D box
protected static ToD3DBoxExtent ( PixelBox lockBox ) : SlimDX.Direct3D9.Box
lockBox Axiom.Media.PixelBox
return SlimDX.Direct3D9.Box

ToD3DRectangle() protected static method

Convert Axiom integer Box to D3D rectangle
protected static ToD3DRectangle ( BasicBox lockBox ) : Rectangle
lockBox Axiom.Media.BasicBox
return System.Drawing.Rectangle

ToD3DRectangleExtent() protected static method

Convert Axiom PixelBox extent to D3D rectangle
protected static ToD3DRectangleExtent ( PixelBox lockBox ) : Rectangle
lockBox Axiom.Media.PixelBox
return System.Drawing.Rectangle

UnlockDeviceAccess() public static method

public static UnlockDeviceAccess ( ) : void
return void

UnlockImpl() protected method

Unlock a box
protected UnlockImpl ( ) : void
return void

dispose() protected method

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void

Property Details

HWMipmaps protected_oe property

Hardware Mipmaps?
protected bool HWMipmaps
return bool

device protected_oe property

D3DDevice pointer
protected Device,SlimDX.Direct3D9 device
return SlimDX.Direct3D9.Device

doMipmapGen protected_oe property

Doing Mipmapping?
protected bool doMipmapGen
return bool

fsaaSurface protected_oe property

FSAA Surface abstracted by this buffer
protected Surface,SlimDX.Direct3D9 fsaaSurface
return SlimDX.Direct3D9.Surface

mipTex protected_oe property

The Mipmap texture?
protected BaseTexture,SlimDX.Direct3D9 mipTex
return SlimDX.Direct3D9.BaseTexture

sliceTRT protected_oe property

Render targets
protected List sliceTRT
return List

surface protected_oe property

Surface abstracted by this buffer
protected Surface,SlimDX.Direct3D9 surface
return SlimDX.Direct3D9.Surface

tempSurface protected_oe property

Temporary surface in main memory if direct locking of mSurface is not possible
protected Surface,SlimDX.Direct3D9 tempSurface
return SlimDX.Direct3D9.Surface

tempVolume protected_oe property

Temporary volume in main memory if direct locking of mVolume is not possible
protected Volume,SlimDX.Direct3D9 tempVolume
return SlimDX.Direct3D9.Volume

volume protected_oe property

Volume abstracted by this buffer
protected Volume,SlimDX.Direct3D9 volume
return SlimDX.Direct3D9.Volume