Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygend3d9_main.c
Go to the documentation of this file.
00001 /* 00002 * Direct3D 9 00003 * 00004 * Copyright 2002-2003 Jason Edmeades 00005 * Copyright 2002-2003 Raphael Junqueira 00006 * Copyright 2005 Oliver Stieber 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00021 * 00022 */ 00023 00024 #include "config.h" 00025 #include "initguid.h" 00026 #include "d3d9_private.h" 00027 00028 WINE_DEFAULT_DEBUG_CHANNEL(d3d9); 00029 00030 static int D3DPERF_event_level = 0; 00031 00032 void WINAPI DebugSetMute(void) { 00033 /* nothing to do */ 00034 } 00035 00036 IDirect3D9* WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT SDKVersion) { 00037 IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl)); 00038 00039 object->IDirect3D9Ex_iface.lpVtbl = &Direct3D9_Vtbl; 00040 object->ref = 1; 00041 00042 wined3d_mutex_lock(); 00043 object->WineD3D = wined3d_create(9, 0, object); 00044 wined3d_mutex_unlock(); 00045 00046 TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D); 00047 00048 if (!object->WineD3D) 00049 { 00050 HeapFree( GetProcessHeap(), 0, object ); 00051 object = NULL; 00052 } 00053 return (IDirect3D9*) object; 00054 } 00055 00056 HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT SDKVersion, IDirect3D9Ex **direct3d9ex) { 00057 IDirect3D9 *ret; 00058 IDirect3D9Impl* object; 00059 00060 TRACE("Calling Direct3DCreate9\n"); 00061 ret = Direct3DCreate9(SDKVersion); 00062 if(!ret) { 00063 *direct3d9ex = NULL; 00064 return D3DERR_NOTAVAILABLE; 00065 } 00066 00067 object = (IDirect3D9Impl *) ret; 00068 object->extended = TRUE; /* Enables QI for extended interfaces */ 00069 *direct3d9ex = &object->IDirect3D9Ex_iface; 00070 return D3D_OK; 00071 } 00072 00073 /******************************************************************* 00074 * Direct3DShaderValidatorCreate9 (D3D9.@) 00075 * 00076 * No documentation available for this function. 00077 * SDK only says it is internal and shouldn't be used. 00078 */ 00079 void* WINAPI Direct3DShaderValidatorCreate9(void) 00080 { 00081 static int once; 00082 00083 if (!once++) FIXME("stub\n"); 00084 return NULL; 00085 } 00086 00087 /******************************************************************* 00088 * DllMain 00089 */ 00090 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) 00091 { 00092 /* At process attach */ 00093 TRACE("fdwReason=%d\n", fdwReason); 00094 if (fdwReason == DLL_PROCESS_ATTACH) 00095 DisableThreadLibraryCalls(hInstDLL); 00096 00097 return TRUE; 00098 } 00099 00100 /*********************************************************************** 00101 * D3DPERF_BeginEvent (D3D9.@) 00102 */ 00103 int WINAPI D3DPERF_BeginEvent(D3DCOLOR color, LPCWSTR name) { 00104 TRACE("(color %#x, name %s) : stub\n", color, debugstr_w(name)); 00105 00106 return D3DPERF_event_level++; 00107 } 00108 00109 /*********************************************************************** 00110 * D3DPERF_EndEvent (D3D9.@) 00111 */ 00112 int WINAPI D3DPERF_EndEvent(void) { 00113 TRACE("(void) : stub\n"); 00114 00115 return --D3DPERF_event_level; 00116 } 00117 00118 /*********************************************************************** 00119 * D3DPERF_GetStatus (D3D9.@) 00120 */ 00121 DWORD WINAPI D3DPERF_GetStatus(void) { 00122 FIXME("(void) : stub\n"); 00123 00124 return 0; 00125 } 00126 00127 /*********************************************************************** 00128 * D3DPERF_SetOptions (D3D9.@) 00129 * 00130 */ 00131 void WINAPI D3DPERF_SetOptions(DWORD options) 00132 { 00133 FIXME("(%#x) : stub\n", options); 00134 } 00135 00136 /*********************************************************************** 00137 * D3DPERF_QueryRepeatFrame (D3D9.@) 00138 */ 00139 BOOL WINAPI D3DPERF_QueryRepeatFrame(void) { 00140 FIXME("(void) : stub\n"); 00141 00142 return FALSE; 00143 } 00144 00145 /*********************************************************************** 00146 * D3DPERF_SetMarker (D3D9.@) 00147 */ 00148 void WINAPI D3DPERF_SetMarker(D3DCOLOR color, LPCWSTR name) { 00149 FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name)); 00150 } 00151 00152 /*********************************************************************** 00153 * D3DPERF_SetRegion (D3D9.@) 00154 */ 00155 void WINAPI D3DPERF_SetRegion(D3DCOLOR color, LPCWSTR name) { 00156 FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name)); 00157 } Generated on Sun May 27 2012 04:22:09 for ReactOS by
1.7.6.1
|