-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmojodds.h
62 lines (50 loc) · 1.91 KB
/
mojodds.h
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
/**
* MojoDDS; tools for dealing with DDS files.
*
* Please see the file LICENSE.txt in the source's root directory.
*/
#ifndef _INCL_MOJODDS_H_
#define _INCL_MOJODDS_H_
/* !!! FIXME: flesh this file out. */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum MOJODDS_textureType
{
MOJODDS_TEXTURE_2D,
MOJODDS_TEXTURE_CUBE,
MOJODDS_TEXTURE_VOLUME
} MOJODDS_textureType;
/* order and values for these matter, they are used for calculating offsets
lucky for us both DDS and OpengGL order matches */
typedef enum MOJODDS_cubeFace
{
MOJODDS_CUBEFACE_POSITIVE_X,
MOJODDS_CUBEFACE_NEGATIVE_X,
MOJODDS_CUBEFACE_POSITIVE_Y,
MOJODDS_CUBEFACE_NEGATIVE_Y,
MOJODDS_CUBEFACE_POSITIVE_Z,
MOJODDS_CUBEFACE_NEGATIVE_Z
} MOJODDS_cubeFace;
int MOJODDS_isDDS(const void *_ptr, const unsigned long _len);
int MOJODDS_getTexture(const void *_ptr, const unsigned long _len,
const void **_tex, unsigned long *_texlen,
unsigned int *_glfmt, unsigned int *_w,
unsigned int *_h, unsigned int *_miplevels,
unsigned int *_cubemapfacelen,
MOJODDS_textureType *_textureType);
int MOJODDS_getMipMapTexture(unsigned int miplevel, unsigned int glfmt,
const void *_basetex,
unsigned int w, unsigned h,
const void **_tex, unsigned long *_texlen,
unsigned int *_texw, unsigned int *_texh);
int MOJODDS_getCubeFace(MOJODDS_cubeFace cubeFace, unsigned int miplevel,
unsigned int glfmt, const void*_basetex,
unsigned long _cubemapfacelen, unsigned int w, unsigned h,
const void **_tex, unsigned long *_texlen,
unsigned int *_texw, unsigned int *_texh);
#ifdef __cplusplus
}
#endif
#endif
/* end of mojodds.h ... */