source: trunk/src/ddraw/new/os2d3d.cpp@ 21916

Last change on this file since 21916 was 21916, checked in by dmik, 14 years ago

Merge branch gcc-kmk to trunk.

File size: 4.0 KB
Line 
1/* $Id: OS2D3D.CPP,v 1.2 2001-03-09 22:48:47 mike 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#include "os2ddraw.h"
18#include "os2clipper.h"
19#include "os2palette.h"
20#include "os2surface.h"
21#define _OS2WIN_H
22#define FAR
23#include <misc.h>
24#include <winerror.h>
25#undef THIS
26#define THIS VOID*
27
28//******************************************************************************
29//******************************************************************************
30HRESULT __stdcall D3DQueryInterface(THIS This, REFIID riid, LPVOID FAR * ppvObj)
31{
32 dprintf(("DDRAW: D3DQueryInterface\n"));
33 *ppvObj = NULL;
34
35 if (!IsEqualGUID(riid, IID_IDirect3D))
36 return E_NOINTERFACE;
37
38 *ppvObj = This;
39
40 D3DAddRef(This);
41 return(D3D_OK);
42}
43//******************************************************************************
44//******************************************************************************
45ULONG __stdcall D3DAddRef(THIS This)
46{
47 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
48
49 dprintf(("DDRAW: OS2IDirectDraw::AddRef %d\n", me->Referenced+1));
50 return ++me->Referenced;
51}
52//******************************************************************************
53//******************************************************************************
54ULONG __stdcall D3DRelease(THIS This)
55{
56 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
57
58 dprintf(("DDRAW: OS2IDirectDraw::Release %d\n", me->Referenced-1));
59 dprintf(("DDRAW: OS2IDirectDraw::%X \n", me));
60 if(me->Referenced)
61 {
62 me->Referenced--;
63 if(me->Referenced == 0)
64 {
65 delete(me);
66 return(0);
67 }
68 else
69 return me->Referenced;
70 }
71 else
72 return(0);
73}
74//******************************************************************************
75//******************************************************************************
76HRESULT __stdcall D3DInitialize(THIS This, REFIID)
77{
78 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
79
80 dprintf(("DDRAW: D3DInitialize\n"));
81 return(D3D_OK);
82}
83//******************************************************************************
84//******************************************************************************
85HRESULT __stdcall D3DEnumDevices(THIS This, LPD3DENUMDEVICESCALLBACK, LPVOID)
86{
87 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
88
89 dprintf(("DDRAW: D3DEnumDevices\n"));
90 return(D3D_OK);
91}
92//******************************************************************************
93//******************************************************************************
94HRESULT __stdcall D3DCreateLight(THIS This, LPDIRECT3DLIGHT*, IUnknown*)
95{
96 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
97
98 dprintf(("DDRAW: D3DCreateLight\n"));
99 return(D3D_OK);
100}
101//******************************************************************************
102//******************************************************************************
103HRESULT __stdcall D3DCreateMaterial(THIS This, LPDIRECT3DMATERIAL*, IUnknown*)
104{
105 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
106
107 dprintf(("DDRAW: D3DCreateMaterial\n"));
108 return(D3D_OK);
109}
110//******************************************************************************
111//******************************************************************************
112HRESULT __stdcall D3DCreateViewport(THIS This, LPDIRECT3DVIEWPORT*, IUnknown*)
113{
114 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
115
116 dprintf(("DDRAW: D3DCreateViewport\n"));
117 return(D3D_OK);
118}
119//******************************************************************************
120//******************************************************************************
121HRESULT __stdcall D3DFindDevice(THIS This, LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT)
122{
123 OS2IDirectDraw *me = DDraw3D_GetThisPtr(This);
124
125 dprintf(("DDRAW: D3DCreateFindDevice\n"));
126 return(D3D_OK);
127}
128//******************************************************************************
129//******************************************************************************
Note: See TracBrowser for help on using the repository browser.