MythRenderD3D9 Class Reference

#include <mythrender_d3d9.h>

Inheritance diagram for MythRenderD3D9:
MythRender

List of all members.

Public Member Functions

 MythRenderD3D9 ()
 ~MythRenderD3D9 ()
bool Create (QSize size, HWND window)
bool Test (bool &reset)
bool ClearBuffer (void)
bool Begin (void)
bool End (void)
void CopyFrame (void *surface, D3D9Image *img)
bool StretchRect (IDirect3DTexture9 *texture, IDirect3DSurface9 *surface, bool known_surface=true)
bool DrawTexturedQuad (IDirect3DVertexBuffer9 *vertexbuffer)
void DrawRect (const QRect &rect, const QColor &color, int alpha)
bool Present (HWND win)
bool HardwareYUVConversion (void)
QRect GetRect (IDirect3DVertexBuffer9 *vertexbuffer)
bool SetRenderTarget (IDirect3DTexture9 *texture)
IDirect3DTexture9 * CreateTexture (const QSize &size)
void DeleteTexture (IDirect3DTexture9 *texture)
IDirect3DVertexBuffer9 * CreateVertexBuffer (IDirect3DTexture9 *texture=NULL)
bool UpdateVertexBuffer (IDirect3DVertexBuffer9 *vertexbuffer, const QRect &dvr, const QRect &vr, int alpha=255, bool video=false)
void DeleteVertexBuffer (IDirect3DVertexBuffer9 *vertexbuffer)
IDirect3DSurface9 * CreateSurface (const QSize &size, bool video=false)
bool UpdateSurface (IDirect3DSurface9 *surface, const MythImage *image)
void DeleteSurface (IDirect3DSurface9 *surface)
uint8_tGetBuffer (IDirect3DSurface9 *surface, uint &pitch)
void ReleaseBuffer (IDirect3DSurface9 *surface)
IDirect3DDevice9 * AcquireDevice (void)
void ReleaseDevice (void)
IDirect3DDeviceManager9GetDeviceManager (void)

Static Public Member Functions

static void * ResolveAddress (const char *lib, const char *proc)

Private Member Functions

bool SetTexture (IDirect3DDevice9 *dev, IDirect3DTexture9 *texture, int num=0)
void DeleteTextures (void)
void DeleteVertexBuffers (void)
void DeleteSurfaces (void)
void Init2DState (void)
void EnableBlending (IDirect3DDevice9 *dev, bool enable)
void MultiTexturing (IDirect3DDevice9 *dev, bool enable, IDirect3DTexture9 *texture=NULL)
void SetTextureVertices (IDirect3DDevice9 *dev, bool enable)
void CreateDeviceManager (void)
void DestroyDeviceManager (void)

Private Attributes

QMap< IDirect3DTexture9 *, QSize > m_textures
QMap< IDirect3DVertexBuffer9
*, MythD3DVertexBuffer
m_vertexbuffers
QMap< IDirect3DSurface9
*, MythD3DSurface
m_surfaces
IDirect3D9 * m_d3d
IDirect3DDevice9 * m_rootD3DDevice
D3DFORMAT m_adaptor_fmt
D3DFORMAT m_videosurface_fmt
D3DFORMAT m_surface_fmt
D3DFORMAT m_texture_fmt
IDirect3DVertexBuffer9 * m_rect_vertexbuffer
IDirect3DSurface9 * m_default_surface
IDirect3DSurface9 * m_current_surface
QMutex m_lock
bool m_blend
bool m_multi_texturing
bool m_texture_vertices
IDirect3DDeviceManager9m_deviceManager
HANDLE m_deviceHandle
uint m_deviceManagerToken

Detailed Description

Definition at line 61 of file mythrender_d3d9.h.


Constructor & Destructor Documentation

MythRenderD3D9::MythRenderD3D9 ( void   ) 

Definition at line 189 of file mythrender_d3d9.cpp.

MythRenderD3D9::~MythRenderD3D9 ( void   ) 

Definition at line 202 of file mythrender_d3d9.cpp.


Member Function Documentation

void * MythRenderD3D9::ResolveAddress ( const char *  lib,
const char *  proc 
) [static]
bool MythRenderD3D9::Create ( QSize  size,
HWND  window 
)

Definition at line 266 of file mythrender_d3d9.cpp.

Referenced by MythD3D9Painter::InitD3D9(), and VideoOutputD3D::SetupContext().

bool MythRenderD3D9::Test ( bool reset  ) 
bool MythRenderD3D9::ClearBuffer ( void   ) 

Definition at line 467 of file mythrender_d3d9.cpp.

Referenced by MythD3D9Painter::Begin(), and VideoOutputD3D::PrepareFrame().

bool MythRenderD3D9::Begin ( void   ) 

Definition at line 484 of file mythrender_d3d9.cpp.

Referenced by MythD3D9Painter::Begin(), and VideoOutputD3D::PrepareFrame().

bool MythRenderD3D9::End ( void   ) 

Definition at line 500 of file mythrender_d3d9.cpp.

Referenced by MythD3D9Painter::End(), and VideoOutputD3D::PrepareFrame().

void MythRenderD3D9::CopyFrame ( void *  surface,
D3D9Image img 
)

Definition at line 516 of file mythrender_d3d9.cpp.

Referenced by VideoOutputD3D::ProcessFrame().

bool MythRenderD3D9::StretchRect ( IDirect3DTexture9 *  texture,
IDirect3DSurface9 *  surface,
bool  known_surface = true 
)

Definition at line 522 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::ReleaseBuffer(), and D3D9Image::UpdateImage().

bool MythRenderD3D9::DrawTexturedQuad ( IDirect3DVertexBuffer9 *  vertexbuffer  ) 

Definition at line 554 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::Draw().

void MythRenderD3D9::DrawRect ( const QRect &  rect,
const QColor &  color,
int  alpha 
)

Definition at line 591 of file mythrender_d3d9.cpp.

Referenced by MythD3D9Painter::DrawRect(), and VideoOutputD3D::PrepareFrame().

bool MythRenderD3D9::Present ( HWND  win  ) 

Definition at line 709 of file mythrender_d3d9.cpp.

Referenced by MythD3D9Painter::End(), and VideoOutputD3D::Show().

bool MythRenderD3D9::HardwareYUVConversion ( void   ) 

Definition at line 419 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::GetBuffer().

QRect MythRenderD3D9::GetRect ( IDirect3DVertexBuffer9 *  vertexbuffer  ) 

Definition at line 726 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::GetRect().

bool MythRenderD3D9::SetRenderTarget ( IDirect3DTexture9 *  texture  ) 

Definition at line 733 of file mythrender_d3d9.cpp.

Referenced by MythD3D9Painter::End(), and D3D9Image::SetAsRenderTarget().

IDirect3DTexture9 * MythRenderD3D9::CreateTexture ( const QSize &  size  ) 

Definition at line 803 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::D3D9Image().

void MythRenderD3D9::DeleteTexture ( IDirect3DTexture9 *  texture  ) 

Definition at line 834 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::~D3D9Image().

IDirect3DVertexBuffer9 * MythRenderD3D9::CreateVertexBuffer ( IDirect3DTexture9 *  texture = NULL  ) 

Definition at line 966 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::D3D9Image().

bool MythRenderD3D9::UpdateVertexBuffer ( IDirect3DVertexBuffer9 *  vertexbuffer,
const QRect &  dvr,
const QRect &  vr,
int  alpha = 255,
bool  video = false 
)

Definition at line 1013 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::UpdateVertices().

void MythRenderD3D9::DeleteVertexBuffer ( IDirect3DVertexBuffer9 *  vertexbuffer  ) 

Definition at line 1003 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::~D3D9Image().

IDirect3DSurface9 * MythRenderD3D9::CreateSurface ( const QSize &  size,
bool  video = false 
)

Definition at line 844 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::D3D9Image().

bool MythRenderD3D9::UpdateSurface ( IDirect3DSurface9 *  surface,
const MythImage image 
)

Definition at line 871 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::UpdateImage().

void MythRenderD3D9::DeleteSurface ( IDirect3DSurface9 *  surface  ) 

Definition at line 925 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::~D3D9Image().

uint8_t * MythRenderD3D9::GetBuffer ( IDirect3DSurface9 *  surface,
uint pitch 
)

Definition at line 935 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::GetBuffer(), and UpdateSurface().

void MythRenderD3D9::ReleaseBuffer ( IDirect3DSurface9 *  surface  ) 

Definition at line 955 of file mythrender_d3d9.cpp.

Referenced by D3D9Image::ReleaseBuffer(), and UpdateSurface().

bool MythRenderD3D9::SetTexture ( IDirect3DDevice9 *  dev,
IDirect3DTexture9 *  texture,
int  num = 0 
) [private]

Definition at line 788 of file mythrender_d3d9.cpp.

Referenced by DrawRect(), DrawTexturedQuad(), and MultiTexturing().

void MythRenderD3D9::DeleteTextures ( void   )  [private]

Definition at line 826 of file mythrender_d3d9.cpp.

Referenced by ~MythRenderD3D9().

void MythRenderD3D9::DeleteVertexBuffers ( void   )  [private]

Definition at line 992 of file mythrender_d3d9.cpp.

Referenced by ~MythRenderD3D9().

void MythRenderD3D9::DeleteSurfaces ( void   )  [private]

Definition at line 917 of file mythrender_d3d9.cpp.

Referenced by ~MythRenderD3D9().

void MythRenderD3D9::Init2DState ( void   )  [private]

Definition at line 1111 of file mythrender_d3d9.cpp.

Referenced by Create().

void MythRenderD3D9::EnableBlending ( IDirect3DDevice9 *  dev,
bool  enable 
) [private]

Definition at line 1141 of file mythrender_d3d9.cpp.

Referenced by DrawRect(), DrawTexturedQuad(), and Init2DState().

void MythRenderD3D9::MultiTexturing ( IDirect3DDevice9 *  dev,
bool  enable,
IDirect3DTexture9 *  texture = NULL 
) [private]

Definition at line 673 of file mythrender_d3d9.cpp.

Referenced by DrawRect(), DrawTexturedQuad(), and Init2DState().

void MythRenderD3D9::SetTextureVertices ( IDirect3DDevice9 *  dev,
bool  enable 
) [private]

Definition at line 1151 of file mythrender_d3d9.cpp.

Referenced by DrawRect(), DrawTexturedQuad(), and Init2DState().

IDirect3DDevice9 * MythRenderD3D9::AcquireDevice ( void   ) 

Definition at line 1161 of file mythrender_d3d9.cpp.

Referenced by D3D9Locker::Acquire(), and Init2DState().

void MythRenderD3D9::ReleaseDevice ( void   ) 

Definition at line 1193 of file mythrender_d3d9.cpp.

Referenced by Init2DState(), and D3D9Locker::~D3D9Locker().

IDirect3DDeviceManager9* MythRenderD3D9::GetDeviceManager ( void   )  [inline]

Definition at line 137 of file mythrender_d3d9.h.

Referenced by DXVA2Decoder::CreateVideoService().

void MythRenderD3D9::CreateDeviceManager ( void   )  [private]

Definition at line 1211 of file mythrender_d3d9.cpp.

Referenced by Create().

void MythRenderD3D9::DestroyDeviceManager ( void   )  [private]

Definition at line 1254 of file mythrender_d3d9.cpp.

Referenced by ~MythRenderD3D9().


Member Data Documentation

QMap<IDirect3DTexture9*, QSize> MythRenderD3D9::m_textures [private]
QMap<IDirect3DVertexBuffer9*, MythD3DVertexBuffer> MythRenderD3D9::m_vertexbuffers [private]
QMap<IDirect3DSurface9*, MythD3DSurface> MythRenderD3D9::m_surfaces [private]
IDirect3D9* MythRenderD3D9::m_d3d [private]

Definition at line 119 of file mythrender_d3d9.h.

Referenced by Create(), and ~MythRenderD3D9().

IDirect3DDevice9* MythRenderD3D9::m_rootD3DDevice [private]

Definition at line 120 of file mythrender_d3d9.h.

Referenced by AcquireDevice(), Create(), CreateDeviceManager(), and ~MythRenderD3D9().

D3DFORMAT MythRenderD3D9::m_adaptor_fmt [private]

Definition at line 121 of file mythrender_d3d9.h.

Referenced by Create().

Definition at line 122 of file mythrender_d3d9.h.

Referenced by Create(), CreateSurface(), and HardwareYUVConversion().

D3DFORMAT MythRenderD3D9::m_surface_fmt [private]

Definition at line 123 of file mythrender_d3d9.h.

Referenced by Create(), and CreateSurface().

D3DFORMAT MythRenderD3D9::m_texture_fmt [private]

Definition at line 124 of file mythrender_d3d9.h.

Referenced by Create(), and CreateTexture().

IDirect3DVertexBuffer9* MythRenderD3D9::m_rect_vertexbuffer [private]

Definition at line 125 of file mythrender_d3d9.h.

Referenced by DrawRect(), and ~MythRenderD3D9().

IDirect3DSurface9* MythRenderD3D9::m_default_surface [private]

Definition at line 126 of file mythrender_d3d9.h.

Referenced by SetRenderTarget(), and ~MythRenderD3D9().

IDirect3DSurface9* MythRenderD3D9::m_current_surface [private]

Definition at line 127 of file mythrender_d3d9.h.

Referenced by SetRenderTarget(), and ~MythRenderD3D9().

QMutex MythRenderD3D9::m_lock [private]

Definition at line 130 of file mythrender_d3d9.h.

Referenced by EnableBlending().

Definition at line 131 of file mythrender_d3d9.h.

Referenced by MultiTexturing().

Definition at line 132 of file mythrender_d3d9.h.

Referenced by SetTextureVertices().

Definition at line 146 of file mythrender_d3d9.h.

Referenced by CreateDeviceManager().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Fri May 25 06:42:14 2012 for MythTV by  doxygen 1.6.3