Subversion Repository Public Repository

Divide-Framework

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "Headers/ScopedStates.h"
#include "Platform/Video/Headers/GFXDevice.h"

namespace Divide {
namespace GFX {

Scoped2DRendering::Scoped2DRendering(GFXDevice& context)
    : _context(context)
{
    _context.toggle2D(true);
}

Scoped2DRendering::~Scoped2DRendering()
{
    _context.toggle2D(false);
}

ScopedViewport::ScopedViewport(GFXDevice& context, const vec4<I32>& viewport)
    : _context(context)
{
    _context.setViewport(viewport);
}

ScopedViewport::~ScopedViewport()
{
    _context.restoreViewport();
}

};  // namespace GFX
};  // namespace Divide

Commits for Divide-Framework/trunk/Source Code/Platform/Video/ScopedStates.cpp

Diff revisions: vs.
Revision Author Commited Message
804 Diff Diff IonutCava picture IonutCava Thu 01 Dec, 2016 17:20:59 +0000

[IonutCava]
- Singleton elimination update Part I: get it to compile
— The following classes are no longer Singletons: GFXDevice, GL_API, DX_API, SFXWrapper, FmodWrapper, SDLWrapper, ALWrapper, PXDevice, InputInterface, RenderPassManager, SceneManager and ResourceManager;
— Refactor system to a Context / Component based implementation (Pass relevant context to objects: e.g. GFXDevice object to Textures, GUI to GUIElements, etc)
— Make devices and managers components of the kernel
— Allow multiple Resource caches to co-exist. This may prove useful for later when a more fragmented memory model is need (per frame / per scene / global caches / etc)

  • next steps: part II – cleanup/refactor new code, part III – optimise code, part IV – remove remaining Singletons (e.g. Application, ParamHandler, FrameListenerManager, Recast, PostFX and DebugInterface)
801 Diff Diff IonutCava picture IonutCava Sun 27 Nov, 2016 21:28:01 +0000

[IonutCava]
- More performance analysis guided optimizations.
- Some refactoring to allow later removal of Singletons status for: GFXDevice, SFXDevice, PXDevice, GUI and Input.
— Pass a PlatformContext around objects to access these classes.

762 Diff Diff IonutCava picture IonutCava Thu 11 Aug, 2016 16:18:35 +0000

[IonutCava]
- Removed a lot of high level GFX state and merged it back on a lower level:
— depth mask is now a framebuffer specific toggle controlled by the RenderPolicy
— rasterization is now a per-buffer draw switch toggled by a rendering flag in GenericDrawCommand
- Replaced old style GL texture binding code with DSA style glBindTextures and glBindSamplers even for single textures
— completely removed the concept of a active texture unit in the GL code
- Fixed some draw policy settings that were clearing the depth buffer in the PostFX passes
- More build type flag replacement of macros
- Render pass system bug fixing
- Add option to skip occlusion culling for certain nodes

475 Diff Diff IonutCava picture IonutCava Fri 19 Jun, 2015 16:12:42 +0000

[Ionut]
- More (hackish) occlusion query code

436 Diff Diff IonutCava picture IonutCava Thu 14 May, 2015 16:09:08 +0000

[Ionut]
- Initial cleanup of RenderStateBlock and RenderStateBlockDescriptor classes
- lineWith is now part of the render state and as such, must be explicitly set in the state hash
— This affects all IMPrimitives, especially those rendered via drawBox3D and drawLines

353 IonutCava picture IonutCava Tue 17 Feb, 2015 17:08:27 +0000

[Ionut]
- Compatibility updates for Boost 1.57 (some warnings still exist for now)
- Fixed some non-conforming code
- Added ALL OF THE MISSING FILES FROM THE LAST 15 commits ...........