Sweden-Number/include/wine/wined3d_interface.h

172 lines
7.2 KiB
C

/*
* Direct3D wine internal public interface file
*
* Copyright 2002-2003 The wine-d3d team
* Copyright 2002-2003 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_WINED3D_INTERFACE_H
#define __WINE_WINED3D_INTERFACE_H
#if !defined( __WINE_CONFIG_H )
# error You must include config.h to use this header
#endif
#if !defined( __WINE_D3D8_H ) && !defined( __WINE_D3D9_H )
# error You must include d3d8.h or d3d9.h header to use this header
#endif
/*****************************************************************
* THIS FILE MUST NOT CONTAIN X11 or MESA DEFINES
* PLEASE USE wine/wined3d_gl.h INSTEAD
*/
/*****************************************************************************
* WineD3D Structures
*/
typedef struct _WINED3DADAPTER_IDENTIFIER {
char *Driver;
char *Description;
char *DeviceName;
LARGE_INTEGER *DriverVersion;
DWORD *VendorId;
DWORD *DeviceId;
DWORD *SubSysId;
DWORD *Revision;
GUID *DeviceIdentifier;
DWORD *WHQLLevel;
} WINED3DADAPTER_IDENTIFIER;
/*****************************************************************************
* WineD3D interface
*/
typedef struct IWineD3D IWineD3D;
#define INTERFACE IWineD3D
#define IWineD3D_METHODS \
IUnknown_METHODS \
STDMETHOD_(UINT,GetAdapterCount )(THIS) PURE; \
STDMETHOD(RegisterSoftwareDevice)(THIS_ void * pInitializeFunction) PURE; \
STDMETHOD_(HMONITOR,GetAdapterMonitor)(THIS_ UINT Adapter) PURE; \
STDMETHOD_(UINT,GetAdapterModeCount)(THIS_ UINT Adapter, D3DFORMAT Format) PURE; \
STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter, UINT Mode, D3DFORMAT Format, D3DDISPLAYMODE * pMode) PURE; \
STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter, D3DDISPLAYMODE * pMode) PURE; \
STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter, DWORD Flags, WINED3DADAPTER_IDENTIFIER* pIdentifier) PURE; \
DECLARE_INTERFACE_(IWineD3D,IUnknown) { IWineD3D_METHODS };
#undef INTERFACE
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IWineD3D_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IWineD3D_Release(p) (p)->lpVtbl->Release(p)
/*** IWineD3D methods ***/
#define IWineD3D_GetAdapterCount(p) (p)->lpVtbl->GetAdapterCount(p)
#define IWineD3D_RegisterSoftwareDevice(p,a) (p)->lpVtbl->RegisterSoftwareDevice(p,a)
#define IWineD3D_GetAdapterMonitor(p,a) (p)->lpVtbl->GetAdapterMonitor(p,a)
#define IWineD3D_GetAdapterModeCount(p,a,b) (p)->lpVtbl->GetAdapterModeCount(p,a,b)
#define IWineD3D_EnumAdapterModes(p,a,b,c,d) (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
#define IWineD3D_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
#define IWineD3D_GetAdapterIdentifier(p,a,b,c) (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
#endif
/* Define the main WineD3D entrypoint */
IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion);
#if 0 /* FIXME: During porting in from d3d8 - the following will be used */
/*****************************************************************
* Some defines
*/
/* Device caps */
#define MAX_PALETTES 256
#define MAX_STREAMS 16
#define MAX_CLIPPLANES D3DMAXUSERCLIPPLANES
#define MAX_LEVELS 256
/* Other useful values */
#define HIGHEST_RENDER_STATE 174
#define HIGHEST_TEXTURE_STATE 29
#define HIGHEST_TRANSFORMSTATE 512
#define D3DSBT_RECORDED 0xfffffffe
#define D3D_VSHADER_MAX_CONSTANTS 96
#define D3D_PSHADER_MAX_CONSTANTS 32
/*****************************************************************
* Some includes
*/
#include "wine/wined3d_gl.h"
#include "wine/wined3d_types.h"
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
/*****************************************************************
* Some defines
*/
typedef struct IDirect3DImpl IDirect3DImpl;
typedef struct IDirect3DBaseTextureImpl IDirect3DBaseTextureImpl;
typedef struct IDirect3DVolumeTextureImpl IDirect3DVolumeTextureImpl;
typedef struct IDirect3DDeviceImpl IDirect3DDeviceImpl;
typedef struct IDirect3DTextureImpl IDirect3DTextureImpl;
typedef struct IDirect3DCubeTextureImpl IDirect3DCubeTextureImpl;
typedef struct IDirect3DIndexBufferImpl IDirect3DIndexBufferImpl;
typedef struct IDirect3DSurfaceImpl IDirect3DSurfaceImpl;
typedef struct IDirect3DSwapChainImpl IDirect3DSwapChainImpl;
typedef struct IDirect3DResourceImpl IDirect3DResourceImpl;
typedef struct IDirect3DVolumeImpl IDirect3DVolumeImpl;
typedef struct IDirect3DVertexBufferImpl IDirect3DVertexBufferImpl;
typedef struct IDirect3DStateBlockImpl IDirect3DStateBlockImpl;
typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl;
typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl;
typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl;
/*************************************************************
* d3dcore interfaces defs
*/
/** Vertex Shader API */
extern HRESULT WINAPI IDirect3DVertexShaderImpl_ParseProgram(IDirect3DVertexShaderImpl* This, CONST DWORD* pFunction);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetFunction(IDirect3DVertexShaderImpl* This, VOID* pData, UINT* pSizeOfData);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantB(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantI(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST INT* pConstantData, UINT Vector4iCount);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantF(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST FLOAT* pConstantData, UINT Vector4fCount);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantB(IDirect3DVertexShaderImpl* This, UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantI(IDirect3DVertexShaderImpl* This, UINT StartRegister, INT* pConstantData, UINT Vector4iCount);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantF(IDirect3DVertexShaderImpl* This, UINT StartRegister, FLOAT* pConstantData, UINT Vector4fCount);
/* internal Interfaces */
extern DWORD WINAPI IDirect3DVertexShaderImpl_GetVersion(IDirect3DVertexShaderImpl* This);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_ExecuteSW(IDirect3DVertexShaderImpl* This, VSHADERINPUTDATA* input, VSHADEROUTPUTDATA* output);
#endif /* Temporary #if 0 */
#endif