2
|
1 |
/*
|
|
2 |
* Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation. Sun designates this
|
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
|
9 |
* by Sun in the LICENSE file that accompanied this code.
|
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
|
21 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
22 |
* CA 95054 USA or visit www.sun.com if you need additional information or
|
|
23 |
* have any questions.
|
|
24 |
*/
|
|
25 |
|
|
26 |
#ifndef D3DRUNTIMETEST_H
|
|
27 |
#define D3DRUNTIMETEST_H
|
|
28 |
|
|
29 |
#include "ddrawObject.h"
|
|
30 |
#include "dxCapabilities.h"
|
|
31 |
#include "D3DContext.h"
|
|
32 |
|
|
33 |
/*
|
|
34 |
* This is a minimum set of capabilities required for
|
|
35 |
* enabling D3D pipeline. If any of these is
|
|
36 |
* missing, d3d will be disabled completely.
|
|
37 |
*
|
|
38 |
* This set is used if the use of d3d pipeline is
|
|
39 |
* forced via flag or env. variable.
|
|
40 |
*/
|
|
41 |
#define J2D_D3D_REQUIRED_RESULTS ( \
|
|
42 |
J2D_D3D_HW_OK | \
|
|
43 |
J2D_D3D_DEVICE_OK | \
|
|
44 |
J2D_D3D_DEPTH_SURFACE_OK | \
|
|
45 |
J2D_D3D_PLAIN_SURFACE_OK | \
|
|
46 |
J2D_D3D_PIXEL_FORMATS_OK | \
|
|
47 |
J2D_D3D_OP_TEXTURE_SURFACE_OK | \
|
|
48 |
J2D_D3D_TR_TEXTURE_SURFACE_OK | \
|
|
49 |
J2D_D3D_SET_TRANSFORM_OK)
|
|
50 |
|
|
51 |
/*
|
|
52 |
* This is a set of capabilities desired for
|
|
53 |
* enabling D3D pipeline. It includes the set
|
|
54 |
* of required caps, plus a number of rendering
|
|
55 |
* quality related caps.
|
|
56 |
*
|
|
57 |
* This is the set of caps checked by default when
|
|
58 |
* deciding on whether to enable the d3d pipeline.
|
|
59 |
*/
|
|
60 |
#define J2D_D3D_DESIRED_RESULTS ( \
|
|
61 |
J2D_D3D_REQUIRED_RESULTS | \
|
|
62 |
J2D_D3D_BM_TEXTURE_SURFACE_OK | \
|
|
63 |
J2D_D3D_TEXTURE_BLIT_OK | \
|
|
64 |
J2D_D3D_TEXTURE_TRANSFORM_OK | \
|
|
65 |
J2D_D3D_LINES_OK | \
|
|
66 |
J2D_D3D_LINE_CLIPPING_OK)
|
|
67 |
|
|
68 |
|
|
69 |
/*
|
|
70 |
* This function tests the direct3d device associated
|
|
71 |
* with the passed ddraw object.
|
|
72 |
*
|
|
73 |
* The function returns the capabilities of the tested device, and the
|
|
74 |
* results of the quality testing.
|
|
75 |
* Enabling the d3d pipeline for this particular device is based on the
|
|
76 |
* result of this function.
|
|
77 |
*/
|
|
78 |
int TestD3DDevice(DDraw *ddObject, D3DContext *d3dContext, DxCapabilities *dxCaps);
|
|
79 |
|
|
80 |
void PrintD3DCaps(int caps);
|
|
81 |
|
|
82 |
#endif //D3DRUNTIMETEST_H
|