39 const char* vertexShaderSource, |
39 const char* vertexShaderSource, |
40 const char* fragmentShaderSource); |
40 const char* fragmentShaderSource); |
41 void checkForGLErrors(QWidget* parent); |
41 void checkForGLErrors(QWidget* parent); |
42 inline glm::vec3 colorToVector3(const QColor& color) |
42 inline glm::vec3 colorToVector3(const QColor& color) |
43 { |
43 { |
44 return {toFloat(color.redF()), toFloat(color.greenF()), toFloat(color.blueF())}; |
44 return {float_cast(color.redF()), float_cast(color.greenF()), float_cast(color.blueF())}; |
45 } |
45 } |
46 inline glm::vec4 colorToVector4(const QColor& color) |
46 inline glm::vec4 colorToVector4(const QColor& color) |
47 { |
47 { |
48 return {gl::colorToVector3(color), toFloat(color.alphaF())}; |
48 return {gl::colorToVector3(color), float_cast(color.alphaF())}; |
49 } |
49 } |
50 } |
50 } |
51 |
51 |
52 class gl::ShaderProgram : public QOpenGLShaderProgram |
52 class gl::ShaderProgram : public QOpenGLShaderProgram |
53 { |
53 { |