Commit e31ae926 authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

- some D3D8 fixes

- beginning of shaders support (Vertex and Pixel Shaders 1.1 on DirectX8) - beginning of D3DX8 support the D3D8 utility API (very basic, only the core header)
parent 0df7b24b
......@@ -1366,6 +1366,7 @@ dlls/commdlg/Makefile
dlls/crtdll/Makefile
dlls/crypt32/Makefile
dlls/d3d8/Makefile
dlls/d3dx8/Makefile
dlls/dciman32/Makefile
dlls/ddraw/Makefile
dlls/devenum/Makefile
......
......@@ -8,7 +8,7 @@ VPATH = @srcdir@
# special configure-dependent targets
GLU32FILES = glu32
OPENGLFILES = d3d8 opengl32
OPENGLFILES = d3d8 d3dx8 opengl32
XFILES = ddraw x11drv
EXTRADIRS = @GLU32FILES@ @OPENGLFILES@ @XFILES@
......@@ -112,6 +112,7 @@ BASEDIRS = \
SUBDIRS = \
$(BASEDIRS) \
d3d8 \
d3dx8 \
ddraw \
glu32 \
opengl32 \
......@@ -301,6 +302,9 @@ crypt32.dll$(DLLEXT): crypt32/crypt32.dll$(DLLEXT)
d3d8.dll$(DLLEXT): d3d8/d3d8.dll$(DLLEXT)
$(RM) $@ && $(LN_S) d3d8/d3d8.dll$(DLLEXT) $@
d3dx8.dll$(DLLEXT): d3dx8/d3dx8.dll$(DLLEXT)
$(RM) $@ && $(LN_S) d3dx8/d3dx8.dll$(DLLEXT) $@
dciman32.dll$(DLLEXT): dciman32/dciman32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dciman32/dciman32.dll$(DLLEXT) $@
......@@ -585,6 +589,7 @@ IMPORT_LIBS = \
libcrtdll \
libcrypt32 \
libd3d8 \
libd3dx8 \
libdciman32 \
libddraw \
libdevenum \
......@@ -705,6 +710,11 @@ libd3d8.def: d3d8/d3d8.spec.def
libd3d8.a: d3d8/d3d8.spec.def
$(DLLTOOL) -k -l $@ -d d3d8/d3d8.spec.def
libd3dx8.def: d3dx8/d3dx8.spec.def
$(RM) $@ && $(LN_S) d3dx8/d3dx8.spec.def $@
libd3dx8.a: d3dx8/d3dx8.spec.def
$(DLLTOOL) -k -l $@ -d d3dx8/d3dx8.spec.def
libdciman32.def: dciman32/dciman32.spec.def
$(RM) $@ && $(LN_S) dciman32/dciman32.spec.def $@
libdciman32.a: dciman32/dciman32.spec.def
......@@ -1060,6 +1070,7 @@ commdlg/comdlg32.spec.def: $(WINEBUILD)
crtdll/crtdll.spec.def: $(WINEBUILD)
crypt32/crypt32.spec.def: $(WINEBUILD)
d3d8/d3d8.spec.def: $(WINEBUILD)
d3dx8/d3dx8.spec.def: $(WINEBUILD)
dciman32/dciman32.spec.def: $(WINEBUILD)
ddraw/ddraw.spec.def: $(WINEBUILD)
devenum/devenum.spec.def: $(WINEBUILD)
......@@ -1145,6 +1156,7 @@ commdlg/comdlg32.dll$(DLLEXT): commdlg
crtdll/crtdll.dll$(DLLEXT): crtdll
crypt32/crypt32.dll$(DLLEXT): crypt32
d3d8/d3d8.dll$(DLLEXT): d3d8
d3dx8/d3dx8.dll$(DLLEXT): d3dx8
dciman32/dciman32.dll$(DLLEXT): dciman32
ddraw/ddraw.dll$(DLLEXT): ddraw
devenum/devenum.dll$(DLLEXT): devenum
......@@ -1246,6 +1258,7 @@ commdlg/__install__: comdlg32.dll$(DLLEXT)
crtdll/__install__: crtdll.dll$(DLLEXT)
crypt32/__install__: crypt32.dll$(DLLEXT)
d3d8/__install__: d3d8.dll$(DLLEXT)
d3dx8/__install__: d3dx8.dll$(DLLEXT)
dciman32/__install__: dciman32.dll$(DLLEXT)
ddraw/__install__: ddraw.dll$(DLLEXT)
devenum/__install__: devenum.dll$(DLLEXT)
......
......@@ -18,6 +18,7 @@ C_SRCS = \
directx.c \
indexbuffer.c \
resource.c \
shader.c \
surface.c \
swapchain.c \
texture.c \
......
......@@ -28,13 +28,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
/* IDirect3DBaseTexture8 IUnknown parts follow: */
/* IDirect3DBaseTexture8 (Inherited from IUnknown) */
HRESULT WINAPI IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
TRACE("(%p) : QueryInterface\n", This);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DResource8)
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture8)) {
IDirect3DBaseTexture8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......@@ -59,7 +60,7 @@ ULONG WINAPI IDirect3DBaseTexture8Impl_Release(LPDIRECT3DBASETEXTURE8 iface) {
return ref;
}
/* IDirect3DBaseTexture8 IDirect3DResource8 Interface follow: */
/* IDirect3DBaseTexture8 (Inherited from IDirect3DResource8) */
HRESULT WINAPI IDirect3DBaseTexture8Impl_GetDevice(LPDIRECT3DBASETEXTURE8 iface, IDirect3DDevice8** ppDevice) {
ICOM_THIS(IDirect3DBaseTexture8Impl,iface);
TRACE("(%p) : returning %p\n", This, This->Device);
......
......@@ -34,7 +34,9 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_QueryInterface(LPDIRECT3DCUBETEXTURE8 i
ICOM_THIS(IDirect3DCubeTexture8Impl,iface);
TRACE("(%p) : QueryInterface\n", This);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DResource8)
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture8)
|| IsEqualGUID(riid, &IID_IDirect3DCubeTexture8)) {
IDirect3DCubeTexture8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......@@ -68,7 +70,7 @@ ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 iface) {
return ref;
}
/* IDirect3DCubeTexture8 IDirect3DResource8 Interface follow: */
/* IDirect3DCubeTexture8 (Inherited from IDirect3DResource8) */
HRESULT WINAPI IDirect3DCubeTexture8Impl_GetDevice(LPDIRECT3DCUBETEXTURE8 iface, IDirect3DDevice8** ppDevice) {
ICOM_THIS(IDirect3DCubeTexture8Impl,iface);
TRACE("(%p) : returning %p\n", This, This->Device);
......@@ -109,11 +111,13 @@ D3DRESOURCETYPE WINAPI IDirect3DCubeTexture8Impl_GetType(LPDIRECT3DCUBETEXTURE8
/* IDirect3DCubeTexture8 (Inherited from IDirect3DBaseTexture8) */
DWORD WINAPI IDirect3DCubeTexture8Impl_SetLOD(LPDIRECT3DCUBETEXTURE8 iface, DWORD LODNew) {
ICOM_THIS(IDirect3DCubeTexture8Impl,iface);
FIXME("(%p) : stub\n", This); return D3D_OK;
FIXME("(%p) : stub\n", This);
return D3D_OK;
}
DWORD WINAPI IDirect3DCubeTexture8Impl_GetLOD(LPDIRECT3DCUBETEXTURE8 iface) {
ICOM_THIS(IDirect3DCubeTexture8Impl,iface);
FIXME("(%p) : stub\n", This); return D3D_OK;
FIXME("(%p) : stub\n", This);
return D3D_OK;
}
DWORD WINAPI IDirect3DCubeTexture8Impl_GetLevelCount(LPDIRECT3DCUBETEXTURE8 iface) {
......@@ -133,7 +137,6 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXT
}
return D3D_OK;
}
HRESULT WINAPI IDirect3DCubeTexture8Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,UINT Level,IDirect3DSurface8** ppCubeMapSurface) {
ICOM_THIS(IDirect3DCubeTexture8Impl,iface);
TRACE("(%p) : returning %p\n", This, This->surfaces[FaceType][Level]);
......
......@@ -22,6 +22,7 @@
#include "winuser.h"
#include "wine/debug.h"
#include "d3d8.h"
#include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
......@@ -29,18 +30,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
void (*wine_tsx11_lock_ptr)(void) = NULL;
void (*wine_tsx11_unlock_ptr)(void) = NULL;
HRESULT WINAPI ValidatePixelShader(void)
{
FIXME("(void): stub\n");
return 0;
}
HRESULT WINAPI ValidateVertexShader(void)
{
FIXME("(void): stub\n");
return 0;
}
HRESULT WINAPI D3D8GetSWInfo(void)
{
FIXME("(void): stub\n");
......
......@@ -63,7 +63,7 @@ HRESULT WINAPI IDirect3D8Impl_QueryInterface(LPDIRECT3D8 iface,REFIID riid,LPVOI
ICOM_THIS(IDirect3D8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3D8)) {
IDirect3D8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......
......@@ -34,7 +34,8 @@ HRESULT WINAPI IDirect3DIndexBuffer8Impl_QueryInterface(LPDIRECT3DINDEXBUFFER8 i
ICOM_THIS(IDirect3DIndexBuffer8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DResource8)
|| IsEqualGUID(riid, &IID_IDirect3DIndexBuffer8)) {
IDirect3DIndexBuffer8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......@@ -55,8 +56,8 @@ ULONG WINAPI IDirect3DIndexBuffer8Impl_Release(LPDIRECT3DINDEXBUFFER8 iface) {
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0) {
HeapFree(GetProcessHeap(), 0, This);
HeapFree(GetProcessHeap(), 0, This->allocatedMemory);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
......@@ -106,7 +107,7 @@ HRESULT WINAPI IDirect3DIndexBuffer8Impl_Lock(LPDIRECT3DINDEXBUFFER8 ifa
} else {
FIXME("(%p) : stub, offset %d, size %d, Flags=%lx\n", This, OffsetToLock, SizeToLock, Flags);
}
*ppbData = This->allocatedMemory;
*ppbData = This->allocatedMemory + OffsetToLock;
return D3D_OK;
}
......
/*
* shaders implementation
*
* Copyright 2002 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include <math.h>
#include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
typedef void (*shader_fct0_t)(void);
typedef void (*shader_fct1_t)(SHADER8Vector*);
typedef void (*shader_fct2_t)(SHADER8Vector*,SHADER8Vector*);
typedef void (*shader_fct3_t)(SHADER8Vector*,SHADER8Vector*,SHADER8Vector*);
typedef void (*shader_fct4_t)(SHADER8Vector*,SHADER8Vector*,SHADER8Vector*,SHADER8Vector*);
/*
typedef union shader_fct {
shader_fct0_t fct0;
shader_fct1_t fct1;
shader_fct2_t fct2;
shader_fct3_t fct3;
shader_fct4_t fct4;
} shader_fct;
*/
typedef void (*shader_fct)();
typedef struct shader_opcode {
CONST BYTE opcode;
const char* name;
CONST UINT num_params;
shader_fct soft_fct;
/*
union {
shader_fct0_t fct0;
shader_fct1_t fct1;
shader_fct2_t fct2;
shader_fct3_t fct3;
shader_fct4_t fct4;
} shader_fct;
*/
} shader_opcode;
typedef struct vshader_input_data {
/*SHADER8Vector V[16];//0-15 */
SHADER8Vector V0;
SHADER8Vector V1;
SHADER8Vector V2;
SHADER8Vector V3;
SHADER8Vector V4;
SHADER8Vector V5;
SHADER8Vector V6;
SHADER8Vector V7;
SHADER8Vector V8;
SHADER8Vector V9;
SHADER8Vector V10;
SHADER8Vector V11;
SHADER8Vector V12;
SHADER8Vector V13;
SHADER8Vector V14;
SHADER8Vector V15;
} vshader_input_data;
typedef struct vshader_output_data {
SHADER8Vector oPos;
/*SHADER8Vector oD[2];//0-1 */
SHADER8Vector oD0;
SHADER8Vector oD1;
/*SHADER8Vector oT[4];//0-3 */
SHADER8Vector oT0;
SHADER8Vector oT1;
SHADER8Vector oT2;
SHADER8Vector oT3;
SHADER8Scalar oFog;
SHADER8Scalar oPts;
} vshader_output_data;
/*********************
* vshader software VM
*/
void vshader_add(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = s0->x + s1->x;
d->y = s0->y + s1->y;
d->z = s0->z + s1->z;
d->w = s0->w + s1->w;
}
void vshader_dp3(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = d->y = d->z = d->w = s0->x * s1->x + s0->y * s1->y + s0->z * s1->z;
}
void vshader_dp4(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = d->y = d->z = d->w = s0->x * s1->x + s0->y * s1->y + s0->z * s1->z + s0->w * s1->w;
}
void vshader_dst(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = 1;
d->y = s0->y * s1->y;
d->z = s0->z;
d->w = s1->w;
}
void vshader_expp(SHADER8Vector* d, SHADER8Vector* s0) {
float tmp_f = floorf(s0->w);
d->x = pow(2, tmp_f);
d->y = s0->w - tmp_f;
d->z = pow(2, s0->w);
d->w = 1;
}
void vshader_lit(SHADER8Vector* d, SHADER8Vector* s0) {
d->x = 1;
d->y = (0 < s0->x) ? s0->x : 0;
d->z = (0 < s0->x && 0 < s0->y) ? pow(s0->y, s0->w) : 0;
d->w = 1;
}
void vshader_logp(SHADER8Vector* d, SHADER8Vector* s0) {
d->x = d->y = d->z = d->w = (0 != s0->w) ? log(fabsf(s0->w))/log(2) : HUGE;
}
void vshader_mad(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1, SHADER8Vector* s2) {
d->x = s0->x * s1->x + s2->x;
d->y = s0->y * s1->y + s2->y;
d->z = s0->z * s1->z + s2->z;
d->w = s0->w * s1->w + s2->w;
}
void vshader_max(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = (s0->x >= s1->x) ? s0->x : s1->x;
d->y = (s0->y >= s1->y) ? s0->y : s1->y;
d->z = (s0->z >= s1->z) ? s0->z : s1->z;
d->w = (s0->w >= s1->w) ? s0->w : s1->w;
}
void vshader_min(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = (s0->x < s1->x) ? s0->x : s1->x;
d->y = (s0->y < s1->y) ? s0->y : s1->y;
d->z = (s0->z < s1->z) ? s0->z : s1->z;
d->w = (s0->w < s1->w) ? s0->w : s1->w;
}
void vshader_mov(SHADER8Vector* d, SHADER8Vector* s0) {
d->x = s0->x;
d->y = s0->y;
d->z = s0->z;
d->w = s0->w;
}
void vshader_mul(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = s0->x * s1->x;
d->y = s0->y * s1->y;
d->z = s0->z * s1->z;
d->w = s0->w * s1->w;
}
void vshader_nop(void) {
/* NOPPPP ahhh too easy ;) */
}
void vshader_rcp(SHADER8Vector* d, SHADER8Vector* s0) {
d->x = d->y = d->z = d->w = (0 == s0->w) ? HUGE : 1 / s0->w;
}
void vshader_rsq(SHADER8Vector* d, SHADER8Vector* s0) {
d->x = d->y = d->z = d->w = (0 == s0->w) ? HUGE : 1 / sqrt(fabsf(s0->w));
}
void vshader_sge(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = (s0->x >= s1->x) ? 1 : 0;
d->y = (s0->y >= s1->y) ? 1 : 0;
d->z = (s0->z >= s1->z) ? 1 : 0;
d->w = (s0->w >= s1->w) ? 1 : 0;
}
void vshader_slt(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = (s0->x < s1->x) ? 1 : 0;
d->y = (s0->y < s1->y) ? 1 : 0;
d->z = (s0->z < s1->z) ? 1 : 0;
d->w = (s0->w < s1->w) ? 1 : 0;
}
void vshader_sub(SHADER8Vector* d, SHADER8Vector* s0, SHADER8Vector* s1) {
d->x = s0->x - s1->x;
d->y = s0->y - s1->y;
d->z = s0->z - s1->z;
d->w = s0->w - s1->w;
}
/**
* log, exp, frc, m*x* seems to be macros ins ... to see
*
* @TODO: find this fucking really opcodes values
*/
static CONST shader_opcode vshader_ins [] =
{
{0, "mov", 2, vshader_mov},
{0, "max", 3, vshader_max},
{0, "min", 3, vshader_min},
{0, "sge", 3, vshader_sge},
{0, "slt", 3, vshader_slt},
{0, "add", 3, vshader_add},
{0, "sub", 3, vshader_sub},
{0, "mul", 3, vshader_mul},
{0, "rcp", 2, vshader_rcp},
{0, "mad", 4, vshader_mad},
{0, "dp3", 3, vshader_dp3},
{0, "dp4", 3, vshader_dp4},
{0, "rsq", 2, vshader_rsq},
{0, "dst", 3, vshader_dst},
{0, "lit", 2, vshader_lit},
{0, "expp", 2, vshader_expp},
{0, "logp", 2, vshader_logp},
{0, "nop", 0, vshader_nop},
{0, NULL, 0, NULL}
};
shader_opcode* vshader_get_opcode(const DWORD code) {
return NULL;
}
/**
* Function parser ...
*/
BOOL vshader_parse_function(const DWORD* function) {
return TRUE;
}
BOOL vshader_hardware_execute_function(VERTEXSHADER8* vshader,
const vshader_input_data* input,
vshader_output_data* output) {
/**
* TODO: use the GL_NV_vertex_program
* and specifics vendors variants for it
*/
return TRUE;
}
BOOL vshader_software_execute_function(VERTEXSHADER8* vshader,
const vshader_input_data* input,
vshader_output_data* output) {
/** Vertex Shader Temporary Registers */
/*SHADER8Vector R[12];*/
/*SHADER8Scalar A0;*/
/** temporary Vector for modifier management */
/*SHADER8Vector d;*/
/** parser datas */
const DWORD* pToken = vshader->function;
shader_opcode* curOpcode = NULL;
/* the first dword is the version tag */
/* TODO: parse it */
++pToken;
while (0xFFFFFFFF != *pToken) {
curOpcode = vshader_get_opcode(*pToken);
++pToken;
if (NULL == curOpcode) {
/* unkown current opcode ... */
return FALSE;
}
if (curOpcode->num_params > 0) {
/* TODO */
}
}
return TRUE;
}
/**
* Declaration Parser First draft ...
*/
#if 0
static CONST char* vshader_decl [] =
{
"D3DVSDT_D3DCOLOR",
"D3DVSDT_FLOAT1",
"D3DVSDT_FLOAT2",
"D3DVSDT_FLOAT3",
"D3DVSDT_FLOAT4",
"D3DVSDT_UBYTE4",
NULL
};
#endif
/** Vertex Shader Declaration parser tokens */
enum D3DVSD_TOKENS {
D3DVSD_STREAM,
D3DVSD_END
};
BOOL vshader_parse_declaration(VERTEXSHADER8* vshader) {
/** parser data */
const DWORD* pToken = vshader->decl;
++pToken;
while (0xFFFFFFFF != *pToken) {
/** TODO */
++pToken;
}
return TRUE;
}
HRESULT WINAPI ValidatePixelShader(void) {
FIXME("(void): stub\n");
return 0;
}
HRESULT WINAPI ValidateVertexShader(void) {
FIXME("(void): stub\n");
return 0;
}
......@@ -34,7 +34,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_QueryInterface(LPDIRECT3DSURFACE8 iface,REF
ICOM_THIS(IDirect3DSurface8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DSurface8)) {
IDirect3DSurface8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......
......@@ -34,7 +34,7 @@ HRESULT WINAPI IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN8 iface
ICOM_THIS(IDirect3DSwapChain8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DSwapChain8)) {
IDirect3DSwapChain8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......
......@@ -34,7 +34,9 @@ HRESULT WINAPI IDirect3DTexture8Impl_QueryInterface(LPDIRECT3DTEXTURE8 iface,REF
ICOM_THIS(IDirect3DTexture8Impl,iface);
TRACE("(%p) : QueryInterface\n", This);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DResource8)
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture8)
|| IsEqualGUID(riid, &IID_IDirect3DTexture8)) {
IDirect3DTexture8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......
......@@ -29,12 +29,13 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
/* IDirect3DResource IUnknown parts follow: */
HRESULT WINAPI IDirect3DVertexBuffer8Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER8 iface,REFIID riid,LPVOID *ppobj)
HRESULT WINAPI IDirect3DVertexBuffer8Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER8 iface, REFIID riid, LPVOID *ppobj)
{
ICOM_THIS(IDirect3DVertexBuffer8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DResource8)
|| IsEqualGUID(riid, &IID_IDirect3DVertexBuffer8)) {
IDirect3DVertexBuffer8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......@@ -55,7 +56,7 @@ ULONG WINAPI IDirect3DVertexBuffer8Impl_Release(LPDIRECT3DVERTEXBUFFER8 iface) {
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0) {
HeapFree(GetProcessHeap(), 0, This->allocatedMemory);
if (NULL != This->allocatedMemory) HeapFree(GetProcessHeap(), 0, This->allocatedMemory);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
......@@ -101,9 +102,9 @@ D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer8Impl_GetType(LPDIRECT3DVERTEXBUFFER
/* IDirect3DVertexBuffer8 */
HRESULT WINAPI IDirect3DVertexBuffer8Impl_Lock(LPDIRECT3DVERTEXBUFFER8 iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags) {
ICOM_THIS(IDirect3DVertexBuffer8Impl,iface);
if (OffsetToLock) FIXME("(%p) : with non-zero offset!!\n", This);
TRACE("(%p) : returning memory of %p\n", This, This->allocatedMemory);
*ppbData = This->allocatedMemory;
TRACE("(%p) : returning memory of %p (base:%p,offset:%u)\n", This, This->allocatedMemory + OffsetToLock, This->allocatedMemory, OffsetToLock);
/* TODO: check Flags compatibility with This->currentDesc.Usage (see MSDN) */
*ppbData = This->allocatedMemory + OffsetToLock;
return D3D_OK;
}
HRESULT WINAPI IDirect3DVertexBuffer8Impl_Unlock(LPDIRECT3DVERTEXBUFFER8 iface) {
......
......@@ -34,7 +34,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 iface,REFII
ICOM_THIS(IDirect3DVolume8Impl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory)) {
|| IsEqualGUID(riid, &IID_IDirect3DVolume8)) {
IDirect3DVolume8Impl_AddRef(iface);
*ppobj = This;
return D3D_OK;
......
Makefile
d3dx8.dll.dbg.c
d3dx8.spec.c
d3dx8.spec.def
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = d3dx8.dll
IMPORTS = d3d8 user32 gdi32 kernel32
EXTRAINCL = @X_CFLAGS@
EXTRALIBS = $(LIBUUID) @X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ @OPENGL_LIBS@
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
d3dx8_main.c \
d3dxbuffer.c
@MAKE_DLL_RULES@
### Dependencies:
@ stdcall D3DXCreateBuffer(long ptr) D3DXCreateBuffer
@ stdcall D3DXCreateFont(ptr ptr ptr) D3DXCreateFont
@ stdcall D3DXGetFVFVertexSize(long) D3DXGetFVFVertexSize
@ stdcall D3DXAssembleShader(ptr long long ptr ptr ptr) D3DXAssembleShader
@ stdcall D3DXAssembleShaderFromFileA(ptr long ptr ptr ptr) D3DXAssembleShaderFromFileA
@ stdcall D3DXAssembleShaderFromFileW(ptr long ptr ptr ptr) D3DXAssembleShaderFromFileW
/*
* Direct3D X 8 main file
*
* Copyright (C) 2002 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "config.h"
#include "wine/port.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "d3dx8core.h"
#include "d3dx8core_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
HRESULT D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) {
ID3DXBufferImpl *object;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXBufferImpl));
if (NULL == object) {
*ppBuffer = (LPD3DXBUFFER)NULL;
return E_OUTOFMEMORY;
}
object->lpVtbl = &D3DXBuffer_Vtbl;
object->ref = 1;
object->bufferSize = NumBytes;
object->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, NumBytes);
if (NULL == object->buffer) {
HeapFree(GetProcessHeap(), 0, object);
*ppBuffer = (LPD3DXBUFFER)NULL;
return E_OUTOFMEMORY;
}
*ppBuffer = (LPD3DXBUFFER)object;
return D3D_OK;
}
HRESULT D3DXCreateFont(LPDIRECT3DDEVICE8 pDevice, HFONT hFont, LPD3DXFONT* ppFont) {
FIXME("(void): stub\n");
return D3D_OK;
}
UINT D3DXGetFVFVertexSize(DWORD FVF) {
FIXME("(void): stub\n");
return 0;
}
HRESULT D3DXAssembleShader(LPCVOID pSrcData, UINT SrcDataLen, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors) {
FIXME("(void): stub\n");
return D3D_OK;
}
HRESULT D3DXAssembleShaderFromFileA(LPSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors) {
FIXME("(void): stub\n");
return D3D_OK;
}
HRESULT D3DXAssembleShaderFromFileW(LPSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors) {
FIXME("(void): stub\n");
return D3D_OK;
}
/*
* Direct3D X 8 private include file
*
* Copyright 2002 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_D3DX8CORE_PRIVATE_H
#define __WINE_D3DX8CORE_PRIVATE_H
#include "d3dx8core.h"
/* Interfaces */
typedef struct ID3DXBufferImpl ID3DXBufferImpl;
typedef struct ID3DXFontImpl ID3DXFontImpl;
/* ----------- */
/* ID3DXBuffer */
/* ----------- */
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(ID3DXBuffer) D3DXBuffer_Vtbl;
/*****************************************************************************
* ID3DXBufferImpl implementation structure
*/
struct ID3DXBufferImpl
{
/* IUnknown fields */
ICOM_VFIELD(ID3DXBuffer);
DWORD ref;
/* ID3DXBuffer fields */
DWORD *buffer;
DWORD bufferSize;
};
/* IUnknown: */
extern HRESULT WINAPI ID3DXBufferImpl_QueryInterface(LPD3DXBUFFER iface, REFIID refiid, LPVOID *obj);
extern ULONG WINAPI ID3DXBufferImpl_AddRef(LPD3DXBUFFER iface);
extern ULONG WINAPI ID3DXBufferImpl_Release(LPD3DXBUFFER iface);
/* ID3DXBuffer: */
extern LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(LPD3DXBUFFER iface);
extern DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface);
/* --------- */
/* ID3DXFont */
/* --------- */
/*****************************************************************************
* Predeclare the interface implementation structures
*/
extern ICOM_VTABLE(ID3DXFont) D3DXFont_Vtbl;
/*****************************************************************************
* ID3DXFontImpl implementation structure
*/
struct ID3DXFontImpl
{
/* IUnknown fields */
ICOM_VFIELD(ID3DXFont);
DWORD ref;
/* ID3DXFont fields */
};
/* IUnknown: */
extern HRESULT WINAPI ID3DXFontImpl_QueryInterface(LPD3DXFONT iface, REFIID refiid, LPVOID *obj);
extern ULONG WINAPI ID3DXFontImpl_AddRef(LPD3DXFONT iface);
extern ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface);
/* ID3DXFont: */
extern INT WINAPI ID3DXFontImpl_DrawTextA(LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color);
#endif /*__WINE_D3DX8CORE_PRIVATE_H */
/*
* ID3DXBuffer implementation
*
* Copyright 2002 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "d3d8.h"
#include "d3dx8core_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
/* ID3DXBuffer IUnknown parts follow: */
HRESULT WINAPI ID3DXBufferImpl_QueryInterface(LPD3DXBUFFER iface, REFIID riid, LPVOID* ppobj) {
ICOM_THIS(ID3DXBufferImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_ID3DXBuffer)) {
ID3DXBufferImpl_AddRef(iface);
*ppobj = This;
return D3D_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
}
ULONG WINAPI ID3DXBufferImpl_AddRef(LPD3DXBUFFER iface) {
ICOM_THIS(ID3DXBufferImpl,iface);
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
return ++(This->ref);
}
ULONG WINAPI ID3DXBufferImpl_Release(LPD3DXBUFFER iface) {
ICOM_THIS(ID3DXBufferImpl,iface);
ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0) {
if (NULL != This->buffer) HeapFree(GetProcessHeap(), 0, This->buffer);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
}
/* ID3DXBuffer Interface follow: */
LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(LPD3DXBUFFER iface) {
ICOM_THIS(ID3DXBufferImpl,iface);
return This->buffer;
}
DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface) {
ICOM_THIS(ID3DXBufferImpl,iface);
return This->bufferSize;
}
ICOM_VTABLE(ID3DXBuffer) D3DXBuffer_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
ID3DXBufferImpl_QueryInterface,
ID3DXBufferImpl_AddRef,
ID3DXBufferImpl_Release,
ID3DXBufferImpl_GetBufferPointer,
ID3DXBufferImpl_GetBufferSize
};
......@@ -36,6 +36,7 @@ my %special_dlls =
"glu32" => "GLU32FILES",
"opengl32" => "OPENGLFILES",
"d3d8" => "OPENGLFILES",
"d3dx8" => "OPENGLFILES",
"x11drv" => "XFILES"
);
......
......@@ -27,6 +27,7 @@ WINDOWS_INCLUDES = \
d3dhal.h \
d3dtypes.h \
d3dvec.inl \
d3dx8core.h \
dde.h \
ddeml.h \
ddraw.h \
......
......@@ -151,6 +151,83 @@
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
/** VertexShader Declaration */
typedef enum _D3DVSD_TOKENTYPE {
D3DVSD_TOKEN_NOP,
D3DVSD_TOKEN_STREAM,
D3DVSD_TOKEN_STREAMDATA,
D3DVSD_TOKEN_TESSELLATOR,
D3DVSD_TOKEN_CONSTMEM,
D3DVSD_TOKEN_EXT,
D3DVSD_TOKEN_END,
D3DVSD_FORCE_DWORD = 0x7FFFFFFF
} D3DVSD_TOKENTYPE;
/* Address of the vertex register. 0 - 16 */
typedef enum _D3DVSDE_REGISTER {
D3DVSDE_POSITION = 0,
D3DVSDE_BLENDWEIGHT = 1,
D3DVSDE_BLENDINDICES = 2,
D3DVSDE_NORMAL = 3,
D3DVSDE_PSIZE = 4,
D3DVSDE_DIFFUSE = 5,
D3DVSDE_SPECULAR = 6,
D3DVSDE_TEXCOORD0 = 7,
D3DVSDE_TEXCOORD1 = 8,
D3DVSDE_TEXCOORD2 = 9,
D3DVSDE_TEXCOORD3 = 10,
D3DVSDE_TEXCOORD4 = 11,
D3DVSDE_TEXCOORD5 = 12,
D3DVSDE_TEXCOORD6 = 13,
D3DVSDE_TEXCOORD7 = 14,
D3DVSDE_POSITION2 = 15,
D3DVSDE_NORMAL2 = 16
} D3DVSDE_REGISTER;
typedef enum _D3DVSDT_TYPE {
D3DVSDT_FLOAT1 = 0x00,
D3DVSDT_FLOAT2 = 0x01,
D3DVSDT_FLOAT3 = 0x02,
D3DVSDT_FLOAT4 = 0x03,
D3DVSDT_D3DCOLOR = 0x04,
D3DVSDT_UBYTE4 = 0x05,
D3DVSDT_SHORT2 = 0x06,
D3DVSDT_SHORT4 = 0x07
} D3DVSDT_TYPE;
#define D3DVSD_DATATYPESHIFT 16
#define D3DVSD_CONSTCOUNTSHIFT 25
#define D3DVSD_TOKENTYPESHIFT 26
#define D3DVSD_MAKETOKENTYPE(TokenType) \
((TokenType << D3DVSD_TOKENTYPESHIFT) & D3DVSD_TOKENTYPEMASK)
#define D3DVSD_CONST(ConstantAddress, Count) \
(D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_CONSTMEM) | ((Count) << D3DVSD_CONSTCOUNTSHIFT) | (ConstantAddress))
#define D3DVSD_END() 0xFFFFFFFF
#define D3DVSD_NOP() 0x00000000
#define D3DVSD_REG(VertexRegister, Type) \
(D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAMDATA) | ((Type) << D3DVSD_DATATYPESHIFT) | (VertexRegister))
#define D3DVSD_SKIP(Count) \
(D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAMDATA) | 0x10000000 | ((Count) << D3DVSD_SKIPCOUNTSHIFT))
#define D3DVSD_STREAM(StreamNumber) \
(D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAM) | (StreamNumber))
#define D3DVSD_STREAM_TESS() \
(D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAM) | (D3DVSD_STREAMTESSMASK))
#define D3DVSD_TESSNORMAL(VertexRegisterIn, VertexRegisterOut) \
(D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_TESSELLATOR) | ((VertexRegisterIn) << D3DVSD_VERTEXREGINSHIFT) | ((0x02) << D3DVSD_DATATYPESHIFT) | (VertexRegisterOut))
#define D3DVSD_TESSUV(VertexRegister) \
(D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_TESSELLATOR) | 0x10000000 | ((0x01) << D3DVSD_DATATYPESHIFT) | (_VertexRegister))
/*****************************************************************************
* Direct 3D v8 enumerated types
*/
......
/*
* Copyright (C) 2002 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_D3DX8CORE_H
#define __WINE_D3DX8CORE_H
#include "objbase.h"
#include "d3d8.h"
#include "d3d8types.h"
#include "d3d8caps.h"
/*****************************************************************************
* #defines and error codes
*/
#define D3DXASM_DEBUG 1
#define D3DXASM_SKIPVALIDATION 2
#define _FACD3D 0x876
#define MAKE_D3DXHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code )
/*
* Direct3D Errors
*/
#define D3DXERR_CANNOTATTRSORT MAKE_D3DXHRESULT(2158)
#define D3DXERR_CANNOTMODIFYINDEXBUFFER MAKE_D3DXHRESULT(2159)
#define D3DXERR_INVALIDMESH MAKE_D3DXHRESULT(2160)
#define D3DXERR_SKINNINGNOTSUPPORTED MAKE_D3DXHRESULT(2161)
#define D3DXERR_TOOMANYINFLUENCES MAKE_D3DXHRESULT(2162)
#define D3DXERR_INVALIDDATA MAKE_D3DXHRESULT(2163)
/*****************************************************************************
* Predeclare the interfaces
*/
DEFINE_GUID(IID_ID3DXBuffer, 0x1,0x1,0x4,0xB0,0xCF,0x98,0xFE,0xFD,0xFF,0x95,0x12);/* FIXME */
typedef struct ID3DXBuffer ID3DXBuffer, *LPD3DXBUFFER;
DEFINE_GUID(IID_ID3DXFont, 0x1,0x1,0x4,0xB0,0xCF,0x98,0xFE,0xFD,0xFF,0x95,0x13);/* FIXME */
typedef struct ID3DXFont ID3DXFont, *LPD3DXFONT;
/*****************************************************************************
* ID3DXBuffer interface
*/
#undef ICOM_INTERFACE
#define ICOM_INTERFACE ID3DXBuffer
#define ID3DXBuffer_METHODS \
/*** ID3DXBuffer methods ***/ \
ICOM_METHOD (LPVOID, GetBufferPointer) \
ICOM_METHOD (DWORD, GetBufferSize)
/*** ID3DXBuffer methods ***/
#define ID3DXBuffer_IMETHODS \
IUnknown_IMETHODS \
ID3DXBuffer_METHODS
ICOM_DEFINE(ID3DXBuffer,IUnknown)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
#define ID3DXBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define ID3DXBuffer_AddRef(p) ICOM_CALL (AddRef,p)
#define ID3DXBuffer_Release(p) ICOM_CALL (Release,p)
/*** ID3DXBuffer methods ***/
#define ID3DXBuffer_GetBufferPointer(p) ICOM_CALL (GetBufferPointer,p)
#define ID3DXBuffer_GetBufferSize(p) ICOM_CALL (GetBufferSize,p)
/*****************************************************************************
* ID3DXFont interface
*/
#undef ICOM_INTERFACE
#define ICOM_INTERFACE ID3DXFont
#define ID3DXFont_METHODS \
/*** ID3DXFont methods ***/ \
ICOM_METHOD (HRESULT, Begin) \
ICOM_METHOD (HRESULT, DrawTextA) \
ICOM_METHOD (HRESULT, End)
/*** ID3DXFont methods ***/
#define ID3DXFont_IMETHODS \
IUnknown_IMETHODS \
ID3DXFont_METHODS
ICOM_DEFINE(ID3DXFont,IUnknown)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
#define ID3DXFont_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define ID3DXFont_AddRef(p) ICOM_CALL (AddRef,p)
#define ID3DXFont_Release(p) ICOM_CALL (Release,p)
/*** ID3DXFont methods ***/
#define ID3DXFont_Begin(p) ICOM_CALL (Begin,p)
#define ID3DXFont_DrawTextA(p,a,b,c,d,e)ICOM_CALL5(DrawText,p,a,b,c,d,e)
#define ID3DXFont_End(p) ICOM_CALL (End,p)
/*************************************************************************************
* Define entrypoints
*/
HRESULT D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer);
HRESULT D3DXCreateFont(LPDIRECT3DDEVICE8 pDevice, HFONT hFont, LPD3DXFONT* ppFont);
UINT D3DXGetFVFVertexSize(DWORD FVF);
HRESULT D3DXAssembleShader(LPCVOID pSrcData, UINT SrcDataLen, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
HRESULT D3DXAssembleShaderFromFileA(LPSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
HRESULT D3DXAssembleShaderFromFileW(LPSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
#endif /* __WINE_D3DX8CORE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment