glDrawPixels???

Hi,
I’ve recently seen a couple of 64k demos and I’ve set out to write my own. Currently I’m trying to generate some plasma using a mid-point displacement method and simply draw it using glDrawPixels but I’m having all sorts of problems.

I’m using a plasma size of 257x257 (required for the mid point method) and I can’t get glDrawPixels to draw it correctly.

I’ve tried setting GL_UNPACK_ROW_LENGTH to 257 using glPixelStore as I thought that was the problem, but it still doesn’t work.

Any help would be greatly appreciated.


Fleejay

u normally should leave that at 0
257 is not a multiple of 4
so change GL_UNPACK_ALIGNMENT to 1

Cheers, got that now working - had another problem though with recalculating pixels so I’ve found another way of doing it…