98e75f2d |
1 | /* |
2 | * Texture Filtering |
3 | * Version: 1.0 |
4 | * |
5 | * Copyright (C) 2007 Hiroshi Morii All Rights Reserved. |
6 | * Email koolsmoky(at)users.sourceforge.net |
7 | * Web http://www.3dfxzone.it/koolsmoky |
8 | * |
9 | * this is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License as published by |
11 | * the Free Software Foundation; either version 2, or (at your option) |
12 | * any later version. |
13 | * |
14 | * this is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License |
20 | * along with GNU Make; see the file COPYING. If not, write to |
21 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ |
23 | |
24 | #ifndef __INTERNAL_H__ |
25 | #define __INTERNAL_H__ |
26 | |
27 | #include "Ext_TxFilter.h" |
28 | |
29 | /* dll exports */ |
30 | #ifdef TXFILTER_DLL |
31 | #define TAPI __declspec(dllexport) |
32 | #define TAPIENTRY |
33 | #else |
34 | #define TAPI |
35 | #define TAPIENTRY |
36 | #endif |
37 | |
38 | #include <stdint.h> |
39 | |
40 | typedef uint8_t uint8; |
41 | typedef uint16_t uint16; |
42 | typedef uint32_t uint32; |
43 | |
44 | #ifdef WIN32 |
45 | #define KBHIT(key) ((GetAsyncKeyState(key) & 0x8001) == 0x8001) |
46 | #else |
47 | #define KBHIT(key) (0) |
48 | #endif |
49 | |
50 | /* from OpenGL glext.h */ |
51 | #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 |
52 | #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 |
53 | #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 |
54 | #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 |
55 | |
56 | /* for explicit fxt1 compression */ |
57 | #define CC_CHROMA 0x0 |
58 | #define CC_HI 0x1 |
59 | #define CC_ALPHA 0x2 |
60 | |
61 | /* in-memory zlib texture compression */ |
62 | #define GR_TEXFMT_GZ 0x8000 |
63 | |
64 | #if 0 /* this is here to remind me of other formats */ |
65 | /* from 3Dfx Interactive Inc. glide.h */ |
66 | #define GR_TEXFMT_8BIT 0x0 |
67 | #define GR_TEXFMT_RGB_332 GR_TEXFMT_8BIT |
68 | #define GR_TEXFMT_YIQ_422 0x1 |
69 | #define GR_TEXFMT_ALPHA_8 0x2 /* (0..0xFF) alpha */ |
70 | #define GR_TEXFMT_INTENSITY_8 0x3 /* (0..0xFF) intensity */ |
71 | #define GR_TEXFMT_ALPHA_INTENSITY_44 0x4 |
72 | #define GR_TEXFMT_P_8 0x5 /* 8-bit palette */ |
73 | #define GR_TEXFMT_RSVD0 0x6 /* GR_TEXFMT_P_8_RGBA */ |
74 | #define GR_TEXFMT_P_8_6666 GR_TEXFMT_RSVD0 |
75 | #define GR_TEXFMT_P_8_6666_EXT GR_TEXFMT_RSVD0 |
76 | #define GR_TEXFMT_RSVD1 0x7 |
77 | #define GR_TEXFMT_16BIT 0x8 |
78 | #define GR_TEXFMT_ARGB_8332 GR_TEXFMT_16BIT |
79 | #define GR_TEXFMT_AYIQ_8422 0x9 |
80 | #define GR_TEXFMT_RGB_565 0xa |
81 | #define GR_TEXFMT_ARGB_1555 0xb |
82 | #define GR_TEXFMT_ARGB_4444 0xc |
83 | #define GR_TEXFMT_ALPHA_INTENSITY_88 0xd |
84 | #define GR_TEXFMT_AP_88 0xe /* 8-bit alpha 8-bit palette */ |
85 | #define GR_TEXFMT_RSVD2 0xf |
86 | #define GR_TEXFMT_RSVD4 GR_TEXFMT_RSVD2 |
87 | |
88 | /* from 3Dfx Interactive Inc. g3ext.h */ |
89 | #define GR_TEXFMT_ARGB_CMP_FXT1 0x11 |
90 | #define GR_TEXFMT_ARGB_8888 0x12 |
91 | #define GR_TEXFMT_YUYV_422 0x13 |
92 | #define GR_TEXFMT_UYVY_422 0x14 |
93 | #define GR_TEXFMT_AYUV_444 0x15 |
94 | #define GR_TEXFMT_ARGB_CMP_DXT1 0x16 |
95 | #define GR_TEXFMT_ARGB_CMP_DXT2 0x17 |
96 | #define GR_TEXFMT_ARGB_CMP_DXT3 0x18 |
97 | #define GR_TEXFMT_ARGB_CMP_DXT4 0x19 |
98 | #define GR_TEXFMT_ARGB_CMP_DXT5 0x1A |
99 | #define GR_TEXTFMT_RGB_888 0xFF |
100 | #endif |
101 | |
102 | #endif /* __INTERNAL_H__ */ |