Permalink
Browse files

ColorTexture

  • Loading branch information...
1 parent 2413670 commit 25d78d464605f52aecde4c6689ee145377564f2f @cyndis cyndis committed Apr 21, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 backend/src/texture.h
View
@@ -23,6 +23,20 @@ namespace dmcr {
private:
png::image<png::rgb_pixel> m_image;
};
+
+ class ColorTexture : public Texture2D {
+ public:
+ ColorTexture(Color color)
+ : Texture2D(), m_color(color) { }
+
+ virtual Color queryTexel(double u, double v) {
+ (void)u; (void)v;
+ return m_color;
+ }
+
+ private:
+ Color m_color;
+ };
}
#endif

0 comments on commit 25d78d4

Please sign in to comment.