aboutsummaryrefslogtreecommitdiff
path: root/src/dtx/dtx.h
blob: 24a7a7ba8c893115ab651a7cd1b47849efe42533 (plain) (blame)
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
#ifndef DTX_H
#define DTX_H

#include <rez/file.h>
#include <GL/gl.h>

class dtx
{
public:
    typedef std::vector<unsigned char> pixdata;

    dtx();
    ~dtx();
    int parse(rez::file &f);
    int draw() const;

private:

    enum bpp
    {
        bpp_8_pal,
        bpp_8,
        bpp_16,
        bpp_32,
        bpp_s3tc_dxt1,
        bpp_s3tc_dxt3,
        bpp_s3tc_dxt5,
        bpp_32_pal,

        n_bpp
    } bpp;

    GLuint texture;
    unsigned w, h;
};

#endif