Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/OpenGL/OpenGLProgram.h @ 1639:5cdc5b98f14d
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 10 Nov 2020 16:41:11 +0100 |
parents | 8563ea5d8ae4 |
children | 9ac2a65d4172 |
comparison
equal
deleted
inserted
replaced
1638:754ef576d945 | 1639:5cdc5b98f14d |
---|---|
33 { | 33 { |
34 class IOpenGLContext; | 34 class IOpenGLContext; |
35 | 35 |
36 class OpenGLProgram : public boost::noncopyable | 36 class OpenGLProgram : public boost::noncopyable |
37 { | 37 { |
38 private: | |
39 OpenGL::IOpenGLContext& context_; | |
40 GLuint program_; | |
41 | |
38 public: | 42 public: |
39 // WARNING: A global OpenGL context must be active to create this object! | 43 // WARNING: A global OpenGL context must be active to create this object! |
40 // the context is only passed so that it can be checked for loss | 44 // the context is only passed so that it can be checked for loss |
41 // when destructing the program resource | 45 // when destructing the program resource |
42 explicit OpenGLProgram(OpenGL::IOpenGLContext& context); | 46 explicit OpenGLProgram(OpenGL::IOpenGLContext& context); |
50 const std::string& fragmentCode); | 54 const std::string& fragmentCode); |
51 | 55 |
52 GLint GetUniformLocation(const std::string& name); | 56 GLint GetUniformLocation(const std::string& name); |
53 | 57 |
54 GLint GetAttributeLocation(const std::string& name); | 58 GLint GetAttributeLocation(const std::string& name); |
55 | |
56 private: | |
57 GLuint program_; | |
58 OpenGL::IOpenGLContext& context_; | |
59 }; | 59 }; |
60 } | 60 } |
61 } | 61 } |