diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-05-27 17:44:49 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-05-28 17:53:32 +0200 |
commit | 56977990e04efa051b1ebd4ce9274d6b69c7bd0c (patch) | |
tree | eaa66635b67faaf94df7b0670fa9e0971268a936 /src/gui/rhi/qrhigles2_p_p.h | |
parent | c991d87ee2c239fedb77f76f25936dddf5eb5982 (diff) |
rhi: Harmonize create-destroy API pattern with the rest of Qt
For historical reasons we use build and release instead of create and
destroy. This becomes confusing now that more modules in Qt start taking
QRhi into use. Migrate to the more familiar naming, so those who have
used QWindow or QOpenGLContext before will find it natural.
Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2_p_p.h')
-rw-r--r-- | src/gui/rhi/qrhigles2_p_p.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h index 65ac3ccb67..2c393da3b4 100644 --- a/src/gui/rhi/qrhigles2_p_p.h +++ b/src/gui/rhi/qrhigles2_p_p.h @@ -62,8 +62,8 @@ struct QGles2Buffer : public QRhiBuffer { QGles2Buffer(QRhiImplementation *rhi, Type type, UsageFlags usage, int size); ~QGles2Buffer(); - void release() override; - bool build() override; + void destroy() override; + bool create() override; QRhiBuffer::NativeBuffer nativeBuffer() override; GLuint buffer = 0; @@ -92,8 +92,8 @@ struct QGles2RenderBuffer : public QRhiRenderBuffer int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint); ~QGles2RenderBuffer(); - void release() override; - bool build() override; + void destroy() override; + bool create() override; QRhiTexture::Format backingFormat() const override; GLuint renderbuffer = 0; @@ -132,12 +132,12 @@ struct QGles2Texture : public QRhiTexture QGles2Texture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int sampleCount, Flags flags); ~QGles2Texture(); - void release() override; - bool build() override; - bool buildFrom(NativeTexture src) override; + void destroy() override; + bool create() override; + bool createFrom(NativeTexture src) override; NativeTexture nativeTexture() override; - bool prepareBuild(QSize *adjustedSize = nullptr); + bool prepareCreate(QSize *adjustedSize = nullptr); GLuint texture = 0; bool owns = true; @@ -175,8 +175,8 @@ struct QGles2Sampler : public QRhiSampler QGles2Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w); ~QGles2Sampler(); - void release() override; - bool build() override; + void destroy() override; + bool create() override; QGles2SamplerData d; uint generation = 0; @@ -187,7 +187,7 @@ struct QGles2RenderPassDescriptor : public QRhiRenderPassDescriptor { QGles2RenderPassDescriptor(QRhiImplementation *rhi); ~QGles2RenderPassDescriptor(); - void release() override; + void destroy() override; bool isCompatible(const QRhiRenderPassDescriptor *other) const override; }; @@ -208,7 +208,7 @@ struct QGles2ReferenceRenderTarget : public QRhiRenderTarget { QGles2ReferenceRenderTarget(QRhiImplementation *rhi); ~QGles2ReferenceRenderTarget(); - void release() override; + void destroy() override; QSize pixelSize() const override; float devicePixelRatio() const override; @@ -221,14 +221,14 @@ struct QGles2TextureRenderTarget : public QRhiTextureRenderTarget { QGles2TextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags); ~QGles2TextureRenderTarget(); - void release() override; + void destroy() override; QSize pixelSize() const override; float devicePixelRatio() const override; int sampleCount() const override; QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() override; - bool build() override; + bool create() override; QGles2RenderTargetData d; GLuint framebuffer = 0; @@ -239,8 +239,8 @@ struct QGles2ShaderResourceBindings : public QRhiShaderResourceBindings { QGles2ShaderResourceBindings(QRhiImplementation *rhi); ~QGles2ShaderResourceBindings(); - void release() override; - bool build() override; + void destroy() override; + bool create() override; uint generation = 0; friend class QRhiGles2; @@ -270,8 +270,8 @@ struct QGles2GraphicsPipeline : public QRhiGraphicsPipeline { QGles2GraphicsPipeline(QRhiImplementation *rhi); ~QGles2GraphicsPipeline(); - void release() override; - bool build() override; + void destroy() override; + bool create() override; GLuint program = 0; GLenum drawMode = GL_TRIANGLES; @@ -285,8 +285,8 @@ struct QGles2ComputePipeline : public QRhiComputePipeline { QGles2ComputePipeline(QRhiImplementation *rhi); ~QGles2ComputePipeline(); - void release() override; - bool build() override; + void destroy() override; + bool create() override; GLuint program = 0; QVector<QGles2UniformDescription> uniforms; @@ -299,7 +299,7 @@ struct QGles2CommandBuffer : public QRhiCommandBuffer { QGles2CommandBuffer(QRhiImplementation *rhi); ~QGles2CommandBuffer(); - void release() override; + void destroy() override; struct Command { enum Cmd { @@ -662,7 +662,7 @@ struct QGles2SwapChain : public QRhiSwapChain { QGles2SwapChain(QRhiImplementation *rhi); ~QGles2SwapChain(); - void release() override; + void destroy() override; QRhiCommandBuffer *currentFrameCommandBuffer() override; QRhiRenderTarget *currentFrameRenderTarget() override; @@ -670,7 +670,7 @@ struct QGles2SwapChain : public QRhiSwapChain QSize surfacePixelSize() override; QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() override; - bool buildOrResize() override; + bool createOrResize() override; QSurface *surface = nullptr; QSize pixelSize; |