Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 762 vs 801 for /trunk/Source Code/Platform/Video/ScopedStates.cpp

Diff revisions: vs.
  @@ -4,21 +4,20 @@
4 4 namespace Divide {
5 5 namespace GFX {
6 6
7 - Scoped2DRendering::Scoped2DRendering(bool state) {
8 - _2dRenderingState = GFX_DEVICE.is2DRendering();
9 - GFX_DEVICE.toggle2D(state);
7 + Scoped2DRendering::Scoped2DRendering() {
8 + GFXDevice::instance().toggle2D(true);
10 9 }
11 10
12 11 Scoped2DRendering::~Scoped2DRendering() {
13 - GFX_DEVICE.toggle2D(_2dRenderingState);
12 + GFXDevice::instance().toggle2D(false);
14 13 }
15 14
16 15 ScopedViewport::ScopedViewport(const vec4<I32>& viewport) {
17 - GFX_DEVICE.setViewport(viewport);
16 + GFXDevice::instance().setViewport(viewport);
18 17 }
19 18
20 19 ScopedViewport::~ScopedViewport() {
21 - GFX_DEVICE.restoreViewport();
20 + GFXDevice::instance().restoreViewport();
22 21 }
23 22
24 23 }; // namespace GFX