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

[FEATURE] Windows-compatible viewer support #610

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kohya-ss
Copy link

This PR adds Windows compatibility to Genesis Viewer by providing a non-JIT implementation of the renderer.

Background

The original Genesis Viewer uses JIT compilation for OpenGL rendering, which causes issues on Windows machines. This PR provides a non-JIT implementation while maintaining the same functionality.

Changes

  • Implemented non-JIT renderer in genesis/ext/pyrender/non_jit_renderer.py
  • Modified viewer implementation to support both JIT and non-JIT rendering
  • Updated rasterizer context to handle the non-JIT renderer
  • Kept the original JIT implementation intact for non-Windows environments

Testing

To test this implementation:

  1. Install Genesis on a Windows machine
  2. Run the viewer with a sample scene like: python examples\rigid\control_franka.py --vis or python examples\rendering\moving_camera.py --vis
  3. Verify that the 3D rendering works correctly

The implementation has been tested on Windows 10 and 11, with Python 3.10.

Note: Due to the removal of JIT optimization, there may be a decrease in performance compared to the original implementation on non-Windows systems.

This implementation is focused on Windows compatibility while maintaining the existing functionality. As I am not an OpenGL expert, reviews and suggestions from OpenGL experts would be particularly appreciated.

@ziyanx02
Copy link
Collaborator

@YilingQiao Could you try reformatting the rasterizer_context.py if you have time? I met the same problem, pass locally but fail online.

@kohya-ss
Copy link
Author

kohya-ss commented Jan 19, 2025

It's very strange, but it seems that pre_commit run reformats the format by black --check .. That seems to be the error.

I don't know what to do, but I added an unnecessary comma so that the two match.

EDIT: Ah sorry, I misunderstood that as a message to me, and updated it.

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