Skip to content

Latest commit

 

History

History
62 lines (50 loc) · 1.91 KB

mojodds.h

File metadata and controls

62 lines (50 loc) · 1.91 KB
 
Jul 10, 2021
Jul 10, 2021
1
2
3
4
5
6
/**
* MojoDDS; tools for dealing with DDS files.
*
* Please see the file LICENSE.txt in the source's root directory.
*/
May 8, 2011
May 8, 2011
7
8
9
10
#ifndef _INCL_MOJODDS_H_
#define _INCL_MOJODDS_H_
/* !!! FIXME: flesh this file out. */
May 9, 2011
May 9, 2011
11
12
13
#ifdef __cplusplus
extern "C" {
#endif
May 8, 2011
May 8, 2011
14
Apr 29, 2015
Apr 29, 2015
15
16
17
18
19
20
21
typedef enum MOJODDS_textureType
{
MOJODDS_TEXTURE_2D,
MOJODDS_TEXTURE_CUBE,
MOJODDS_TEXTURE_VOLUME
} MOJODDS_textureType;
Jul 6, 2021
Jul 6, 2021
22
23
24
/* order and values for these matter, they are used for calculating offsets
lucky for us both DDS and OpengGL order matches */
Jul 10, 2021
Jul 10, 2021
25
26
typedef enum MOJODDS_cubeFace
{
Jul 6, 2021
Jul 6, 2021
27
28
29
30
31
32
33
34
35
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;
May 9, 2011
May 9, 2011
36
int MOJODDS_isDDS(const void *_ptr, const unsigned long _len);
May 8, 2011
May 8, 2011
37
int MOJODDS_getTexture(const void *_ptr, const unsigned long _len,
May 10, 2011
May 10, 2011
38
39
const void **_tex, unsigned long *_texlen,
unsigned int *_glfmt, unsigned int *_w,
Apr 29, 2015
Apr 29, 2015
40
41
42
unsigned int *_h, unsigned int *_miplevels,
unsigned int *_cubemapfacelen,
MOJODDS_textureType *_textureType);
Apr 28, 2015
Apr 28, 2015
43
int MOJODDS_getMipMapTexture(unsigned int miplevel, unsigned int glfmt,
Jul 10, 2021
Jul 10, 2021
44
const void *_basetex,
Apr 28, 2015
Apr 28, 2015
45
46
47
unsigned int w, unsigned h,
const void **_tex, unsigned long *_texlen,
unsigned int *_texw, unsigned int *_texh);
May 8, 2011
May 8, 2011
48
Jul 6, 2021
Jul 6, 2021
49
50
int MOJODDS_getCubeFace(MOJODDS_cubeFace cubeFace, unsigned int miplevel,
unsigned int glfmt, const void*_basetex,
Jul 6, 2021
Jul 6, 2021
51
unsigned long _cubemapfacelen, unsigned int w, unsigned h,
Jul 6, 2021
Jul 6, 2021
52
53
54
const void **_tex, unsigned long *_texlen,
unsigned int *_texw, unsigned int *_texh);
May 9, 2011
May 9, 2011
55
56
#ifdef __cplusplus
}
May 8, 2011
May 8, 2011
57
58
#endif
May 9, 2011
May 9, 2011
59
#endif
May 8, 2011
May 8, 2011
60
May 9, 2011
May 9, 2011
61
/* end of mojodds.h ... */