Subversion Repositories Games.Chess Giants

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
 
2
#ifndef __dxgitype_h__
3
#define __dxgitype_h__
4
 
5
 
6
#include "dxgiformat.h"
7
 
8
#define _FACDXGI    0x87a
9
#define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code)
10
#define MAKE_DXGI_STATUS(code)  MAKE_HRESULT(0, _FACDXGI, code)
11
 
12
#define DXGI_STATUS_OCCLUDED                    MAKE_DXGI_STATUS(1)
13
#define DXGI_STATUS_CLIPPED                     MAKE_DXGI_STATUS(2)
14
#define DXGI_STATUS_NO_REDIRECTION              MAKE_DXGI_STATUS(4)
15
#define DXGI_STATUS_NO_DESKTOP_ACCESS           MAKE_DXGI_STATUS(5)
16
#define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_STATUS(6)
17
#define DXGI_STATUS_MODE_CHANGED                MAKE_DXGI_STATUS(7)
18
#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS     MAKE_DXGI_STATUS(8)
19
 
20
 
21
#define DXGI_ERROR_INVALID_CALL                 MAKE_DXGI_HRESULT(1)
22
#define DXGI_ERROR_NOT_FOUND                    MAKE_DXGI_HRESULT(2)
23
#define DXGI_ERROR_MORE_DATA                    MAKE_DXGI_HRESULT(3)
24
#define DXGI_ERROR_UNSUPPORTED                  MAKE_DXGI_HRESULT(4)
25
#define DXGI_ERROR_DEVICE_REMOVED               MAKE_DXGI_HRESULT(5)
26
#define DXGI_ERROR_DEVICE_HUNG                  MAKE_DXGI_HRESULT(6)
27
#define DXGI_ERROR_DEVICE_RESET                 MAKE_DXGI_HRESULT(7)
28
#define DXGI_ERROR_WAS_STILL_DRAWING            MAKE_DXGI_HRESULT(10)
29
#define DXGI_ERROR_FRAME_STATISTICS_DISJOINT    MAKE_DXGI_HRESULT(11)
30
#define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_HRESULT(12)
31
#define DXGI_ERROR_DRIVER_INTERNAL_ERROR        MAKE_DXGI_HRESULT(32)
32
#define DXGI_ERROR_NONEXCLUSIVE                 MAKE_DXGI_HRESULT(33)
33
#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE      MAKE_DXGI_HRESULT(34)
34
#define DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED   MAKE_DXGI_HRESULT(35)
35
#define DXGI_ERROR_REMOTE_OUTOFMEMORY           MAKE_DXGI_HRESULT(36)
36
 
37
 
38
 
39
#define DXGI_CPU_ACCESS_NONE                    ( 0 )
40
#define DXGI_CPU_ACCESS_DYNAMIC                 ( 1 )
41
#define DXGI_CPU_ACCESS_READ_WRITE              ( 2 )
42
#define DXGI_CPU_ACCESS_SCRATCH                 ( 3 )
43
#define DXGI_CPU_ACCESS_FIELD                   15
44
 
45
#define DXGI_USAGE_SHADER_INPUT                 ( 1L << (0 + 4) )
46
#define DXGI_USAGE_RENDER_TARGET_OUTPUT         ( 1L << (1 + 4) )
47
#define DXGI_USAGE_BACK_BUFFER                  ( 1L << (2 + 4) )
48
#define DXGI_USAGE_SHARED                       ( 1L << (3 + 4) )
49
#define DXGI_USAGE_READ_ONLY                    ( 1L << (4 + 4) )
50
#define DXGI_USAGE_DISCARD_ON_PRESENT           ( 1L << (5 + 4) )
51
#define DXGI_USAGE_UNORDERED_ACCESS             ( 1L << (6 + 4) )
52
 
53
typedef struct DXGI_RGB
54
{
55
    float Red;
56
    float Green;
57
    float Blue;
58
} DXGI_RGB;
59
 
60
typedef struct DXGI_GAMMA_CONTROL
61
{
62
    DXGI_RGB Scale;
63
    DXGI_RGB Offset;
64
    DXGI_RGB GammaCurve[ 1025 ];
65
} DXGI_GAMMA_CONTROL;
66
 
67
typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES
68
{
69
    BOOL ScaleAndOffsetSupported;
70
    float MaxConvertedValue;
71
    float MinConvertedValue;
72
    UINT NumGammaControlPoints;
73
    float ControlPointPositions[1025];
74
} DXGI_GAMMA_CONTROL_CAPABILITIES;
75
 
76
typedef struct DXGI_RATIONAL
77
{
78
    UINT Numerator;
79
    UINT Denominator;
80
} DXGI_RATIONAL;
81
 
82
typedef enum DXGI_MODE_SCANLINE_ORDER
83
{
84
    DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED        = 0,
85
    DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE        = 1,
86
    DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST  = 2,
87
    DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST  = 3
88
} DXGI_MODE_SCANLINE_ORDER;
89
 
90
typedef enum DXGI_MODE_SCALING
91
{
92
    DXGI_MODE_SCALING_UNSPECIFIED   = 0,
93
    DXGI_MODE_SCALING_CENTERED      = 1,
94
    DXGI_MODE_SCALING_STRETCHED     = 2
95
} DXGI_MODE_SCALING;
96
 
97
typedef enum DXGI_MODE_ROTATION
98
{
99
    DXGI_MODE_ROTATION_UNSPECIFIED  = 0,
100
    DXGI_MODE_ROTATION_IDENTITY     = 1,
101
    DXGI_MODE_ROTATION_ROTATE90     = 2,
102
    DXGI_MODE_ROTATION_ROTATE180    = 3,
103
    DXGI_MODE_ROTATION_ROTATE270    = 4
104
} DXGI_MODE_ROTATION;
105
 
106
typedef struct DXGI_MODE_DESC
107
{
108
    UINT Width;
109
    UINT Height;
110
    DXGI_RATIONAL RefreshRate;
111
    DXGI_FORMAT Format;
112
    DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
113
    DXGI_MODE_SCALING Scaling;
114
} DXGI_MODE_DESC;
115
 
116
typedef struct DXGI_SAMPLE_DESC
117
{
118
    UINT Count;
119
    UINT Quality;
120
} DXGI_SAMPLE_DESC;
121
 
122
#endif // __dxgitype_h__
123