xash3d-ffi 0.2.2

Raw FFI bindings to Xash3D FWGS engine
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
/* automatically generated by rust-bindgen 0.72.0 */

pub const DXT_ENCODE_DEFAULT: i32 = 0;
pub const DXT_ENCODE_COLOR_YCoCg: i32 = 6657;
pub const DXT_ENCODE_ALPHA_1BIT: i32 = 6658;
pub const DXT_ENCODE_ALPHA_8BIT: i32 = 6659;
pub const DXT_ENCODE_ALPHA_SDF: i32 = 6660;
pub const DXT_ENCODE_NORMAL_AG_ORTHO: i32 = 6661;
pub const DXT_ENCODE_NORMAL_AG_STEREO: i32 = 6662;
pub const DXT_ENCODE_NORMAL_AG_PARABOLOID: i32 = 6663;
pub const DXT_ENCODE_NORMAL_AG_QUARTIC: i32 = 6664;
pub const DXT_ENCODE_NORMAL_AG_AZIMUTHAL: i32 = 6665;
pub const REF_API_VERSION: i32 = 10;
pub const VID_SCREENSHOT: i32 = 0;
pub const VID_LEVELSHOT: i32 = 1;
pub const VID_MINISHOT: i32 = 2;
pub const VID_MAPSHOT: i32 = 3;
pub const VID_SNAPSHOT: i32 = 4;
pub const kRenderScreenFadeModulate: i32 = 4096;
pub const SKYBOX_MAX_SIDES: i32 = 6;
#[allow(unsafe_code)]
pub const REF_DEFAULT_TEXTURE: &::core::ffi::CStr =
    unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"*default\0") };
#[allow(unsafe_code)]
pub const REF_GRAY_TEXTURE: &::core::ffi::CStr =
    unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"*gray\0") };
#[allow(unsafe_code)]
pub const REF_WHITE_TEXTURE: &::core::ffi::CStr =
    unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"*white\0") };
#[allow(unsafe_code)]
pub const REF_BLACK_TEXTURE: &::core::ffi::CStr =
    unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"*black\0") };
#[allow(unsafe_code)]
pub const REF_PARTICLE_TEXTURE: &::core::ffi::CStr =
    unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"*particle\0") };
#[allow(unsafe_code)]
pub const GET_REF_API: &::core::ffi::CStr =
    unsafe { ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"GetRefAPI\0") };
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct convar_s {
    pub name: *mut ::core::ffi::c_char,
    pub string: *mut ::core::ffi::c_char,
    pub flags: u32,
    pub value: f32,
    pub next: *mut convar_s,
    pub desc: *mut ::core::ffi::c_char,
    pub def_string: *mut ::core::ffi::c_char,
}
pub type convar_t = convar_s;
pub const pixformat_t_PF_UNKNOWN: pixformat_t = 0;
pub const pixformat_t_PF_INDEXED_24: pixformat_t = 1;
pub const pixformat_t_PF_INDEXED_32: pixformat_t = 2;
pub const pixformat_t_PF_RGBA_32: pixformat_t = 3;
pub const pixformat_t_PF_BGRA_32: pixformat_t = 4;
pub const pixformat_t_PF_RGB_24: pixformat_t = 5;
pub const pixformat_t_PF_BGR_24: pixformat_t = 6;
pub const pixformat_t_PF_LUMINANCE: pixformat_t = 7;
pub const pixformat_t_PF_DXT1: pixformat_t = 8;
pub const pixformat_t_PF_DXT3: pixformat_t = 9;
pub const pixformat_t_PF_DXT5: pixformat_t = 10;
pub const pixformat_t_PF_ATI2: pixformat_t = 11;
pub const pixformat_t_PF_BC4_SIGNED: pixformat_t = 12;
pub const pixformat_t_PF_BC4_UNSIGNED: pixformat_t = 13;
pub const pixformat_t_PF_BC5_SIGNED: pixformat_t = 14;
pub const pixformat_t_PF_BC5_UNSIGNED: pixformat_t = 15;
pub const pixformat_t_PF_BC6H_SIGNED: pixformat_t = 16;
pub const pixformat_t_PF_BC6H_UNSIGNED: pixformat_t = 17;
pub const pixformat_t_PF_BC7_UNORM: pixformat_t = 18;
pub const pixformat_t_PF_BC7_SRGB: pixformat_t = 19;
pub const pixformat_t_PF_KTX2_RAW: pixformat_t = 20;
pub const pixformat_t_PF_TOTALCOUNT: pixformat_t = 21;
pub type pixformat_t = ::core::ffi::c_uint;
#[repr(C)]
pub struct bpc_desc_s {
    pub format: ::core::ffi::c_int,
    pub name: [::core::ffi::c_char; 16usize],
    pub glFormat: uint,
    pub bpp: ::core::ffi::c_int,
}
pub type bpc_desc_t = bpc_desc_s;
pub const ilFlags_t_IL_USE_LERPING: ilFlags_t = 1;
pub const ilFlags_t_IL_KEEP_8BIT: ilFlags_t = 2;
pub const ilFlags_t_IL_ALLOW_OVERWRITE: ilFlags_t = 4;
pub const ilFlags_t_IL_DONTFLIP_TGA: ilFlags_t = 8;
pub const ilFlags_t_IL_DDS_HARDWARE: ilFlags_t = 16;
pub const ilFlags_t_IL_LOAD_DECAL: ilFlags_t = 32;
pub const ilFlags_t_IL_OVERVIEW: ilFlags_t = 64;
pub const ilFlags_t_IL_LOAD_PLAYER_DECAL: ilFlags_t = 128;
pub const ilFlags_t_IL_KTX2_RAW: ilFlags_t = 256;
pub type ilFlags_t = ::core::ffi::c_uint;
pub const imgFlags_t_IMAGE_CUBEMAP: imgFlags_t = 1;
pub const imgFlags_t_IMAGE_HAS_ALPHA: imgFlags_t = 2;
pub const imgFlags_t_IMAGE_HAS_COLOR: imgFlags_t = 4;
pub const imgFlags_t_IMAGE_COLORINDEX: imgFlags_t = 8;
pub const imgFlags_t_IMAGE_HAS_LUMA: imgFlags_t = 16;
pub const imgFlags_t_IMAGE_SKYBOX: imgFlags_t = 32;
pub const imgFlags_t_IMAGE_QUAKESKY: imgFlags_t = 64;
pub const imgFlags_t_IMAGE_DDS_FORMAT: imgFlags_t = 128;
pub const imgFlags_t_IMAGE_MULTILAYER: imgFlags_t = 256;
pub const imgFlags_t_IMAGE_ONEBIT_ALPHA: imgFlags_t = 512;
pub const imgFlags_t_IMAGE_QUAKEPAL: imgFlags_t = 1024;
pub const imgFlags_t_IMAGE_FLIP_X: imgFlags_t = 65536;
pub const imgFlags_t_IMAGE_FLIP_Y: imgFlags_t = 131072;
pub const imgFlags_t_IMAGE_ROT_90: imgFlags_t = 262144;
pub const imgFlags_t_IMAGE_ROT180: imgFlags_t = 196608;
pub const imgFlags_t_IMAGE_ROT270: imgFlags_t = 458752;
pub const imgFlags_t_IMAGE_RESAMPLE: imgFlags_t = 1048576;
pub const imgFlags_t_IMAGE_FORCE_RGBA: imgFlags_t = 8388608;
pub const imgFlags_t_IMAGE_MAKE_LUMA: imgFlags_t = 16777216;
pub const imgFlags_t_IMAGE_QUANTIZE: imgFlags_t = 33554432;
pub const imgFlags_t_IMAGE_LIGHTGAMMA: imgFlags_t = 67108864;
pub const imgFlags_t_IMAGE_REMAP: imgFlags_t = 134217728;
pub type imgFlags_t = ::core::ffi::c_uint;
#[repr(C)]
pub struct rgbdata_s {
    pub width: word,
    pub height: word,
    pub depth: word,
    pub type_: uint,
    pub flags: uint,
    pub encode: word,
    pub numMips: byte,
    pub palette: *mut byte,
    pub buffer: *mut byte,
    pub fogParams: rgba_t,
    pub size: usize,
}
pub type rgbdata_t = rgbdata_s;
pub const demo_mode_DEMO_INACTIVE: demo_mode = 0;
pub const demo_mode_DEMO_XASH3D: demo_mode = 1;
pub const demo_mode_DEMO_QUAKE1: demo_mode = 2;
pub type demo_mode = ::core::ffi::c_uint;
pub const ref_window_type_e_REF_WINDOW_TYPE_NULL: ref_window_type_e = 0;
pub const ref_window_type_e_REF_WINDOW_TYPE_WIN32: ref_window_type_e = 1;
pub const ref_window_type_e_REF_WINDOW_TYPE_X11: ref_window_type_e = 2;
pub const ref_window_type_e_REF_WINDOW_TYPE_WAYLAND: ref_window_type_e = 3;
pub const ref_window_type_e_REF_WINDOW_TYPE_MACOS: ref_window_type_e = 4;
pub const ref_window_type_e_REF_WINDOW_TYPE_SDL: ref_window_type_e = 5;
pub type ref_window_type_e = ::core::ffi::c_uint;
pub use self::ref_window_type_e as ref_window_type_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sortedface_t {
    pub surf: *mut msurface_t,
    pub cull: ::core::ffi::c_int,
}
#[repr(C)]
pub struct ref_globals_s {
    pub developer: qboolean,
    pub width: ::core::ffi::c_int,
    pub height: ::core::ffi::c_int,
    pub fullScreen: qboolean,
    pub wideScreen: qboolean,
    pub vieworg: vec3_t,
    pub viewangles: vec3_t,
    pub draw_surfaces: *mut sortedface_t,
    pub max_surfaces: ::core::ffi::c_int,
    pub visbytes: usize,
    pub desktopBitsPixel: ::core::ffi::c_int,
}
pub type ref_globals_t = ref_globals_s;
#[repr(C)]
pub struct ref_client_s {
    pub time: f64,
    pub oldtime: f64,
    pub viewentity: ::core::ffi::c_int,
    pub playernum: ::core::ffi::c_int,
    pub maxclients: ::core::ffi::c_int,
    pub nummodels: ::core::ffi::c_int,
    pub models: [*mut model_t; 4097usize],
    pub paused: qboolean,
    pub simorg: vec3_t,
}
pub type ref_client_t = ref_client_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ref_host_s {
    pub realtime: f64,
    pub frametime: f64,
    pub features: ::core::ffi::c_int,
}
pub type ref_host_t = ref_host_s;
pub const GL_KEEP_UNIT: _bindgen_ty_13 = -1;
pub const XASH_TEXTURE0: _bindgen_ty_13 = 0;
pub const XASH_TEXTURE1: _bindgen_ty_13 = 1;
pub const XASH_TEXTURE2: _bindgen_ty_13 = 2;
pub const XASH_TEXTURE3: _bindgen_ty_13 = 3;
pub const MAX_TEXTURE_UNITS: _bindgen_ty_13 = 32;
pub type _bindgen_ty_13 = ::core::ffi::c_int;
pub const RS_ACTIVE_TENTS: _bindgen_ty_14 = 0;
pub type _bindgen_ty_14 = ::core::ffi::c_uint;
pub const connstate_e_ca_disconnected: connstate_e = 0;
pub const connstate_e_ca_connecting: connstate_e = 1;
pub const connstate_e_ca_connected: connstate_e = 2;
pub const connstate_e_ca_validate: connstate_e = 3;
pub const connstate_e_ca_active: connstate_e = 4;
pub const connstate_e_ca_cinematic: connstate_e = 5;
pub type connstate_e = ::core::ffi::c_uint;
pub use self::connstate_e as connstate_t;
pub const ref_defaultsprite_e_REF_DOT_SPRITE: ref_defaultsprite_e = 0;
pub const ref_defaultsprite_e_REF_CHROME_SPRITE: ref_defaultsprite_e = 1;
pub type ref_defaultsprite_e = ::core::ffi::c_uint;
pub const ref_graphic_apis_e_REF_SOFTWARE: ref_graphic_apis_e = 0;
pub const ref_graphic_apis_e_REF_GL: ref_graphic_apis_e = 1;
pub const ref_graphic_apis_e_REF_D3D: ref_graphic_apis_e = 2;
pub type ref_graphic_apis_e = ::core::ffi::c_uint;
pub const ref_safegl_context_t_SAFE_NO: ref_safegl_context_t = 0;
pub const ref_safegl_context_t_SAFE_NOMSAA: ref_safegl_context_t = 1;
pub const ref_safegl_context_t_SAFE_NOACC: ref_safegl_context_t = 2;
pub const ref_safegl_context_t_SAFE_NOSTENCIL: ref_safegl_context_t = 3;
pub const ref_safegl_context_t_SAFE_NOALPHA: ref_safegl_context_t = 4;
pub const ref_safegl_context_t_SAFE_NODEPTH: ref_safegl_context_t = 5;
pub const ref_safegl_context_t_SAFE_NOCOLOR: ref_safegl_context_t = 6;
pub const ref_safegl_context_t_SAFE_DONTCARE: ref_safegl_context_t = 7;
pub const ref_safegl_context_t_SAFE_LAST: ref_safegl_context_t = 8;
pub type ref_safegl_context_t = ::core::ffi::c_uint;
pub const REF_GL_RED_SIZE: _bindgen_ty_15 = 0;
pub const REF_GL_GREEN_SIZE: _bindgen_ty_15 = 1;
pub const REF_GL_BLUE_SIZE: _bindgen_ty_15 = 2;
pub const REF_GL_ALPHA_SIZE: _bindgen_ty_15 = 3;
pub const REF_GL_DOUBLEBUFFER: _bindgen_ty_15 = 4;
pub const REF_GL_DEPTH_SIZE: _bindgen_ty_15 = 5;
pub const REF_GL_STENCIL_SIZE: _bindgen_ty_15 = 6;
pub const REF_GL_MULTISAMPLEBUFFERS: _bindgen_ty_15 = 7;
pub const REF_GL_MULTISAMPLESAMPLES: _bindgen_ty_15 = 8;
pub const REF_GL_ACCELERATED_VISUAL: _bindgen_ty_15 = 9;
pub const REF_GL_CONTEXT_MAJOR_VERSION: _bindgen_ty_15 = 10;
pub const REF_GL_CONTEXT_MINOR_VERSION: _bindgen_ty_15 = 11;
pub const REF_GL_CONTEXT_EGL: _bindgen_ty_15 = 12;
pub const REF_GL_CONTEXT_FLAGS: _bindgen_ty_15 = 13;
pub const REF_GL_CONTEXT_PROFILE_MASK: _bindgen_ty_15 = 14;
pub const REF_GL_SHARE_WITH_CURRENT_CONTEXT: _bindgen_ty_15 = 15;
pub const REF_GL_FRAMEBUFFER_SRGB_CAPABLE: _bindgen_ty_15 = 16;
pub const REF_GL_CONTEXT_RELEASE_BEHAVIOR: _bindgen_ty_15 = 17;
pub const REF_GL_CONTEXT_RESET_NOTIFICATION: _bindgen_ty_15 = 18;
pub const REF_GL_CONTEXT_NO_ERROR: _bindgen_ty_15 = 19;
pub const REF_GL_ATTRIBUTES_COUNT: _bindgen_ty_15 = 20;
pub type _bindgen_ty_15 = ::core::ffi::c_uint;
pub const REF_GL_CONTEXT_PROFILE_CORE: _bindgen_ty_16 = 1;
pub const REF_GL_CONTEXT_PROFILE_COMPATIBILITY: _bindgen_ty_16 = 2;
pub const REF_GL_CONTEXT_PROFILE_ES: _bindgen_ty_16 = 4;
pub type _bindgen_ty_16 = ::core::ffi::c_uint;
pub const REF_GL_CONTEXT_DEBUG_FLAG: _bindgen_ty_17 = 1;
pub const REF_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG: _bindgen_ty_17 = 2;
pub const REF_GL_CONTEXT_ROBUST_ACCESS_FLAG: _bindgen_ty_17 = 4;
pub const REF_GL_CONTEXT_RESET_ISOLATION_FLAG: _bindgen_ty_17 = 8;
pub type _bindgen_ty_17 = ::core::ffi::c_uint;
pub const ref_screen_rotation_e_REF_ROTATE_NONE: ref_screen_rotation_e = 0;
pub const ref_screen_rotation_e_REF_ROTATE_CW: ref_screen_rotation_e = 1;
pub const ref_screen_rotation_e_REF_ROTATE_UD: ref_screen_rotation_e = 2;
pub const ref_screen_rotation_e_REF_ROTATE_CCW: ref_screen_rotation_e = 3;
pub type ref_screen_rotation_e = ::core::ffi::c_uint;
pub use self::ref_screen_rotation_e as ref_screen_rotation_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct remap_info_s {
    pub textures: [::core::ffi::c_ushort; 32usize],
    pub ptexture: *mut mstudiotex_s,
    pub numtextures: ::core::ffi::c_short,
    pub topcolor: ::core::ffi::c_short,
    pub bottomcolor: ::core::ffi::c_short,
    pub model: *mut model_t,
}
pub type remap_info_t = remap_info_s;
pub const ref_parm_e_PARM_DEV_OVERVIEW: ref_parm_e = -1;
pub const ref_parm_e_PARM_THIRDPERSON: ref_parm_e = -2;
pub const ref_parm_e_PARM_QUAKE_COMPATIBLE: ref_parm_e = -3;
pub const ref_parm_e_PARM_GET_CLIENT_PTR: ref_parm_e = -4;
pub const ref_parm_e_PARM_GET_HOST_PTR: ref_parm_e = -5;
pub const ref_parm_e_PARM_CONNSTATE: ref_parm_e = -6;
pub const ref_parm_e_PARM_PLAYING_DEMO: ref_parm_e = -7;
pub const ref_parm_e_PARM_WATER_LEVEL: ref_parm_e = -8;
pub const ref_parm_e_PARM_GET_WORLD_PTR: ref_parm_e = -9;
pub const ref_parm_e_PARM_LOCAL_HEALTH: ref_parm_e = -10;
pub const ref_parm_e_PARM_LOCAL_GAME: ref_parm_e = -11;
pub const ref_parm_e_PARM_NUMENTITIES: ref_parm_e = -12;
pub const ref_parm_e_PARM_GET_MOVEVARS_PTR: ref_parm_e = -13;
pub const ref_parm_e_PARM_GET_PALETTE_PTR: ref_parm_e = -14;
pub const ref_parm_e_PARM_GET_VIEWENT_PTR: ref_parm_e = -15;
pub const ref_parm_e_PARM_GET_TEXGAMMATABLE_PTR: ref_parm_e = -16;
pub const ref_parm_e_PARM_GET_LIGHTGAMMATABLE_PTR: ref_parm_e = -17;
pub const ref_parm_e_PARM_GET_SCREENGAMMATABLE_PTR: ref_parm_e = -18;
pub const ref_parm_e_PARM_GET_LINEARGAMMATABLE_PTR: ref_parm_e = -19;
pub const ref_parm_e_PARM_GET_LIGHTSTYLES_PTR: ref_parm_e = -20;
pub const ref_parm_e_PARM_GET_DLIGHTS_PTR: ref_parm_e = -21;
pub const ref_parm_e_PARM_GET_ELIGHTS_PTR: ref_parm_e = -22;
pub const ref_parm_e_PARM_TEX_FILTERING: ref_parm_e = -65536;
pub type ref_parm_e = ::core::ffi::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ref_api_s {
    pub EngineGetParm: ::core::option::Option<
        unsafe extern "C" fn(parm: ::core::ffi::c_int, arg: ::core::ffi::c_int) -> isize,
    >,
    pub Cvar_Get: ::core::option::Option<
        unsafe extern "C" fn(
            szName: *const ::core::ffi::c_char,
            szValue: *const ::core::ffi::c_char,
            flags: ::core::ffi::c_int,
            description: *const ::core::ffi::c_char,
        ) -> *mut cvar_t,
    >,
    pub pfnGetCvarPointer: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            ignore_flags: ::core::ffi::c_int,
        ) -> *mut cvar_t,
    >,
    pub pfnGetCvarFloat:
        ::core::option::Option<unsafe extern "C" fn(szName: *const ::core::ffi::c_char) -> f32>,
    pub pfnGetCvarString: ::core::option::Option<
        unsafe extern "C" fn(szName: *const ::core::ffi::c_char) -> *const ::core::ffi::c_char,
    >,
    pub Cvar_SetValue:
        ::core::option::Option<unsafe extern "C" fn(name: *const ::core::ffi::c_char, value: f32)>,
    pub Cvar_Set: ::core::option::Option<
        unsafe extern "C" fn(name: *const ::core::ffi::c_char, value: *const ::core::ffi::c_char),
    >,
    pub Cvar_RegisterVariable: ::core::option::Option<unsafe extern "C" fn(var: *mut convar_t)>,
    pub Cvar_FullSet: ::core::option::Option<
        unsafe extern "C" fn(
            var_name: *const ::core::ffi::c_char,
            value: *const ::core::ffi::c_char,
            flags: ::core::ffi::c_int,
        ),
    >,
    pub Cmd_AddCommand: ::core::option::Option<
        unsafe extern "C" fn(
            cmd_name: *const ::core::ffi::c_char,
            function: ::core::option::Option<unsafe extern "C" fn()>,
            description: *const ::core::ffi::c_char,
        ) -> ::core::ffi::c_int,
    >,
    pub Cmd_RemoveCommand:
        ::core::option::Option<unsafe extern "C" fn(cmd_name: *const ::core::ffi::c_char)>,
    pub Cmd_Argc: ::core::option::Option<unsafe extern "C" fn() -> ::core::ffi::c_int>,
    pub Cmd_Argv: ::core::option::Option<
        unsafe extern "C" fn(arg: ::core::ffi::c_int) -> *const ::core::ffi::c_char,
    >,
    pub Cmd_Args: ::core::option::Option<unsafe extern "C" fn() -> *const ::core::ffi::c_char>,
    pub Cbuf_AddText:
        ::core::option::Option<unsafe extern "C" fn(commands: *const ::core::ffi::c_char)>,
    pub Cbuf_InsertText:
        ::core::option::Option<unsafe extern "C" fn(commands: *const ::core::ffi::c_char)>,
    pub Cbuf_Execute: ::core::option::Option<unsafe extern "C" fn()>,
    pub Con_Printf:
        ::core::option::Option<unsafe extern "C" fn(fmt: *const ::core::ffi::c_char, ...)>,
    pub Con_DPrintf:
        ::core::option::Option<unsafe extern "C" fn(fmt: *const ::core::ffi::c_char, ...)>,
    pub Con_Reportf:
        ::core::option::Option<unsafe extern "C" fn(fmt: *const ::core::ffi::c_char, ...)>,
    pub Con_NPrintf: ::core::option::Option<
        unsafe extern "C" fn(pos: ::core::ffi::c_int, fmt: *const ::core::ffi::c_char, ...),
    >,
    pub Con_NXPrintf: ::core::option::Option<
        unsafe extern "C" fn(info: *mut con_nprint_s, fmt: *const ::core::ffi::c_char, ...),
    >,
    pub CL_CenterPrint:
        ::core::option::Option<unsafe extern "C" fn(s: *const ::core::ffi::c_char, y: f32)>,
    pub Con_DrawStringLen: ::core::option::Option<
        unsafe extern "C" fn(
            pText: *const ::core::ffi::c_char,
            length: *mut ::core::ffi::c_int,
            height: *mut ::core::ffi::c_int,
        ),
    >,
    pub Con_DrawString: ::core::option::Option<
        unsafe extern "C" fn(
            x: ::core::ffi::c_int,
            y: ::core::ffi::c_int,
            string: *const ::core::ffi::c_char,
            setColor: *const rgba_t,
        ) -> ::core::ffi::c_int,
    >,
    pub CL_DrawCenterPrint: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_BeamGetEntity:
        ::core::option::Option<unsafe extern "C" fn(index: ::core::ffi::c_int) -> *mut cl_entity_s>,
    pub CL_GetWaterEntity:
        ::core::option::Option<unsafe extern "C" fn(p: *const vec3_t) -> *mut cl_entity_s>,
    pub CL_AddVisibleEntity: ::core::option::Option<
        unsafe extern "C" fn(ent: *mut cl_entity_t, entityType: ::core::ffi::c_int) -> qboolean,
    >,
    pub Mod_SampleSizeForFace:
        ::core::option::Option<unsafe extern "C" fn(surf: *const msurface_s) -> ::core::ffi::c_int>,
    pub Mod_BoxVisible: ::core::option::Option<
        unsafe extern "C" fn(
            mins: *const vec3_t,
            maxs: *const vec3_t,
            visbits: *const byte,
        ) -> qboolean,
    >,
    pub Mod_PointInLeaf: ::core::option::Option<
        unsafe extern "C" fn(p: *const vec3_t, node: *mut mnode_t) -> *mut mleaf_t,
    >,
    pub R_DrawWorldHull: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_DrawModelHull: ::core::option::Option<unsafe extern "C" fn(mod_: *mut model_t)>,
    pub R_StudioGetAnim: ::core::option::Option<
        unsafe extern "C" fn(
            m_pStudioHeader: *mut studiohdr_t,
            m_pSubModel: *mut model_t,
            pseqdesc: *mut mstudioseqdesc_t,
        ) -> *mut ::core::ffi::c_void,
    >,
    pub pfnStudioEvent: ::core::option::Option<
        unsafe extern "C" fn(event: *const mstudioevent_s, entity: *const cl_entity_t),
    >,
    pub CL_DrawEFX: ::core::option::Option<unsafe extern "C" fn(time: f32, fTrans: qboolean)>,
    pub CL_ThinkParticle:
        ::core::option::Option<unsafe extern "C" fn(frametime: f64, p: *mut particle_t)>,
    pub R_FreeDeadParticles:
        ::core::option::Option<unsafe extern "C" fn(ppparticles: *mut *mut particle_t)>,
    pub CL_AllocParticleFast: ::core::option::Option<unsafe extern "C" fn() -> *mut particle_t>,
    pub CL_AllocElight:
        ::core::option::Option<unsafe extern "C" fn(key: ::core::ffi::c_int) -> *mut dlight_s>,
    pub GetDefaultSprite:
        ::core::option::Option<unsafe extern "C" fn(spr: ref_defaultsprite_e) -> *mut model_s>,
    pub R_StoreEfrags: ::core::option::Option<
        unsafe extern "C" fn(ppefrag: *mut *mut efrag_s, framecount: ::core::ffi::c_int),
    >,
    pub Mod_ForName: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            crash: qboolean,
            trackCRC: qboolean,
        ) -> *mut model_t,
    >,
    pub Mod_Extradata: ::core::option::Option<
        unsafe extern "C" fn(
            type_: ::core::ffi::c_int,
            model: *mut model_t,
        ) -> *mut ::core::ffi::c_void,
    >,
    pub CL_EntitySetRemapColors: ::core::option::Option<
        unsafe extern "C" fn(
            e: *mut cl_entity_t,
            mod_: *mut model_t,
            top: ::core::ffi::c_int,
            bottom: ::core::ffi::c_int,
        ) -> qboolean,
    >,
    pub CL_GetRemapInfoForEntity:
        ::core::option::Option<unsafe extern "C" fn(e: *mut cl_entity_t) -> *mut remap_info_s>,
    pub CL_ExtraUpdate: ::core::option::Option<unsafe extern "C" fn()>,
    pub Host_Error:
        ::core::option::Option<unsafe extern "C" fn(fmt: *const ::core::ffi::c_char, ...)>,
    pub COM_SetRandomSeed: ::core::option::Option<unsafe extern "C" fn(lSeed: ::core::ffi::c_int)>,
    pub COM_RandomFloat: ::core::option::Option<unsafe extern "C" fn(rmin: f32, rmax: f32) -> f32>,
    pub COM_RandomLong: ::core::option::Option<
        unsafe extern "C" fn(
            rmin: ::core::ffi::c_int,
            rmax: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub GetScreenFade: ::core::option::Option<unsafe extern "C" fn() -> *mut screenfade_s>,
    pub CL_GetScreenInfo: ::core::option::Option<
        unsafe extern "C" fn(width: *mut ::core::ffi::c_int, height: *mut ::core::ffi::c_int),
    >,
    pub SetLocalLightLevel: ::core::option::Option<unsafe extern "C" fn(level: ::core::ffi::c_int)>,
    pub Sys_CheckParm: ::core::option::Option<
        unsafe extern "C" fn(flag: *const ::core::ffi::c_char) -> ::core::ffi::c_int,
    >,
    pub pfnPlayerInfo: ::core::option::Option<
        unsafe extern "C" fn(index: ::core::ffi::c_int) -> *mut player_info_t,
    >,
    pub pfnGetPlayerState: ::core::option::Option<
        unsafe extern "C" fn(index: ::core::ffi::c_int) -> *mut entity_state_t,
    >,
    pub Mod_CacheCheck: ::core::option::Option<
        unsafe extern "C" fn(c: *mut cache_user_s) -> *mut ::core::ffi::c_void,
    >,
    pub Mod_LoadCacheFile: ::core::option::Option<
        unsafe extern "C" fn(path: *const ::core::ffi::c_char, cu: *mut cache_user_s),
    >,
    pub Mod_Calloc: ::core::option::Option<
        unsafe extern "C" fn(number: ::core::ffi::c_int, size: usize) -> *mut ::core::ffi::c_void,
    >,
    pub pfnGetStudioModelInterface: ::core::option::Option<
        unsafe extern "C" fn(
            version: ::core::ffi::c_int,
            ppinterface: *mut *mut r_studio_interface_s,
            pstudio: *mut engine_studio_api_s,
        ) -> ::core::ffi::c_int,
    >,
    pub _Mem_AllocPool: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            filename: *const ::core::ffi::c_char,
            fileline: ::core::ffi::c_int,
        ) -> poolhandle_t,
    >,
    pub _Mem_FreePool: ::core::option::Option<
        unsafe extern "C" fn(
            poolptr: *mut poolhandle_t,
            filename: *const ::core::ffi::c_char,
            fileline: ::core::ffi::c_int,
        ),
    >,
    pub _Mem_Alloc: ::core::option::Option<
        unsafe extern "C" fn(
            poolptr: poolhandle_t,
            size: usize,
            clear: qboolean,
            filename: *const ::core::ffi::c_char,
            fileline: ::core::ffi::c_int,
        ) -> *mut ::core::ffi::c_void,
    >,
    pub _Mem_Realloc: ::core::option::Option<
        unsafe extern "C" fn(
            poolptr: poolhandle_t,
            memptr: *mut ::core::ffi::c_void,
            size: usize,
            clear: qboolean,
            filename: *const ::core::ffi::c_char,
            fileline: ::core::ffi::c_int,
        ) -> *mut ::core::ffi::c_void,
    >,
    pub _Mem_Free: ::core::option::Option<
        unsafe extern "C" fn(
            data: *mut ::core::ffi::c_void,
            filename: *const ::core::ffi::c_char,
            fileline: ::core::ffi::c_int,
        ),
    >,
    pub COM_LoadLibrary: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            build_ordinals_table: ::core::ffi::c_int,
            directpath: qboolean,
        ) -> *mut ::core::ffi::c_void,
    >,
    pub COM_FreeLibrary:
        ::core::option::Option<unsafe extern "C" fn(handle: *mut ::core::ffi::c_void)>,
    pub COM_GetProcAddress: ::core::option::Option<
        unsafe extern "C" fn(
            handle: *mut ::core::ffi::c_void,
            name: *const ::core::ffi::c_char,
        ) -> *mut ::core::ffi::c_void,
    >,
    pub R_Init_Video:
        ::core::option::Option<unsafe extern "C" fn(type_: ::core::ffi::c_int) -> qboolean>,
    pub R_Free_Video: ::core::option::Option<unsafe extern "C" fn()>,
    pub GL_SetAttribute: ::core::option::Option<
        unsafe extern "C" fn(
            attr: ::core::ffi::c_int,
            value: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub GL_GetAttribute: ::core::option::Option<
        unsafe extern "C" fn(
            attr: ::core::ffi::c_int,
            value: *mut ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub GL_GetProcAddress: ::core::option::Option<
        unsafe extern "C" fn(name: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_void,
    >,
    pub GL_SwapBuffers: ::core::option::Option<unsafe extern "C" fn()>,
    pub SW_CreateBuffer: ::core::option::Option<
        unsafe extern "C" fn(
            width: ::core::ffi::c_int,
            height: ::core::ffi::c_int,
            stride: *mut uint,
            bpp: *mut uint,
            r: *mut uint,
            g: *mut uint,
            b: *mut uint,
        ) -> qboolean,
    >,
    pub SW_LockBuffer: ::core::option::Option<unsafe extern "C" fn() -> *mut ::core::ffi::c_void>,
    pub SW_UnlockBuffer: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_FatPVS: ::core::option::Option<
        unsafe extern "C" fn(
            org: *const f32,
            radius: f32,
            visbuffer: *mut byte,
            merge: qboolean,
            fullvis: qboolean,
        ) -> ::core::ffi::c_int,
    >,
    pub GetOverviewParms: ::core::option::Option<unsafe extern "C" fn() -> *const ref_overview_s>,
    pub pfnTime: ::core::option::Option<unsafe extern "C" fn() -> f64>,
    pub EV_GetPhysent:
        ::core::option::Option<unsafe extern "C" fn(idx: ::core::ffi::c_int) -> *mut physent_s>,
    pub EV_TraceSurface: ::core::option::Option<
        unsafe extern "C" fn(
            ground: ::core::ffi::c_int,
            vstart: *mut f32,
            vend: *mut f32,
        ) -> *mut msurface_s,
    >,
    pub PM_TraceLine: ::core::option::Option<
        unsafe extern "C" fn(
            start: *mut f32,
            end: *mut f32,
            flags: ::core::ffi::c_int,
            usehull: ::core::ffi::c_int,
            ignore_pe: ::core::ffi::c_int,
        ) -> *mut pmtrace_s,
    >,
    pub EV_VisTraceLine: ::core::option::Option<
        unsafe extern "C" fn(
            start: *mut f32,
            end: *mut f32,
            flags: ::core::ffi::c_int,
        ) -> *mut pmtrace_s,
    >,
    pub CL_TraceLine: ::core::option::Option<
        unsafe extern "C" fn(
            start: *mut vec3_t,
            end: *mut vec3_t,
            flags: ::core::ffi::c_int,
        ) -> pmtrace_s,
    >,
    pub Image_AddCmdFlags: ::core::option::Option<unsafe extern "C" fn(flags: uint)>,
    pub Image_SetForceFlags: ::core::option::Option<unsafe extern "C" fn(flags: uint)>,
    pub Image_ClearForceFlags: ::core::option::Option<unsafe extern "C" fn()>,
    pub Image_CustomPalette: ::core::option::Option<unsafe extern "C" fn() -> qboolean>,
    pub Image_Process: ::core::option::Option<
        unsafe extern "C" fn(
            pix: *mut *mut rgbdata_t,
            width: ::core::ffi::c_int,
            height: ::core::ffi::c_int,
            flags: uint,
            reserved: f32,
        ) -> qboolean,
    >,
    pub FS_LoadImage: ::core::option::Option<
        unsafe extern "C" fn(
            filename: *const ::core::ffi::c_char,
            buffer: *const byte,
            size: usize,
        ) -> *mut rgbdata_t,
    >,
    pub FS_SaveImage: ::core::option::Option<
        unsafe extern "C" fn(filename: *const ::core::ffi::c_char, pix: *mut rgbdata_t) -> qboolean,
    >,
    pub FS_CopyImage:
        ::core::option::Option<unsafe extern "C" fn(in_: *mut rgbdata_t) -> *mut rgbdata_t>,
    pub FS_FreeImage: ::core::option::Option<unsafe extern "C" fn(pack: *mut rgbdata_t)>,
    pub Image_SetMDLPointer: ::core::option::Option<unsafe extern "C" fn(p: *mut byte)>,
    pub Image_GetPFDesc:
        ::core::option::Option<unsafe extern "C" fn(idx: ::core::ffi::c_int) -> *const bpc_desc_s>,
    pub pfnDrawNormalTriangles: ::core::option::Option<unsafe extern "C" fn()>,
    pub pfnDrawTransparentTriangles: ::core::option::Option<unsafe extern "C" fn()>,
    pub drawFuncs: *mut render_interface_t,
    pub fsapi: *mut fs_api_t,
    pub R_GetWindowHandle: ::core::option::Option<
        unsafe extern "C" fn(
            handle: *mut *mut ::core::ffi::c_void,
            type_: ref_window_type_t,
        ) -> ref_window_type_t,
    >,
}
pub type ref_api_t = ref_api_s;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mip_s {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ref_interface_s {
    pub R_Init: ::core::option::Option<unsafe extern "C" fn() -> qboolean>,
    pub R_Shutdown: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_GetConfigName:
        ::core::option::Option<unsafe extern "C" fn() -> *const ::core::ffi::c_char>,
    pub R_SetDisplayTransform: ::core::option::Option<
        unsafe extern "C" fn(
            rotate: ref_screen_rotation_t,
            x: ::core::ffi::c_int,
            y: ::core::ffi::c_int,
            scale_x: f32,
            scale_y: f32,
        ) -> qboolean,
    >,
    pub GL_SetupAttributes:
        ::core::option::Option<unsafe extern "C" fn(safegl: ::core::ffi::c_int)>,
    pub GL_InitExtensions: ::core::option::Option<unsafe extern "C" fn()>,
    pub GL_ClearExtensions: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_GammaChanged: ::core::option::Option<unsafe extern "C" fn(do_reset_gamma: qboolean)>,
    pub R_BeginFrame: ::core::option::Option<unsafe extern "C" fn(clearScene: qboolean)>,
    pub R_RenderScene: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_EndFrame: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_PushScene: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_PopScene: ::core::option::Option<unsafe extern "C" fn()>,
    pub GL_BackendStartFrame: ::core::option::Option<unsafe extern "C" fn()>,
    pub GL_BackendEndFrame: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_ClearScreen: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_AllowFog: ::core::option::Option<unsafe extern "C" fn(allow: qboolean)>,
    pub GL_SetRenderMode:
        ::core::option::Option<unsafe extern "C" fn(renderMode: ::core::ffi::c_int)>,
    pub R_AddEntity: ::core::option::Option<
        unsafe extern "C" fn(clent: *mut cl_entity_s, type_: ::core::ffi::c_int) -> qboolean,
    >,
    pub CL_AddCustomBeam: ::core::option::Option<unsafe extern "C" fn(pEnvBeam: *mut cl_entity_t)>,
    pub R_ProcessEntData: ::core::option::Option<
        unsafe extern "C" fn(
            allocate: qboolean,
            entities: *mut cl_entity_t,
            max_entities: ::core::ffi::c_uint,
        ),
    >,
    pub R_Flush: ::core::option::Option<unsafe extern "C" fn(flush_flags: ::core::ffi::c_uint)>,
    pub R_ShowTextures: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_GetTextureOriginalBuffer:
        ::core::option::Option<unsafe extern "C" fn(idx: ::core::ffi::c_uint) -> *const byte>,
    pub GL_LoadTextureFromBuffer: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            pic: *mut rgbdata_t,
            flags: texFlags_t,
            update: qboolean,
        ) -> ::core::ffi::c_int,
    >,
    pub GL_ProcessTexture: ::core::option::Option<
        unsafe extern "C" fn(
            texnum: ::core::ffi::c_int,
            gamma: f32,
            topColor: ::core::ffi::c_int,
            bottomColor: ::core::ffi::c_int,
        ),
    >,
    pub R_SetupSky:
        ::core::option::Option<unsafe extern "C" fn(skyboxTextures: *mut ::core::ffi::c_int)>,
    pub R_Set2DMode: ::core::option::Option<unsafe extern "C" fn(enable: qboolean)>,
    pub R_DrawStretchRaw: ::core::option::Option<
        unsafe extern "C" fn(
            x: f32,
            y: f32,
            w: f32,
            h: f32,
            cols: ::core::ffi::c_int,
            rows: ::core::ffi::c_int,
            data: *const byte,
            dirty: qboolean,
        ),
    >,
    pub R_DrawStretchPic: ::core::option::Option<
        unsafe extern "C" fn(
            x: f32,
            y: f32,
            w: f32,
            h: f32,
            s1: f32,
            t1: f32,
            s2: f32,
            t2: f32,
            texnum: ::core::ffi::c_int,
        ),
    >,
    pub FillRGBA: ::core::option::Option<
        unsafe extern "C" fn(
            rendermode: ::core::ffi::c_int,
            x: f32,
            y: f32,
            w: f32,
            h: f32,
            r: byte,
            g: byte,
            b: byte,
            a: byte,
        ),
    >,
    pub WorldToScreen: ::core::option::Option<
        unsafe extern "C" fn(world: *const vec3_t, screen: *mut vec3_t) -> ::core::ffi::c_int,
    >,
    pub VID_ScreenShot: ::core::option::Option<
        unsafe extern "C" fn(
            filename: *const ::core::ffi::c_char,
            shot_type: ::core::ffi::c_int,
        ) -> qboolean,
    >,
    pub VID_CubemapShot: ::core::option::Option<
        unsafe extern "C" fn(
            base: *const ::core::ffi::c_char,
            size: uint,
            vieworg: *const f32,
            skyshot: qboolean,
        ) -> qboolean,
    >,
    pub R_LightPoint: ::core::option::Option<unsafe extern "C" fn(p: *const f32) -> colorVec>,
    pub R_DecalShoot: ::core::option::Option<
        unsafe extern "C" fn(
            textureIndex: ::core::ffi::c_int,
            entityIndex: ::core::ffi::c_int,
            modelIndex: ::core::ffi::c_int,
            pos: *mut vec3_t,
            flags: ::core::ffi::c_int,
            scale: f32,
        ),
    >,
    pub R_DecalRemoveAll: ::core::option::Option<unsafe extern "C" fn(texture: ::core::ffi::c_int)>,
    pub R_CreateDecalList:
        ::core::option::Option<unsafe extern "C" fn(pList: *mut decallist_s) -> ::core::ffi::c_int>,
    pub R_ClearAllDecals: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_StudioEstimateFrame: ::core::option::Option<
        unsafe extern "C" fn(
            e: *mut cl_entity_t,
            pseqdesc: *mut mstudioseqdesc_t,
            time: f64,
        ) -> f32,
    >,
    pub R_StudioLerpMovement: ::core::option::Option<
        unsafe extern "C" fn(
            e: *mut cl_entity_t,
            time: f64,
            origin: *mut vec3_t,
            angles: *mut vec3_t,
        ),
    >,
    pub CL_InitStudioAPI: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_SetSkyCloudsTextures: ::core::option::Option<
        unsafe extern "C" fn(
            solidskyTexture: ::core::ffi::c_int,
            alphaskyTexture: ::core::ffi::c_int,
        ),
    >,
    pub GL_SubdivideSurface:
        ::core::option::Option<unsafe extern "C" fn(mod_: *mut model_t, fa: *mut msurface_t)>,
    pub CL_RunLightStyles: ::core::option::Option<unsafe extern "C" fn(ls: *mut lightstyle_t)>,
    pub R_GetSpriteParms: ::core::option::Option<
        unsafe extern "C" fn(
            frameWidth: *mut ::core::ffi::c_int,
            frameHeight: *mut ::core::ffi::c_int,
            numFrames: *mut ::core::ffi::c_int,
            currentFrame: ::core::ffi::c_int,
            pSprite: *const model_t,
        ),
    >,
    pub R_GetSpriteTexture: ::core::option::Option<
        unsafe extern "C" fn(
            m_pSpriteModel: *const model_t,
            frame: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub Mod_ProcessRenderData: ::core::option::Option<
        unsafe extern "C" fn(mod_: *mut model_t, create: qboolean, buffer: *const byte) -> qboolean,
    >,
    pub Mod_StudioLoadTextures: ::core::option::Option<
        unsafe extern "C" fn(mod_: *mut model_t, data: *mut ::core::ffi::c_void),
    >,
    pub CL_DrawParticles: ::core::option::Option<
        unsafe extern "C" fn(frametime: f64, particles: *mut particle_t, partsize: f32),
    >,
    pub CL_DrawTracers:
        ::core::option::Option<unsafe extern "C" fn(frametime: f64, tracers: *mut particle_t)>,
    pub CL_DrawBeams:
        ::core::option::Option<unsafe extern "C" fn(fTrans: ::core::ffi::c_int, beams: *mut BEAM)>,
    pub R_BeamCull: ::core::option::Option<
        unsafe extern "C" fn(
            start: *const vec3_t,
            end: *const vec3_t,
            pvsOnly: qboolean,
        ) -> qboolean,
    >,
    pub RefGetParm: ::core::option::Option<
        unsafe extern "C" fn(
            parm: ::core::ffi::c_int,
            arg: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub GetDetailScaleForTexture: ::core::option::Option<
        unsafe extern "C" fn(texture: ::core::ffi::c_int, xScale: *mut f32, yScale: *mut f32),
    >,
    pub GetExtraParmsForTexture: ::core::option::Option<
        unsafe extern "C" fn(
            texture: ::core::ffi::c_int,
            red: *mut byte,
            green: *mut byte,
            blue: *mut byte,
            alpha: *mut byte,
        ),
    >,
    pub GetFrameTime: ::core::option::Option<unsafe extern "C" fn() -> f32>,
    pub R_SetCurrentEntity: ::core::option::Option<unsafe extern "C" fn(ent: *mut cl_entity_s)>,
    pub R_SetCurrentModel: ::core::option::Option<unsafe extern "C" fn(mod_: *mut model_s)>,
    pub GL_FindTexture: ::core::option::Option<
        unsafe extern "C" fn(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int,
    >,
    pub GL_TextureName: ::core::option::Option<
        unsafe extern "C" fn(texnum: ::core::ffi::c_uint) -> *const ::core::ffi::c_char,
    >,
    pub GL_TextureData:
        ::core::option::Option<unsafe extern "C" fn(texnum: ::core::ffi::c_uint) -> *const byte>,
    pub GL_LoadTexture: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            buf: *const byte,
            size: usize,
            flags: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub GL_CreateTexture: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            width: ::core::ffi::c_int,
            height: ::core::ffi::c_int,
            buffer: *const ::core::ffi::c_void,
            flags: texFlags_t,
        ) -> ::core::ffi::c_int,
    >,
    pub GL_LoadTextureArray: ::core::option::Option<
        unsafe extern "C" fn(
            names: *mut *const ::core::ffi::c_char,
            flags: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub GL_CreateTextureArray: ::core::option::Option<
        unsafe extern "C" fn(
            name: *const ::core::ffi::c_char,
            width: ::core::ffi::c_int,
            height: ::core::ffi::c_int,
            depth: ::core::ffi::c_int,
            buffer: *const ::core::ffi::c_void,
            flags: texFlags_t,
        ) -> ::core::ffi::c_int,
    >,
    pub GL_FreeTexture: ::core::option::Option<unsafe extern "C" fn(texnum: ::core::ffi::c_uint)>,
    pub R_OverrideTextureSourceSize: ::core::option::Option<
        unsafe extern "C" fn(
            texnum: ::core::ffi::c_uint,
            srcWidth: ::core::ffi::c_uint,
            srcHeight: ::core::ffi::c_uint,
        ),
    >,
    pub DrawSingleDecal:
        ::core::option::Option<unsafe extern "C" fn(pDecal: *mut decal_s, fa: *mut msurface_s)>,
    pub R_DecalSetupVerts: ::core::option::Option<
        unsafe extern "C" fn(
            pDecal: *mut decal_s,
            surf: *mut msurface_s,
            texture: ::core::ffi::c_int,
            outCount: *mut ::core::ffi::c_int,
        ) -> *mut f32,
    >,
    pub R_EntityRemoveDecals: ::core::option::Option<unsafe extern "C" fn(mod_: *mut model_s)>,
    pub AVI_UploadRawFrame: ::core::option::Option<
        unsafe extern "C" fn(
            texture: ::core::ffi::c_int,
            cols: ::core::ffi::c_int,
            rows: ::core::ffi::c_int,
            width: ::core::ffi::c_int,
            height: ::core::ffi::c_int,
            data: *const byte,
        ),
    >,
    pub GL_Bind: ::core::option::Option<
        unsafe extern "C" fn(tmu: ::core::ffi::c_int, texnum: ::core::ffi::c_uint),
    >,
    pub GL_SelectTexture: ::core::option::Option<unsafe extern "C" fn(tmu: ::core::ffi::c_int)>,
    pub GL_LoadTextureMatrix: ::core::option::Option<unsafe extern "C" fn(glmatrix: *const f32)>,
    pub GL_TexMatrixIdentity: ::core::option::Option<unsafe extern "C" fn()>,
    pub GL_CleanUpTextureUnits:
        ::core::option::Option<unsafe extern "C" fn(last: ::core::ffi::c_int)>,
    pub GL_TexGen: ::core::option::Option<
        unsafe extern "C" fn(coord: ::core::ffi::c_uint, mode: ::core::ffi::c_uint),
    >,
    pub GL_TextureTarget: ::core::option::Option<unsafe extern "C" fn(target: ::core::ffi::c_uint)>,
    pub GL_TexCoordArrayMode:
        ::core::option::Option<unsafe extern "C" fn(texmode: ::core::ffi::c_uint)>,
    pub GL_UpdateTexSize: ::core::option::Option<
        unsafe extern "C" fn(
            texnum: ::core::ffi::c_int,
            width: ::core::ffi::c_int,
            height: ::core::ffi::c_int,
            depth: ::core::ffi::c_int,
        ),
    >,
    pub GL_Reserved0: ::core::option::Option<unsafe extern "C" fn()>,
    pub GL_Reserved1: ::core::option::Option<unsafe extern "C" fn()>,
    pub GL_DrawParticles: ::core::option::Option<
        unsafe extern "C" fn(rvp: *const ref_viewpass_s, trans_pass: qboolean, frametime: f32),
    >,
    pub LightVec: ::core::option::Option<
        unsafe extern "C" fn(
            start: *const f32,
            end: *const f32,
            lightspot: *mut f32,
            lightvec: *mut f32,
        ) -> colorVec,
    >,
    pub StudioGetTexture:
        ::core::option::Option<unsafe extern "C" fn(e: *mut cl_entity_s) -> *mut mstudiotex_s>,
    pub GL_RenderFrame: ::core::option::Option<unsafe extern "C" fn(rvp: *const ref_viewpass_s)>,
    pub GL_OrthoBounds:
        ::core::option::Option<unsafe extern "C" fn(mins: *const f32, maxs: *const f32)>,
    pub R_SpeedsMessage: ::core::option::Option<
        unsafe extern "C" fn(out: *mut ::core::ffi::c_char, size: usize) -> qboolean,
    >,
    pub Mod_GetCurrentVis: ::core::option::Option<unsafe extern "C" fn() -> *mut byte>,
    pub R_NewMap: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_ClearScene: ::core::option::Option<unsafe extern "C" fn()>,
    pub R_GetProcAddress: ::core::option::Option<
        unsafe extern "C" fn(name: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_void,
    >,
    pub TriRenderMode: ::core::option::Option<unsafe extern "C" fn(mode: ::core::ffi::c_int)>,
    pub Begin: ::core::option::Option<unsafe extern "C" fn(primitiveCode: ::core::ffi::c_int)>,
    pub End: ::core::option::Option<unsafe extern "C" fn()>,
    pub Color4f: ::core::option::Option<unsafe extern "C" fn(r: f32, g: f32, b: f32, a: f32)>,
    pub Color4ub: ::core::option::Option<
        unsafe extern "C" fn(
            r: ::core::ffi::c_uchar,
            g: ::core::ffi::c_uchar,
            b: ::core::ffi::c_uchar,
            a: ::core::ffi::c_uchar,
        ),
    >,
    pub TexCoord2f: ::core::option::Option<unsafe extern "C" fn(u: f32, v: f32)>,
    pub Vertex3fv: ::core::option::Option<unsafe extern "C" fn(worldPnt: *const f32)>,
    pub Vertex3f: ::core::option::Option<unsafe extern "C" fn(x: f32, y: f32, z: f32)>,
    pub Fog: ::core::option::Option<
        unsafe extern "C" fn(
            flFogColor: *mut [f32; 3usize],
            flStart: f32,
            flEnd: f32,
            bOn: ::core::ffi::c_int,
        ),
    >,
    pub ScreenToWorld:
        ::core::option::Option<unsafe extern "C" fn(screen: *const f32, world: *mut f32)>,
    pub GetMatrix:
        ::core::option::Option<unsafe extern "C" fn(pname: ::core::ffi::c_int, matrix: *mut f32)>,
    pub FogParams: ::core::option::Option<
        unsafe extern "C" fn(flDensity: f32, iFogSkybox: ::core::ffi::c_int),
    >,
    pub CullFace: ::core::option::Option<unsafe extern "C" fn(mode: TRICULLSTYLE)>,
    pub VGUI_SetupDrawing: ::core::option::Option<unsafe extern "C" fn(rect: qboolean)>,
    pub VGUI_UploadTextureBlock: ::core::option::Option<
        unsafe extern "C" fn(
            drawX: ::core::ffi::c_int,
            drawY: ::core::ffi::c_int,
            rgba: *const byte,
            blockWidth: ::core::ffi::c_int,
            blockHeight: ::core::ffi::c_int,
        ),
    >,
}
pub type ref_interface_t = ref_interface_s;
pub type REFAPI = ::core::option::Option<
    unsafe extern "C" fn(
        version: ::core::ffi::c_int,
        pFunctionTable: *mut ref_interface_t,
        engfuncs: *mut ref_api_t,
        pGlobals: *mut ref_globals_t,
    ) -> ::core::ffi::c_int,
>;