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

Last change on this file since 8706 was 7940, checked in by sandervl, 24 years ago

compile fixes

File size: 4.1 KB
Line 
1/* $Id: OS2D3D.CPP,v 1.13 2002-02-17 20:40:04 sandervl Exp $ */
2
3/*
4 * DX clipper class routines
5 *
6 * Copyright 1998 Sander van Leeuwen
7 *
8 * Note: MUST use DDraw3D_GetThisPtr macro to access DirectDraw object!
9 *
10 * Project Odin Software License can be found in LICENSE.TXT
11 *
12 */
13
14#include <memory.h>
15
16#define INITGUID
17#define _OS2WIN_H
18#define FAR
19
20#include <odin.h>
21#include <winbase.h>
22#include "os2ddraw.h"
23#include "os2clipper.h"
24#include "os2palette.h"
25#include "os2surface.h"
26#include <misc.h>
27#include <winerror.h>
28#undef THIS
29#define THIS VOID*
30
31//******************************************************************************
32//******************************************************************************
33HRESULT __stdcall D3DQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj)
34{
35 dprintf(("DDRAW: D3DQueryInterface\n"));
36 *ppvObj = NULL;
37
38 if (!IsEqualGUID(riid, IID_IDirect3D))
39 return E_NOINTERFACE;
40
41 *ppvObj = This;
42
43 D3DAddRef(This);
44 return(D3D_OK);
45}
46//******************************************************************************
47//******************************************************************************
48ULONG __stdcall D3DAddRef(THIS This)
49{
50 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
51
52 dprintf(("DDRAW: OS2IDirectDraw::AddRef %d\n", me->Referenced+1));
53 return ++me->Referenced;
54}
55//******************************************************************************
56//******************************************************************************
57ULONG __stdcall D3DRelease(THIS This)
58{
59 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
60
61 dprintf(("DDRAW: OS2IDirectDraw::Release %d\n", me->Referenced-1));
62 dprintf(("DDRAW: OS2IDirectDraw::%X \n", me));
63 if(me->Referenced)
64 {
65 me->Referenced--;
66 if(me->Referenced == 0)
67 {
68 delete(me);
69 return(0);
70 }
71 else
72 return me->Referenced;
73 }
74 else
75 return(0);
76}
77//******************************************************************************
78//******************************************************************************
79HRESULT __stdcall D3DInitialize(THIS This, REFIID)
80{
81 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
82
83 dprintf(("DDRAW: D3DInitialize\n"));
84 return(D3D_OK);
85}
86//******************************************************************************
87//******************************************************************************
88HRESULT __stdcall D3DEnumDevices(THIS This, LPD3DENUMDEVICESCALLBACK, LPVOID)
89{
90 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
91
92 dprintf(("DDRAW: D3DEnumDevices\n"));
93 return(D3D_OK);
94}
95//******************************************************************************
96//******************************************************************************
97HRESULT __stdcall D3DCreateLight(THIS This, LPDIRECT3DLIGHT*, IUnknown*)
98{
99 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
100
101 dprintf(("DDRAW: D3DCreateLight\n"));
102 return(D3D_OK);
103}
104//******************************************************************************
105//******************************************************************************
106HRESULT __stdcall D3DCreateMaterial(THIS This, LPDIRECT3DMATERIAL*, IUnknown*)
107{
108 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
109
110 dprintf(("DDRAW: D3DCreateMaterial\n"));
111 return(D3D_OK);
112}
113//******************************************************************************
114//******************************************************************************
115HRESULT __stdcall D3DCreateViewport(THIS This, LPDIRECT3DVIEWPORT*, IUnknown*)
116{
117 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
118
119 dprintf(("DDRAW: D3DCreateViewport\n"));
120 return(D3D_OK);
121}
122//******************************************************************************
123//******************************************************************************
124HRESULT __stdcall D3DFindDevice(THIS This, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
125{
126 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
127
128 dprintf(("DDRAW: D3DCreateFindDevice\n"));
129 return(D3D_OK);
130}
131//******************************************************************************
132//******************************************************************************
Note: See TracBrowser for help on using the repository browser.