src/gl/common.h

changeset 206
654661eab7f3
parent 200
ca23936b455b
child 210
232e7634cc8a
equal deleted inserted replaced
205:1a4342d80de7 206:654661eab7f3
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 {

mercurial