PLEASE HELP ME GUYS WITH glDrawPixels

glDrawPixels behaves differently depending on the bitmap image dimension. For example, if the image is 128x80 it’s displayed correctly, and when I change the dimensions to say 159x80, it’s distorted. I mean it’s cut in a half and the portion which is supposed to be on the right looks somehow wrapped to the left.
My hardware:
PII 400MHZ, 64MB RAM and GeForce2 MX installed in AGP 2x slot. Drivers: NVIDIA Detenator 6.5.
Note that I’ve checked the pixel storing mode and other relevant pixel transfer ops.
Also I am passing the correct dim.
Thanx.

I have used it a lot without problems (TNT2), could you post the code snippet that does the drawing…

Mikael

Try to specify the plane you are applying the texture to, in a trigonometric way, that is (show the order indicated by the figures):
2__________________________1
| |
| |
| |
| |
| |
3__________________________4
it might work… let me know.
Toinou

Excuse me, the shape designed in the upper reply, should have been a rectangle…

> 159x80

This is an odd-size image. Perhaps you’re suffering from pitch/rowbytes/stride/packing mis-alignment problems.