Mercurial > hg > orthanc-stone
comparison Framework/OpenGL/OpenGLShader.h @ 579:fadacfbf5538
OpenGL programs and textures
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 19 Apr 2019 16:06:45 +0200 |
parents | 21fd70df3fc9 |
children | d933fc19214a |
comparison
equal
deleted
inserted
replaced
578:21fd70df3fc9 | 579:fadacfbf5538 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 | |
25 #if !defined(ORTHANC_ENABLE_OPENGL) | 24 #if !defined(ORTHANC_ENABLE_OPENGL) |
26 # error The macro ORTHANC_ENABLE_OPENGL must be defined | 25 # error The macro ORTHANC_ENABLE_OPENGL must be defined |
27 #endif | 26 #endif |
28 | 27 |
29 #if ORTHANC_ENABLE_OPENGL != 1 | 28 #if ORTHANC_ENABLE_OPENGL != 1 |
30 # error Support for OpenGL is disabled | 29 # error Support for OpenGL is disabled |
31 #endif | 30 #endif |
32 | 31 |
33 #include <EmbeddedResources.h> | 32 #include <string> |
34 | |
35 #include <GL/gl.h> | 33 #include <GL/gl.h> |
36 #include <boost/noncopyable.hpp> | 34 #include <boost/noncopyable.hpp> |
37 | 35 |
38 namespace OrthancStone | 36 namespace OrthancStone |
39 { | 37 { |
47 | 45 |
48 public: | 46 public: |
49 OpenGLShader(GLenum type, | 47 OpenGLShader(GLenum type, |
50 const std::string& source); | 48 const std::string& source); |
51 | 49 |
52 OpenGLShader(GLenum type, | |
53 Orthanc::EmbeddedResources::FileResourceId resource); | |
54 | |
55 ~OpenGLShader(); | 50 ~OpenGLShader(); |
56 | 51 |
57 bool IsValid() const | 52 bool IsValid() const |
58 { | 53 { |
59 return isValid_; | 54 return isValid_; |