Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ColorTexture

  • Loading branch information...
commit 25d78d464605f52aecde4c6689ee145377564f2f 1 parent 2413670
@cyndis cyndis authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 backend/src/texture.h
View
14 backend/src/texture.h
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.