> It seems that the texture-image gets never initialized to a transparent > background, on my testings I can see a lot of pixel-garbage in the > unused areas of the texture.Finally we seem to be getting to the bottom of it. The initial texture object was be allocated using 0, when tells OpenGL to allocated the the data by not copy any data. The init code look like this: glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA, getTextureWidth(), getTextureHeight(), 0, GL_ALPHA, GL_UNSIGNED_BYTE, 0 ); What it looks like is that different drivers initialize the memory in different ways, we lucked out with NVidia initializing to 0's. I have now changed the implementation so that is initializes the original blank glyph texture to all 0's, the code now looks like: unsigned int imageDataSize = getTextureHeight()*getTextureWidth(); unsigned char* imageData = new unsigned char[imageDataSize]; for(unsigned int i=0; i<imageDataSize; ++i) { imageData[i] = 0; } // allocate the texture memory. glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA, getTextureWidth(), getTextureHeight(), 0, GL_ALPHA, GL_UNSIGNED_BYTE, imageData ); delete [] imageData; This is now checked in. Could you guys test it out?
Hi Robert, I just test that issue and is working perfect on my imac. -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
