nxpascal icon indicating copy to clipboard operation
nxpascal copied to clipboard

Immediate mode rendering outdated

Open Zaflis opened this issue 8 years ago • 0 comments

There are still a few places in the code where glBegin..glEnd sort of coding is used. I believe it would best to get rid of them altogether, however it is as of yet unclear what the best path to that is. Using VBO's through the TRenderer class might be easy enough, and it would at the same time make all the graphics compatible with shader programs.

On the downside this kind of renewing might stop support for lesser graphics cards, but is that really an issue still in 2017? I don't think so. Maybe some still have old Linux drivers that might not let these apps to start, but overall there should be a speed boost that would make this change worthwhile.

If i go with TRenderer, it would cause that calls like glColor will become non-funtional. Instead you'd use nx.renderer.SetColor(r,g,b) , which will assign color values automatically to next polygons in cache array. The renderer collects N amount of polygons and send them all at once to OpenGL in a bunch. Changing render program is one of the ways to send and reset the cache.

Zaflis avatar Sep 24 '17 14:09 Zaflis