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

Implement UI decoration rendering with *AnnotationRenderables #17095

Merged
merged 12 commits into from Oct 20, 2019

Conversation

@pchote
Copy link
Member

pchote commented Sep 15, 2019

This PR implements another significant chunk of preparation for #10382.

The concept of an "Annotation" is introduced to represent overlays drawn in the UI that give the player extra info, but doesn't physically exist in the game world. This covers range circles, target lines, selection boxes / bars, debug overlays and so on. Annotations render at the native screen resolution, and their size is determined by the UI zoom (to be implemented in a future PR) rather than the world zoom.

The goal for testing should be to show that there are no visual regressions compared to bleed. The new behavior will only be useful once we implement the world framebuffer and enable arbitrary zooming. This can be tested using my render-wip branch, but expect other regressions there.

There are three obvious questions, which I am deliberately deferring to future PRs:

  • Changing beacons and rally point indicators is controversial, and further discussion about them is best left until we have the final world and UI zoom behaviors so everyone can fully understand the questions being debated.
  • The map editor overlays may require similar changes, to be handled in a followup.
  • I plan to document the different rendering stages / renderable interfaces in WorldRenderer and for the book, but not here. This will be part of the world framebuffer PR.
@pchote pchote added this to the Next+1 milestone Sep 15, 2019
@@ -220,34 +247,44 @@ public void Draw()
foreach (var r in g)
r.Render(this);

Game.Renderer.Flush();

This comment has been minimized.

Copy link
@pchote

pchote Sep 15, 2019

Author Member

A future PR will chop this method in half at this line. Everything above will be drawn into the world framebuffer (and can only use the World*Renderers), everything below as UI (and can only use the non-World *Renderers). This is the difference between preparedOverlayRenderables and preparedAnnotationRenderables.

@pchote pchote force-pushed the pchote:render-annotations branch from 016cab2 to d684553 Oct 2, 2019
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Oct 2, 2019

Rebased.

@pchote pchote dismissed stale reviews from abcdefg30 and teinarss via fab20c1 Oct 20, 2019
@pchote pchote force-pushed the pchote:render-annotations branch from d684553 to fab20c1 Oct 20, 2019
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Oct 20, 2019

Fixed and rebased.

@abcdefg30 abcdefg30 merged commit 1599eac into OpenRA:bleed Oct 20, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abcdefg30

This comment has been minimized.

Copy link
Member

abcdefg30 commented Oct 20, 2019

@GraionDilach

This comment has been minimized.

Copy link
Contributor

GraionDilach commented Oct 30, 2019

Not fond of another Flush added to rendering in light of #17130 (comment)

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

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.