| 1 |
// Copyright (C) 2020 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
#ifndef HELLOWINDOW_H |
| 5 |
#define HELLOWINDOW_H |
| 6 |
|
| 7 |
#include "window.h" |
| 8 |
|
| 9 |
class HelloWindow : public Window |
| 10 |
{ |
| 11 |
public: |
| 12 |
HelloWindow(QRhi::Implementation graphicsApi); |
| 13 |
|
| 14 |
void customInit() override; |
| 15 |
void customRender() override; |
| 16 |
|
| 17 |
private: |
| 18 |
QShader getShader(const QString &name); |
| 19 |
|
| 20 |
std::unique_ptr<QRhiBuffer> m_vbuf; |
| 21 |
bool m_vbufReady = false; |
| 22 |
std::unique_ptr<QRhiBuffer> m_ubuf; |
| 23 |
std::unique_ptr<QRhiShaderResourceBindings> m_srb; |
| 24 |
std::unique_ptr<QRhiGraphicsPipeline> m_ps; |
| 25 |
|
| 26 |
float m_rotation = 0; |
| 27 |
float m_opacity = 1; |
| 28 |
int m_opacityDir = -1; |
| 29 |
}; |
| 30 |
|
| 31 |
#endif |