comparison OrthancStone/Sources/OpenGL/OpenGLFramebuffer.h @ 2060:86e0e92a2e0d deep-learning

added OpenGLTextureArray and OpenGLFramebuffer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 May 2023 16:15:50 +0200
parents
children b6b5e1ca1cc2
comparison
equal deleted inserted replaced
2059:f7cbc58ff44d 2060:86e0e92a2e0d
1 /**
2 * Stone of Orthanc
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
7 *
8 * This program is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation, either version 3 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
21 **/
22
23
24 #pragma once
25
26 #include "OpenGLIncludes.h"
27 #include "IOpenGLContext.h"
28
29 #include <Images/ImageAccessor.h>
30
31 namespace OrthancStone
32 {
33 namespace OpenGL
34 {
35 class OpenGLTexture;
36 class OpenGLTextureArray;
37
38 class OpenGLFramebuffer : public boost::noncopyable
39 {
40 private:
41 IOpenGLContext& context_;
42 GLuint framebuffer_;
43
44 void SetupTextureTarget();
45
46 void ReadContent(Orthanc::ImageAccessor& target);
47
48 public:
49 OpenGLFramebuffer(IOpenGLContext& context);
50
51 ~OpenGLFramebuffer();
52
53 void SetTarget(OpenGLTexture& target);
54
55 void SetTarget(OpenGLTextureArray& target,
56 unsigned int layer);
57
58 void ReadTexture(Orthanc::ImageAccessor& target,
59 const OpenGLTexture& source);
60
61 void ReadTexture(Orthanc::ImageAccessor& target,
62 const OpenGLTextureArray& source,
63 unsigned int layer);
64 };
65 }
66 }