- attempt to fix / improve performance of color picking

This commit is contained in:
Mark Vejvoda
2013-01-22 04:30:06 +00:00
parent 7eaf0dcffc
commit 7146a20976
4 changed files with 168 additions and 19 deletions

View File

@@ -1568,7 +1568,8 @@ vector<int> BaseColorPickEntity::getPickedList(int x,int y,int w,int h,
//printf("In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
static Chrono lastSnapshot(true);
const int selectionMillisecondUpdate = 100;
//const int selectionMillisecondUpdate = 100;
const int selectionMillisecondUpdate = 0;
if(PixelBufferWrapper::getIsPBOEnable() == true) {
// Only update the pixel buffer every x milliseconds or as required
@@ -1679,10 +1680,17 @@ bool BaseColorPickEntity::isUniquePickingColor(unsigned char *pixel) const {
}
void BaseColorPickEntity::setUniquePickingColor() const {
glColor3ub(uniqueColorID[0],
uniqueColorID[1],
uniqueColorID[2]);
/*
glColor3f( uniqueColorID[0] / 255.0f,
uniqueColorID[1] / 255.0f,
uniqueColorID[2] / 255.0f);
//uniqueColorID[3] / 255.0f);
*/
}