4 * Copyright 2002-2003 Jason Edmeades
5 * Copyright 2002-2003 Raphael Junqueira
6 * Copyright 2005 Oliver Stieber
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #include "d3d9_private.h"
28 static CRITICAL_SECTION_DEBUG d3d9_cs_debug
=
31 { &d3d9_cs_debug
.ProcessLocksList
,
32 &d3d9_cs_debug
.ProcessLocksList
},
33 0, 0, { (DWORD_PTR
)(__FILE__
": d3d9_cs") }
35 CRITICAL_SECTION d3d9_cs
= { &d3d9_cs_debug
, -1, 0, 0, 0, 0 };
37 WINE_DEFAULT_DEBUG_CHANNEL(d3d9
);
39 static int D3DPERF_event_level
= 0;
41 HRESULT WINAPI
D3D9GetSWInfo(void) {
42 FIXME("(void): stub\n");
46 void WINAPI
DebugSetMute(void) {
50 IDirect3D9
* WINAPI
Direct3DCreate9(UINT SDKVersion
) {
51 IDirect3D9Impl
* object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirect3D9Impl
));
53 object
->lpVtbl
= &Direct3D9_Vtbl
;
55 EnterCriticalSection(&d3d9_cs
);
56 object
->WineD3D
= WineDirect3DCreate(SDKVersion
, 9, (IUnknown
*)object
);
57 LeaveCriticalSection(&d3d9_cs
);
59 TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion
, object
, object
->WineD3D
);
61 return (IDirect3D9
*) object
;
64 /* At process attach */
65 BOOL WINAPI
DllMain(HINSTANCE hInstDLL
, DWORD fdwReason
, LPVOID lpv
)
67 TRACE("fdwReason=%d\n", fdwReason
);
68 if (fdwReason
== DLL_PROCESS_ATTACH
)
69 DisableThreadLibraryCalls(hInstDLL
);
74 /***********************************************************************
75 * D3DPERF_BeginEvent (D3D9.@)
77 int WINAPI
D3DPERF_BeginEvent(D3DCOLOR color
, LPCWSTR name
) {
78 FIXME("(color %#x, name %s) : stub\n", color
, debugstr_w(name
));
80 return D3DPERF_event_level
++;
83 /***********************************************************************
84 * D3DPERF_EndEvent (D3D9.@)
86 int WINAPI
D3DPERF_EndEvent(void) {
87 FIXME("(void) : stub\n");
89 return --D3DPERF_event_level
;
92 /***********************************************************************
93 * D3DPERF_GetStatus (D3D9.@)
95 DWORD WINAPI
D3DPERF_GetStatus(void) {
96 FIXME("(void) : stub\n");
101 /***********************************************************************
102 * D3DPERF_SetOptions (D3D9.@)
105 void WINAPI
D3DPERF_SetOptions(DWORD options
)
107 FIXME("(%#x) : stub\n", options
);
110 /***********************************************************************
111 * D3DPERF_QueryRepeatFrame (D3D9.@)
113 BOOL WINAPI
D3DPERF_QueryRepeatFrame(void) {
114 FIXME("(void) : stub\n");
119 /***********************************************************************
120 * D3DPERF_SetMarker (D3D9.@)
122 void WINAPI
D3DPERF_SetMarker(D3DCOLOR color
, LPCWSTR name
) {
123 FIXME("(color %#x, name %s) : stub\n", color
, debugstr_w(name
));
126 /***********************************************************************
127 * D3DPERF_SetRegion (D3D9.@)
129 void WINAPI
D3DPERF_SetRegion(D3DCOLOR color
, LPCWSTR name
) {
130 FIXME("(color %#x, name %s) : stub\n", color
, debugstr_w(name
));