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

Refactor opengl examples to reduce code duplication and fix warnings #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexpana
Copy link

@alexpana alexpana commented Oct 1, 2016

Glancing over the opengl examples I found a lot of warnings and bad practices: code duplication, non-private fields and various inconsistencies.

I'd like to propose some simple refactorings to clean up the examples. After all, the examples are probably the first thing new developers see.

This pull request is not complete, but I would like to have some feedback on the proposal. The ImmediateModeDemo and NoVerticesBSplineDemo have been refactored as examples. The glfw scaffolding (which is duplicated among all examples) has been extracted into a parent class, so that each example only contains logic and state relevant for the example.

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

Successfully merging this pull request may close these issues.

1 participant