dust3d/application/sources/monochrome_opengl_program.h

23 lines
643 B
C
Raw Normal View History

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