qvolray
annotate 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 |
rev | line source |
---|---|
nuclear@8 | 1 #ifndef VOLUME_H_ |
nuclear@8 | 2 #define VOLUME_H_ |
nuclear@8 | 3 |
nuclear@11 | 4 #include <list> |
nuclear@11 | 5 #include <string> |
nuclear@8 | 6 |
nuclear@11 | 7 class Volume { |
nuclear@11 | 8 private: |
nuclear@8 | 9 int sz[3]; |
nuclear@8 | 10 float zaspect; |
nuclear@11 | 11 unsigned int tex; |
nuclear@11 | 12 |
nuclear@13 | 13 bool read_voldesc(const char *fname, std::list<std::string> *slist); |
nuclear@11 | 14 |
nuclear@11 | 15 public: |
nuclear@11 | 16 Volume(); |
nuclear@11 | 17 ~Volume(); |
nuclear@11 | 18 |
nuclear@18 | 19 bool create(int xsz, int ysz, int zsz, float *data = 0); |
nuclear@11 | 20 bool load(const char *fname); |
nuclear@11 | 21 |
nuclear@11 | 22 unsigned int get_texture() const; |
nuclear@11 | 23 void bind(int tex_unit = 0) const; |
nuclear@8 | 24 }; |
nuclear@8 | 25 |
nuclear@8 | 26 #endif /* VOLUME_H_ */ |