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

Render the cursor in the WebGL canvas #4568

Merged
merged 9 commits into from
Aug 1, 2023
Merged

Conversation

xzfc
Copy link
Contributor

@xzfc xzfc commented Jun 18, 2023

#4082

The RectangleRenderer is updated not just to draw cell backgrounds, but the cursor as well (bar and underscore cursors are 1px wide rectangles, blur cursor consists of four 1px rectangles). The block cursor is implemented by changing cell attributes.

The CursorRenderLayer is dropped.

@Tyriar Tyriar added this to the 5.3.0 milestone Jul 28, 2023
@Tyriar Tyriar self-assigned this Jul 28, 2023
This also focused the manager's creation on renderer start up, to ensure blink
works immediately.
@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

I notice the cursor fg is unexpectedly blue sometimes, I would have thought this is black:

image

@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

Underline and bar cursors don't seem to update correctly atm

@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

Changing to light theme in demo still shows white block cursor:

image

@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

Fixed the blue problem, was related to rgba format being used as rgb f64cb15

@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

The light theme issue is actually a problem outside of this PR as the cursor colors don't get set in the theme so the defaults are used.

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

@xzfc great work on this! I made a few fixes and I think this is good to go

@Tyriar
Copy link
Member

Tyriar commented Aug 1, 2023

Just need to fix the tests:

  1) WebGL Renderer Integration Tests
       dispose removes renderer canvases:

      AssertionError: expected 2 to equal 3
      + expected - actual

      -2
      +3
      
      at Context.<anonymous> (addons\xterm-addon-webgl\test\WebglRenderer.api.ts:28:12)
      at Generator.next (<anonymous>)
      at fulfilled (addons\xterm-addon-webgl\out-test\WebglRenderer.api.js:5:58)

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