Page 1 of 1

[OT] To the programmers (OpenGL)

Posted: Sun May 18, 2003 6:27 am
by Andrea B Previtera
Maybe I'm wrong, but I think you as going to implement an OpenGL renderer for Exult, am I right? Said this:

in OpenGL, one of the most performance degrading tasks, is texture swapping. Assuming that each shape is actually a texture, the variety of Ultima 7 would require a huge amount of texture swappings per frame. Are you experiencing problems with this?

Also: of course all shapes have to be masked. This is typically accomplished with Alpha Test. Any serious slowdowns due to Alpha testing? Everyone says it's almost non-costings in terms of rendering, but on the other hand, I am experiencing serious performance degradation because of that.

Re: [OT] To the programmers (OpenGL)

Posted: Mon May 19, 2003 9:36 am
by drcode
I believe Exult does use one texture per shape/frame, but the performance seems decent. The problems I recall (not having worked on it for a while) are:

1. You can see seams between the terrain chunks (which are also textures).
2. It crashes my Linux box if I play for more than a few minutes. I'm guessing that it happens when my Voodoo3's texture memory fills up.

Re: [OT] To the programmers (OpenGL)

Posted: Tue May 20, 2003 12:16 am
by Andrea B Previtera
Bizarre: the main cost in Opengl status changes is texture swapping. But after all, those are very small textures. If you see seams between the terrain chunks, it can be a Zbuffer issue (which is quite frequent when using GL_ORTHO projection, or maybe you should render those as a TRI_STRIP.

What about the alpha masks? Do you have an alpha channel for each shape, or what?

Re: [OT] To the programmers (OpenGL)

Posted: Tue May 20, 2003 7:26 am
by drcode
Yes, I believe each shape's texture has an alpha channel. Keep in mind that I'm very much a novice with OpenGL, and just have one video card (Voodoo3) to test with. So I think I stored the textures in 5-5-5-1 format.

Re: [OT] To the programmers (OpenGL)

Posted: Tue May 20, 2003 10:42 pm
by Colourless
Andrea, the 'problems' with lines between the chunks is due to bilinear filtering breaking down (can't filter between chunks). A Z-Buffer is not used nor required. All shapes do require an alpha channel.