Original Post
Have got my targa writer working but get strange artefacts in the image now and again.
I pass my targa writer function my frame buffer, an array of floats. These are then converted in chars. I feel the problem lies here somewhere.
my targa header structure is as follows
I pass my targa writer function my frame buffer, an array of floats. These are then converted in chars. I feel the problem lies here somewhere.
my targa header structure is as follows
struct TGA {
unsigned char idLength;
unsigned char colourMapType;
unsigned char imageType;
unsigned short colourMapFirstEntryIndex;
unsigned short colourMapLength;
unsigned char colourMapEntrySize;
unsigned short xOrigin;
unsigned short yOrigin;
unsigned short width;
unsigned short height;
unsigned char pixelDepth;
unsigned char imageDescriptor;
};
Anyone have any ideas how to resolve this problem?
Thanks