Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immediate mode rendering outdated #7

Open
Zaflis opened this issue Sep 24, 2017 · 0 comments
Open

Immediate mode rendering outdated #7

Zaflis opened this issue Sep 24, 2017 · 0 comments

Comments

@Zaflis
Copy link
Owner

Zaflis commented Sep 24, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant