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 Public APIs to support different renderers #214

Closed
arihantparsoya opened this issue Aug 2, 2020 · 5 comments
Closed

Update Public APIs to support different renderers #214

arihantparsoya opened this issue Aug 2, 2020 · 5 comments

Comments

@arihantparsoya
Copy link
Member

Currently all the APIs use PShape only for rendering shapes as vispy is the only renderer being used. To add support for new renderers, we want to update the existing API functions to call that specific renderer. Pseudo code:

def shapeXYZ(): # some rendering function
    renderer.shapeXYZ() # the function corresponding to the renderer will be called.
@arihantparsoya
Copy link
Member Author

Few more things needs to be done after #288

  1. Implement begin_shape() API inside the Vispy2DRenderer

@arihantparsoya
Copy link
Member Author

  1. Test if the Font and Image APIs are working as expected with the new library structure.

@tushar5526
Copy link
Member

It skipped my mind to refactor image.py as it has a dependency on Texture2D from vispy.gloo. Image APIs are working fine as of now, as there is only one renderer.
PImage has to be updated to support multiple renderers. I will make a PR soon.

@tushar5526
Copy link
Member

Few more things needs to be done after #288

  1. Implement begin_shape() API inside the Vispy2DRenderer

@parsoyaarihant Can you tell a bit more about this? I am interested in doing it.

@arihantparsoya
Copy link
Member Author

begin_shape() API currently uses PShape: https://github.com/p5py/p5/blob/master/p5/core/vertex.py#L335

We need to move this code into the VispyRenderer.

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

No branches or pull requests

2 participants