add enabled/strength params to setBloom, add setRenderQuality method
This commit is contained in:
@@ -24,6 +24,14 @@ enum ToneMapping
|
||||
LINEAR
|
||||
};
|
||||
|
||||
// copied from Options.h
|
||||
enum TQualityLevel {
|
||||
LOW,
|
||||
MEDIUM,
|
||||
HIGH,
|
||||
ULTRA
|
||||
};
|
||||
|
||||
// View
|
||||
EMSCRIPTEN_KEEPALIVE TViewport View_getViewport(TView *view);
|
||||
EMSCRIPTEN_KEEPALIVE void View_updateViewport(TView *view, uint32_t width, uint32_t height);
|
||||
@@ -37,7 +45,8 @@ EMSCRIPTEN_KEEPALIVE void View_setPostProcessing(TView* tView, bool enabled);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setShadowsEnabled(TView* tView, bool enabled);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setShadowType(TView* tView, int shadowType);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setSoftShadowOptions(TView* tView, float penumbraScale, float penumbraRatioScale);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setBloom(TView* tView, float strength);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setBloom(TView* tView, bool enabled, float strength);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setRenderQuality(TView* tView, TQualityLevel qualityLevel);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setToneMapping(TView* tView, TEngine* tEngine, ToneMapping toneMapping);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setAntiAliasing(TView *tView, bool msaa, bool fxaa, bool taa);
|
||||
EMSCRIPTEN_KEEPALIVE void View_setLayerEnabled(TView *tView, int layer, bool visible);
|
||||
|
||||
@@ -81,12 +81,12 @@ using namespace filament;
|
||||
view->setSoftShadowOptions(opts);
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE void View_setBloom(TView *tView, float strength)
|
||||
EMSCRIPTEN_KEEPALIVE void View_setBloom(TView *tView, bool enabled, float strength)
|
||||
{
|
||||
auto view = reinterpret_cast<View *>(tView);
|
||||
#ifndef __EMSCRIPTEN__
|
||||
decltype(view->getBloomOptions()) opts;
|
||||
opts.enabled = true;
|
||||
opts.enabled = enabled;
|
||||
opts.strength = strength;
|
||||
view->setBloomOptions(opts);
|
||||
#endif
|
||||
@@ -172,8 +172,7 @@ using namespace filament;
|
||||
auto view = reinterpret_cast<View *>(tView);
|
||||
return view->isStencilBufferEnabled();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE void View_pick(TView *tView, uint32_t requestId, uint32_t x, uint32_t y, PickCallback callback)
|
||||
{
|
||||
@@ -196,6 +195,13 @@ using namespace filament;
|
||||
auto *view = reinterpret_cast<View *>(tView);
|
||||
return view->getDithering() == Dithering::TEMPORAL;
|
||||
}
|
||||
EMSCRIPTEN_KEEPALIVE void View_setRenderQuality(TView *tView, TQualityLevel qualityLevel) {
|
||||
auto view = reinterpret_cast<View *>(tView);
|
||||
RenderQuality rq;
|
||||
rq.hdrColorBuffer = (filament::QualityLevel)qualityLevel;
|
||||
view->setRenderQuality(rq);
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user