2 * Direct3D wine internal private include file
4 * Copyright 2002-2003 The wine-d3d team
5 * Copyright 2002-2003 Raphael Junqueira
6 * Copyright 2004 Jason Edmeades
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_WINED3D_PRIVATE_H
24 #define __WINE_WINED3D_PRIVATE_H
27 #define NONAMELESSUNION
28 #define NONAMELESSSTRUCT
34 #include "wine/debug.h"
37 #include "d3d9types.h"
38 #include "wine/wined3d_interface.h"
39 #include "wine/wined3d_gl.h"
52 extern void (*wine_tsx11_lock_ptr
)(void);
53 extern void (*wine_tsx11_unlock_ptr
)(void);
55 /* As GLX relies on X, this is needed */
59 #define ENTER_GL() ++num_lock; if (num_lock > 1) FIXME("Recursive use of GL lock to: %d\n", num_lock); wine_tsx11_lock_ptr()
60 #define LEAVE_GL() if (num_lock != 1) FIXME("Recursive use of GL lock: %d\n", num_lock); --num_lock; wine_tsx11_unlock_ptr()
62 #define ENTER_GL() wine_tsx11_lock_ptr()
63 #define LEAVE_GL() wine_tsx11_unlock_ptr()
66 /*****************************************************************************
69 #define GL_SUPPORT(ExtName) (This->gl_info.supported[ExtName] != 0)
72 #define MAX_STREAMS 16 /* Maximum possible streams - used for fixed size arrays
73 See MaxStreams in MSDN under GetDeviceCaps */
75 #define WINED3D_VSHADER_MAX_CONSTANTS 96
76 /* Maximum number of constants provided to the shaders */
78 /*****************************************************************************
79 * IWineD3D implementation structure
81 typedef struct IWineD3DImpl
85 DWORD ref
; /* Note: Ref counting not required */
87 /* WineD3D Information */
92 WineD3D_GL_Info gl_info
;
95 extern IWineD3DVtbl IWineD3D_Vtbl
;
97 /* Utility function prototypes */
98 const char* debug_d3dformat(D3DFORMAT fmt
);
99 const char* debug_d3ddevicetype(D3DDEVTYPE devtype
);
100 const char* debug_d3dresourcetype(D3DRESOURCETYPE res
);
101 const char* debug_d3dusage(DWORD usage
);
105 #if 0 /* Needs fixing during rework */
106 /*****************************************************************************
107 * IDirect3DVertexShaderDeclaration implementation structure
109 struct IDirect3DVertexShaderDeclarationImpl
{
111 /*IDirect3DDeviceImpl* device;*/
113 /** precomputed fvf if simple declaration */
114 DWORD fvf
[MAX_STREAMS
];
117 /** dx8 compatible Declaration fields */
118 DWORD
* pDeclaration8
;
119 DWORD declaration8Length
;
123 /*****************************************************************************
124 * IDirect3DVertexShader implementation structure
126 struct IDirect3DVertexShaderImpl
{
128 /*IDirect3DDeviceImpl* device;*/
136 VSHADERINPUTDATA input
;
137 VSHADEROUTPUTDATA output
;
141 /*****************************************************************************
142 * IDirect3DPixelShader implementation structure
144 struct IDirect3DPixelShaderImpl
{
146 /*IDirect3DDeviceImpl* device;*/
153 PSHADERINPUTDATA input
;
154 PSHADEROUTPUTDATA output
;
157 #endif /* Needs fixing during rework */