-
Notifications
You must be signed in to change notification settings - Fork 13
/
constants_windows.go
1781 lines (1399 loc) · 73.3 KB
/
constants_windows.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package d3d9
const (
// ADAPTER_DEFAULT is used to specify the primary display adapter.
ADAPTER_DEFAULT = 0
// CAPS_READ_SCANLINE means the display hardware is capable of returning
// the current scan line.
CAPS_READ_SCANLINE = 0x20000
// CAPS2_CANAUTOGENMIPMAP indicates that the driver is capable of
// automatically generating mipmaps.
CAPS2_CANAUTOGENMIPMAP = 0x40000000
// CAPS2_CANCALIBRATEGAMMA indicates that the system has a calibrator
// installed that can automatically adjust the gamma ramp so that the
// result is identical on all systems that have a calibrator. To invoke the
// calibrator when setting new gamma levels, use the SGR_CALIBRATE flag
// when calling SetGammaRamp. Calibrating gamma ramps incurs some
// processing overhead and should not be used frequently.
CAPS2_CANCALIBRATEGAMMA = 0x00100000
// CAPS2_CANMANAGERESOURCE indicates that the driver is capable of managing
// resources. On such drivers, POOL_MANAGED resources will be managed by
// the driver. To have Direct3D override the driver so that Direct3D
// manages resources, use the CREATE_DISABLE_DRIVER_MANAGEMENT flag when
// calling CreateDevice.
CAPS2_CANMANAGERESOURCE = 0x10000000
// CAPS2_DYNAMICTEXTURES indicates that the driver supports dynamic
// textures.
CAPS2_DYNAMICTEXTURES = 0x20000000
// CAPS2_FULLSCREENGAMMA indicates that the driver supports dynamic gamma
// ramp adjustment in full-screen mode.
CAPS2_FULLSCREENGAMMA = 0x00020000
// CAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD indicates that the device can
// respect the RS_ALPHABLENDENABLE render state in full-screen mode while
// using the FLIP or DISCARD swap effect. This only applies when the
// RS_SRCBLEND or RS_DESTBLEND states are set to one of the following:
// BLEND_DESTALPHA, BLEND_INVDESTALPHA, BLEND_DESTCOLOR, BLEND_INVDESTCOLOR
CAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD = 0x00000020
// CAPS3_COPY_TO_VIDMEM indicates that the device can accelerate a memory
// copy from system memory to local video memory. This cap guarantees that
// UpdateSurface and UpdateTexture calls will be hardware accelerated. If
// this cap is absent, these calls will succeed but will be slower.
CAPS3_COPY_TO_VIDMEM = 0x00000100
// CAPS3_COPY_TO_SYSTEMMEM indicates that the device can accelerate a
// memory copy from local video memory to system memory. This cap
// guarantees that GetRenderTargetData calls will be hardware accelerated.
// If this cap is absent, this call will succeed but will be slower.
CAPS3_COPY_TO_SYSTEMMEM = 0x00000200
// CAPS3_LINEAR_TO_SRGB_PRESENTATION indicates that the device can perform
// gamma correction from a windowed back buffer (containing linear content)
// to an sRGB desktop.
CAPS3_LINEAR_TO_SRGB_PRESENTATION = 0x00000080
// CLEAR_STENCIL clears the stencil buffer.
CLEAR_STENCIL = 0x00000004
// CLEAR_TARGET clears a render target, or all targets in a multiple render
// target.
CLEAR_TARGET = 0x00000001
// CLEAR_ZBUFFER clears the depth buffer.
CLEAR_ZBUFFER = 0x00000002
// CREATE_ADAPTERGROUP_DEVICE asks the device to drive all the heads that
// this master adapter owns. The flag is illegal on nonmaster adapters. If
// this flag is set, the presentation parameters passed to CreateDevice
// should point to an array of PRESENT_PARAMETERS. The number of elements
// in PRESENT_PARAMETERS should equal the number of adapters defined by the
// NumberOfAdaptersInGroup member of the CAPS9 structure. The DirectX
// runtime will assign each element to each head in the numerical order
// specified by the AdapterOrdinalInGroup member of CAPS9.
CREATE_ADAPTERGROUP_DEVICE = 0x00000200
// CREATE_DISABLE_DRIVER_MANAGEMENT instructs Direct3D to manage resources
// instead of the driver. Direct3D calls will not fail for resource errors
// such as insufficient video memory.
CREATE_DISABLE_DRIVER_MANAGEMENT = 0x00000400
// CREATE_DISABLE_DRIVER_MANAGEMENT_EX instructs Direct3D to manage
// resources instead of the driver. Unlike
// CREATE_DISABLE_DRIVER_MANAGEMENT, CREATE_DISABLE_DRIVER_MANAGEMENT_EX
// will return errors for conditions such as insufficient video memory.
CREATE_DISABLE_DRIVER_MANAGEMENT_EX = 0x00000400
// CREATE_DISABLE_PRINTSCREEN causes the runtime not register hotkeys for
// Printscreen, Ctrl-Printscreen and Alt-Printscreen to capture the desktop
// or window content.
// This flag is available in Direct3D 9Ex only.
CREATE_DISABLE_PRINTSCREEN = 0x00008000
// CREATE_DISABLE_PSGP_THREADING restricts computation to the main
// application thread. If the flag is not set, the runtime may perform
// software vertex processing and other computations in worker thread to
// improve performance on multi-processor systems. Differences between
// Windows XP and Windows Vista: This flag is available on Windows Vista,
// Windows Server 2008, and Windows 7.
CREATE_DISABLE_PSGP_THREADING = 0x00002000
// CREATE_ENABLE_PRESENTSTATS enables the gathering of present statistics
// on the device. Calls to GetPresentStatistics will return valid data.
// This flag is available in Direct3D 9Ex only.
CREATE_ENABLE_PRESENTSTATS = 0x00004000
// CREATE_FPU_PRESERVE sets the precision for Direct3D floating-point
// calculations to the precision used by the calling thread. If you do not
// specify this flag, Direct3D defaults to single-precision
// round-to-nearest mode for two reasons:
// 1) Double-precision mode will reduce Direct3D performance.
// 2) Portions of Direct3D assume floating-point unit exceptions are
// masked; unmasking these exceptions may result in undefined behavior.
CREATE_FPU_PRESERVE = 0x00000002
// CREATE_HARDWARE_VERTEXPROCESSING specifies hardware vertex processing.
CREATE_HARDWARE_VERTEXPROCESSING = 0x00000040
// CREATE_MIXED_VERTEXPROCESSING specifies mixed (both software and
// hardware) vertex processing.
CREATE_MIXED_VERTEXPROCESSING = 0x00000080
// CREATE_MULTITHREADED indicates that the application requests Direct3D to
// be multithread safe. This makes a Direct3D thread take ownership of its
// global critical section more frequently, which can degrade performance.
// If an application processes window messages in one thread while making
// Direct3D API calls in another, the application must use this flag when
// creating the device. This window must also be destroyed before unloading
// d3d9.dll.
CREATE_MULTITHREADED = 0x00000004
// CREATE_NOWINDOWCHANGES indicates that Direct3D must not alter the focus
// window in any way.
// Note: If this flag is set, the application must fully support all focus
// management events, such as ALT+TAB and mouse click events.
CREATE_NOWINDOWCHANGES = 0x00000800
// CREATE_PUREDEVICE specifies that Direct3D does not support Get* calls
// for anything that can be stored in state blocks. It also tells Direct3D
// not to provide any emulation services for vertex processing. This means
// that if the device does not support vertex processing, then the
// application can use only post-transformed vertices.
CREATE_PUREDEVICE = 0x00000010
// CREATE_SCREENSAVER allows screensavers during a fullscreen application.
// Without this flag, Direct3D will disable screensavers for as long as the
// calling application is fullscreen. If the calling application is already
// a screensaver, this flag has no effect.
// This flag is available in Direct3D 9Ex only.
CREATE_SCREENSAVER = 0x10000000
// CREATE_SOFTWARE_VERTEXPROCESSING specifies software vertex processing.
CREATE_SOFTWARE_VERTEXPROCESSING = 0x00000020
// CS_ALL is a combination of all clip flags.
CS_ALL = 0xFFF
// CS_LEFT means all vertices are clipped by the left plane of the viewing
// frustum.
CS_LEFT = 0x001
// CS_RIGHT means all vertices are clipped by the right plane of the
// viewing frustum.
CS_RIGHT = 0x002
// CS_TOP means all vertices are clipped by the top plane of the viewing
// frustum.
CS_TOP = 0x004
// CS_BOTTOM means all vertices are clipped by the bottom plane of the
// viewing frustum.
CS_BOTTOM = 0x008
// CS_FRONT means all vertices are clipped by the front plane of the
// viewing frustum.
CS_FRONT = 0x010
// CS_BACK means all vertices are clipped by the back plane of the viewing
// frustum.
CS_BACK = 0x020
// CS_PLANE0 uses application-defined clipping planes.
CS_PLANE0 = 0x040
// CS_PLANE1 uses application-defined clipping planes.
CS_PLANE1 = 0x080
// CS_PLANE2 uses application-defined clipping planes.
CS_PLANE2 = 0x100
// CS_PLANE3 uses application-defined clipping planes.
CS_PLANE3 = 0x200
// CS_PLANE4 uses application-defined clipping planes.
CS_PLANE4 = 0x400
// CS_PLANE5 uses application-defined clipping planes.
CS_PLANE5 = 0x800
// CURSORCAPS_COLOR indicates that the driver supports hardware color
// cursor in at least high resolution modes (height >= 400).
CURSORCAPS_COLOR = 1
// CURSORCAPS_LOWRES indicates that the driver supports hardware color
// cursor in low resolution modes (height < 400).
CURSORCAPS_LOWRES = 2
// DEVCAPS_CANBLTSYSTONONLOCAL means the device supports blits from
// system-memory textures to nonlocal video-memory textures.
DEVCAPS_CANBLTSYSTONONLOCAL = 0x0020000
// DEVCAPS_CANRENDERAFTERFLIP means the device can queue rendering commands
// after a page flip. Applications do not change their behavior if this
// flag is set; this capability means that the device is relatively fast.
DEVCAPS_CANRENDERAFTERFLIP = 0x0000800
// DEVCAPS_DRAWPRIMITIVES2 means the device can support at least a DirectX
// 5-compliant driver.
DEVCAPS_DRAWPRIMITIVES2 = 0x0002000
// DEVCAPS_DRAWPRIMITIVES2EX means the device can support at least a
// DirectX 7-compliant driver.
DEVCAPS_DRAWPRIMITIVES2EX = 0x0008000
// DEVCAPS_DRAWPRIMTLVERTEX means the device exports an
// IDirect3DDevice9::DrawPrimitive-aware hal.
DEVCAPS_DRAWPRIMTLVERTEX = 0x0000400
// DEVCAPS_EXECUTESYSTEMMEMORY means the device can use execute buffers
// from system memory.
DEVCAPS_EXECUTESYSTEMMEMORY = 0x0000010
// DEVCAPS_EXECUTEVIDEOMEMORY means the device can use execute buffers from
// video memory.
DEVCAPS_EXECUTEVIDEOMEMORY = 0x0000020
// DEVCAPS_HWRASTERIZATION means the device has hardware acceleration for
// scene rasterization.
DEVCAPS_HWRASTERIZATION = 0x0080000
// DEVCAPS_HWTRANSFORMANDLIGHT means the device can support transformation
// and lighting in hardware.
DEVCAPS_HWTRANSFORMANDLIGHT = 0x0010000
// DEVCAPS_NPATCHES means the device supports N patches.
DEVCAPS_NPATCHES = 0x1000000
// DEVCAPS_PUREDEVICE means the device can support rasterization,
// transform, lighting, and shading in hardware.
DEVCAPS_PUREDEVICE = 0x0100000
// DEVCAPS_QUINTICRTPATCHES means the device supports quintic Bézier
// curves and B-splines.
DEVCAPS_QUINTICRTPATCHES = 0x0200000
// DEVCAPS_RTPATCHES means the device supports rectangular and triangular
// patches.
DEVCAPS_RTPATCHES = 0x0400000
// DEVCAPS_RTPATCHHANDLEZERO means the hardware architecture does not
// require caching of any information, and uncached patches (handle zero)
// will be drawn as efficiently as cached ones. Note that setting
// DEVCAPS_RTPATCHHANDLEZERO does not mean that a patch with handle zero
// can be drawn. A handle-zero patch can always be drawn whether this cap
// is set or not.
DEVCAPS_RTPATCHHANDLEZERO = 0x0800000
// DEVCAPS_SEPARATETEXTUREMEMORIES means the device is texturing from
// separate memory pools.
DEVCAPS_SEPARATETEXTUREMEMORIES = 0x0004000
// DEVCAPS_TEXTURENONLOCALVIDMEM means the device can retrieve textures
// from non-local video memory.
DEVCAPS_TEXTURENONLOCALVIDMEM = 0x0001000
// DEVCAPS_TEXTURESYSTEMMEMORY means the device can retrieve textures from
// system memory.
DEVCAPS_TEXTURESYSTEMMEMORY = 0x0000100
// DEVCAPS_TEXTUREVIDEOMEMORY means the device can retrieve textures from
// device memory.
DEVCAPS_TEXTUREVIDEOMEMORY = 0x0000200
// DEVCAPS_TLVERTEXSYSTEMMEMORY means the device can use buffers from
// system memory for transformed and lit vertices.
DEVCAPS_TLVERTEXSYSTEMMEMORY = 0x0000040
// DEVCAPS_TLVERTEXVIDEOMEMORY means the device can use buffers from video
// memory for transformed and lit vertices.
DEVCAPS_TLVERTEXVIDEOMEMORY = 0x0000080
// DEVCAPS2_ADAPTIVETESSRTPATCH indicates that the device supports adaptive
// tessellation of RT-patches
DEVCAPS2_ADAPTIVETESSRTPATCH = 0x00000004
// DEVCAPS2_ADAPTIVETESSNPATCH indicates that the device supports adaptive
// tessellation of N-patches.
DEVCAPS2_ADAPTIVETESSNPATCH = 0x00000008
// DEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES indicates that the device
// supports StretchRect using a texture as the source.
DEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES = 0x00000010
// DEVCAPS2_DMAPNPATCH indicates that the device supports displacement maps
// for N-patches.
DEVCAPS2_DMAPNPATCH = 0x00000002
// DEVCAPS2_PRESAMPLEDDMAPNPATCH indicates that the device supports
// presampled displacement maps for N-patches.
DEVCAPS2_PRESAMPLEDDMAPNPATCH = 0x00000020
// DEVCAPS2_STREAMOFFSET indicates that the device supports stream offsets.
DEVCAPS2_STREAMOFFSET = 0x00000001
// DEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET means that multiple vertex
// elements can share the same offset in a stream if
// DEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET is set by the device and the
// vertex declaration does not have an element with DECLUSAGE_POSITIONT0.
DEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET = 0x00000040
// DTCAPS_UBYTE4 is a 4D unsigned byte.
DTCAPS_UBYTE4 = 0x00000001
// DTCAPS_UBYTE4N is a normalized, 4D unsigned byte. Each of the four bytes
// is normalized by dividing to 255.0.
DTCAPS_UBYTE4N = 0x00000002
// DTCAPS_SHORT2N is a normalized, 2D signed short, expanded to (first
// byte/32767.0, second byte/32767.0, 0, 1).
DTCAPS_SHORT2N = 0x00000004
// DTCAPS_SHORT4N is a normalized, 4D signed short, expanded to (first
// byte/32767.0, second byte/32767.0, third byte/32767.0, fourth
// byte/32767.0).
DTCAPS_SHORT4N = 0x00000008
// DTCAPS_USHORT2N is a normalized, 2D unsigned short, expanded to (first
// byte/65535.0, second byte/65535.0, 0, 1).
DTCAPS_USHORT2N = 0x00000010
// DTCAPS_USHORT4N is a normalized 4D unsigned short, expanded to (first
// byte/65535.0, second byte/65535.0, third byte/65535.0, fourth
// byte/65535.0).
DTCAPS_USHORT4N = 0x00000020
// DTCAPS_UDEC3 is a 3D unsigned 10 10 10 format expanded to (value, value,
// value, 1).
DTCAPS_UDEC3 = 0x00000040
// DTCAPS_DEC3N is a 3D signed 10 10 10 format normalized and expanded to
// (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1).
DTCAPS_DEC3N = 0x00000080
// DTCAPS_FLOAT16_2 is a 2D 16-bit floating point numbers.
DTCAPS_FLOAT16_2 = 0x00000100
// DTCAPS_FLOAT16_4 is a 4D 16-bit floating point numbers.
DTCAPS_FLOAT16_4 = 0x00000200
// OK_NOAUTOGEN is a success code. However, the autogeneration of mipmaps
// is not supported for this format. This means that resource creation will
// succeed but the mipmap levels will not be automatically generated.
OK_NOAUTOGEN = 141953135
// ERR_CONFLICTINGRENDERSTATE indicates that the currently set render
// states cannot be used together.
ERR_CONFLICTINGRENDERSTATE = -2005530591
// ERR_CONFLICTINGTEXTUREFILTER indicates that the current texture filters
// cannot be used together.
ERR_CONFLICTINGTEXTUREFILTER = -2005530594
// ERR_CONFLICTINGTEXTUREPALETTE indicates that the current textures cannot
// be used simultaneously.
ERR_CONFLICTINGTEXTUREPALETTE = -2005530586
// ERR_DEVICEHUNG indicates that the device that returned this code caused
// the hardware adapter to be reset by the OS. Most applications should
// destroy the device and quit. Applications that must continue should
// destroy all video memory objects (surfaces, textures, state blocks etc)
// and call Reset() to put the device in a default state. If the
// application then continues rendering in the same way, the device will
// return to this state.
// Applies to Direct3D 9Ex only.
ERR_DEVICEHUNG = -2005530508
// ERR_DEVICELOST indicates that the device has been lost but cannot be
// reset at this time. Therefore, rendering is not possible. A Direct3D
// device object other than the one that returned this code caused the
// hardware adapter to be reset by the OS. Delete all video memory objects
// (surfaces, textures, state blocks) and call Reset() to return the device
// to a default state. If the application continues rendering without a
// reset, the rendering calls will succeed.
ERR_DEVICELOST = -2005530520
// ERR_DEVICENOTRESET indicates that the device has been lost but can be
// reset at this time.
ERR_DEVICENOTRESET = -2005530519
// ERR_DEVICEREMOVED indicates that he hardware adapter has been removed.
// Application must destroy the device, do enumeration of adapters and
// create another Direct3D device. If application continues rendering
// without calling Reset, the rendering calls will succeed.
// Applies to Direct3D 9Ex only.
ERR_DEVICEREMOVED = -2005530512
// ERR_DRIVERINTERNALERROR Internal driver error. Applications should
// destroy and recreate the device when receiving this error.
ERR_DRIVERINTERNALERROR = -2005530585
// ERR_DRIVERINVALIDCALL is not used.
ERR_DRIVERINVALIDCALL = -2005530515
// ERR_INVALIDCALL indicates that the method call is invalid. For example,
// a method's parameter may not be an invalid pointer.
ERR_INVALIDCALL = -2005530516
// ERR_INVALIDDEVICE indicates that the requested device type is not valid.
ERR_INVALIDDEVICE = -2005530517
// ERR_MOREDATA indicates that there is more data available than the
// specified buffer size can hold.
ERR_MOREDATA = -2005530521
// ERR_NOTAVAILABLE indicates that this device does not support the queried
// technique.
ERR_NOTAVAILABLE = -2005530518
// ERR_NOTFOUND indicates that the requested item was not found.
ERR_NOTFOUND = -2005530522
// _OK indicates that no error occurred.
OK = S_OK
// ERR_OUTOFVIDEOMEMORY indicates that Direct3D does not have enough
// display memory to perform the operation. The device is using more
// resources in a single scene than can fit simultaneously into video
// memory. Present, PresentEx, or CheckDeviceState can return this error.
// Recovery is similar to ERR_DEVICEHUNG, though the application may want
// to reduce its per-frame memory usage as well to avoid having the error
// recur.
ERR_OUTOFVIDEOMEMORY = -2005532292
// ERR_TOOMANYOPERATIONS indicates that the application is requesting more
// texture-filtering operations than the device supports.
ERR_TOOMANYOPERATIONS = -2005530595
// ERR_UNSUPPORTEDALPHAARG indicates that the device does not support a
// specified texture-blending argument for the alpha channel.
ERR_UNSUPPORTEDALPHAARG = -2005530596
// ERR_UNSUPPORTEDALPHAOPERATION indicates that the device does not support
// a specified texture-blending operation for the alpha channel.
ERR_UNSUPPORTEDALPHAOPERATION = -2005530597
// ERR_UNSUPPORTEDCOLORARG indicates that the device does not support a
// specified texture-blending argument for color values.
ERR_UNSUPPORTEDCOLORARG = -2005530598
// ERR_UNSUPPORTEDCOLOROPERATION indicates that the device does not support
// a specified texture-blending operation for color values.
ERR_UNSUPPORTEDCOLOROPERATION = -2005530599
// ERR_UNSUPPORTEDFACTORVALUE indicates that the device does not support
// the specified texture factor value. Not used; provided only to support
// older drivers.
ERR_UNSUPPORTEDFACTORVALUE = -2005530593
// ERR_UNSUPPORTEDTEXTUREFILTER indicates that the device does not support
// the specified texture filter.
ERR_UNSUPPORTEDTEXTUREFILTER = -2005530590
// ERR_WASSTILLDRAWING indicates that the previous blit operation that is
// transferring information to or from this surface is incomplete.
ERR_WASSTILLDRAWING = -2005532132
// ERR_WRONGTEXTUREFORMAT indicates that the pixel format of the texture
// surface is not valid.
ERR_WRONGTEXTUREFORMAT = -2005530600
// E_FAIL indicates that an undetermined error occurred inside the Direct3D
// subsystem.
E_FAIL = -2147467259
// E_INVALIDARG indicates that an invalid parameter was passed to the
// returning function.
E_INVALIDARG = -2147024809
// E_NOINTERFACE indicates that no object interface is available.
E_NOINTERFACE = -2147467262
// E_NOTIMPL indicates that a method is not implemented.
E_NOTIMPL = -2147467263
// E_OUTOFMEMORY indicates that Direct3D could not allocate sufficient
// memory to complete the call.
E_OUTOFMEMORY = -2147024882
// S_NOT_RESIDENT indicates that at least one allocation that comprises the
// resources is on disk. Direct3D 9Ex only.
S_NOT_RESIDENT = 141953141
// S_RESIDENT_IN_SHARED_MEMORY indicates that no allocations that comprise
// the resources are on disk. However, at least one allocation is not in
// GPU-accessible memory. Direct3D 9Ex only.
S_RESIDENT_IN_SHARED_MEMORY = 141953142
// ERR_UNSUPPORTEDOVERLAY indicates that the device does not support
// overlay for the specified size or display mode.
// Direct3D 9Ex under Windows 7 only.
ERR_UNSUPPORTEDOVERLAY = -2005530501
// ERR_UNSUPPORTEDOVERLAYFORMAT indicates that the device does not support
// overlay for the specified surface format.
// Direct3D 9Ex under Windows 7 only.
ERR_UNSUPPORTEDOVERLAYFORMAT = -2005530500
// ERR_CANNOTPROTECTCONTENT indicates that the specified content cannot be
// protected.
// Direct3D 9Ex under Windows 7 only.
ERR_CANNOTPROTECTCONTENT = -2005530499
// ERR_UNSUPPORTEDCRYPTO indicates that the specified cryptographic
// algorithm is not supported.
// Direct3D 9Ex under Windows 7 only.
ERR_UNSUPPORTEDCRYPTO = -2005530498
// FVFCAPS_DONOTSTRIPELEMENTS means it is preferable that vertex elements
// not be stripped. That is, if the vertex format contains elements that
// are not used with the current render states, there is no need to
// regenerate the vertices. If this capability flag is not present,
// stripping extraneous elements from the vertex format provides better
// performance.
FVFCAPS_DONOTSTRIPELEMENTS = 0x080000
// FVFCAPS_PSIZE means the point size is determined by either the render
// state or the vertex data. If an FVF is used, point size can come from
// point size data in the vertex declaration. Otherwise, point size is
// determined by the render state RS_POINTSIZE. If the application provides
// point size in both (the render state and the vertex declaration), the
// vertex data overrides the render-state data.
FVFCAPS_PSIZE = 0x100000
// FVFCAPS_TEXCOORDCOUNTMASK masks the low WORD of FVFCaps. These bits,
// cast to the WORD data type, describe the total number of texture
// coordinate sets that the device can simultaneously use for multiple
// texture blending. (You can use up to eight texture coordinate sets for
// any vertex, but the device can blend using only the specified number of
// texture coordinate sets.)
FVFCAPS_TEXCOORDCOUNTMASK = 0x00FFFF
// FVF_DIFFUSE means the vertex format includes a diffuse color component.
// It is a COLOR in ARGB order.
FVF_DIFFUSE = 0x0040
// FVF_NORMAL means the vertex format includes a vertex normal vector. This
// flag cannot be used with the FVF_XYZRHW flag. The normal consists of
// three float32s.
FVF_NORMAL = 0x0010
// FVF_PSIZE means vertex format specified in point size. This size is
// expressed in camera space units for vertices that are not transformed
// and lit, and in device-space units for transformed and lit vertices.
FVF_PSIZE = 0x0020
// FVF_SPECULAR means the vertex format includes a specular color component.
FVF_SPECULAR = 0x0080
// FVF_XYZ means the vertex format includes the position of an
// untransformed vertex. This flag cannot be used with the FVF_XYZRHW flag.
FVF_XYZ = 0x0002
// FVF_XYZRHW means the vertex format includes the position of a
// transformed vertex. This flag cannot be used with the FVF_XYZ or
// FVF_NORMAL flags.
FVF_XYZRHW = 0x0004
// FVF_XYZB1 means the vertex format contains position data, and 1
// weighting (beta) value to use for multimatrix vertex blending
// operations. Currently, Direct3D can blend with up to three weighting
// values and four blending matrices.
FVF_XYZB1 = 0x0006
// FVF_XYZB2 means the vertex format contains position data, and 2
// weighting (beta) values to use for multimatrix vertex blending
// operations. Currently, Direct3D can blend with up to three weighting
// values and four blending matrices.
FVF_XYZB2 = 0x0008
// FVF_XYZB3 means the vertex format contains position data, and 3
// weighting (beta) values to use for multimatrix vertex blending
// operations. Currently, Direct3D can blend with up to three weighting
// values and four blending matrices.
FVF_XYZB3 = 0x000a
// FVF_XYZB4 means the vertex format contains position data, and 4
// weighting (beta) values to use for multimatrix vertex blending
// operations. Currently, Direct3D can blend with up to three weighting
// values and four blending matrices.
FVF_XYZB4 = 0x000c
// FVF_XYZB5 means the vertex format contains position data, and 5
// weighting (beta) values to use for multimatrix vertex blending
// operations. Currently, Direct3D can blend with up to three weighting
// values and four blending matrices.
FVF_XYZB5 = 0x000e
// FVF_XYZW means the vertex format contains transformed and clipped (x, y,
// z, w) data. ProcessVertices does not invoke the clipper, instead
// outputting data in clip coordinates. This constant is designed for, and
// can only be used with, the programmable vertex pipeline.
FVF_XYZW = 0x4002
// FVF_TEX0 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX0 = 0x0000
// FVF_TEX1 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX1 = 0x0100
// FVF_TEX2 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX2 = 0x0200
// FVF_TEX3 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX3 = 0x0300
// FVF_TEX4 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX4 = 0x0400
// FVF_TEX5 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX5 = 0x0500
// FVF_TEX6 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX6 = 0x0600
// FVF_TEX7 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX7 = 0x0700
// FVF_TEX8 is the number of texture coordinate sets for this vertex. The
// actual values for these flags are not sequential.
FVF_TEX8 = 0x0800
// FVF_TEXTUREFORMAT1 means 1 floating point value.
FVF_TEXTUREFORMAT1 = 3
// FVF_TEXTUREFORMAT2 means 2 floating point value.
FVF_TEXTUREFORMAT2 = 0
// FVF_TEXTUREFORMAT3 means 3 floating point value.
FVF_TEXTUREFORMAT3 = 1
// FVF_TEXTUREFORMAT4 means 4 floating point value.
FVF_TEXTUREFORMAT4 = 2
// FVF_POSITION_MASK means the format has a mask for position bits.
FVF_POSITION_MASK = 0x400E
// FVF_TEXCOUNT_MASK means the format has a mask value for texture flag
// bits.
FVF_TEXCOUNT_MASK = 0x0f00
// FVF_LASTBETA_D3DCOLOR means the last beta field in the vertex position
// data will be of type COLOR. The data in the beta fields are used with
// matrix palette skinning to specify matrix indices.
FVF_LASTBETA_D3DCOLOR = 0x8000
// FVF_LASTBETA_UBYTE4 means the last beta field in the vertex position
// data will be of type UBYTE4. The data in the beta fields are used with
// matrix palette skinning to specify matrix indices.
FVF_LASTBETA_UBYTE4 = 0x1000
// FVF_TEXCOUNT_SHIFT is the number of bits by which to shift an integer
// value that identifies the number of texture coordinates for a vertex.
FVF_TEXCOUNT_SHIFT = 8
// LINECAPS_ALPHACMP means it supports alpha-test comparisons.
LINECAPS_ALPHACMP = 0x08
// LINECAPS_ANTIALIAS means antialiased lines are supported.
LINECAPS_ANTIALIAS = 0x20
// LINECAPS_BLEND means it supports source-blending.
LINECAPS_BLEND = 0x04
// LINECAPS_FOG means it supports fog.
LINECAPS_FOG = 0x10
// LINECAPS_TEXTURE means it supports texture-mapping.
LINECAPS_TEXTURE = 0x01
// LINECAPS_ZTEST means it supports z-buffer comparisons.
LINECAPS_ZTEST = 0x02
// LOCK_DISCARD instructs the application to discard all memory within the
// locked region. For vertex and index buffers, the entire buffer will be
// discarded. This option is only valid when the resource is created with
// dynamic usage.
LOCK_DISCARD = 0x2000
// LOCK_DONOTWAIT allows an application to gain back CPU cycles if the
// driver cannot lock the surface immediately. If this flag is set and the
// driver cannot lock the surface immediately, the lock call will return
// ERR_WASSTILLDRAWING. This flag can only be used when locking a surface
// created using CreateOffscreenPlainSurface, CreateRenderTarget, or
// CreateDepthStencilSurface. This flag can also be used with a back buffer.
LOCK_DONOTWAIT = 0x4000
// LOCK_NO_DIRTY_UPDATE by default, a lock on a resource adds a dirty
// region to that resource. This option prevents any changes to the dirty
// state of the resource. Applications should use this option when they
// have additional information about the set of regions changed during the
// lock operation.
LOCK_NO_DIRTY_UPDATE = 0x8000
// LOCK_NOOVERWRITE indicates that memory that was referred to in a drawing
// call since the last lock without this flag will not be modified during
// the lock. This can enable optimizations when the application is
// appending data to a resource. Specifying this flag enables the driver to
// return immediately if the resource is in use, otherwise, the driver must
// finish using the resource before returning from locking.
LOCK_NOOVERWRITE = 0x1000
// LOCK_NOSYSLOCK the default behavior of a video memory lock is to reserve
// a system-wide critical section, guaranteeing that no display mode
// changes will occur for the duration of the lock. This option causes the
// system-wide critical section not to be held for the duration of the lock.
// The lock operation is time consuming, but can enable the system to
// perform other duties, such as moving the mouse cursor. This option is
// useful for long-duration locks, such as the lock of the back buffer for
// software rendering that would otherwise adversely affect system
// responsiveness.
LOCK_NOSYSLOCK = 0x0800
// LOCK_READONLY means the application will not write to the buffer. This
// enables resources stored in non-native formats to save the recompression
// step when unlocking.
LOCK_READONLY = 0x0010
// PBLENDCAPS_BLENDFACTOR means the driver supports both BLEND_BLENDFACTOR
// and BLEND_INVBLENDFACTOR.
PBLENDCAPS_BLENDFACTOR = 0x00002000
// PBLENDCAPS_BOTHINVSRCALPHA means the source blend factor is (1 - As, 1 -
// As, 1 - As, 1 - As) and destination blend factor is (As, As, As, As);
// the destination blend selection is overridden.
PBLENDCAPS_BOTHINVSRCALPHA = 0x00001000
// PBLENDCAPS_BOTHSRCALPHA means the driver supports the BLEND_BOTHSRCALPHA
// blend mode. (This blend mode is obsolete.)
PBLENDCAPS_BOTHSRCALPHA = 0x00000800
// PBLENDCAPS_DESTALPHA means the blend factor is (Ad, Ad, Ad, Ad).
PBLENDCAPS_DESTALPHA = 0x00000040
// PBLENDCAPS_DESTCOLOR means the blend factor is (Rd, Gd, Bd, Ad).
PBLENDCAPS_DESTCOLOR = 0x00000100
// PBLENDCAPS_INVDESTALPHA means the blend factor is (1 - Ad, 1 - Ad, 1 -
// Ad, 1 - Ad).
PBLENDCAPS_INVDESTALPHA = 0x00000080
// PBLENDCAPS_INVDESTCOLOR means the blend factor is (1 - Rd, 1 - Gd, 1 -
// Bd, 1 - Ad).
PBLENDCAPS_INVDESTCOLOR = 0x00000200
// PBLENDCAPS_INVSRCALPHA means the blend factor is (1 - As, 1 - As, 1 -
// As, 1 - As).
PBLENDCAPS_INVSRCALPHA = 0x00000020
// PBLENDCAPS_INVSRCCOLOR means the blend factor is (1 - Rs, 1 - Gs, 1 -
// Bs, 1 - As).
PBLENDCAPS_INVSRCCOLOR = 0x00000008
// PBLENDCAPS_ONE means the blend factor is (1, 1, 1, 1).
PBLENDCAPS_ONE = 0x00000002
// PBLENDCAPS_SRCALPHA means the blend factor is (As, As, As, As).
PBLENDCAPS_SRCALPHA = 0x00000010
// PBLENDCAPS_SRCALPHASAT means the blend factor is (f, f, f, 1); f =
// min(As, 1 - Ad).
PBLENDCAPS_SRCALPHASAT = 0x00000400
// PBLENDCAPS_SRCCOLOR means the blend factor is (Rs, Gs, Bs, As).
PBLENDCAPS_SRCCOLOR = 0x00000004
// PBLENDCAPS_ZERO means the blend factor is (0, 0, 0, 0).
PBLENDCAPS_ZERO = 0x00000001
// PCMPCAPS_ALWAYS always passes the z-test.
PCMPCAPS_ALWAYS = 0x80
// PCMPCAPS_EQUAL passes the z-test if the new z equals the current z.
PCMPCAPS_EQUAL = 0x04
// PCMPCAPS_GREATER passes the z-test if the new z is greater than the
// current z.
PCMPCAPS_GREATER = 0x10
// PCMPCAPS_GREATEREQUAL passes the z-test if the new z is greater than or
// equal to the current z.
PCMPCAPS_GREATEREQUAL = 0x40
// PCMPCAPS_LESS passes the z-test if the new z is less than the current z.
PCMPCAPS_LESS = 0x02
// PCMPCAPS_LESSEQUAL passes the z-test if the new z is less than or equal
// to the current z.
PCMPCAPS_LESSEQUAL = 0x08
// PCMPCAPS_NEVER always fails the z-test.
PCMPCAPS_NEVER = 0x01
// PCMPCAPS_NOTEQUAL passes the z-test if the new z does not equal the
// current z.
PCMPCAPS_NOTEQUAL = 0x20
// PMISCCAPS_MASKZ means the device can enable and disable modification of
// the depth buffer on pixel operations.
PMISCCAPS_MASKZ = 0x00000002
// PMISCCAPS_CULLNONE means the driver does not perform triangle culling.
// This corresponds to the CULL_NONE member of the CULL enumerated type.
PMISCCAPS_CULLNONE = 0x00000010
// PMISCCAPS_CULLCW means the driver supports clockwise triangle culling
// through the RS_CULLMODE state. (This applies only to triangle
// primitives.) This flag corresponds to the CULL_CW member of the CULL
// enumerated type.
PMISCCAPS_CULLCW = 0x00000020
// PMISCCAPS_CULLCCW means the driver supports counterclockwise culling
// through the RS_CULLMODE state. (This applies only to triangle
// primitives.) This flag corresponds to the CULL_CCW member of the CULL
// enumerated type.
PMISCCAPS_CULLCCW = 0x00000040
// PMISCCAPS_COLORWRITEENABLE means the device supports per-channel writes
// for the render-target color buffer through the RS_COLORWRITEENABLE state.
PMISCCAPS_COLORWRITEENABLE = 0x00000080
// PMISCCAPS_CLIPPLANESCALEDPOINTS means the device correctly clips scaled
// points of size greater than 1.0 to user-defined clipping planes.
PMISCCAPS_CLIPPLANESCALEDPOINTS = 0x00000100
// PMISCCAPS_CLIPTLVERTS means the device clips post-transformed vertex
// primitives.
// Specify USAGE_DONOTCLIP when the pipeline should not do any clipping.
// For this case, additional software clipping may need to be performed at
// draw time, requiring the vertex buffer to be in system memory.
PMISCCAPS_CLIPTLVERTS = 0x00000200
// PMISCCAPS_TSSARGTEMP means the device supports TA for temporary register.
PMISCCAPS_TSSARGTEMP = 0x00000400
// PMISCCAPS_BLENDOP means the device supports alpha-blending operations
// other than BLENDOP_ADD.
PMISCCAPS_BLENDOP = 0x00000800
// PMISCCAPS_NULLREFERENCE is a reference device that does not render.
PMISCCAPS_NULLREFERENCE = 0x00001000
// PMISCCAPS_INDEPENDENTWRITEMASKS means the device supports independent
// write masks for multiple element textures or multiple render targets.
PMISCCAPS_INDEPENDENTWRITEMASKS = 0x00004000
// PMISCCAPS_PERSTAGECONSTANT means the device supports per-stage
// constants. See TSS_CONSTANT in TEXTURESTAGESTATETYPE.
PMISCCAPS_PERSTAGECONSTANT = 0x00008000
// PMISCCAPS_FOGANDSPECULARALPHA means the device supports separate fog and
// specular alpha. Many devices use the specular alpha channel to store the
// fog factor.
PMISCCAPS_FOGANDSPECULARALPHA = 0x00010000
// PMISCCAPS_SEPARATEALPHABLEND means the device supports separate blend
// settings for the alpha channel.
PMISCCAPS_SEPARATEALPHABLEND = 0x00020000
// PMISCCAPS_MRTINDEPENDENTBITDEPTHS means the device supports different
// bit depths for multiple render targets.
PMISCCAPS_MRTINDEPENDENTBITDEPTHS = 0x00040000
// PMISCCAPS_MRTPOSTPIXELSHADERBLENDING means the device supports
// post-pixel shader operations for multiple render targets.
PMISCCAPS_MRTPOSTPIXELSHADERBLENDING = 0x00080000
// PMISCCAPS_FOGVERTEXCLAMPED means the device clamps fog blend factor per
// vertex.
PMISCCAPS_FOGVERTEXCLAMPED = 0x00100000
// PRASTERCAPS_ANISOTROPY means the device supports anisotropic filtering.
PRASTERCAPS_ANISOTROPY = 0x00020000
// PRASTERCAPS_COLORPERSPECTIVE means the device iterates colors
// perspective correctly.
PRASTERCAPS_COLORPERSPECTIVE = 0x00400000
// PRASTERCAPS_DITHER means the device can dither to improve color
// resolution.
PRASTERCAPS_DITHER = 0x00000001
// PRASTERCAPS_DEPTHBIAS means the device supports legacy depth bias. For
// true depth bias, see PRASTERCAPS_SLOPESCALEDEPTHBIAS.
PRASTERCAPS_DEPTHBIAS = 0x04000000
// PRASTERCAPS_FOGRANGE means the device supports range-based fog. In
// range-based fog, the distance of an object from the viewer is used to
// compute fog effects, not the depth of the object (that is, the
// z-coordinate) in the scene.
PRASTERCAPS_FOGRANGE = 0x00010000
// PRASTERCAPS_FOGTABLE means the device calculates the fog value by
// referring to a lookup table containing fog values that are indexed to
// the depth of a given pixel.
PRASTERCAPS_FOGTABLE = 0x00000100
// PRASTERCAPS_FOGVERTEX means the device calculates the fog value during
// the lighting operation and interpolates the fog value during
// rasterization.
PRASTERCAPS_FOGVERTEX = 0x00000080
// PRASTERCAPS_MIPMAPLODBIAS means the device supports level-of-detail bias
// adjustments. These bias adjustments enable an application to make a
// mipmap appear crisper or less sharp than it normally would. For more
// information about level-of-detail bias in mipmaps, see
// SAMP_MIPMAPLODBIAS.
PRASTERCAPS_MIPMAPLODBIAS = 0x00002000
// PRASTERCAPS_MULTISAMPLE_TOGGLE means the device supports toggling
// multisampling on and off between Device.BeginScene and Device.EndScene
// (using RS_MULTISAMPLEANTIALIAS).
PRASTERCAPS_MULTISAMPLE_TOGGLE = 0x08000000
// PRASTERCAPS_SCISSORTEST means the device supports scissor test.
PRASTERCAPS_SCISSORTEST = 0x01000000
// PRASTERCAPS_SLOPESCALEDEPTHBIAS means the device performs true
// slope-scale based depth bias. This is in contrast to the legacy style
// depth bias.
PRASTERCAPS_SLOPESCALEDEPTHBIAS = 0x02000000
// PRASTERCAPS_WBUFFER means the device supports depth buffering using w.
PRASTERCAPS_WBUFFER = 0x00040000
// PRASTERCAPS_WFOG means the device supports w-based fog. W-based fog is
// used when a perspective projection matrix is specified, but affine
// projections still use z-based fog. The system considers a projection
// matrix that contains a nonzero value in the [3][4] element to be a
// perspective projection matrix.
PRASTERCAPS_WFOG = 0x00100000
// PRASTERCAPS_ZBUFFERLESSHSR means the device can perform hidden-surface
// removal (HSR) without requiring the application to sort polygons and
// without requiring the allocation of a depth-buffer. This leaves more
// video memory for textures. The method used to perform HSR is
// hardware-dependent and is transparent to the application.
// Z-bufferless HSR is performed if no depth-buffer surface is associated
// with the rendering-target surface and the depth-buffer comparison test
// is enabled (that is, when the state value associated with the RS_ZENABLE
// enumeration constant is set to TRUE).
PRASTERCAPS_ZBUFFERLESSHSR = 0x00008000
// PRASTERCAPS_ZFOG means the device supports z-based fog.
PRASTERCAPS_ZFOG = 0x00200000
// PRASTERCAPS_ZTEST means the device can perform z-test operations. This
// effectively renders a primitive and indicates whether any z pixels have
// been rendered.
PRASTERCAPS_ZTEST = 0x00000010
// PRESENT_INTERVAL_DEFAULT is nearly equivalent to PRESENT_INTERVAL_ONE.
PRESENT_INTERVAL_DEFAULT = 0x00000000
// PRESENT_INTERVAL_ONE means the driver will wait for the vertical retrace
// period (the runtime will "beam follow" to prevent tearing). Present
// operations will not be affected more frequently than the screen refresh;
// the runtime will complete at most one Present operation per adapter
// refresh period. This is equivalent to using SWAPEFFECT_COPYVSYNC in
// DirectX 8.1. This option is always available for both windowed and
// full-screen swap chains.
PRESENT_INTERVAL_ONE = 0x00000001
// PRESENT_INTERVAL_TWO means the driver will wait for the vertical retrace
// period. Present operations will not be affected more frequently than
// every second screen refresh. Check the PresentationIntervals cap (see