2020-09-10 11:40:07 +02:00
|
|
|
#include "shaderlibrary.h"
|
|
|
|
|
2021-05-13 13:05:05 +02:00
|
|
|
/*!
|
|
|
|
\module ScreenPlayShader
|
|
|
|
\title ScreenPlayShader
|
|
|
|
\brief Module for ScreenPlayShader.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\class ShaderLibrary
|
|
|
|
\inmodule ScreenPlayShader
|
|
|
|
\brief .
|
|
|
|
*/
|
|
|
|
|
2021-05-13 13:35:54 +02:00
|
|
|
/*!
|
|
|
|
* \brief ShaderLibrary::ShaderLibrary
|
|
|
|
* \param parent
|
|
|
|
*/
|
2020-09-10 11:40:07 +02:00
|
|
|
ShaderLibrary::ShaderLibrary(QQuickItem* parent)
|
|
|
|
: QQuickItem(parent)
|
|
|
|
{
|
|
|
|
QFile lightningFragFile(":/lightning.frag");
|
|
|
|
lightningFragFile.open(QIODevice::ReadOnly);
|
|
|
|
QFile lightningVertFile(":/lightning.vert");
|
|
|
|
lightningVertFile.open(QIODevice::ReadOnly);
|
2020-09-13 19:51:20 +02:00
|
|
|
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());
|
2020-09-10 11:40:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ShaderLibrary::~ShaderLibrary()
|
|
|
|
{
|
|
|
|
}
|