qvolray

view src/volume.h @ 37:450d4c50470f

- 16bit floating point textures halve gpu texture memory usage - slower transfer function change
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 01 Jan 2014 00:23:57 +0200
parents 17d9dc2edc91
children
line source
1 #ifndef VOLUME_H_
2 #define VOLUME_H_
4 #include <list>
5 #include <string>
7 class Volume {
8 private:
9 int sz[3];
10 float zaspect;
11 unsigned int tex;
13 bool read_voldesc(const char *fname, std::list<std::string> *slist);
15 public:
16 Volume();
17 ~Volume();
19 bool create(int xsz, int ysz, int zsz, float *data = 0);
20 bool load(const char *fname);
22 unsigned int get_texture() const;
23 void bind(int tex_unit = 0) const;
24 };
26 #endif /* VOLUME_H_ */