I'm trying to draw a textured quad in viewport space using LWCustomObjAccess but the output color does not match the input.
Here's the code I'm using to produce a white quad in the viewport and below is what I get ..... 255, 255, 193 instead of 255, 255, 255.
Anybody know if I'm doing something wrong or if this is a LW bug?

Here's the code I'm using to produce a white quad in the viewport and below is what I get ..... 255, 255, 193 instead of 255, 255, 255.
Anybody know if I'm doing something wrong or if this is a LW bug?
Code:
void drawTexturedQuad(const LWCustomObjAccess * const drawer)
{
int w = 256;
int h = 256;
int comp = 4;
int totalBytes = w * h * comp;
uint8_t * image = new uint8_t[totalBytes];
std::memset(image, 255, totalBytes);
// uvs
Vector2d a(1, 1);
Vector2d b(0, 1);
Vector2d c(1, 0);
Vector2d d(0, 0);
drawer->setUVs(drawer->dispData, a.data(), b.data(), c.data(), d.data());
int size = w;
drawer->setTexture(drawer->dispData, size, image);
// quad vertices
double z = .001;
Vector3d p1(0, 0, z);
Vector3d p2(0, h, z);
Vector3d p3(w, h, z);
Vector3d p4(w, 0, z);
drawer->quad(drawer->dispData, p1.data(), p2.data(), p3.data(), p4.data(), LWCSYS_VIEWPORT);
delete [] image;
}
