diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-07 00:39:54 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:53 +0100 |
commit | 215ac3f6ab07bc74b0228d7377f0475857e7ed6c (patch) | |
tree | 09ce72792aa361879bca7dab6253d4db444d2528 /src/utils/rgb_color.hpp | |
parent | 34688d24a281a3fb646d0909d66afb46a8b4e524 (diff) | |
download | usdx-215ac3f6ab07bc74b0228d7377f0475857e7ed6c.tar.gz usdx-215ac3f6ab07bc74b0228d7377f0475857e7ed6c.tar.xz usdx-215ac3f6ab07bc74b0228d7377f0475857e7ed6c.zip |
utils/rgb_color: add possibility to generate color array for opengl
Diffstat (limited to '')
-rw-r--r-- | src/utils/rgb_color.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/rgb_color.hpp b/src/utils/rgb_color.hpp index 4c06e765..36a5b42c 100644 --- a/src/utils/rgb_color.hpp +++ b/src/utils/rgb_color.hpp @@ -25,6 +25,8 @@ #ifndef RGB_COLOR_HPP #define RGB_COLOR_HPP +#include <GL/gl.h> + namespace usdx { class RgbColor @@ -33,13 +35,24 @@ namespace usdx float red; float green; float blue; + + protected: + mutable GLubyte *array; + mutable size_t array_length; + public: RgbColor(int red, int green, int blue); RgbColor(float red, float green, float blue); + RgbColor(const RgbColor& color); + virtual ~RgbColor(); + RgbColor& operator=(const RgbColor& color); float get_red(void) const; float get_green(void) const; float get_blue(void) const; + + virtual const GLubyte* get_array(size_t len) const; + int get_array_comonent_count(void) const; }; }; |