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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "Headers/SceneState.h"

#include "Core/Headers/Kernel.h"
#include "Core/Headers/Application.h"

#include "Utility/Headers/Colours.h"

namespace Divide {

FogDescriptor::FogDescriptor()
    : _dirty(true),
     _active(true),
     _density(0.0f),
     _colour(DefaultColours::WHITE().rgb())
{
}

SceneRenderState::SceneRenderState(Scene& parentScene)
    : SceneComponent(parentScene),
      _drawBB(false),
      _drawGeometry(true),
      _drawSkeletons(false),
      _drawBoundingBoxes(false),
      _drawWireframe(false),
      _drawOctreeRegions(false),
      _debugDrawLines(false),
      _debugDrawTargetLines(false),
      _playAnimations(true),
      _currentStagePass(-1)
{
    _gizmoState = GizmoState::NO_GIZMO;
    _cameraMgr = &Application::instance().kernel().getCameraMgr();
}

void SceneRenderState::toggleSkeletons() {
    Console::d_printfn(Locale::get(_ID("TOGGLE_SCENE_SKELETONS")));
    drawSkeletons(!drawSkeletons());
}

void SceneRenderState::toggleBoundingBoxes() {
    Console::d_printfn(Locale::get(_ID("TOGGLE_SCENE_BOUNDING_BOXES")));
    drawBoundingBoxes(!drawBoundingBoxes());
}

void SceneRenderState::toggleAxisLines() {
    static U32 selection = 0;
    Console::d_printfn(Locale::get(_ID("TOGGLE_SCENE_AXIS_GIZMO")));
    selection = (selection + 1) % to_const_uint(GizmoState::COUNT);
    switch (selection) {
        case 0:
            gizmoState(GizmoState::SELECTED_GIZMO);
            break;
        case 1:
            gizmoState(GizmoState::ALL_GIZMO);
            break;
        case 2:
            gizmoState(GizmoState::SCENE_GIZMO);
            break;
        case 3:
            gizmoState(GizmoState::NO_GIZMO);
            break;
    }
}

void SceneRenderState::toggleWireframe() {
    drawWireframe(!drawWireframe());
}

void SceneRenderState::toggleDebugLines() {
    drawDebugLines(!drawDebugLines());
}

void SceneRenderState::toggleGeometry() {
    drawGeometry(!drawGeometry());
}

};  // namespace Divide

Commits for Divide-Framework/trunk/Source Code/Scenes/SceneState.cpp

Diff revisions: vs.
Revision Author Commited Message
750 Diff Diff IonutCava picture IonutCava Thu 07 Jul, 2016 16:02:03 +0000

[IonutCava]
- Static analysis based fixes and improvements

734 Diff Diff IonutCava picture IonutCava Tue 21 Jun, 2016 16:28:11 +0000

[IonutCava]
- Added a render target pool:
— All render targets are now allocated (and tracked) by the GFXDevice.
— Allocation routines return a slim RenderTargetHandle object that will be used later on in draw commands.

- Added a refraction render pass that will handle translucent objects that need refracted textures instead of clear transparency
— Both reflective nodes and refractive nodes are not gathered properly at this point

- All API specific objects (buffers, textures, etc) are now initialized in the GFXDevice class (see GFXDeviceObjects.cpp)
— This allowed for the slimming of the RenderAPIWrapper interface

- Improved ENABLE_GPU_VALIDATION macro utilization:
— It enabled shadow map split plane debugging
— It bypasses loading shaders from text cache

730 Diff Diff IonutCava picture IonutCava Thu 16 Jun, 2016 15:35:07 +0000

[IonutCava]
- More shadow mapping fixes
- Small performance improvements
- Proper per scene XML data loading (e.g. fog)

727 Diff Diff IonutCava picture IonutCava Tue 14 Jun, 2016 16:01:38 +0000

[IonutCava]
- Remove node and cmd buffers from GFXDevice and add them as a new BufferData struct to RenderPass class.
— Each render pass holds its own buffers
- Improvements / fixes to the CSM code
- Added a global toggle to enable/disable custom memory allocators

720 Diff Diff IonutCava picture IonutCava Mon 06 Jun, 2016 15:51:06 +0000

[IonutCava]
- PVS-Studio guided static analysis fixes and optimizations
- Added a flag to SceneState to bypass the Save/Load system not needed for certain types of scenes (menus, cinematics, etc)

713 Diff Diff IonutCava picture IonutCava Wed 25 May, 2016 15:43:38 +0000

[IonutCava]
- Removed all unique_ptr’s from the code with classic new/delete pairs. They were seriously not needed.
- Added the concept of SceneComponent to scene specific classes: aiManager, lightPool, sceneGraph, physicsInterface etc
— This allowed the removal of the global GET_ACTIVE_SCENEGRAPH call;

670 Diff Diff IonutCava picture IonutCava Wed 06 Apr, 2016 16:21:35 +0000

[IonutCava]
- getInstance() renamed to instance() for simplicity (should really go away altogether, but that’s a different issue)
- some particle emitter threading updates

669 Diff Diff IonutCava picture IonutCava Mon 04 Apr, 2016 16:15:35 +0000

[IonutCava]
- Move Task creation calls to TaskPool.h
- Allow tasks to use any pool, but default behaviour is to use the Kernel’s main task pool
- Change image transparency check to use the task pool instead of OpenMP
— Perfect place for future parallel_for implementation
- Warning fixes
- Some method renaming for improved readability

635 Diff Diff IonutCava picture IonutCava Thu 28 Jan, 2016 16:52:38 +0000

[IonutCava]
- Fix a transparency bug
- Octree implementation updates (still not 100% functional)
— Moving node update is buggy
- Octree debug preview system

577 IonutCava picture IonutCava Fri 20 Nov, 2015 15:59:10 +0000

[IonutCava]
- Replace all string indexed maps with unsigned long long indexed maps and add both compile time and runtime hashing functions to convert strings to the proper indices
— Balancing the calls between _ID and _ID_RT can reduce map lookup overhead, especially with ParamHandler and Locale::get