Quote Originally Posted by cairnswm
Yeah I know how to use others peoples stuff Its called Copy paste or just reuse the library

If you like I'll add all the procedures etc to the TPhxImage class - this leaves you to carry on with the other items. I at least know enough on how to do this now

I will use the logic as in S2DL (Probably mostly copy and paste). Once I'm done I'll give it back to you and you can optimise it.
Yeah, that would be sweet indeed. However there's still the issue of wich rendering method to use, there's basically 4 ways:

1, glBegin / glEnd - The wy you've done in your lib aswell as I did in GLXTreem, potentally slow.

2. Display list, one for every pattern. Abit more advanced, but "should" be faster then the prefious method. Drawback of needing to modify the modelview matrix for each render (position, stretch).

3. glVertexPointer + glTexCoordPointer, Should be faster then both of the previous versions, requires quite a bit of coding however, but no need to modify the modelvirew matrix and only one opengl call per draw.

4. glBindBuffer (Vertex Buffer Objects), Should improve of the last variant even more due to the texturecoordinates being static on the gpu memory, only vertex data needs to be shuffled to the gfx card on each draw. And still no modelview matrix modifixations.

The first 2 methods is quite straigth forward, infact they are already implemented to some degree, however there may be some performance issues with em.

Then there's the Vertex Array and Vertex Buffer Object versions, shure they will bring some performence gain, but the question is if the performance gain is big enough to justify the extra work