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
#include "Headers/SceneState.h"

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

namespace Divide {

SceneRenderState::SceneRenderState(Scene& parentScene)
    : SceneComponent(parentScene),
      _drawBB(false),
      _drawGeometry(true),
      _drawSkeletons(false),
      _drawBoundingBoxes(false),
      _drawWireframe(false),
      _drawOctreeRegions(false),
      _debugDrawLines(false),
      _debugDrawTargetLines(false),
      _playAnimations(true),
      _currentShadowLightIndex(-1),
      _currentReflectorIndex(-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 %= 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
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 Diff Diff 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

408 Diff Diff IonutCava picture IonutCava Thu 23 Apr, 2015 15:44:51 +0000

[Ionut]
- Fixed shadow map rendering using the new batching system (W.I.P.)
- Modified the Skeleton/Wireframe/BoundingBox/Geometry toggle system in SceneRenderState

407 Diff Diff IonutCava picture IonutCava Wed 22 Apr, 2015 16:05:42 +0000

[Ionut]
- Fixed a bug in last commit that caused all skeletons in a scene to render (RenderingComponent)
- Some profile guided optimizations and code cleanup of SceneState

366 IonutCava picture IonutCava Tue 10 Mar, 2015 16:56:30 +0000

[Ionut]
- More type safe enum replacement