Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/OpenGL/OpenGLProgram.h @ 1571:85e117739eca
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2020 17:46:39 +0200 |
parents | 244ad1e4e76a |
children | 4fb8fdf03314 |
comparison
equal
deleted
inserted
replaced
1570:9a04f42098a3 | 1571:85e117739eca |
---|---|
36 { | 36 { |
37 public: | 37 public: |
38 // WARNING: A global OpenGL context must be active to create this object! | 38 // WARNING: A global OpenGL context must be active to create this object! |
39 // the context is only passed so that it can be checked for loss | 39 // the context is only passed so that it can be checked for loss |
40 // when destructing the program resource | 40 // when destructing the program resource |
41 OpenGLProgram(OpenGL::IOpenGLContext& context); | 41 explicit OpenGLProgram(OpenGL::IOpenGLContext& context); |
42 | 42 |
43 ~OpenGLProgram(); | 43 ~OpenGLProgram(); |
44 | 44 |
45 void Use(); | 45 void Use(); |
46 | 46 |
49 const std::string& fragmentCode); | 49 const std::string& fragmentCode); |
50 | 50 |
51 GLint GetUniformLocation(const std::string& name); | 51 GLint GetUniformLocation(const std::string& name); |
52 | 52 |
53 GLint GetAttributeLocation(const std::string& name); | 53 GLint GetAttributeLocation(const std::string& name); |
54 | |
54 private: | 55 private: |
55 GLuint program_; | 56 GLuint program_; |
56 OpenGL::IOpenGLContext& context_; | 57 OpenGL::IOpenGLContext& context_; |
57 }; | 58 }; |
58 } | 59 } |