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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#include "Headers/FileManagement.h"

#include "Core/Headers/XMLEntryData.h"
#include "Core/Headers/Configuration.h"
#include "Core/Headers/PlatformContext.h"

namespace Divide {

namespace Paths {

    stringImpl g_assetsLocation;
    stringImpl g_shadersLocation;
    stringImpl g_texturesLocation;
    stringImpl g_heightmapLocation;
    stringImpl g_imagesLocation;
    stringImpl g_materialsLocation;
    stringImpl g_soundsLocation;
    stringImpl g_xmlDataLocation;
    stringImpl g_navMeshesLocation;
    stringImpl g_scenesLocation;
    stringImpl g_saveLocation;
    stringImpl g_GUILocation;
    stringImpl g_fontsPath;
    stringImpl g_localisationPath;

    namespace Scripts {
        stringImpl g_scriptsLocation;
        stringImpl g_scriptsAtomsLocation;
    };

    namespace Shaders {
        stringImpl g_cacheLocation;
        stringImpl g_cacheLocationText;
        stringImpl g_cacheLocationBin;

        namespace GLSL {
            // these must match the last 4 characters of the atom file
            stringImpl g_fragAtomExt;
            stringImpl g_vertAtomExt;
            stringImpl g_geomAtomExt;
            stringImpl g_tescAtomExt;
            stringImpl g_teseAtomExt;
            stringImpl g_compAtomExt;
            stringImpl g_comnAtomExt;

            // Shader subfolder name that contains shader files for OpenGL
            stringImpl g_parentShaderLoc;
            // Atom folder names in parent shader folder
            stringImpl g_fragAtomLoc;
            stringImpl g_vertAtomLoc;
            stringImpl g_geomAtomLoc;
            stringImpl g_tescAtomLoc;
            stringImpl g_teseAtomLoc;
            stringImpl g_compAtomLoc;
            stringImpl g_comnAtomLoc;
        };

        namespace HLSL {
            stringImpl g_parentShaderLoc;
        };
    };

    std::regex g_includePattern;
    std::regex g_usePattern;

    void initPaths() {
        g_assetsLocation = "assets/";
        g_shadersLocation = "shaders/";
        g_texturesLocation = "textures/";
        g_heightmapLocation = "terrain/";
        g_xmlDataLocation = "XML/";
        g_scenesLocation = "Scenes/";

        g_saveLocation = "SaveData/";
        g_imagesLocation = "misc_images/";
        g_materialsLocation = "materials/";
        g_navMeshesLocation = "navMeshes/";
        g_GUILocation = "GUI/";
        g_fontsPath = "fonts/";
        g_soundsLocation = "sounds/";
        g_localisationPath = "localisation/";
        Scripts::g_scriptsLocation = g_assetsLocation + "scripts/";
        Scripts::g_scriptsAtomsLocation = Scripts::g_scriptsLocation + "atoms/";

        Shaders::g_cacheLocation = "shaderCache/";
        Shaders::g_cacheLocationText = Shaders::g_cacheLocation + "Text/";
        Shaders::g_cacheLocationBin = Shaders::g_cacheLocation + "Binary/";
        // these must match the last 4 characters of the atom file
        Shaders::GLSL::g_fragAtomExt = "frag";
        Shaders::GLSL::g_vertAtomExt = "vert";
        Shaders::GLSL::g_geomAtomExt = "geom";
        Shaders::GLSL::g_tescAtomExt = "tesc";
        Shaders::GLSL::g_teseAtomExt = "tese";
        Shaders::GLSL::g_compAtomExt = ".cpt";
        Shaders::GLSL::g_comnAtomExt = ".cmn";

        Shaders::GLSL::g_parentShaderLoc = "GLSL/";
        Shaders::GLSL::g_fragAtomLoc = "fragmentAtoms/";
        Shaders::GLSL::g_vertAtomLoc = "vertexAtoms/";
        Shaders::GLSL::g_geomAtomLoc = "geometryAtoms/";
        Shaders::GLSL::g_tescAtomLoc = "tessellationCAtoms/";
        Shaders::GLSL::g_teseAtomLoc = "tessellationEAtoms/";
        Shaders::GLSL::g_compAtomLoc = "computeAtoms/";
        Shaders::GLSL::g_comnAtomLoc = "common/";

        Shaders::HLSL::g_parentShaderLoc = "HLSL/";

        g_includePattern = std::regex(R"(^\s*#\s*include\s+["<]([^">]+)*[">])");
        g_usePattern = std::regex(R"(^\s*use\s*\(\s*\"(.*)\"\s*\))");
    }

    void updatePaths(const PlatformContext& context) {
        const Configuration& config = context.config();
        const XMLEntryData& entryData = context.entryData();
        
        g_assetsLocation = entryData.assetsLocation + "/";
        g_shadersLocation = config.defaultShadersLocation + "/";
        g_texturesLocation = config.defaultTextureLocation + "/";
        g_xmlDataLocation = entryData.scriptLocation + "/";
        g_scenesLocation = entryData.scenesLocation + "/";
        Scripts::g_scriptsLocation = g_assetsLocation + "scripts/";
        Scripts::g_scriptsAtomsLocation = Scripts::g_scriptsLocation + "atoms/";
    }

}; //namespace Paths

}; //namespace Divide

Commits for Divide-Framework/trunk/Source Code/Platform/File/FileManagementPaths.cpp

Diff revisions: vs.
Revision Author Commited Message
869 Diff Diff IonutCava picture IonutCava Sun 26 Feb, 2017 23:25:54 +0000

[IonutCava]
- Reduce loading time using profile guided optimizations
- Camera/Quaternion work in an attempt to fix a weird Yaw-rotation bug.

847 Diff Diff IonutCava picture IonutCava Sun 05 Feb, 2017 21:16:24 +0000

[IonutCava]
- Code rot fixes:
— Terrain loading (8 bit heightmap only for now)
— Terrain rendering
— Water Plane loading and rendering
— Reflection and Refraction rendering passes (hack for now: need environment cubemaps as separate from reflect/refract maps for planar rendering)
-— ToDo: Separate Reflection / Refraction render targets to Planar R/R and Cube R/R. Environment probes should use Cube Reflections, Water should use planar reflection targets.
- Added a way to register debug views: texture, shader and params. Viewports get automatically scaled and positioned
— ToDo: Add a hover-preview feature
— ToDo: Add a click-lock preview feature

846 Diff Diff IonutCava picture IonutCava Fri 03 Feb, 2017 22:41:05 +0000

[IonutCava]
- More scripting work

845 Diff Diff IonutCava picture IonutCava Fri 03 Feb, 2017 14:36:26 +0000

[IonutCava]
- Hot reloading system cleanup
- More script system bug fixes

844 Diff Diff IonutCava picture IonutCava Thu 02 Feb, 2017 21:49:28 +0000

[IonutCava]
- More scripting prep work and experiments

840 Diff Diff IonutCava picture IonutCava Wed 01 Feb, 2017 14:06:06 +0000

[IonutCava]
- Fix a bug with hot shader reloading and atom file caching
- Add hot language file reloading.
— Changes made to the current language file will be immediately applied

839 Diff Diff IonutCava picture IonutCava Tue 31 Jan, 2017 17:28:13 +0000

[IonutCava]
- Add simplefilewatcher libary: https://github.com/jameswynn/simplefilewatcher
- Use simplefilewatcher to automatically recompile shaders after save without restarting the app!
— Shaders can now be edited on the fly with automatic rebuild if they used one of the modified atoms.

833 IonutCava picture IonutCava Thu 26 Jan, 2017 22:04:33 +0000

[IonutCava]
- Fix most build errors. Divide-Server does not build for now.