terrain working - no culling
[demo] / src / image.h
index d39e750..ec5228d 100644 (file)
@@ -1,11 +1,16 @@
 #ifndef IMAGE_H_
 #define IMAGE_H_
 
+#include <gmath/gmath.h>
+
 class Image {
 public:
        int w;
        int h;
-       unsigned char *pixels;
+       int psz;
+
+       bool is_float;
+       void *pixels;
 
        Image();
        ~Image();
@@ -21,6 +26,9 @@ public:
        Image &operator =(Image &&image);
 
        bool load(const char *fname);
+
+       Vec4 lookup_nearest(float u, float v) const;
+       //TODO lookup_linear
 };
 
 #endif // IMAGE_H_
\ No newline at end of file