Graphite  Version 3
An experimental 3D geometry processing program
rendering_context.h
1 /*
2  * GXML/Graphite: Geometry and Graphics Programming Library + Utilities
3  * Copyright (C) 2000 Bruno Levy
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  * If you modify this software, you should include a notice giving the
20  * name of the person performing the modification, the date of modification,
21  * and the reason for such modification.
22  *
23  * Contact: Bruno Levy
24  *
25  * levy@loria.fr
26  *
27  * ISA Project
28  * LORIA, INRIA Lorraine,
29  * Campus Scientifique, BP 239
30  * 54506 VANDOEUVRE LES NANCY CEDEX
31  * FRANCE
32  *
33  * Note that the GNU General Public License does not permit incorporating
34  * the Software into proprietary programs.
35  */
36 
37 
38 #ifndef H_SKIN_IMGUI_RENDERING_CONTEXT_H
39 #define H_SKIN_IMGUI_RENDERING_CONTEXT_H
40 
43 
44 #include <geogram/image/color.h>
45 #include <geogram_gfx/GLUP/GLUP.h>
46 
47 namespace OGF {
48 
56  public:
57 
64  GLUPcontext glup_context
65  ) : RenderingContext(glup_context) {
66  }
67 
71  void begin_frame() override;
72 
76  void end_frame() override;
77 
81  void resize(index_t w, index_t h) override;
82 
87 
99  void snapshot(Image* image, bool hide_gui=true);
100 
101  private:
102  FrameBufferObject FBO_;
103  };
104 
105 }
106 
107 #endif
GLUP: GL Useful Primitives.
void * GLUPcontext
Opaque identifier of a GLUP context.
Definition: GLUP.h:90
An OpenGL frame buffer object.
An image.
Definition: image.h:59
Helper class for OpenGL context management.
A class derived from RenderingContext that interfaces the Application class with Graphite.
void resize(index_t w, index_t h) override
Must be called whenever the rendering context is resized.
void begin_frame() override
Begins a new frame.
SkinImGUIRenderingContext(GLUPcontext glup_context)
SkinImGUIRenderingContext constructor.
void snapshot(Image *image, bool hide_gui=true)
Copies the content of this RenderingContext to an Image.
void end_frame() override
Terminates a frame.
void draw_last_frame()
Draws the frame that was rendered in the FBO.
Color types.
geo_index_t index_t
The type for storing and manipulating indices.
Definition: numeric.h:329
Global Graphite namespace.
Definition: common.h:76
Helper class for OpenGL context management.
Definitions common to all include files in the skin_imgui library.