Skip to content

Commit a96db2e

Browse files
Merge remote-tracking branch 'overte/master' into application
2 parents c6731d2 + c660c22 commit a96db2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+228
-261
lines changed

interface/src/Application_Setup.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
#include <scripting/DesktopScriptingInterface.h>
9292
#include <scripting/HMDScriptingInterface.h>
9393
#include <scripting/KeyboardScriptingInterface.h>
94+
#include <scripting/SelectionScriptingInterface.h>
9495
#include <scripting/TestScriptingInterface.h>
9596
#include <scripting/TTSScriptingInterface.h>
9697
#include <scripting/WindowScriptingInterface.h>

libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,9 +1748,8 @@ ShapePipelinePointer shapePipelineFactory(const ShapePlumber& plumber, const Sha
17481748
if (!std::get<2>(key)) {
17491749
_pipelines[std::make_tuple(std::get<0>(key), std::get<1>(key), std::get<2>(key), wireframe)] = std::make_shared<render::ShapePipeline>(pipeline, nullptr, nullptr, nullptr);
17501750
} else {
1751-
const auto& fadeEffect = DependencyManager::get<FadeEffect>();
17521751
_pipelines[std::make_tuple(std::get<0>(key), std::get<1>(key), std::get<2>(key), wireframe)] = std::make_shared<render::ShapePipeline>(pipeline, nullptr,
1753-
fadeEffect->getBatchSetter(), fadeEffect->getItemUniformSetter());
1752+
FadeEffect::getBatchSetter(), FadeEffect::getItemUniformSetter());
17541753
}
17551754
}
17561755
}

libraries/entities-renderer/src/RenderableWebEntityItem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void WebEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene
171171
_dpi = entity->getDpi();
172172
_color = entity->getColor();
173173
_alpha = entity->getAlpha();
174-
_wantsKeyboardFocus = entity->wantsKeyboardFocus();
174+
_wantsKeyboardFocus = entity->getWantsKeyboardFocus();
175175
_pulseProperties = entity->getPulseProperties();
176176

177177
if (_contentType == ContentType::NoContent) {

libraries/entities/src/EntityItem.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ public:
397397
QUuid getOwningAvatarIDForProperties() const;
398398

399399
virtual bool wantsHandControllerPointerEvents() const { return false; }
400-
virtual bool wantsKeyboardFocus() const { return false; }
401400
virtual void setProxyWindow(QWindow* proxyWindow) {}
402401
virtual QObject* getEventHandler() { return nullptr; }
403402

libraries/render-utils/src/AmbientOcclusionEffect.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,8 @@ void AmbientOcclusionEffect::run(const render::RenderContextPointer& renderConte
842842
config->setGPUBatchRunTime(_gpuTimer->getGPUAverage(), _gpuTimer->getBatchAverage());
843843
}
844844

845+
gpu::PipelinePointer DebugAmbientOcclusion::_debugPipeline;
846+
845847
void DebugAmbientOcclusion::configure(const Config& config) {
846848
_showCursorPixel = config.showCursorPixel;
847849

@@ -851,7 +853,7 @@ void DebugAmbientOcclusion::configure(const Config& config) {
851853
}
852854
}
853855

854-
const gpu::PipelinePointer& DebugAmbientOcclusion::getDebugPipeline() {
856+
gpu::PipelinePointer& DebugAmbientOcclusion::getDebugPipeline() {
855857
if (!_debugPipeline) {
856858
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render_utils::program::ssao_debugOcclusion);
857859
gpu::StatePointer state = std::make_shared<gpu::State>();

libraries/render-utils/src/AmbientOcclusionEffect.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ class DebugAmbientOcclusion {
283283
};
284284
gpu::StructBuffer<Parameters> _parametersBuffer;
285285

286-
const gpu::PipelinePointer& getDebugPipeline();
286+
static gpu::PipelinePointer& getDebugPipeline();
287287

288-
gpu::PipelinePointer _debugPipeline;
288+
static gpu::PipelinePointer _debugPipeline;
289289

290290
bool _showCursorPixel { false };
291291
};

libraries/render-utils/src/AntialiasingEffect.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ namespace gr {
4040

4141
#if !ANTIALIASING_USE_TAA
4242

43+
gpu::PipelinePointer Antialiasing::_antialiasingPipeline;
44+
gpu::PipelinePointer Antialiasing::_blendPipeline;
45+
4346
Antialiasing::Antialiasing() {
4447
_geometryId = DependencyManager::get<GeometryCache>()->allocateID();
4548
}
@@ -144,6 +147,10 @@ void AntialiasingConfig::setAAMode(int mode) {
144147
emit dirty();
145148
}
146149

150+
gpu::PipelinePointer Antialiasing::_antialiasingPipeline;
151+
gpu::PipelinePointer Antialiasing::_blendPipeline;
152+
gpu::PipelinePointer Antialiasing::_debugBlendPipeline;
153+
147154
Antialiasing::Antialiasing(bool isSharpenEnabled) :
148155
_isSharpenEnabled{ isSharpenEnabled } {
149156
}
@@ -154,7 +161,7 @@ Antialiasing::~Antialiasing() {
154161
_antialiasingTextures[1].reset();
155162
}
156163

157-
const gpu::PipelinePointer& Antialiasing::getAntialiasingPipeline(const render::RenderContextPointer& renderContext) {
164+
gpu::PipelinePointer& Antialiasing::getAntialiasingPipeline() {
158165

159166
if (!_antialiasingPipeline) {
160167
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render_utils::program::taa);
@@ -169,7 +176,7 @@ const gpu::PipelinePointer& Antialiasing::getAntialiasingPipeline(const render::
169176
return _antialiasingPipeline;
170177
}
171178

172-
const gpu::PipelinePointer& Antialiasing::getBlendPipeline() {
179+
gpu::PipelinePointer& Antialiasing::getBlendPipeline() {
173180
if (!_blendPipeline) {
174181
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render_utils::program::fxaa_blend);
175182
gpu::StatePointer state = std::make_shared<gpu::State>();
@@ -180,7 +187,7 @@ const gpu::PipelinePointer& Antialiasing::getBlendPipeline() {
180187
return _blendPipeline;
181188
}
182189

183-
const gpu::PipelinePointer& Antialiasing::getDebugBlendPipeline() {
190+
gpu::PipelinePointer& Antialiasing::getDebugBlendPipeline() {
184191
if (!_debugBlendPipeline) {
185192
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render_utils::program::taa_blend);
186193
gpu::StatePointer state = std::make_shared<gpu::State>();
@@ -260,7 +267,6 @@ void Antialiasing::run(const render::RenderContextPointer& renderContext, const
260267
batch.setViewportTransform(args->_viewport);
261268

262269
// TAA step
263-
getAntialiasingPipeline(renderContext);
264270
batch.setResourceFramebufferSwapChainTexture(ru::Texture::TaaHistory, _antialiasingBuffers, 0);
265271
batch.setResourceTexture(ru::Texture::TaaSource, sourceBuffer->getRenderBuffer(0));
266272
batch.setResourceTexture(ru::Texture::TaaVelocity, velocityBuffer->getVelocityTexture());
@@ -269,9 +275,9 @@ void Antialiasing::run(const render::RenderContextPointer& renderContext, const
269275

270276
batch.setUniformBuffer(ru::Buffer::TaaParams, _params);
271277
batch.setUniformBuffer(ru::Buffer::DeferredFrameTransform, deferredFrameTransform->getFrameTransformBuffer());
272-
278+
273279
batch.setFramebufferSwapChain(_antialiasingBuffers, 1);
274-
batch.setPipeline(getAntialiasingPipeline(renderContext));
280+
batch.setPipeline(getAntialiasingPipeline());
275281
batch.draw(gpu::TRIANGLE_STRIP, 4);
276282

277283
// Blend step

libraries/render-utils/src/AntialiasingEffect.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,18 @@ class Antialiasing {
213213
void configure(const Config& config);
214214
void run(const render::RenderContextPointer& renderContext, const Inputs& inputs);
215215

216-
const gpu::PipelinePointer& getAntialiasingPipeline(const render::RenderContextPointer& renderContext);
217-
const gpu::PipelinePointer& getBlendPipeline();
218-
const gpu::PipelinePointer& getDebugBlendPipeline();
216+
static gpu::PipelinePointer& getAntialiasingPipeline();
217+
static gpu::PipelinePointer& getBlendPipeline();
218+
static gpu::PipelinePointer& getDebugBlendPipeline();
219219

220220
private:
221221

222222
gpu::FramebufferSwapChainPointer _antialiasingBuffers;
223223
gpu::TexturePointer _antialiasingTextures[2];
224224
gpu::BufferPointer _blendParamsBuffer;
225-
gpu::PipelinePointer _antialiasingPipeline;
226-
gpu::PipelinePointer _blendPipeline;
227-
gpu::PipelinePointer _debugBlendPipeline;
225+
static gpu::PipelinePointer _antialiasingPipeline;
226+
static gpu::PipelinePointer _blendPipeline;
227+
static gpu::PipelinePointer _debugBlendPipeline;
228228

229229
TAAParamsBuffer _params;
230230
AntialiasingConfig::Mode _mode{ AntialiasingConfig::TAA };
@@ -251,17 +251,17 @@ class Antialiasing {
251251
void configure(const Config& config) {}
252252
void run(const render::RenderContextPointer& renderContext, const gpu::FramebufferPointer& sourceBuffer);
253253

254-
const gpu::PipelinePointer& getAntialiasingPipeline();
255-
const gpu::PipelinePointer& getBlendPipeline();
254+
static gpu::PipelinePointer& getAntialiasingPipeline();
255+
static gpu::PipelinePointer& getBlendPipeline();
256256

257257
private:
258258
gpu::FramebufferPointer _antialiasingBuffer;
259259

260260
gpu::TexturePointer _antialiasingTexture;
261261
gpu::BufferPointer _paramsBuffer;
262262

263-
gpu::PipelinePointer _antialiasingPipeline;
264-
gpu::PipelinePointer _blendPipeline;
263+
static gpu::PipelinePointer _antialiasingPipeline;
264+
static gpu::PipelinePointer _blendPipeline;
265265
int _geometryId { 0 };
266266
};
267267
#endif

libraries/render-utils/src/BloomEffect.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919

2020
#define BLOOM_BLUR_LEVEL_COUNT 3
2121

22+
gpu::PipelinePointer BloomThreshold::_pipeline;
23+
gpu::PipelinePointer BloomApply::_pipeline;
24+
gpu::PipelinePointer BloomDraw::_pipeline;
25+
gpu::PipelinePointer DebugBloom::_pipeline;
26+
2227
BloomThreshold::BloomThreshold(unsigned int downsamplingFactor) {
2328
assert(downsamplingFactor > 0);
2429
_parameters.edit()._sampleCount = downsamplingFactor;

libraries/render-utils/src/BloomEffect.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class BloomThreshold {
4343

4444
#include "BloomThreshold.shared.slh"
4545

46+
static gpu::PipelinePointer _pipeline;
4647
gpu::FramebufferPointer _outputBuffer;
47-
gpu::PipelinePointer _pipeline;
4848
gpu::StructBuffer<Parameters> _parameters;
4949
};
5050

@@ -68,7 +68,7 @@ class BloomApply {
6868

6969
#include "BloomApply.shared.slh"
7070

71-
gpu::PipelinePointer _pipeline;
71+
static gpu::PipelinePointer _pipeline;
7272
gpu::StructBuffer<Parameters> _parameters;
7373
};
7474

@@ -83,7 +83,7 @@ class BloomDraw {
8383

8484
private:
8585

86-
gpu::PipelinePointer _pipeline;
86+
static gpu::PipelinePointer _pipeline;
8787
};
8888

8989
class DebugBloomConfig : public render::Job::Config {
@@ -125,7 +125,7 @@ class DebugBloom {
125125
void run(const render::RenderContextPointer& renderContext, const Inputs& inputs);
126126

127127
private:
128-
gpu::PipelinePointer _pipeline;
128+
static gpu::PipelinePointer _pipeline;
129129
gpu::BufferPointer _params;
130130
DebugBloomConfig::Mode _mode;
131131
};

0 commit comments

Comments
 (0)