Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/OpenGL/OpenGLProgram.cpp @ 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 |
---|---|
28 | 28 |
29 namespace OrthancStone | 29 namespace OrthancStone |
30 { | 30 { |
31 namespace OpenGL | 31 namespace OpenGL |
32 { | 32 { |
33 OpenGLProgram::OpenGLProgram(OpenGL::IOpenGLContext& context) | 33 OpenGLProgram::OpenGLProgram(OpenGL::IOpenGLContext& context) : |
34 : context_(context) | 34 context_(context) |
35 { | 35 { |
36 program_ = glCreateProgram(); | 36 program_ = glCreateProgram(); |
37 ORTHANC_OPENGL_CHECK("glCreateProgram"); | 37 ORTHANC_OPENGL_CHECK("glCreateProgram"); |
38 | |
38 if (program_ == 0) | 39 if (program_ == 0) |
39 { | 40 { |
40 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, | 41 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, |
41 "Cannot create an OpenGL program"); | 42 "Cannot create an OpenGL program"); |
42 } | 43 } |