]> git.cworth.org Git - apitrace/blob - gui/apisurface.h
Dump stencil buffer too.
[apitrace] / gui / apisurface.h
1 #ifndef APISURFACE_H
2 #define APISURFACE_H
3
4 #include <QImage>
5 #include <QSize>
6 #include <QString>
7
8 class ApiSurface
9 {
10 public:
11     ApiSurface();
12
13     QSize size() const;
14     void setSize(const QSize &size);
15
16     int numChannels() const;
17     void setNumChannels(int numChannels);
18
19     void contentsFromBase64(const QByteArray &base64);
20
21     QImage image() const;
22     QImage thumb() const;
23
24 private:
25     QSize  m_size;
26     int m_numChannels;
27     QImage m_image;
28     QImage m_thumb;
29 };
30
31
32 class ApiTexture : public ApiSurface
33 {
34 public:
35     ApiTexture();
36
37     int unit() const;
38     void setUnit(int un);
39
40     int level() const;
41     void setLevel(int l);
42
43     QString target() const;
44     void setTarget(const QString &str);
45
46 private:
47     int m_unit;
48     int m_level;
49     QString m_target;
50 };
51
52 class ApiFramebuffer : public ApiSurface
53 {
54 public:
55     ApiFramebuffer();
56
57     QString type() const;
58     void setType(const QString &str);
59
60 private:
61     QString m_type;
62
63 };
64
65 #endif