mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 16:55:25 +08:00
qt 6.6.0 clean
This commit is contained in:
@ -43,7 +43,9 @@ void Window::customInit()
|
||||
if (!m_r->isFeatureSupported(QRhi::TextureArrays))
|
||||
qFatal("Texture array objects are not supported by this backend");
|
||||
|
||||
d.texArr = m_r->newTextureArray(QRhiTexture::RGBA8, ARRAY_SIZE, QSize(512, 512));
|
||||
d.texArr = m_r->newTextureArray(QRhiTexture::RGBA8, ARRAY_SIZE, QSize(512, 512), 1,
|
||||
// mipmaps will be generated, to exercise that too
|
||||
QRhiTexture::MipMapped | QRhiTexture::UsedWithGenerateMips);
|
||||
d.releasePool << d.texArr;
|
||||
d.texArr->create();
|
||||
|
||||
@ -59,7 +61,9 @@ void Window::customInit()
|
||||
img.fill(Qt::yellow);
|
||||
d.initialUpdates->uploadTexture(d.texArr, QRhiTextureUploadDescription(QRhiTextureUploadEntry(3, 0, QRhiTextureSubresourceUploadDescription(img))));
|
||||
|
||||
d.sampler = m_r->newSampler(QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::None,
|
||||
d.initialUpdates->generateMips(d.texArr);
|
||||
|
||||
d.sampler = m_r->newSampler(QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::Linear,
|
||||
QRhiSampler::ClampToEdge, QRhiSampler::ClampToEdge);
|
||||
d.releasePool << d.sampler;
|
||||
d.sampler->create();
|
||||
|
Reference in New Issue
Block a user