History

Split global JS Scene into Render

Zach Pomerantz committed 10 years ago

Commit 919a4b61 parent e1793269 files · +296 −280Browse files

Showing the changes to libraries/render-utils/src/RenderScriptingInterface.cpp (1 of 9 files). Show all

Unified · Split

libraries/render-utils/src/RenderScriptingInterface.cpp+41−0
@@ -0,0 +1,41 @@
1+//
2+// RenderScriptingInterface.cpp
3+// libraries/render-utils
4+//
5+// Created by Zach Pomerantz on 12/16/15.
6+// Copyright 2015 High Fidelity, Inc.
7+//
8+// Distributed under the Apache License, Version 2.0.
9+// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10+//
11+
12+#include "RenderScriptingInterface.h"
13+
14+RenderScriptingInterface::RenderScriptingInterface() {};
15+
16+void RenderScriptingInterface::setEngineToneMappingToneCurve(const QString& toneCurve) {
17+ if (toneCurve == QString("None")) {
18+ _tone._toneCurve = 0;
19+ } else if (toneCurve == QString("Gamma22")) {
20+ _tone._toneCurve = 1;
21+ } else if (toneCurve == QString("Reinhard")) {
22+ _tone._toneCurve = 2;
23+ } else if (toneCurve == QString("Filmic")) {
24+ _tone._toneCurve = 3;
25+ }
26+}
27+
28+QString RenderScriptingInterface::getEngineToneMappingToneCurve() const {
29+ switch (_tone._toneCurve) {
30+ case 0:
31+ return QString("None");
32+ case 1:
33+ return QString("Gamma22");
34+ case 2:
35+ return QString("Reinhard");
36+ case 3:
37+ return QString("Filmic");
38+ default:
39+ return QString("Filmic");
40+ };
41+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t