- attempt to avoid crash if color picking index is larger than buffer, increase it

This commit is contained in:
SoftCoder
2016-01-16 21:49:36 -08:00
parent e7a9c01bf6
commit 74da39e83e
2 changed files with 28 additions and 1 deletions

View File

@@ -250,7 +250,7 @@ public:
PixelBufferWrapper(int pboCount,int bufferSize);
~PixelBufferWrapper();
static Pixmap2D *getPixelBufferFor(int x,int y,int w,int h, int colorComponents);
Pixmap2D *getPixelBufferFor(int x,int y,int w,int h, int colorComponents);
static void begin();
static void end();
static bool getIsPBOEnable() { return isPBOEnabled; }
@@ -259,8 +259,10 @@ private:
static bool isPBOEnabled;
static int index;
static vector<uint32> pboIds;
int bufferSize;
void cleanup();
void addBuffersToPixelBuf(int pboCount);
};
class BaseColorPickEntity {