Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/OpenGL/OpenGLProgram.h @ 2057:8bb8d9c0cfd0 deep-learning
added "checkStatus" argument to OpenGLProgram::Use()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Apr 2023 14:39:23 +0200 |
parents | 7053b8a0aaec |
children | fdb012c86a75 |
comparison
equal
deleted
inserted
replaced
2056:66c130af0d3c | 2057:8bb8d9c0cfd0 |
---|---|
46 // when destructing the program resource | 46 // when destructing the program resource |
47 explicit OpenGLProgram(OpenGL::IOpenGLContext& context); | 47 explicit OpenGLProgram(OpenGL::IOpenGLContext& context); |
48 | 48 |
49 ~OpenGLProgram(); | 49 ~OpenGLProgram(); |
50 | 50 |
51 void Use(); | 51 // WARNING: Setting "checkStatus" to "true" impacts performance: |
52 // Calling "glGetError()" seems like a costly operation in WebGL | |
53 void Use(bool checkStatus); | |
52 | 54 |
53 // WARNING: A global OpenGL context must be active to run this method! | 55 // WARNING: A global OpenGL context must be active to run this method! |
54 void CompileShaders(const std::string& vertexCode, | 56 void CompileShaders(const std::string& vertexCode, |
55 const std::string& fragmentCode); | 57 const std::string& fragmentCode); |
56 | 58 |