some compile fixes in debug font rendering

This commit is contained in:
erwin.coumans
2009-09-29 02:12:40 +00:00
parent ebd44c1cd2
commit 7b4bfcbcab
6 changed files with 260 additions and 277 deletions

View File

@@ -37,10 +37,19 @@ public:
{
unsigned char* pixel = &m_buffer[ (x+y*m_width) * 4];
pixel[0] = (unsigned char)(255*rgba.getX());
pixel[1] = (unsigned char)(255*rgba.getY());
pixel[2] = (unsigned char)(255*rgba.getZ());
pixel[3] = (unsigned char)(255*rgba.getW());
pixel[0] = (unsigned char)(255.*rgba.getX());
pixel[1] = (unsigned char)(255.*rgba.getY());
pixel[2] = (unsigned char)(255.*rgba.getZ());
pixel[3] = (unsigned char)(255.*rgba.getW());
}
inline void addPixel(int x,int y,const btVector4& rgba)
{
unsigned char* pixel = &m_buffer[ (x+y*m_width) * 4];
pixel[0] = (unsigned char)btMin(255.f,((float)pixel[0] + 255.f*rgba.getX()));
pixel[1] = (unsigned char)btMin(255.f,((float)pixel[1] + 255.f*rgba.getY()));
pixel[2] = (unsigned char)btMin(255.f,((float)pixel[2] + 255.f*rgba.getZ()));
// pixel[3] = (unsigned char)btMin(255.f,((float)pixel[3] + 255.f*rgba.getW()));
}
inline btVector4 getPixel(int x,int y)