mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 11:54:00 +02:00
Tweak to see if we can get the new colour picking code working
This commit is contained in:
@@ -278,8 +278,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
unsigned char uniqueColorID[COLOR_COMPONENTS];
|
unsigned char uniqueColorID[COLOR_COMPONENTS];
|
||||||
|
|
||||||
static int nextColorID;
|
static unsigned nextColorID;
|
||||||
static const int k, p;
|
static const unsigned k, p;
|
||||||
static Mutex mutexNextColorID;
|
static Mutex mutexNextColorID;
|
||||||
|
|
||||||
static auto_ptr<PixelBufferWrapper> pbo;
|
static auto_ptr<PixelBufferWrapper> pbo;
|
||||||
|
@@ -1826,9 +1826,9 @@ PixelBufferWrapper::~PixelBufferWrapper() {
|
|||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
const int BaseColorPickEntity::p = 64007;
|
const unsigned BaseColorPickEntity::p = 64007;
|
||||||
const int BaseColorPickEntity::k = 43067;
|
const unsigned BaseColorPickEntity::k = 43067;
|
||||||
int BaseColorPickEntity::nextColorID = BaseColorPickEntity::k;
|
unsigned BaseColorPickEntity::nextColorID = BaseColorPickEntity::k;
|
||||||
Mutex BaseColorPickEntity::mutexNextColorID;
|
Mutex BaseColorPickEntity::mutexNextColorID;
|
||||||
auto_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo;
|
auto_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo;
|
||||||
|
|
||||||
@@ -1845,7 +1845,7 @@ void BaseColorPickEntity::assign_color() {
|
|||||||
// nextColorID is a 16-bit (hi)colour (for players with 16-bit display depths)
|
// nextColorID is a 16-bit (hi)colour (for players with 16-bit display depths)
|
||||||
// we expand it to true-color for use with OpenGL
|
// we expand it to true-color for use with OpenGL
|
||||||
|
|
||||||
const int
|
const unsigned
|
||||||
r = (nextColorID >> 11) & ((1<<5)-1),
|
r = (nextColorID >> 11) & ((1<<5)-1),
|
||||||
g = (nextColorID >> 5) & ((1<<6)-1),
|
g = (nextColorID >> 5) & ((1<<6)-1),
|
||||||
b = nextColorID & ((1<<5)-1);
|
b = nextColorID & ((1<<5)-1);
|
||||||
|
Reference in New Issue
Block a user