Image is not displayed correctly

BlitzMax Forums/OpenGL Module/Image is not displayed correctly

deps(Posted 2005) [#1]
Trying to create a function to draw polygon images. Or whatever they should be called. It's just a simple Max2D function.

It works but contains 2 bugs. The most irritating bug is that it looks like the image is folded. But why? And how do I stop it from doing that?
The second bug is that I need to use the image before I use it with this function, but that's just probably something I forgot to cut-n-paste from other sources in the codearchives and the max2D source, so no biggie.

But the folding bug irritates me a lot. Got any helpful advice?

(You need an image to try this code out.)