add missing method handlers on Windows and use 32bit depth buffer for render target by default

This commit is contained in:
Nick Fisher
2023-09-28 10:46:20 +10:00
parent d502450f9e
commit fd843147ad
7 changed files with 19 additions and 14 deletions

View File

@@ -602,7 +602,7 @@ void FilamentViewer::createRenderTarget(intptr_t textureId, uint32_t width, uint
.height(height)
.levels(1)
.usage(filament::Texture::Usage::DEPTH_ATTACHMENT)
.format(filament::Texture::InternalFormat::DEPTH24)
.format(filament::Texture::InternalFormat::DEPTH32F)
.build(*_engine);
_rt = filament::RenderTarget::Builder()
.texture(RenderTarget::AttachmentPoint::COLOR, _rtColor)
@@ -901,6 +901,10 @@ void FilamentViewer::updateViewportAndCameraProjection(
contentScaleFactor);
}
void FilamentViewer::setViewFrustumCulling(bool enabled) {
_view->setFrustumCullingEnabled(enabled);
}
void FilamentViewer::setCameraPosition(float x, float y, float z) {
Camera& cam =_view->getCamera();