48 state->num_render_targets *
sizeof(IDirect3DSurface9 *));
49 if (!
state->render_targets)
52 for (
i = 0;
i <
state->num_render_targets;
i++)
65 for (
i = 0;
i <
state->num_render_targets;
i++)
79 for (
i = 0;
i <
state->num_render_targets;
i++)
82 if (
state->render_targets[
i])
88 if (
state->depth_stencil)
101 for (
i = 0;
i <
state->num_render_targets;
i++)
103 if (
state->render_targets[
i])
142 IUnknown_AddRef(iface);
158 TRACE(
"%p increasing refcount to %u\n", iface,
ref);
168 TRACE(
"%p decreasing refcount to %u\n", iface,
ref);
188 IDirect3DDevice9 **
device)
215 IDirect3DSurface9 *surface,
224 DWORD multi_sample_quality = 0;
226 TRACE(
"(%p)->(%p, %p)\n", iface, surface, viewport);
238 if (viewport->
X >
render->desc.Width || viewport->
Y >
render->desc.Height
244 && (viewport->
X != 0 || viewport->
Y != 0
255 for (
i = 1;
i <
render->previous_state.num_render_targets;
i++)
267 render->desc.Format, multi_sample_type, multi_sample_quality,
FALSE,
275 if (
render->desc.DepthStencil)
278 render->desc.DepthStencilFormat, multi_sample_type, multi_sample_quality,
TRUE,
291 render->dst_surface = surface;
321 if (
render->render_target)
325 if (
FAILED(
hr))
ERR(
"Copying render target data to surface failed %#x\n",
hr);
331 if (
render->render_target)
337 if (
render->depth_stencil)
351 FIXME(
"(%p)->(): stub\n", iface);
357 FIXME(
"(%p)->(): stub\n", iface);
382 ID3DXRenderToSurface **
out)
387 TRACE(
"(%p, %u, %u, %#x, %d, %#x, %p)\n",
device,
width,
height,
format,
402 render->desc.DepthStencilFormat = depth_stencil_format;
418 *
out = &
render->ID3DXRenderToSurface_iface;
455 IDirect3DSurface9 *cube_surface;
460 if (
FAILED(
hr))
ERR(
"Copying render target data to surface failed %#x\n",
hr);
479 IUnknown_AddRef(iface);
495 TRACE(
"%p increasing refcount to %u\n", iface,
ref);
505 TRACE(
"%p decreasing refcount to %u\n", iface,
ref);
525 IDirect3DDevice9 **
device)
552 IDirect3DCubeTexture9 *
texture)
577 if (
render->desc.DepthStencil)
610 IDirect3DTexture9 *pos_z_texture,
611 IDirect3DTexture9 *neg_z_texture)
613 FIXME(
"(%p)->(%p, %p): stub\n", iface, pos_z_texture, neg_z_texture);
618 IDirect3DTexture9 *pos_z_texture,
619 IDirect3DTexture9 *neg_z_texture)
621 FIXME(
"(%p)->(%p, %p): stub\n", iface, pos_z_texture, neg_z_texture);
638 if (
render->render_target)
651 for (
i = 1;
i <
render->previous_device_state.num_render_targets;
i++)
654 if (!
render->render_target)
690 if (
render->render_target)
699 if (
render->render_target)
705 if (
render->depth_stencil)
720 FIXME(
"(%p)->(): stub\n", iface);
726 FIXME(
"(%p)->(): stub\n", iface);
755 ID3DXRenderToEnvMap **
out)
760 TRACE(
"(%p, %u, %u, %#x, %d, %#x, %p)\n",
device,
size, mip_levels,
776 render->desc.MipLevels = mip_levels;
779 render->desc.DepthStencilFormat = depth_stencil_format;
796 *
out = &
render->ID3DXRenderToEnvMap_iface;
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define D3DUSAGE_RENDERTARGET
enum _D3DFORMAT D3DFORMAT
enum _D3DCUBEMAP_FACES D3DCUBEMAP_FACES
enum _D3DMULTISAMPLE_TYPE D3DMULTISAMPLE_TYPE
#define IDirect3DDevice9_EndScene(p)
#define IDirect3DDevice9_BeginScene(p)
#define IDirect3DCubeTexture9_AddRef(p)
#define IDirect3DDevice9_SetViewport(p, a)
#define IDirect3DDevice9_SetRenderTarget(p, a, b)
#define IDirect3DDevice9_SetDepthStencilSurface(p, a)
#define IDirect3DDevice9_CreateDepthStencilSurface(p, a, b, c, d, e, f, g, h)
#define IDirect3DDevice9_GetDeviceCaps(p, a)
#define IDirect3DDevice9_GetViewport(p, a)
#define IDirect3DSurface9_AddRef(p)
#define IDirect3DCubeTexture9_GetLevelDesc(p, a, b)
#define IDirect3DSurface9_GetDesc(p, a)
#define IDirect3DDevice9_Release(p)
#define IDirect3DDevice9_GetDepthStencilSurface(p, a)
#define IDirect3DSurface9_Release(p)
#define IDirect3DCubeTexture9_GetCubeMapSurface(p, a, b, c)
#define IDirect3DDevice9_AddRef(p)
#define IDirect3DDevice9_CreateRenderTarget(p, a, b, c, d, e, f, g, h)
#define IDirect3DDevice9_GetRenderTarget(p, a, b)
#define D3DERR_INVALIDCALL
static struct render_to_envmap * impl_from_ID3DXRenderToEnvMap(ID3DXRenderToEnvMap *iface)
static HRESULT WINAPI D3DXRenderToSurface_OnLostDevice(ID3DXRenderToSurface *iface)
static HRESULT WINAPI D3DXRenderToSurface_BeginScene(ID3DXRenderToSurface *iface, IDirect3DSurface9 *surface, const D3DVIEWPORT9 *viewport)
static ULONG WINAPI D3DXRenderToSurface_Release(ID3DXRenderToSurface *iface)
static HRESULT WINAPI D3DXRenderToEnvMap_OnLostDevice(ID3DXRenderToEnvMap *iface)
static HRESULT WINAPI D3DXRenderToEnvMap_Face(ID3DXRenderToEnvMap *iface, D3DCUBEMAP_FACES face, DWORD filter)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginHemisphere(ID3DXRenderToEnvMap *iface, IDirect3DTexture9 *pos_z_texture, IDirect3DTexture9 *neg_z_texture)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginParabolic(ID3DXRenderToEnvMap *iface, IDirect3DTexture9 *pos_z_texture, IDirect3DTexture9 *neg_z_texture)
static HRESULT WINAPI D3DXRenderToEnvMap_GetDesc(ID3DXRenderToEnvMap *iface, D3DXRTE_DESC *desc)
static HRESULT WINAPI D3DXRenderToSurface_EndScene(ID3DXRenderToSurface *iface, DWORD filter)
static HRESULT WINAPI D3DXRenderToSurface_OnResetDevice(ID3DXRenderToSurface *iface)
static ULONG WINAPI D3DXRenderToSurface_AddRef(ID3DXRenderToSurface *iface)
static ULONG WINAPI D3DXRenderToEnvMap_AddRef(ID3DXRenderToEnvMap *iface)
HRESULT WINAPI D3DXCreateRenderToEnvMap(IDirect3DDevice9 *device, UINT size, UINT mip_levels, D3DFORMAT format, BOOL depth_stencil, D3DFORMAT depth_stencil_format, ID3DXRenderToEnvMap **out)
static const ID3DXRenderToSurfaceVtbl render_to_surface_vtbl
static void device_state_capture(IDirect3DDevice9 *device, struct device_state *state)
static struct render_to_surface * impl_from_ID3DXRenderToSurface(ID3DXRenderToSurface *iface)
static ULONG WINAPI D3DXRenderToEnvMap_Release(ID3DXRenderToEnvMap *iface)
static HRESULT WINAPI D3DXRenderToEnvMap_QueryInterface(ID3DXRenderToEnvMap *iface, REFIID riid, void **out)
static HRESULT WINAPI D3DXRenderToEnvMap_GetDevice(ID3DXRenderToEnvMap *iface, IDirect3DDevice9 **device)
static HRESULT WINAPI D3DXRenderToSurface_GetDevice(ID3DXRenderToSurface *iface, IDirect3DDevice9 **device)
HRESULT WINAPI D3DXCreateRenderToSurface(IDirect3DDevice9 *device, UINT width, UINT height, D3DFORMAT format, BOOL depth_stencil, D3DFORMAT depth_stencil_format, ID3DXRenderToSurface **out)
static HRESULT device_state_init(IDirect3DDevice9 *device, struct device_state *state)
static HRESULT WINAPI D3DXRenderToSurface_QueryInterface(ID3DXRenderToSurface *iface, REFIID riid, void **out)
static void device_state_restore(IDirect3DDevice9 *device, struct device_state *state)
static void copy_render_target_to_cube_texture_face(IDirect3DCubeTexture9 *cube_texture, D3DCUBEMAP_FACES face, IDirect3DSurface9 *render_target, DWORD filter)
static void device_state_release(struct device_state *state)
static HRESULT WINAPI D3DXRenderToSurface_GetDesc(ID3DXRenderToSurface *iface, D3DXRTS_DESC *desc)
static HRESULT WINAPI D3DXRenderToEnvMap_End(ID3DXRenderToEnvMap *iface, DWORD filter)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginSphere(ID3DXRenderToEnvMap *iface, IDirect3DTexture9 *texture)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginCube(ID3DXRenderToEnvMap *iface, IDirect3DCubeTexture9 *texture)
static const ID3DXRenderToEnvMapVtbl render_to_envmap_vtbl
static HRESULT WINAPI D3DXRenderToEnvMap_OnResetDevice(ID3DXRenderToEnvMap *iface)
HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key)
HRESULT WINAPI D3DXFilterTexture(IDirect3DBaseTexture9 *texture, const PALETTEENTRY *palette, UINT srclevel, DWORD filter)
HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
#define HeapFree(x, y, z)
static void cleanup(void)
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLuint GLint GLenum face
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR desc[]
#define IsEqualGUID(rguid1, rguid2)
D3DMULTISAMPLE_TYPE MultiSampleType
IDirect3DSurface9 * render_target
IDirect3DSurface9 * depth_stencil
IDirect3DSurface9 ** render_targets
IDirect3DSurface9 * render_target
IDirect3DDevice9 * device
struct device_state previous_device_state
IDirect3DCubeTexture9 * dst_cube_texture
ID3DXRenderToEnvMap ID3DXRenderToEnvMap_iface
IDirect3DSurface9 * depth_stencil
IDirect3DSurface9 * depth_stencil
ID3DXRenderToSurface ID3DXRenderToSurface_iface
IDirect3DDevice9 * device
IDirect3DSurface9 * dst_surface
struct device_state previous_state
IDirect3DSurface9 * render_target
#define CONTAINING_RECORD(address, type, field)