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

VideoCommon/BoundingBox: Make interface for querying bounding box data #8513

Merged
merged 2 commits into from Dec 8, 2019

Conversation

@lioncash
Copy link
Member

lioncash commented Dec 5, 2019

Rather than exposing the bounding box members directly, we can instead provide an interface for code to use. This makes it nicer to transition off of global data, as the interface function names are already in place when the stateful class is introduced, meaning only BoundingBox:: generally needs to be replaced.

With this, we now also have a place for both the disabling of bounding box itself, but also a single location for notifying the pixel shader manager when bounding box is disabled or enabled.

lioncash added 2 commits Dec 5, 2019
Rather than expose the bounding box members directly, we can instead
provide an interface for code to use. This makes it nicer to transition
from global data, as the interface function names are already in
place.
…e() calls into Enable()/Disable()

Now that we have an actual interface to manage things, we can stop
duplicating the calls to to the pixel shader manager and remove the
need to remember to actually do so when disabling or enabling the
bounding box.
@degasus
degasus approved these changes Dec 5, 2019
@CookiePLMonster

This comment has been minimized.

Copy link
Contributor

CookiePLMonster commented Dec 6, 2019

You are typecasting u16 to Coordinate in user code just to have Coordinate typecast to u32 again internally. I'd suggest either making Coordinate a private implementation detail of BoundingBox.cpp or introducing overloads so Coordinate overloads call [G/S]etCoordinate(u16). It's an enum class so it's all fine.

@Helios747 Helios747 merged commit fdb78b6 into dolphin-emu:master Dec 8, 2019
10 checks passed
10 checks passed
default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details
@lioncash lioncash deleted the lioncash:bounding-box branch Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.