source: trunk/src/ddraw/OS2D3D.CPP@ 46

Last change on this file since 46 was 46, checked in by sandervl, 26 years ago

* empty log message *

File size: 4.6 KB
Line 
1//******************************************************************************
2//******************************************************************************
3// Direct3D Main Class
4//
5// Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
6//******************************************************************************
7//******************************************************************************
8// *
9// * Project Odin Software License can be found in LICENSE.TXT
10// *
11
12/*@Const************************************************************************
13* Defined Constants *
14*******************************************************************************/
15#define WIN32SDK_NOPOSTWRAPPER
16
17/*@Header***********************************************************************
18* Header Files *
19*******************************************************************************/
20#include <os2win.h>
21#include <dive.h>
22
23#include <builtin.h>
24#include <memory.h>
25
26#include "no.h"
27#include <w_windows.h>
28#include <ddraw.h>
29#include <d3d.h>
30#include <Win32SDKPostWrapper.h>
31
32#include "os2ddraw.h"
33#include "os2clipper.h"
34#include "os2palette.h"
35#include "os2surface.h"
36#include "misc.h"
37
38/*** IDirect3D methods ***/
39/* KSO Apr 19 1999: Set correct interface. *
40 * (INTERFACE is used in the THIS and THIS_ macros) */
41#undef INTERFACE
42#define INTERFACE IDirect3D
43
44
45//******************************************************************************
46//******************************************************************************
47HRESULT __stdcall D3DQueryInterface(THIS, REFIID riid, LPVOID FAR * ppvObj)
48{
49 dprintf(("D3DQueryInterface\n"));
50 *ppvObj = NULL;
51
52 if(IID_IDirect3D != (GUID &)&riid)
53 return E_NOINTERFACE;
54
55 *ppvObj = This;
56
57 D3DAddRef(This);
58 return(D3D_OK);
59}
60//******************************************************************************
61//******************************************************************************
62ULONG __stdcall D3DAddRef(THIS)
63{
64 OS2IDirectDraw *me = (OS2IDirectDraw *)This;
65
66 dprintf(("OS2IDirectDraw::AddRef %d\n", me->Referenced+1));
67 return ++me->Referenced;
68}
69//******************************************************************************
70//******************************************************************************
71ULONG __stdcall D3DRelease(THIS)
72{
73 OS2IDirectDraw *me = (OS2IDirectDraw *)This;
74
75 dprintf(("OS2IDirectDraw::Release %d\n", me->Referenced-1));
76 dprintf(("OS2IDirectDraw::%X \n", me));
77 if(me->Referenced) {
78 me->Referenced--;
79 if(me->Referenced == 0) {
80 delete me;
81 return(0);
82 }
83 else return me->Referenced;
84 }
85 else return(0);
86}
87//******************************************************************************
88//******************************************************************************
89HRESULT __stdcall D3DInitialize(THIS_ REFIID)
90{
91 dprintf(("D3DInitialize\n"));
92 return(D3D_OK);
93}
94//******************************************************************************
95//******************************************************************************
96HRESULT __stdcall D3DEnumDevices(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID)
97{
98 dprintf(("D3DEnumDevices\n"));
99 return(D3D_OK);
100}
101//******************************************************************************
102//******************************************************************************
103HRESULT __stdcall D3DCreateLight(THIS_ LPDIRECT3DLIGHT*, IUnknown*)
104{
105 dprintf(("D3DCreateLight\n"));
106 return(D3D_OK);
107}
108//******************************************************************************
109//******************************************************************************
110HRESULT __stdcall D3DCreateMaterial(THIS_ LPDIRECT3DMATERIAL*, IUnknown*)
111{
112 dprintf(("D3DCreateMaterial\n"));
113 return(D3D_OK);
114}
115//******************************************************************************
116//******************************************************************************
117HRESULT __stdcall D3DCreateViewport(THIS_ LPDIRECT3DVIEWPORT*, IUnknown*)
118{
119 dprintf(("D3DCreateViewport\n"));
120 return(D3D_OK);
121}
122//******************************************************************************
123//******************************************************************************
124HRESULT __stdcall D3DFindDevice(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
125{
126 dprintf(("D3DCreateFindDevice\n"));
127 return(D3D_OK);
128}
129//******************************************************************************
130//******************************************************************************
Note: See TracBrowser for help on using the repository browser.