2022-09-23 15:54:49 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_MONOCHROME_OPENGL_PROGRAM_H_
|
|
|
|
#define DUST3D_APPLICATION_MONOCHROME_OPENGL_PROGRAM_H_
|
|
|
|
|
2022-09-24 13:31:49 +00:00
|
|
|
#include <memory>
|
2022-09-23 15:54:49 +00:00
|
|
|
#include <QOpenGLShaderProgram>
|
|
|
|
#include <QOpenGLShader>
|
|
|
|
|
|
|
|
class MonochromeOpenGLProgram: public QOpenGLShaderProgram
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void load(bool isCoreProfile=false);
|
|
|
|
int getUniformLocationByName(const std::string &name);
|
|
|
|
bool isCoreProfile() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void addShaderFromResource(QOpenGLShader::ShaderType type, const char *resourceName);
|
|
|
|
|
|
|
|
bool m_isLoaded = false;
|
|
|
|
bool m_isCoreProfile = false;
|
|
|
|
std::map<std::string, int> m_uniformLocationMap;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|