Hey. I'm attempting to write a pixel-based font renderer, so I can pass in font textures and draw them to the screen. I'm currently attempting to automatically calculate kerning values, based on the leftmost and rightmost pixels of each character (testing whether the alpha channel is above 0.5). However, the code is never being called, as it seems GetPixel returns the value (1,1,1,0) in all pixels, regardless of the fact that the texture does not contain this. I'm at a loss here, as the texture is drawing correctly, and everything is working except the GetPixel call. I have even tested it by locating a pixel that I know is not white and not transparent manually, then called GetPixel on that (GetPixel(98,20)), and yet it still returns (1,1,1,0). Does anyone know what might be happening here?
↧