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

Hide TDADev::VSync() and double buffer TDAScreen #41

Open
Zardoz89 opened this issue Jan 10, 2015 · 0 comments
Open

Hide TDADev::VSync() and double buffer TDAScreen #41

Zardoz89 opened this issue Jan 10, 2015 · 0 comments

Comments

@Zardoz89
Copy link
Member

The idea is to make it private or protected and be called every 4000 device clock ticks (25 Hz).

At same time, with issue #40 implemented, we could have a internal TDAScreen that is updated when text buffer or font memory are changed (using Dirty regions) or when MAP_FONT/BUFFER command are executed with a different address. DumpScreen, would do a copy of this internal TDAScreen or return a const reference to it. Also, a method like bool isChanged() would be necessary, so game engine could ask if is necessary to get a TDAScreen to update texture/send across network.

Pros :

  • Not is necessary at client level to call VSync()
  • Generating/Updating a TDAScreen only when is strictly necessary.
  • Engine could know when is necessary to update client TDAScreen so we reduce network traffic.

Contras :

  • TDADev would be a sync device that count cycles and when cycle_count <= 4000 does the VSync and cycle_count -= 4000;
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

1 participant