dust3d/application/sources/model_opengl_program.h

22 lines
567 B
C
Raw Normal View History

2022-09-19 13:30:03 +00:00
#ifndef DUST3D_APPLICATION_MODEL_OPENGL_PROGRAM_H_
#define DUST3D_APPLICATION_MODEL_OPENGL_PROGRAM_H_
#include <QOpenGLShaderProgram>
2022-09-20 12:48:22 +00:00
#include <QOpenGLShader>
2022-09-19 13:30:03 +00:00
class ModelOpenGLProgram: public QOpenGLShaderProgram
{
public:
void load(bool isCoreProfile=false);
2022-09-20 12:48:22 +00:00
int getUniformLocationByName(const char *name);
2022-09-19 13:30:03 +00:00
private:
2022-09-20 12:48:22 +00:00
void addShaderFromResource(QOpenGLShader::ShaderType type, const char *resourceName);
2022-09-19 13:30:03 +00:00
bool m_isLoaded = false;
bool m_isCoreProfile = false;
2022-09-20 12:48:22 +00:00
std::map<std::string, int> m_uniformLocationMap;
2022-09-19 13:30:03 +00:00
};
#endif