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

Avoid wasting cycles on lines that are drawn off-screen. #60

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

byteManiak
Copy link

No description provided.

Copy link
Author

@byteManiak byteManiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes about as I was trying to implement a 3D wireframe engine using the line() method.

For example, lines that are part of a flat surface would get longer the closer you get to the surface. Any lines that are off-screen at that point incur a penalty in framerate, and besides there is no point in drawing them.

@byteManiak byteManiak closed this Jan 27, 2021
@byteManiak byteManiak reopened this Jan 27, 2021
@byteManiak byteManiak changed the title Avoid wasting cycles on lines or part of lines that are drawn off-screen. Avoid wasting cycles on lines that are drawn off-screen. Jan 27, 2021
byteManiak added 2 commits January 27, 2021 20:59
…. The coordinates are recalculated to draw a line that is in the bounds of the screen.
@Martin-Laclaustra
Copy link
Collaborator

Thank you. I will have a look at your patch.
Will you share your 3D wireframe engine when you finish?
Currently we are working in the development branch, and we will make changes there when we decide on it.

@byteManiak
Copy link
Author

Yes, I intend to opensource the engine once I finish it. For now it's considered private university project work :(

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.

2 participants