diff --git a/source/shared_lib/include/graphics/model.h b/source/shared_lib/include/graphics/model.h index 632902c2..5378c64c 100644 --- a/source/shared_lib/include/graphics/model.h +++ b/source/shared_lib/include/graphics/model.h @@ -253,8 +253,24 @@ public: static const int COLOR_COMPONENTS = 4; - struct ColorPickStruct { + class ColorPickStruct { + public: unsigned char color[COLOR_COMPONENTS]; + + ColorPickStruct(unsigned char newColor1,unsigned char newColor2, + unsigned char newColor3,unsigned char newColor4) { + color[0] = newColor1; + color[1] = newColor2; + color[2] = newColor3; + color[3] = newColor4; + } + ColorPickStruct() { + color[0] = 0; + color[1] = 0; + color[2] = 0; + color[3] = 0; + } + }; static void init(int bufferSize); diff --git a/source/shared_lib/sources/graphics/model.cpp b/source/shared_lib/sources/graphics/model.cpp index 2693d883..8c5aab85 100644 --- a/source/shared_lib/sources/graphics/model.cpp +++ b/source/shared_lib/sources/graphics/model.cpp @@ -1462,7 +1462,7 @@ PixelBufferWrapper::~PixelBufferWrapper() { const int colorSpacing = 8; //unsigned char BaseColorPickEntity::nextColorID[COLOR_COMPONENTS] = {1, 1, 1, 1}; -BaseColorPickEntity::ColorPickStruct BaseColorPickEntity::nextColorID = { colorSpacing, colorSpacing, colorSpacing }; +BaseColorPickEntity::ColorPickStruct BaseColorPickEntity::nextColorID = ColorPickStruct(colorSpacing, colorSpacing, colorSpacing, colorSpacing); vector BaseColorPickEntity::nextColorIDReuseList; Mutex BaseColorPickEntity::mutexNextColorID; auto_ptr BaseColorPickEntity::pbo;