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

Update FaceRendering.py #34

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

Conversation

mst-rajatmishra
Copy link

Hello,
I tried making some changes,

  • np.frombuffer is the recommended method for converting binary data into NumPy arrays. np.fromstring has been deprecated for this purpose.

  • Instead of flipping the image channel by channel, the entire image is flipped with np.flipud(renderedImg), which is more concise and clearer.

  • Additional comments have been added to the functions and methods to explain their functionality, which will help maintainability and clarity.

  • While not implemented in this change, consider adding OpenGL error checking (like glGetError()) if you plan to extend the application, especially if debugging more complex OpenGL rendering behavior.

@MarekKowalski
Copy link
Owner

Thanks a lot for this PR! When I wrote this code I was very new to Python and I think the code shows that. With your PR at least that one methods will get a bit better.

Before I accept the PR, just to make sure: everything works as before with those changes and you verified it works, right?

@mst-rajatmishra
Copy link
Author

Thanks a lot for this PR! When I wrote this code I was very new to Python and I think the code shows that. With your PR at least that one methods will get a bit better.

Before I accept the PR, just to make sure: everything works as before with those changes and you verified it works, right?

Hello,
I wasn’t able to verify that everything is still working as expected after the changes. If possible, it would be great if you could verify the functionality to ensure everything is working as before.
Thanks

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