oleaut32: Added Esperanto language.
[wine] / dlls / d3d9 / d3d9_main.c
1 /*
2  * Direct3D 9
3  *
4  * Copyright 2002-2003 Jason Edmeades
5  * Copyright 2002-2003 Raphael Junqueira
6  * Copyright 2005 Oliver Stieber
7  *
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.
12  *
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.
17  *
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
21  *
22  */
23
24 #include "config.h"
25 #include "initguid.h"
26 #include "d3d9_private.h"
27
28 WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
29
30 void (*wine_tsx11_lock_ptr)(void) = NULL;
31 void (*wine_tsx11_unlock_ptr)(void) = NULL;
32
33
34 HRESULT WINAPI D3D9GetSWInfo(void) {
35     FIXME("(void): stub\n");
36     return 0;
37 }
38
39 void WINAPI DebugSetMute(void) {
40     /* nothing to do */
41 }
42
43 IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion) {
44     IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl));
45
46     object->lpVtbl = &Direct3D9_Vtbl;
47     object->ref = 1;
48     object->WineD3D = WineDirect3DCreate(SDKVersion, 9, (IUnknown *)object);
49
50     TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D);
51
52     return (IDirect3D9*) object;
53 }
54
55 /* At process attach */
56 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) {
57     TRACE("fdwReason=%ld\n", fdwReason);
58     if (fdwReason == DLL_PROCESS_ATTACH) {
59         HMODULE mod;
60
61         DisableThreadLibraryCalls(hInstDLL);
62
63         mod = GetModuleHandleA( "winex11.drv" );
64         if (mod)
65         {
66             wine_tsx11_lock_ptr   = (void*) GetProcAddress(mod, "wine_tsx11_lock");
67             wine_tsx11_unlock_ptr = (void*) GetProcAddress(mod, "wine_tsx11_unlock");
68         }
69     }
70     return TRUE;
71 }
72
73 /***********************************************************************
74  *              ValidateVertexShader (D3D9.@)
75  *
76  * PARAMS
77  * toto       result?
78  */
79 BOOL WINAPI ValidateVertexShader(LPVOID pFunction, int param1, int param2, LPVOID toto)
80 {
81   FIXME("(%p %d %d %p): stub\n", pFunction, param1, param2, toto);
82   return TRUE;
83 }
84
85 /***********************************************************************
86  *              ValidatePixelShader (D3D9.@)
87  *
88  * PARAMS
89  * toto       result?
90  */
91 BOOL WINAPI ValidatePixelShader(LPVOID pFunction, int param1, int param2, LPVOID toto)
92 {
93   FIXME("(%p %d %d %p): stub\n", pFunction, param1, param2, toto);
94   return TRUE;
95 }