mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
e8fbe8e565
Update to qdoc Qt 6.1 Add module for every project
34 lines
887 B
C++
34 lines
887 B
C++
#include "shaderlibrary.h"
|
|
|
|
/*!
|
|
\module ScreenPlayShader
|
|
\title ScreenPlayShader
|
|
\brief Module for ScreenPlayShader.
|
|
*/
|
|
|
|
/*!
|
|
\class ShaderLibrary
|
|
\inmodule ScreenPlayShader
|
|
\brief .
|
|
*/
|
|
|
|
ShaderLibrary::ShaderLibrary(QQuickItem* parent)
|
|
: QQuickItem(parent)
|
|
{
|
|
QFile lightningFragFile(":/lightning.frag");
|
|
lightningFragFile.open(QIODevice::ReadOnly);
|
|
QFile lightningVertFile(":/lightning.vert");
|
|
lightningVertFile.open(QIODevice::ReadOnly);
|
|
m_lightning = std::make_unique<Shader>(lightningVertFile.readAll(), lightningFragFile.readAll());
|
|
|
|
QFile waterFragFile(":/water.frag");
|
|
waterFragFile.open(QIODevice::ReadOnly);
|
|
QFile waterVertFile(":/water.vert");
|
|
waterVertFile.open(QIODevice::ReadOnly);
|
|
m_water = std::make_unique<Shader>(waterVertFile.readAll(), waterFragFile.readAll());
|
|
}
|
|
|
|
ShaderLibrary::~ShaderLibrary()
|
|
{
|
|
}
|