2 * Copyright (C) 2011 David Hoyt <dhoyt@hoytsoft.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __DIRECTX_DIRECTX9_DX9_D3D_H__
21 #define __DIRECTX_DIRECTX9_DX9_D3D_H__
27 #define DX9_D3D_API_CALL_FUNC(api, func_name, ...) (DIRECTX_CALL_COMPONENT_SYMBOL(DIRECTX_D3D(api), D3D9DispatchTable, func_name, __VA_ARGS__))
28 #define DX9_D3D_COMPONENT_CALL_FUNC(component, func_name, ...) (DIRECTX_CALL_COMPONENT_SYMBOL(component, D3D9DispatchTable, func_name, __VA_ARGS__))
31 typedef struct _D3D9 D3D9;
32 typedef struct _D3D9DispatchTable D3D9DispatchTable;
35 typedef gpointer /* IDirect3D9* */ (WINAPI *LPDIRECT3DCREATE9) (UINT);
37 struct _D3D9DispatchTable
39 LPDIRECT3DCREATE9 Direct3DCreate9;
45 D3D9DispatchTable vtable;
51 /* Function declarations */
53 void dx9_d3d_init(DirectXAPIComponent* component, gpointer data);
54 DirectXD3D* dx9_d3d_create(const DirectXAPI* api);
55 gboolean dx9_d3d_resize(const DirectXD3D* d3d);
56 gboolean dx9_d3d_device_lost(const DirectXD3D* d3d);
57 gboolean dx9_d3d_notify_device_reset(const DirectXD3D* d3d);
58 gboolean dx9_d3d_release(const DirectXD3D* d3d);
67 dx9_d3d_notify_device_reset,
71 #endif /* __DIRECTX_DIRECTX9_DX9_D3D_H__ */